/* Português Visual — folha de estilo única (sem build step).
   Tokens de cor e espaçamento replicados do projeto Next.js original
   (src/app/globals.css e tailwind.config.ts) para manter o mesmo aspeto. */

:root {
  --background: #ffffff;
  --foreground: #1c2333;
  --card: #ffffff;
  --card-foreground: #1c2333;

  --primary: #2563eb;        /* azul principal */
  --primary-foreground: #ffffff;

  --secondary: #eaf1fe;      /* pastel azul claro */
  --secondary-foreground: #1f3f82;

  --muted: #f2f4f7;
  --muted-foreground: #6b7280;

  --accent: #f1ecfb;
  --accent-foreground: #4a3580;

  --destructive: #dc2626;
  --destructive-foreground: #ffffff;

  --success-bg: #d1fae5;
  --success-fg: #047857;

  --border: #e6e8ee;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }
.space-y-10 > * + * { margin-top: 40px; }

/* ---------- layout com navegação lateral ---------- */
.app-shell { display: flex; min-height: 100dvh; background: var(--background); }

.sidebar {
  display: none;
  flex-direction: column;
  width: 256px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--card);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar-logo { font-weight: 800; color: var(--primary); font-size: 18px; padding: 0 8px 24px; display: block; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--muted-foreground);
}
.sidebar-link:hover { background: var(--muted); color: var(--foreground); }
.sidebar-link.active { background: var(--secondary); color: var(--secondary-foreground); }

.mobile-nav {
  display: flex;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.97);
}
.mobile-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 2px; font-size: 11px; font-weight: 500; color: var(--muted-foreground);
}
.mobile-nav a.active { color: var(--primary); }

.content { min-width: 0; flex: 1; padding-bottom: 80px; }

@media (min-width: 768px) {
  .sidebar { display: flex; }
  .mobile-nav { display: none; }
  .content { padding-bottom: 0; }
}

/* ---------- componentes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 600; font-size: 14px;
  padding: 10px 20px; border: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: var(--background); border: 1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--muted); }
.btn-muted { background: var(--muted); color: var(--muted-foreground); cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-full { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.badge-default { background: rgba(37,99,235,0.1); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success-fg); }
.badge-muted { background: var(--muted); color: var(--muted-foreground); }

.input {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; background: var(--background); color: var(--foreground);
}

h1 { font-size: 26px; font-weight: 700; margin: 0; }
h2 { font-size: 20px; font-weight: 700; margin: 0; }
.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }

/* ---------- grelha de produtos ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card .cover { aspect-ratio: 3 / 4; background: var(--muted); overflow: hidden; }
.product-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1; }
.product-card .title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.product-card .desc { font-size: 12.5px; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }

/* ---------- páginas simples ---------- */
.center-page { max-width: 420px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 0 24px; text-align: left; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }

/* ---------- admin ---------- */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); background: var(--card); padding: 12px 24px;
}
.admin-nav { display: flex; gap: 20px; font-size: 14px; }
.admin-nav a { color: var(--muted-foreground); }
.admin-nav a:hover { color: var(--foreground); }
.admin-body { padding: 32px 24px; background: #fafbfc; min-height: 100dvh; }
.admin-stat { padding: 20px; }
.admin-stat .label { font-size: 13px; color: var(--muted-foreground); }
.admin-stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.flash-success { background: var(--success-bg); color: var(--success-fg); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
