/* ============================================================
   PODZ EXPRESS — Mobile-First Premium Design
   ============================================================ */

/* ── Reset & Variáveis ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #16a34a;
  --green-light: #22c55e;
  --green-dark:  #15803d;
  --green-glow:  rgba(22, 163, 74, .25);
  --green-50:    #f0fdf4;
  --green-100:   #dcfce7;
  --green-200:   #bbf7d0;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-600:    #475569;
  --gray-700:    #334155;
  --gray-800:    #1e293b;
  --gray-900:    #0f172a;
  --red:         #ef4444;
  --red-dark:    #dc2626;
  --whatsapp:    #25d366;
  --whatsapp-d:  #1ebe5a;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 12px 32px rgba(0,0,0,.14);
  --shadow-xl:   0 24px 48px rgba(0,0,0,.18);
  --r-sm:        8px;
  --r:           14px;
  --r-lg:        20px;
  --r-xl:        28px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --t:           0.2s ease;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); outline: none; }
ul { list-style: none; }

/* ── Utilitários ───────────────────────────────────────────── */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { max-width: 960px; } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOTÕES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary   { background: var(--green);       color: #fff; }
.btn-primary:hover  { background: var(--green-dark); box-shadow: 0 4px 12px var(--green-glow); }
.btn-outline   { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover  { background: var(--green-50); }
.btn-danger    { background: var(--red);          color: #fff; }
.btn-danger:hover   { background: var(--red-dark); }
.btn-ghost     { background: var(--gray-100);     color: var(--gray-700); }
.btn-ghost:hover    { background: var(--gray-200); }
.btn-success   { background: var(--green-light);  color: #fff; }

.btn-sm  { padding: 7px 14px; font-size: 12px; }
.btn-lg  { padding: 14px 28px; font-size: 15px; border-radius: var(--r); }
.btn-xl  { padding: 17px 32px; font-size: 16px; border-radius: var(--r); font-weight: 700; }
.btn-full { width: 100%; justify-content: center; }

/* WhatsApp */
.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 17px 28px;
  border-radius: var(--r);
  width: 100%;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
  letter-spacing: .2px;
}
.btn-whatsapp:hover, .btn-whatsapp:active {
  background: var(--whatsapp-d);
  box-shadow: 0 8px 28px rgba(37,211,102,.5);
  transform: translateY(-1px);
}
.btn-whatsapp svg { width: 22px; height: 22px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORMULÁRIOS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 500px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--gray-300); border-radius: 26px; transition: .3s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--green-light); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-label { font-size: 14px; color: var(--gray-700); font-weight: 500; }

/* Image preview */
.img-preview-wrap {
  width: 110px; height: 110px;
  border-radius: var(--r);
  overflow: hidden;
  border: 2px dashed var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100);
  cursor: pointer;
  transition: border-color var(--t);
}
.img-preview-wrap:hover { border-color: var(--green-light); }
.img-preview-wrap img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--gray-400); font-size: 11px; }
.img-preview-placeholder svg { width: 28px; height: 28px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALERTAS & BADGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.alert-success { background: var(--green-50); color: #166534; border: 1px solid var(--green-200); }
.alert-error   { background: #fef2f2; color: var(--red-dark); border: 1px solid #fecaca; }
.alert-close { margin-left: auto; font-size: 20px; opacity:.5; cursor:pointer; line-height:1; padding:0 2px; }
.alert-close:hover { opacity:1; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-green  { background: var(--green-100); color: #166534; }
.badge-gray   { background: var(--gray-100);  color: var(--gray-600); }
.badge-red    { background: #fef2f2;          color: var(--red-dark); }
.badge-dot::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER PÚBLICO — App style
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.site-header .container {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 58px;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.logo-text {
  font-size: 20px; font-weight: 900;
  color: var(--green); letter-spacing: -1px;
}
.logo-img { height: 40px; width: auto; object-fit: contain; }

.header-nav { display: none; gap: 6px; align-items: center; }
@media (min-width: 640px) { .header-nav { display: flex; } }
.nav-link {
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  transition: all var(--t);
}
.nav-link:hover { color: var(--green); background: var(--green-50); }
.nav-admin { background: var(--green); color: white !important; border-radius: 99px !important; }
.nav-admin:hover { background: var(--green-dark) !important; }

.mobile-menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: var(--r-sm);
}
.mobile-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: all var(--t);
}
@media (min-width: 640px) { .mobile-menu-btn { display: none; } }

.mobile-nav {
  display: none; flex-direction: column;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--gray-100);
  background: var(--white);
  gap: 2px;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { display: block; padding: 11px 12px; }

.site-main { min-height: calc(100vh - 58px - 70px); }

/* Footer público */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.5);
  padding: 24px 0;
  margin-top: 0;
}
.footer-inner { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.footer-brand { font-weight: 900; color: var(--green-light); font-size: 15px; letter-spacing: -0.5px; }
.footer-sep   { color: rgba(255,255,255,.2); }
.footer-copy  { font-size: 13px; }
.footer-note  { text-align: center; font-size: 12px; margin-top: 6px; opacity: .4; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO — mobile-first bold
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero {
  background: var(--gray-900);
  color: var(--white);
  padding: 36px 0 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(22,163,74,.35) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--green-light);
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(26px, 8vw, 44px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--green-light); }
.hero p {
  font-size: 14px; opacity: .65;
  max-width: 320px; margin: 0 auto;
  line-height: 1.7;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRODUTO CARDS — Mobile app feel
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.catalog-section { padding: 24px 0 100px; }
.section-label {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--green); margin-bottom: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 500px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.product-card {
  background: var(--white);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:active { transform: scale(.98); }
@media (hover: hover) {
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}

.product-card-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-100);
}
.product-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card-img { transform: scale(1.04); }

.product-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}
.product-card-placeholder svg { width: 40px; height: 40px; color: var(--green-light); opacity:.5; }

.product-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--green); color: white;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .5px;
}

.product-card-body {
  padding: 12px;
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.product-card-name {
  font-size: 13px; font-weight: 700;
  color: var(--gray-900); line-height: 1.3;
}
.product-card-price {
  font-size: 16px; font-weight: 900;
  color: var(--green); letter-spacing: -0.3px;
}
.product-card-price-wrap {
  display: flex; flex-direction: column; gap: 1px;
}
/* Preço com desconto */
.price-original {
  font-size: 12px; font-weight: 600;
  color: var(--green);
  text-decoration: line-through;
  opacity: .75;
}
.price-sale {
  font-size: 16px; font-weight: 900;
  color: #dc2626;
  letter-spacing: -0.3px;
}
/* Preço normal (sem desconto) */
.price-normal {
  font-size: 16px; font-weight: 900;
  color: var(--green); letter-spacing: -0.3px;
}
/* Produto página */
.price-tag-normal { font-size: 32px; font-weight: 900; color: var(--green); letter-spacing: -1.5px; }
.price-tag-sale   { font-size: 32px; font-weight: 900; color: #dc2626;     letter-spacing: -1.5px; }
.price-tag-from {
  font-size: 16px; font-weight: 600; color: var(--green);
  text-decoration: line-through; opacity: .7;
  margin-bottom: 2px;
}
.discount-pill {
  display: inline-flex; align-items: center;
  background: #fef2f2; color: #b91c1c;
  font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .5px;
  margin-left: 10px; vertical-align: middle;
}

.product-card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--green);
  display: flex; align-items: center; gap: 4px;
}
.product-card-cta svg { width: 14px; height: 14px; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state svg { width: 64px; height: 64px; color: var(--gray-300); margin: 0 auto 16px; }
.empty-state h3 { font-size: 18px; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p  { color: var(--gray-400); font-size: 14px; }

/* WhatsApp floating CTA na home */
.wpp-banner {
  margin: 0 16px 24px;
  background: linear-gradient(135deg, #064e3b, #065f46);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(34,197,94,.2);
}
.wpp-banner-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(37,211,102,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.wpp-banner-icon svg { width: 24px; height: 24px; color: #25d366; }
.wpp-banner-text h4 { font-size: 14px; font-weight: 700; color: white; margin-bottom: 2px; }
.wpp-banner-text p  { font-size: 12px; color: rgba(255,255,255,.55); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PÁGINA DO PRODUTO — Mobile optimized
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.product-page { padding-bottom: 120px; }

.product-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray-400);
  padding: 14px 0 4px;
}
.product-breadcrumb a { color: var(--green); font-weight: 500; }
.product-breadcrumb span { color: var(--gray-300); }

.product-hero-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gray-100);
  border-radius: 0;
}
.product-hero-placeholder {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--green-50), var(--green-100));
}
.product-hero-placeholder svg { width: 80px; height: 80px; color: var(--green-light); opacity: .4; }

/* Desktop layout */
@media (min-width: 768px) {
  .product-detail-wrap {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 36px; align-items: start;
    padding: 32px 0;
  }
  .product-hero-img, .product-hero-placeholder {
    border-radius: var(--r-lg);
  }
  .product-page { padding-bottom: 60px; }
}

.product-info { padding: 20px 16px; }
@media (min-width: 768px) { .product-info { padding: 0; } }

.product-name {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900; color: var(--gray-900);
  letter-spacing: -1px; margin-bottom: 8px; line-height: 1.1;
}
.product-price-tag {
  font-size: 32px; font-weight: 900;
  color: var(--green); letter-spacing: -1px;
  margin-bottom: 16px; line-height: 1;
}
.product-price-tag small {
  font-size: 15px; font-weight: 600; opacity: .6; letter-spacing: 0;
}
.product-desc {
  font-size: 14px; color: var(--gray-500);
  line-height: 1.8; margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

/* Flavor chips */
.flavor-heading {
  font-size: 12px; font-weight: 800;
  color: var(--gray-700); text-transform: uppercase;
  letter-spacing: .8px; margin-bottom: 12px;
}
.flavor-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.flavor-btn {
  padding: 9px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 13px; font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.flavor-btn:active { transform: scale(.95); }
.flavor-btn.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 4px 12px var(--green-glow);
}
.flavor-btn:disabled {
  opacity: .35; cursor: not-allowed;
  text-decoration: line-through; font-style: italic;
}
.flavor-note { font-size: 12px; color: var(--gray-400); margin-top: 6px; }

/* Buy sticky bar */
.buy-sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  z-index: 50;
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}
@media (min-width: 768px) {
  .buy-sticky { position: static; box-shadow: none; border: none; padding: 0; margin-top: 24px; }
}
.buy-warning {
  font-size: 12px; color: var(--red);
  text-align: center; margin-top: 8px;
  display: none;
  font-weight: 600;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AUTH PAGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-900);
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-xl);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo-text {
  font-size: 26px; font-weight: 900;
  color: var(--green); letter-spacing: -1px; display: block;
}
.auth-logo-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.auth-title { font-size: 20px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.auth-footer {
  text-align: center; font-size: 14px;
  color: var(--gray-500); margin-top: 20px;
  padding-top: 20px; border-top: 1px solid var(--gray-100);
}
.auth-footer a { color: var(--green); font-weight: 700; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN — Layout
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.admin-body { background: var(--gray-100); }

.admin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--gray-900);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform var(--t);
  overflow-y: auto;
}
@media (max-width: 1023px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: none; box-shadow: var(--shadow-xl); }
}

.sidebar-header { padding: 22px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-logo-text { font-size: 17px; font-weight: 900; color: var(--green-light); letter-spacing: -0.5px; }
.sidebar-logo-img  { height: 38px; width: auto; object-fit: contain; }
.sidebar-subtitle  { font-size: 10px; color: rgba(255,255,255,.3); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { padding: 14px 10px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.6); margin-bottom: 2px;
  transition: all var(--t);
}
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-link:hover { color: white; background: rgba(255,255,255,.07); }
.sidebar-link.active { color: white; background: var(--green); }
.sidebar-link-danger { color: rgba(239,68,68,.65) !important; }
.sidebar-link-danger:hover { color: #ef4444 !important; background: rgba(239,68,68,.1) !important; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.07); margin: 10px 0; }

.admin-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 18px; gap: 12px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) { .admin-topbar { left: 240px; } }
.sidebar-toggle { padding: 8px; border-radius: var(--r-sm); color: var(--gray-600); display: flex; }
.sidebar-toggle svg { width: 22px; height: 22px; }
.sidebar-toggle:hover { background: var(--gray-100); }
@media (min-width: 1024px) { .sidebar-toggle { display: none; } }
.topbar-title { font-size: 15px; font-weight: 700; color: var(--gray-800); flex: 1; }
.user-badge {
  background: var(--green-50); color: var(--green-dark);
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--green-200);
}

.admin-layout { margin-top: 56px; padding: 24px 18px; }
@media (min-width: 1024px) { .admin-layout { margin-left: 240px; } }
.admin-content { max-width: 900px; }

.admin-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}
.admin-card-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 20px;
}
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--green-50);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.stat-icon svg { width: 20px; height: 20px; color: var(--green); }
.stat-icon.red    { background: #fef2f2; }
.stat-icon.red svg { color: var(--red); }
.stat-icon.blue   { background: #eff6ff; }
.stat-icon.blue svg { color: #3b82f6; }
.stat-icon.orange  { background: #fff7ed; }
.stat-icon.orange svg { color: #f97316; }
.stat-value { font-size: 26px; font-weight: 900; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 3px; }

/* Table */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 9px 12px;
  background: var(--gray-50);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.admin-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle; color: var(--gray-700);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }

.table-product-img {
  width: 44px; height: 44px;
  border-radius: var(--r-sm); object-fit: cover;
  background: var(--gray-100); flex-shrink: 0;
}
.table-product-name { font-weight: 600; color: var(--gray-800); font-size: 13px; }
.table-product-slug { font-size: 11px; color: var(--gray-400); font-family: monospace; margin-top: 1px; }
.action-btns { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

/* Page header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-header-title { font-size: 19px; font-weight: 800; color: var(--gray-900); }
.page-header-sub   { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white);
  border-radius: var(--r-xl); padding: 28px;
  max-width: 360px; width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(.94);
  transition: transform var(--t);
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-icon {
  width: 52px; height: 52px;
  background: #fef2f2; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.modal-icon svg { width: 26px; height: 26px; color: var(--red); }
.modal-title { font-size: 17px; font-weight: 800; text-align: center; color: var(--gray-900); margin-bottom: 8px; }
.modal-text  { font-size: 14px; color: var(--gray-500); text-align: center; margin-bottom: 22px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .quick-links { grid-template-columns: repeat(4, 1fr); } }
.quick-link {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--r); color: #166534;
  font-size: 13px; font-weight: 600;
  transition: all var(--t);
}
.quick-link svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }
.quick-link:hover { background: var(--green-100); transform: translateY(-2px); }

/* Flavor list admin */
.flavor-list { display: flex; flex-direction: column; gap: 8px; }
.flavor-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  transition: border-color var(--t);
}
.flavor-item:hover { border-color: var(--green-200); }
.flavor-item-name { flex: 1; font-size: 14px; font-weight: 500; }
.flavor-item-actions { display: flex; gap: 5px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .settings-grid { grid-template-columns: 2fr 1fr; } }
.logo-current {
  width: 90px; height: 90px; border-radius: var(--r);
  object-fit: contain; background: var(--gray-50);
  border: 1px solid var(--gray-200); padding: 8px; margin-bottom: 10px;
}

.admin-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray-400); margin-bottom: 18px;
}
.admin-breadcrumb a { color: var(--green); font-weight: 500; }
.admin-breadcrumb span { color: var(--gray-300); }

/* Responsive helpers */
@media (max-width: 480px) {
  .hide-mobile { display: none !important; }
  .admin-card  { padding: 14px; }
}
