/* =========================================================
   Giro — Design System (protótipo HTML)
   Inspirado no tema Vicodin (medical/pharma e-commerce)
   Paleta: verde "giro", navy no painel, azul informativo
   ========================================================= */

:root {
  --primary:       #0e9f6e;
  --primary-dark:  #057a55;
  --primary-soft:  #def7ec;
  --navy:          #0f1b2d;
  --navy-2:        #16263d;
  --navy-line:     #23374f;
  --info:          #2d6cdf;
  --info-soft:     #e1ebfd;
  --warning:       #f59e0b;
  --warning-soft:  #fef3c7;
  --danger:        #e02424;
  --danger-soft:   #fde8e8;
  --success:       #0e9f6e;
  --purple:        #7e3af2;
  --purple-soft:   #edebfe;

  --bg:            #f4f6fb;
  --surface:       #ffffff;
  --text:          #1f2a37;
  --text-muted:    #6b7280;
  --text-faint:    #9aa4b2;
  --line:          #e5e9f0;
  --line-strong:   #d3d9e3;

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --shadow-sm:     0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --shadow:        0 4px 14px rgba(16,24,40,.08);
  --shadow-lg:     0 12px 34px rgba(16,24,40,.14);
  --sidebar-w:     256px;
  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* default icon size for inline SVGs (specific rules below override) */
svg { width: 18px; height: 18px; flex: none; vertical-align: -.15em; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .6rem; }
small { font-size: 12px; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Utilities ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; background: var(--primary); color: #fff;
  padding: .6rem 1.05rem; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 14px; transition: .15s; line-height: 1.1; white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); }
.btn svg { width: 17px; height: 17px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 15px; }
.btn-sm { padding: .4rem .75rem; font-size: 13px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: #f3f5f9; border-color: var(--line-strong); }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-info { background: var(--info); } .btn-info:hover { background: #1e56c0; }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #422006; } .btn-warning:hover{ background:#d97706;}
.btn-dark { background: var(--navy); } .btn-dark:hover { background: var(--navy-2); }
.btn-icon { padding: .5rem; width: 38px; height: 38px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .55rem; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #eef1f6; color: var(--text-muted);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-green  { background: var(--primary-soft); color: var(--primary-dark); }
.badge-blue   { background: var(--info-soft); color: var(--info); }
.badge-amber  { background: var(--warning-soft); color: #b45309; }
.badge-red    { background: var(--danger-soft); color: var(--danger); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-gray   { background: #eceff4; color: #4b5563; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.25rem 1.4rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15.5px; }
.card-body { padding: 1.25rem 1.4rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.label { display: block; font-weight: 600; font-size: 13px; margin-bottom: .35rem; color: #374151; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text); transition: .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: .3rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.checkbox { display: inline-flex; align-items: center; gap: .5rem; font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position:absolute; inset:0; background:#cbd5e1; border-radius:999px; transition:.2s; }
.switch .track::before { content:""; position:absolute; width:16px; height:16px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); font-weight: 700; padding: .7rem 1rem; border-bottom: 1px solid var(--line);
  background: #fafbfd; white-space: nowrap;
}
table.tbl td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbfe; }
table.tbl tr:last-child td { border-bottom: none; }
.tbl .cell-strong { font-weight: 600; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background:#eef1f6; flex:none; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.search {
  display: flex; align-items: center; gap: .5rem; background:#fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .5rem .75rem;
}
.search input { border: none; outline: none; font-size: 14px; width: 240px; background: transparent; }
.search svg { width: 17px; height: 17px; color: var(--text-faint); }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: .3rem; align-items: center; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 .5rem; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background:#fff;
}
.pager .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .disabled { color: var(--text-faint); }

/* ---------- Stat cards ---------- */
.stat { display: flex; gap: 1rem; align-items: flex-start; }
.stat .ico {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items:center; justify-content:center; flex:none;
}
.stat .ico svg { width: 22px; height: 22px; }
.stat .val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { color: var(--text-muted); font-size: 13px; }
.trend { font-size: 12px; font-weight: 700; display:inline-flex; align-items:center; gap:.2rem; }
.trend.up { color: var(--primary-dark); } .trend.down { color: var(--danger); }
.ico-green{background:var(--primary-soft);color:var(--primary-dark)}
.ico-blue{background:var(--info-soft);color:var(--info)}
.ico-amber{background:var(--warning-soft);color:#b45309}
.ico-red{background:var(--danger-soft);color:var(--danger)}
.ico-purple{background:var(--purple-soft);color:var(--purple)}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab {
  padding: .65rem 1rem; font-weight: 600; font-size: 14px; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: 14px; border:1px solid transparent; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top:1px; }
.alert-info { background: var(--info-soft); color: #1e40af; border-color:#c3d4fb; }
.alert-warn { background: var(--warning-soft); color: #92400e; border-color:#fde68a; }
.alert-danger { background: var(--danger-soft); color: #991b1b; border-color:#fbd5d5; }
.alert-success { background: var(--primary-soft); color: var(--primary-dark); border-color:#a7e8cf; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty .ico { width: 60px; height: 60px; border-radius: 16px; background:#eef1f6; display:inline-flex; align-items:center; justify-content:center; margin-bottom: .75rem; }
.empty .ico svg { width: 30px; height: 30px; color: var(--text-faint); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position:absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 1.3rem; }
.tl-item::before { content:""; position:absolute; left:-22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background:#fff; border: 3px solid var(--primary); }
.tl-item.blue::before { border-color: var(--info); }
.tl-item.amber::before { border-color: var(--warning); }
.tl-item.gray::before { border-color: var(--text-faint); }
.tl-item .when { font-size: 12px; color: var(--text-faint); }

/* =========================================================
   PAINEL INTERNO (Admin/Empresa) — layout com sidebar dark
   ========================================================= */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--navy); color: #c7d2e0; display: flex; flex-direction: column; z-index: 50;
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--navy-line); }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,var(--primary),#34d399); display: inline-flex; align-items:center; justify-content:center; color:#052e1a; font-weight: 900; flex:none; }
.brand-name { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-sub { font-size: 10.5px; color: #7d8ba0; letter-spacing: .06em; text-transform: uppercase; }
.nav { flex: 1; overflow-y: auto; padding: .75rem .6rem 2rem; }
.nav::-webkit-scrollbar { width: 6px; } .nav::-webkit-scrollbar-thumb { background:#2a3d57; border-radius: 3px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #62748e; padding: 1rem .8rem .35rem; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: .7rem; padding: .58rem .8rem; border-radius: 9px;
  color: #b6c2d4; font-size: 14px; font-weight: 500; margin-bottom: 1px;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(14,159,110,.22), rgba(14,159,110,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.nav a .tag { margin-left: auto; font-size: 10.5px; background:#2a3d57; color:#cbd5e1; padding: .05rem .4rem; border-radius: 6px; font-weight:700; }
.nav a .tag.danger { background: var(--danger); color:#fff; }

.main { margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem;
}
.topbar .menu-btn { display: none; background: none; border: none; padding: .3rem; }
.crumb { font-size: 13px; color: var(--text-muted); }
.crumb b { color: var(--text); font-weight: 700; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background:#fff; display:inline-flex; align-items:center; justify-content:center; color: var(--text-muted); }
.icon-btn:hover { background:#f3f5f9; color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count { position: absolute; top: -5px; right: -5px; background: var(--danger); color:#fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px; display:flex; align-items:center; justify-content:center; padding: 0 3px; }
.user-chip { display:flex; align-items:center; gap:.55rem; padding: .3rem .3rem .3rem .3rem; border-radius: 10px; }
.user-chip:hover { background:#f3f5f9; }
.user-chip .who { line-height: 1.1; } .user-chip .who b { font-size: 13px; } .user-chip .who small { color: var(--text-faint); }
.content { padding: 1.5rem; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--text-muted); font-size: 14px; margin-top: .15rem; }

/* =========================================================
   LOJA (Comprador) — header claro
   ========================================================= */
.shop { background: #fff; min-height: 100vh; }
.shop-top { background: var(--navy); color: #cbd5e1; font-size: 12.5px; }
.shop-top .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.shop-top a:hover { color:#fff; }
.shop-header { border-bottom: 1px solid var(--line); background:#fff; position: sticky; top:0; z-index: 30; }
.shop-header .container { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.shop-logo { display:flex; align-items:center; gap:.6rem; }
.shop-logo .brand-name { color: var(--text); }
.shop-search { flex: 1; max-width: 620px; display:flex; align-items:center; border: 2px solid var(--primary); border-radius: 10px; overflow:hidden; }
.shop-search input { border:none; outline:none; padding: .65rem .9rem; flex:1; font-size: 14px; }
.shop-search button { border:none; background: var(--primary); color:#fff; padding: 0 1.1rem; align-self: stretch; }
.shop-search select { border:none; border-right: 1px solid var(--line); background:#f8fafc; padding: 0 .7rem; font-size: 13px; color: var(--text-muted); outline:none; }
.header-actions { display:flex; align-items:center; gap: .4rem; }
.h-act { display:flex; align-items:center; gap:.5rem; padding:.4rem .55rem; border-radius: 10px; color: var(--text); position:relative; }
.h-act:hover { background:#f3f5f9; }
.h-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; background:#f3f5f9; }
.h-act svg { width: 22px; height: 22px; }
.h-act .count { position:absolute; top:-6px; right:-8px; left:auto; background: var(--primary); color:#fff; font-size:10px; font-weight:700; min-width:17px; height:17px; border-radius:999px; display:flex; align-items:center; justify-content:center; padding:0 3px; }
.h-act .lbl { line-height:1.05; } .h-act .lbl small { display:block; color:var(--text-faint); font-size:11px; } .h-act .lbl b { font-size:13px; display:inline-flex; align-items:center; gap:.2rem; }
.h-act .lbl b svg { width:12px; height:12px; }
.h-act .user-ring { width:34px; height:34px; border:1.5px solid var(--text-muted); border-radius:50%; display:inline-flex; align-items:center; justify-content:center; flex:none; }
.h-act .user-ring svg { width:18px; height:18px; color:var(--text-muted); }
.h-act:hover .user-ring, .h-act:focus-visible .user-ring { border-color: var(--primary-dark); }
.h-act:hover .user-ring svg, .h-act:focus-visible .user-ring svg { color: var(--primary-dark); }

/* ---------- Minha conta ---------- */
.account-hello { display:flex; align-items:center; gap:.75rem; margin:1.5rem 0 1.25rem; color:var(--text-muted); font-size:15px; }
.account-hello .user-ring { width:42px; height:42px; border:1.5px solid var(--text-faint); border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:var(--text-faint); flex:none; }
.account-hello .user-ring svg { width:22px; height:22px; }
.account-layout { display:grid; grid-template-columns:280px 1fr; gap:1.5rem; align-items:start; padding-bottom:2rem; }
.account-nav { display:flex; flex-direction:column; gap:.55rem; }
.account-nav a { display:block; background:#fff; border:1px solid var(--line); border-radius:10px; padding:.85rem 1rem; color:var(--text); transition:border-color .15s, box-shadow .15s, background .15s; }
.account-nav a:hover { border-color:var(--line-strong); box-shadow:var(--shadow-sm); }
.account-nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.account-nav a.active { border-color: var(--primary); border-left:3px solid var(--primary); padding-left:calc(1rem - 2px); background: var(--primary-soft); }
.account-nav a.active .an-title { color:var(--primary-dark); }
.account-nav .an-title { display:block; font-weight:700; font-size:14px; margin-bottom:.15rem; }
.account-nav .an-desc { display:block; font-size:12.5px; color:var(--text-muted); line-height:1.35; }
.account-nav a.danger .an-title { color:var(--danger); }
.account-nav a.danger:hover { border-color: #f5c2c2; background: var(--danger-soft); }
.account-nav a[aria-disabled="true"] { opacity:.65; pointer-events:none; cursor:not-allowed; }
.account-panel > h1 { font-size:20px; margin:0 0 1rem; }
.account-panel-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:1.25rem; align-items:start; }
.account-dl { display:grid; grid-template-columns:140px 1fr; gap:.55rem 1rem; font-size:14px; }
.account-dl dt { color:var(--text-muted); }
.account-dl dd { margin:0; font-weight:600; overflow-wrap:anywhere; }
.account-section-title { color:var(--primary-dark); font-size:16px; font-weight:700; margin:1.5rem 0 .85rem; }
@media (max-width: 1024px) {
  /* Com o novo link de conta, o header aperta antes dos 720px */
  .header-actions .h-act .lbl { display: none !important; }
}
@media (max-width: 900px) {
  .account-layout { grid-template-columns:1fr; }
  .account-panel-grid { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .account-dl { grid-template-columns:1fr; gap:.15rem 0; }
  .account-dl dt { margin-top:.35rem; }
  .account-dl dt:first-child { margin-top:0; }
}

.shop-nav { background:#fff; border-bottom: 1px solid var(--line); }
.shop-nav .container { display:flex; align-items:center; gap: .3rem; height: 50px; }
.shop-nav a { padding: .5rem .85rem; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 8px; }
.shop-nav a:hover { color: var(--primary-dark); background: var(--primary-soft); }
.shop-nav a.active { color: var(--primary-dark); }
.shop-nav .cat-btn { background: var(--primary); color:#fff; }
.shop-nav .cat-btn:hover { background: var(--primary-dark); color:#fff; }

.shop-footer { background: var(--navy); color: #9fb0c5; margin-top: 3rem; padding: 2.5rem 0 1.5rem; font-size: 13.5px; }
.shop-footer h4 { color:#fff; font-size: 14px; margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.shop-footer a { display:block; padding: .28rem 0; color:#9fb0c5; }
.shop-footer a:hover { color:#fff; }
.shop-footer .foot-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.shop-footer .foot-bottom { border-top: 1px solid var(--navy-line); margin-top: 2rem; padding-top: 1.2rem; display:flex; justify-content: space-between; flex-wrap: wrap; gap:.5rem; color:#7d8ba0; }

/* ---------- Store layout w/ sidebar ---------- */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 1.75rem; padding: 1.75rem 0; }
.shop-layout.left { grid-template-columns: 270px 1fr; }
.filter-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; background:#fff; }
.filter-box h4 { font-size: 14px; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background:#fafbfd; }
.filter-box .body { padding: .9rem 1rem; }
.filter-list a { display:flex; justify-content: space-between; padding: .35rem 0; color: var(--text-muted); font-size: 14px; }
.filter-list a:hover { color: var(--primary-dark); }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); display:inline-block; }
.range { width: 100%; accent-color: var(--primary); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.product-grid.cols-3 { grid-template-columns: repeat(3,1fr); }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); background:#fff; overflow: hidden; transition: .18s; position: relative; display:flex; flex-direction: column; }
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #dfe6ef; }
.pcard .media { position: relative; aspect-ratio: 1/1; background: #f5f7fa; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pcard .media .ph { color:#c3ccd8; }
.pcard .media .ph svg { width: 64px; height: 64px; }
.pcard .tags { position:absolute; top: .6rem; left: .6rem; display:flex; flex-direction:column; gap:.3rem; }
.pcard .fav { position:absolute; top: .6rem; right: .6rem; width: 32px; height: 32px; border-radius: 50%; background:#fff; box-shadow: var(--shadow-sm); display:flex; align-items:center; justify-content:center; color: var(--text-muted); }
.pcard .fav:hover { color: var(--danger); }
.pcard .body { padding: .85rem .95rem 1rem; display:flex; flex-direction: column; flex:1; }
.pcard .cat { font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.pcard .name { font-weight: 600; font-size: 14.5px; margin: .2rem 0 .35rem; line-height: 1.3; min-height: 38px; }
.pcard .name:hover { color: var(--primary-dark); }
.pcard .stars { color: #f5a623; font-size: 12.5px; letter-spacing: 1px; }
.pcard .price { margin-top: auto; padding-top: .6rem; display:flex; align-items:baseline; gap: .5rem; }
.pcard .price .now { font-size: 17px; font-weight: 800; color: var(--text); }
.pcard .price .old { font-size: 13px; color: var(--text-faint); text-decoration: line-through; }
.pcard .price .unit { font-size: 11.5px; color: var(--text-faint); font-weight:500; }
.pcard .actions { margin-top: .7rem; display:flex; gap: .4rem; }
.stars-lg { color:#f5a623; letter-spacing: 2px; font-size: 16px; }

/* ---------- Order status stepper ---------- */
.stepper { display:flex; gap:.4rem; }
.stepper .step { flex:1; text-align:center; position: relative; }
.stepper .step .bubble { width: 34px; height: 34px; border-radius:50%; background:#eef1f6; color: var(--text-faint); display:flex; align-items:center; justify-content:center; margin: 0 auto .4rem; font-weight:700; border: 2px solid var(--line); z-index:1; position: relative; }
.stepper .step .bubble svg { width:16px; height:16px; }
.stepper .step .lbl { font-size: 12px; color: var(--text-muted); }
.stepper .step::before { content:""; position:absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.stepper .step:first-child::before { display:none; }
.stepper .step.done .bubble { background: var(--primary); border-color: var(--primary); color:#fff; }
.stepper .step.done::before { background: var(--primary); }
.stepper .step.current .bubble { background:#fff; border-color: var(--primary); color: var(--primary-dark); box-shadow: 0 0 0 4px var(--primary-soft); }
.stepper .step.done .lbl, .stepper .step.current .lbl { color: var(--text); font-weight:600; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--navy), #0b2a44 60%, #0a3a2b); color:#fff; padding: 3rem; display:flex; flex-direction: column; justify-content: space-between; position: relative; overflow:hidden; }
.auth-side::after { content:""; position:absolute; width: 380px; height: 380px; background: radial-gradient(circle, rgba(14,159,110,.35), transparent 70%); right:-80px; bottom:-80px; }
.auth-side h2 { font-size: 30px; line-height: 1.2; margin-bottom: 1rem; }
.auth-feat { display:flex; gap:.7rem; margin-bottom: 1rem; align-items:flex-start; }
.auth-feat .ck { width:26px; height:26px; border-radius: 8px; background: rgba(14,159,110,.25); color:#6ee7b7; display:flex; align-items:center; justify-content:center; flex:none; }
.auth-feat .ck svg{ width:16px;height:16px;}
.auth-main { display:flex; align-items:center; justify-content:center; padding: 2rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; margin-bottom: .3rem; }
.divider { display:flex; align-items:center; gap: 1rem; color: var(--text-faint); font-size: 12px; margin: 1.2rem 0; }
.divider::before, .divider::after { content:""; flex:1; height:1px; background: var(--line); }

/* ---------- Portal (index) ---------- */
.portal { max-width: 1180px; margin: 0 auto; padding: 2.5rem 20px 4rem; }
.portal-hero { background: linear-gradient(140deg, var(--navy), #0a3b2b); color:#fff; border-radius: 20px; padding: 2.5rem; margin-bottom: 2rem; position:relative; overflow:hidden; }
.portal-hero::after { content:""; position:absolute; width: 340px; height:340px; right:-60px; top:-60px; background: radial-gradient(circle, rgba(52,211,153,.3), transparent 70%); }
.portal-hero h1 { font-size: 32px; margin-bottom: .5rem; }
.portal-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.portal-sec-title { display:flex; align-items:center; gap:.6rem; font-size: 15px; margin: 2rem 0 1rem; text-transform: uppercase; letter-spacing:.05em; color: var(--text-muted); }
.portal-sec-title::after { content:""; flex:1; height:1px; background: var(--line); }
.screen-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display:flex; gap:.85rem; align-items:flex-start; transition:.15s; box-shadow: var(--shadow-sm); }
.screen-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.screen-card .ico { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex:none; }
.screen-card .ico svg { width:20px; height:20px; }
.screen-card h4 { font-size: 14.5px; margin-bottom:.15rem; }
.screen-card p { font-size: 12.5px; color: var(--text-muted); margin:0; }

/* ---------- Misc ---------- */
.divide-y > * + * { border-top: 1px solid var(--line); }
.list-row { display:flex; align-items:center; gap:.85rem; padding:.8rem 0; }
.dl { display:grid; grid-template-columns: 180px 1fr; gap: .1rem 1rem; }
.dl dt { color: var(--text-muted); font-size: 13px; padding: .4rem 0; }
.dl dd { margin:0; padding: .4rem 0; font-weight: 500; }
.kbd { border:1px solid var(--line-strong); border-bottom-width:2px; border-radius:6px; padding:.05rem .35rem; font-size:12px; background:#fafbfd; }
.progress { height: 8px; background:#eef1f6; border-radius: 999px; overflow:hidden; }
.progress > span { display:block; height:100%; background: var(--primary); border-radius: 999px; }
.bars { display:flex; align-items:flex-end; gap: 8px; height: 160px; }
.bars .bar { flex:1; background: linear-gradient(var(--primary), #6ee7b7); border-radius: 6px 6px 0 0; position: relative; min-width: 8px; }
.bars .bar.alt { background: linear-gradient(var(--info), #93c5fd); }
.donut { width: 150px; height:150px; border-radius:50%; display:grid; place-items:center; }
.donut .hole { width: 96px; height:96px; background:#fff; border-radius:50%; display:grid; place-items:center; text-align:center; }
.legend { display:flex; flex-direction:column; gap:.5rem; }
.legend .row { display:flex; align-items:center; gap:.5rem; font-size:13px; }
.legend .sw { width:12px; height:12px; border-radius:3px; }

/* ---------- Modal (demo, CSS-only via :target) ---------- */
.modal-mask { position: fixed; inset:0; background: rgba(15,27,45,.55); display:none; align-items:center; justify-content:center; z-index: 100; padding: 1rem; }
.modal-mask:target { display: flex; }
.modal { background:#fff; border-radius: var(--radius-lg); max-width: 520px; width:100%; box-shadow: var(--shadow-lg); overflow:hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3,1fr); }
  .portal-grid { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-col { order: 2; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 720px) {
  .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .shop-search, .shop-top { display: none; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 0; }
  .stat .val { font-size: 20px; }
  .page-head h1 { font-size: 19px; }
  .hide-sm { display: none !important; }
}
.scrim { position: fixed; inset: 0; background: rgba(15,27,45,.4); z-index: 45; display: none; }
.scrim.show { display: block; }
