:root {
  --brand-950: #0d2923;
  --brand-900: #11362e;
  --brand-800: #17493d;
  --brand-700: #17624f;
  --brand-600: #187a60;
  --brand-500: #249575;
  --brand-100: #e4f3ed;
  --brand-50: #f1f8f5;
  --gold: #c39a4d;
  --text-strong: #182923;
  --text: #33483f;
  --text-muted: #71827b;
  --text-faint: #94a19c;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-warm: #faf8f2;
  --line: #e0e7e4;
  --line-strong: #d2dcd8;
  --danger: #b6504c;
  --warning: #9d681e;
  --info: #3f6f9f;
  --shadow-sm: 0 4px 16px rgba(21, 54, 44, .05);
  --shadow-md: 0 16px 44px rgba(21, 54, 44, .10);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --font-sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Hiragino Sans GB", Arial, sans-serif;
  --font-size-caption: 12px;
  --font-size-body: 14px;
  --font-size-body-lg: 16px;
  --font-size-title: 20px;
  --font-size-page-title: 30px;
  --line-height-tight: 1.3;
  --line-height-body: 1.65;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-family: var(--font-sans);
  font-size: var(--font-size-body-lg);
  font-weight: 400;
  line-height: var(--line-height-body);
  font-synthesis: none;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; letter-spacing: normal; }
button, input, select, textarea, .price, .amount, .order-id-link, .tracking-code, time {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
:focus-visible { outline: 2px solid rgba(36,149,117,.65); outline-offset: 2px; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.icon { display: inline-grid; width: 20px; height: 20px; place-items: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wide { grid-column: 1 / -1; }

/* Storefront */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(17,54,46,.94);
  color: #fff;
  backdrop-filter: blur(16px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0; }
.brand-mark { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 11px; overflow: hidden; background: var(--gold); }
.brand-mark img { width: 100%; height: 100%; }
.brand small { display: block; margin-top: 1px; color: #91ada4; font-size: 10px; font-weight: 600; letter-spacing: .1em; line-height: 1.4; }
.nav-links { display: flex; align-items: center; gap: 30px; color: #c8dad4; font-size: 14px; }
.nav-links a { transition: color .18s ease; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.ghost-button, .solid-button, .icon-button {
  border: 0;
  border-radius: 999px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.ghost-button { min-height: 42px; padding: 0 18px; background: rgba(255,255,255,.09); color: #fff; }
.solid-button { min-height: 44px; padding: 0 20px; background: #48d4a9; color: #0d3028; font-weight: 700; }
.solid-button.dark { background: var(--brand-950); color: #fff; }
.solid-button.wide { width: 100%; min-height: 48px; }
.ghost-button:hover, .solid-button:hover, .icon-button:hover { transform: translateY(-1px); }
.icon-button { position: relative; width: 43px; height: 43px; display: grid; place-items: center; background: rgba(255,255,255,.09); color: #fff; }
.cart-count { position: absolute; top: -4px; right: -3px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--brand-900); border-radius: 20px; background: #54dfb2; color: #123b31; font-size: 10px; font-weight: 700; }

.hero { overflow: hidden; padding: 50px 0 68px; background: var(--brand-900); color: #fff; }
.hero-grid { min-height: 500px; display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 48px; }
.eyebrow { margin: 0 0 17px; color: #58d9b0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 560px; font-size: clamp(44px, 5vw, 66px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; }
.hero h1 em { color: #55d8ae; font-style: normal; }
.hero-copy { max-width: 520px; margin: 24px 0 31px; color: #bed2cb; font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions > * { min-height: 50px; padding-inline: 23px; }
.stat-row { display: flex; gap: 36px; margin-top: 40px; }
.stat strong { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { color: #91aea5; font-size: 12px; }
.hero-visual { position: relative; min-height: 465px; }
.hero-image { width: 112%; height: 465px; object-fit: cover; object-position: 63% center; border-radius: 34px; box-shadow: 0 28px 80px rgba(0,0,0,.26); }
.hero-card { position: absolute; left: -24px; bottom: 24px; padding: 16px 19px; border: 1px solid rgba(255,255,255,.48); border-radius: 15px; background: rgba(255,255,255,.88); color: var(--text-strong); box-shadow: var(--shadow-md); backdrop-filter: blur(14px); }
.hero-card strong { display: block; font-size: 16px; }
.hero-card span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }

.trust-bar { position: relative; z-index: 3; margin-top: -25px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); box-shadow: var(--shadow-sm); gap: 1px; }
.trust-item { display: flex; align-items: center; gap: 14px; padding: 21px 23px; background: #fff; }
.trust-item .icon { width: 26px; height: 26px; color: var(--brand-600); }
.trust-item strong { display: block; color: var(--text-strong); font-size: 14px; }
.trust-item span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; }

.section { padding: 92px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
.section-heading > p { max-width: 470px; margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 2px 8px rgba(25,55,46,.025); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-image-wrap { position: relative; overflow: hidden; aspect-ratio: 1.05; background: #ecefe9; }
.product-image { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--product-scale, 1.42)); transform-origin: var(--product-origin, 50% 50%); }
.product-tag { position: absolute; top: 13px; left: 13px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.88); color: var(--brand-800); font-size: 11px; font-weight: 700; backdrop-filter: blur(8px); }
.product-brand { position: absolute; left: 13px; bottom: 13px; padding: 6px 9px; border-radius: 7px; background: rgba(17,54,46,.9); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.product-info { padding: 19px; }
.product-kicker { color: var(--brand-600); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.product-info h3 { margin: 7px 0; font-size: 18px; line-height: 1.45; letter-spacing: 0; }
.product-info p { min-height: 46px; margin: 0 0 16px; color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { margin-left: 3px; color: var(--text-muted); font-size: 11px; font-weight: 500; }
.add-button { width: 41px; height: 41px; display: grid; place-items: center; border: 0; border-radius: 11px; background: var(--brand-900); color: #fff; }

.story-section { padding: 0 0 92px; }
.story-card { display: grid; grid-template-columns: .92fr 1.08fr; gap: 64px; align-items: center; padding: 58px 62px; border-radius: var(--radius-xl); background: #e8f2ed; }
.story-card h2 { margin: 0 0 19px; font-size: clamp(34px, 4vw, 46px); line-height: 1.25; letter-spacing: -.02em; }
.story-card p { color: var(--text-muted); line-height: 1.8; }
.steps { display: grid; gap: 11px; }
.step { display: flex; gap: 15px; align-items: center; padding: 16px; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; background: rgba(255,255,255,.62); }
.step-index { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--brand-900); color: #fff; font-size: 12px; font-weight: 700; }
.step strong { display: block; font-size: 14px; }
.step div span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.site-footer { padding: 50px 0 calc(50px + env(safe-area-inset-bottom)); background: #0b241f; color: #abc0b9; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 36px; }
.footer-copy { max-width: 600px; margin: 14px 0 0; font-size: 12px; line-height: 1.85; }
.admin-link { padding: 9px 13px; border: 1px solid #35544c; border-radius: 999px; color: #e1ebe8; font-size: 12px; }

/* Dialogs */
.age-gate { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; background: rgba(5,23,19,.88); backdrop-filter: blur(16px); }
.age-card { width: min(440px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.72); border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.32); text-align: center; }
.age-mark { width: 58px; height: 58px; display: block; margin: 0 auto 18px; overflow: hidden; border-radius: 16px; }
.age-mark img { width: 100%; height: 100%; }
.age-card .eyebrow { margin-bottom: 9px; color: var(--gold); }
.age-card h2 { margin: 0; color: var(--text-strong); font-size: 29px; line-height: 1.3; }
.age-card > p:not(.eyebrow) { margin: 12px auto 24px; color: var(--text-muted); font-size: 14px; line-height: 1.75; }
.age-decline { margin-top: 12px; padding: 8px 12px; border: 0; background: transparent; color: var(--text-muted); font-size: 13px; }
.age-card > small { display: block; margin-top: 13px; color: var(--text-faint); font-size: 12px; }
.age-card.declined .solid-button, .age-card.declined .age-decline { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(8,28,24,.72); backdrop-filter: blur(10px); }
.modal { width: min(450px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 22px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.24); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 26px 18px; }
.modal-header h2 { margin: 0; font-size: 28px; line-height: 1.3; letter-spacing: -.015em; }
.modal-header p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; }
.close-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #eef3f1; color: var(--text); }
.modal-body { padding: 7px 26px 27px; }
.account-note { margin: 0 0 19px; padding: 11px 13px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); font-size: 12px; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--text-strong); font-size: 14px; font-weight: 600; }
.field { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; color: var(--text-strong); outline: none; transition: border .18s ease, box-shadow .18s ease; }
.field:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(36,149,117,.11); }
.fine-print { margin: 13px 0 0; color: var(--text-faint); font-size: 11px; text-align: center; }
.cart-list { display: grid; gap: 11px; }
.cart-item { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.cart-thumb { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; }
.cart-item strong { display: block; font-size: 14px; }
.cart-item div span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.remove-item { border: 0; background: transparent; color: var(--danger); font-size: 19px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.cart-total span { color: var(--text-muted); font-size: 13px; }
.cart-total strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.empty-state { padding: 28px 16px; color: var(--text-muted); text-align: center; }
.empty-state .icon { width: 31px; height: 31px; margin: 0 auto 12px; color: var(--brand-600); }
.empty-state strong { display: block; color: var(--text-strong); }
.empty-state p { margin: 6px 0 0; font-size: 12px; }

/* Admin authentication */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 56% 44%; background: #fff; }
.auth-art { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 46px 52px; background: linear-gradient(90deg, rgba(9,32,27,.88), rgba(9,32,27,.48)), url("assets/yandang-beer-hero-v1.webp") 62% center / cover; color: #fff; }
.auth-art h1 { max-width: 650px; margin: 0; font-size: clamp(48px, 6vw, 72px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; }
.auth-art h1 em { color: #66dab7; font-style: normal; }
.auth-art p { max-width: 620px; margin: 24px 0 0; color: #d0dfda; font-size: 15px; line-height: 1.8; }
.auth-art .admin-badge { align-self: flex-start; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.9); color: var(--brand-800); }
.auth-panel { display: grid; place-items: center; padding: 45px; }
.auth-box { width: min(430px, 100%); }
.auth-box > .brand { margin-bottom: 56px; color: var(--text-strong); }
.auth-box h2 { margin: 0; font-size: 34px; line-height: 1.3; letter-spacing: -.015em; }
.auth-box > p { margin: 8px 0 30px; color: var(--text-muted); font-size: 14px; }
.auth-back { display: inline-flex; margin-top: 18px; color: var(--text-muted); font-size: 13px; }

/* Admin shell */
.admin-shell { min-height: 100vh; background: #f4f7f6; color: var(--text-strong); font-size: var(--font-size-body); line-height: 1.6; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 232px; padding: 25px 17px; border-right: 1px solid var(--line); background: #fff; }
.admin-sidebar > .brand { margin: 0 9px 37px; color: var(--text-strong); }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 10px; color: #65766f; font-size: 14px; font-weight: 500; }
.admin-nav a:hover { background: var(--surface-soft); color: var(--brand-800); }
.admin-nav a.active { background: var(--brand-100); color: var(--brand-700); font-weight: 700; }
.admin-nav .icon { width: 19px; height: 19px; }
.admin-profile { position: absolute; left: 17px; right: 17px; bottom: 18px; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 9px; border-radius: 11px; background: #f6f8f7; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--brand-600); color: #fff !important; font-size: 12px !important; font-weight: 700; }
.admin-profile strong { display: block; color: var(--text-strong); font-size: 13px; font-weight: 600; }
.admin-profile div span { display: block; margin-top: 1px; color: var(--text-muted); font-size: 12px; }
.logout-button, .mobile-logout { width: 30px; height: 30px; display: grid; place-items: center; margin-left: auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #7c8c86; }
.logout-button:hover, .mobile-logout:hover { background: #e7eeeb; color: var(--brand-700); }
.logout-button .icon, .mobile-logout .icon { width: 17px; height: 17px; }
.admin-main { min-height: 100vh; margin-left: 232px; padding: 30px 34px 54px; }
.mobile-admin-bar { display: none; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 22px; }
.admin-topbar h1, .detail-head h1 { margin: 0; color: #172b25; font-size: var(--font-size-page-title); line-height: var(--line-height-tight); letter-spacing: -.015em; font-weight: 700; }
.admin-topbar p { margin: 6px 0 0; color: var(--text-muted); font-size: 14px; }
.admin-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #6d8078; font-size: 12px; white-space: nowrap; }
.admin-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2fbc8e; box-shadow: 0 0 0 4px rgba(47,188,142,.12); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { min-height: 124px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.kpi-card > span { color: var(--text-muted); font-size: 13px; }
.kpi-card > strong { display: block; margin-top: 8px; color: var(--text-strong); font-size: 28px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-card > strong.green { color: var(--brand-600); }
.kpi-card small { display: block; margin-top: 7px; color: var(--text-faint); font-size: 12px; }
.admin-card, .detail-section { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.order-toolbar { flex-wrap: wrap; }
.search-wrap { position: relative; width: min(380px, 100%); }
.search-wrap .icon { position: absolute; top: 50%; left: 13px; width: 18px; height: 18px; color: #80918a; transform: translateY(-50%); pointer-events: none; }
.admin-field { width: 100%; height: 42px; padding: 0 13px 0 41px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fbfcfb; color: var(--text-strong); font-size: 14px; outline: none; }
.admin-field:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(36,149,117,.10); }
.date-range { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 12px; }
.date-range label { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fbfcfb; color: var(--text-muted); }
.date-range input { width: 120px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.filter-row { display: flex; align-items: center; gap: 7px; }
.order-toolbar .filter-row { flex: 1 0 100%; }
.filter-button { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 9px; background: #f5f7f6; color: #687a73; font-size: 13px; white-space: nowrap; }
.filter-button:hover { color: var(--brand-700); }
.filter-button.active { border-color: #bfe2d6; background: #e7f5f0; color: var(--brand-700); font-weight: 600; }
.table-meta { margin-left: auto; color: var(--text-faint); font-size: 12px; white-space: nowrap; }

.order-table { width: 100%; border-collapse: collapse; }
.order-table th { padding: 13px 16px; background: #fbfcfb; color: #798a83; font-size: 12px; font-weight: 600; text-align: left; letter-spacing: 0; white-space: nowrap; }
.order-table td { padding: 16px; border-top: 1px solid #edf1ef; color: var(--text); font-size: 13px; vertical-align: middle; }
.order-table tbody tr:hover { background: #fbfdfc; }
.order-id-link { color: var(--brand-600); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
.table-product { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.table-product img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.table-product strong, .customer-name { display: block; color: var(--text-strong); font-size: 13px; font-weight: 600; }
.table-product span, .customer-region, .order-time { display: block; margin-top: 3px; color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.amount { color: var(--text-strong); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.commerce-status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.commerce-status::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.commerce-status.paid { background: #e6f5ef; color: #17795f; }
.commerce-status.pending, .commerce-status.unpaid { background: #fff3dd; color: #9a6318; }
.commerce-status.fulfilled { background: #e9f1fb; color: #3f6f9f; }
.commerce-status.completed { background: #edf5f1; color: #4e7566; }
.commerce-status.cancelled { background: #eff2f1; color: #73817c; }
.commerce-status.refund { background: #f6edf9; color: #86539a; }
.detail-button { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #456058; font-size: 13px; }
.detail-button:hover { border-color: #8fcab6; color: var(--brand-700); }
.sku-code { color: #62756d; font-size: 12px; font-variant-numeric: tabular-nums; }
.stock-low { color: #bd6c27; }

/* Order and product detail */
.detail-view { color: var(--text); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.detail-head h1 { margin-top: 8px; }
.back-button { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 13px; }
.back-button .icon { width: 15px; height: 15px; }
.detail-actions { display: flex; gap: 9px; }
.admin-action { min-height: 40px; padding: 0 15px; border: 1px solid var(--brand-600); border-radius: 9px; background: var(--brand-600); color: #fff; font-size: 13px; font-weight: 600; }
.admin-action.secondary { border-color: var(--line-strong); background: #fff; color: #496158; }
.admin-action:disabled { cursor: default; opacity: .58; }
.order-overview { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.order-overview h2 { margin: 9px 0 4px; color: var(--text-strong); font-size: 19px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.order-overview p { margin: 0; color: var(--text-faint); font-size: 12px; }
.overview-total { text-align: right; }
.overview-total span { display: block; color: var(--text-muted); font-size: 12px; }
.overview-total strong { display: block; margin-top: 4px; color: var(--brand-600); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-detail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr); gap: 15px; align-items: start; }
.order-detail-main, .order-detail-side { display: grid; gap: 15px; }
.detail-section-title { display: flex; justify-content: space-between; align-items: center; min-height: 50px; padding: 0 17px; border-bottom: 1px solid var(--line); color: var(--text); }
.detail-section-title strong { font-size: 14px; font-weight: 600; }
.detail-section-title > span:not(.commerce-status) { color: var(--text-faint); font-size: 12px; }
.detail-content { padding: 17px; }
.commerce-product-row { display: grid; grid-template-columns: 68px 1fr auto auto; gap: 14px; align-items: center; }
.commerce-product-row img { width: 68px; height: 68px; border-radius: 11px; object-fit: cover; }
.commerce-product-row h3 { margin: 0 0 4px; color: var(--text-strong); font-size: 15px; line-height: 1.45; }
.commerce-product-row p { margin: 0 0 6px; color: var(--text-muted); font-size: 13px; }
.commerce-product-row div > span { color: var(--text-faint); font-size: 12px; }
.commerce-product-row .quantity { color: var(--text-muted); font-size: 13px; }
.commerce-product-row > strong { color: var(--text-strong); font-size: 15px; font-variant-numeric: tabular-nums; }
.recipient-grid, .shipment-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.recipient-grid div > span, .shipment-summary div > span { display: block; margin-bottom: 5px; color: var(--text-faint); font-size: 12px; }
.recipient-grid div > strong, .shipment-summary div > strong { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.65; }
.tracking-code { letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.summary-lines { display: grid; gap: 11px; }
.summary-line { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 13px; }
.summary-line strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-line.total { margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--text-strong); font-size: 14px; }
.summary-line.total strong { color: var(--brand-600); font-size: 21px; }
.payment-method-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text); font-size: 13px; }
.timeline { display: grid; }
.timeline-item { position: relative; display: flex; gap: 11px; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; top: 13px; bottom: 2px; left: 5px; width: 1px; background: #dce6e2; }
.timeline-dot { position: relative; z-index: 1; width: 11px; height: 11px; flex: 0 0 auto; margin-top: 2px; border: 3px solid #d8efe7; border-radius: 50%; background: #26a982; }
.timeline-item strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.timeline-item div span { display: block; margin-top: 3px; color: var(--text-faint); font-size: 12px; }
.timeline-item.inactive .timeline-dot { border-color: #edf0ef; background: #aab5b1; }
.shipment-latest { display: flex; gap: 11px; align-items: flex-start; margin-top: 17px; padding: 13px; border-radius: 10px; background: var(--brand-50); }
.shipment-latest .timeline-dot { margin-top: 2px; }
.shipment-latest strong { display: block; color: #34554a; font-size: 12px; }
.shipment-latest div span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.tracking-history { margin-top: 18px; padding-top: 2px; }
.tracking-event { position: relative; display: grid; grid-template-columns: 76px 14px minmax(0, 1fr); gap: 10px; min-height: 52px; }
.tracking-event:not(:last-child)::after { content: ""; position: absolute; top: 17px; bottom: 0; left: 82px; width: 1px; background: var(--line); }
.tracking-event time { padding-top: 1px; color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tracking-node { position: relative; z-index: 1; width: 8px; height: 8px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: #b4c5bf; box-shadow: 0 0 0 1px var(--line); }
.tracking-event p { margin: 0; padding: 0 0 15px; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.tracking-event.current .tracking-node { background: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.tracking-event.current p { color: var(--text); font-weight: 600; }
.privacy-note { margin: 11px 0 0; color: var(--text-faint); font-size: 12px; }
.logistics-empty { padding: 17px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--text-muted); font-size: 13px; text-align: center; }

.product-detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 15px; }
.product-detail-grid > .detail-section:last-child { grid-column: 1 / -1; }
.product-profile .detail-content { min-height: 300px; display: grid; grid-template-columns: minmax(180px, .85fr) 1.15fr; align-items: center; gap: 28px; }
.product-profile img { width: 100%; max-height: 255px; border-radius: 15px; object-fit: cover; }
.product-profile h2 { margin: 15px 0 6px; color: var(--text-strong); font-size: 28px; line-height: 1.35; letter-spacing: -.015em; }
.product-profile p { color: var(--text-muted); font-size: 14px; }
.product-profile div > strong { display: block; margin-top: 22px; color: var(--brand-600); font-size: 27px; font-variant-numeric: tabular-nums; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.metric-grid div { padding: 15px; border-radius: 10px; background: var(--surface-soft); }
.metric-grid span { display: block; color: var(--text-muted); font-size: 12px; }
.metric-grid strong { display: block; margin-top: 6px; color: var(--text-strong); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Analytics */
.range-tabs { display: flex; gap: 6px; }
.analytics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 15px; }
.analytics-kpi { min-height: 117px; padding: 18px 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.analytics-kpi > span { color: var(--text-muted); font-size: 13px; }
.analytics-kpi > strong { display: block; margin-top: 8px; color: var(--text-strong); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.analytics-kpi > strong.green { color: var(--brand-600); }
.analytics-kpi small { display: block; margin-top: 6px; color: var(--text-faint); font-size: 12px; }
.analytics-layout { display: grid; grid-template-columns: 1.4fr .6fr; gap: 15px; margin-bottom: 15px; }
.bar-chart { height: 245px; display: flex; justify-content: space-around; align-items: end; gap: 10px; padding: 24px 10px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 48px, #edf1ef 49px); }
.bar-column { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }
.bar-column > span { width: min(34px, 70%); min-height: 8px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#55b99a, #1b8164); }
.bar-column small { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.funnel { display: grid; gap: 8px; }
.funnel > div { width: var(--w); min-width: 48%; display: flex; justify-content: space-between; align-items: center; margin: 0 auto; padding: 10px 12px; border-radius: 7px; background: #e8f3ef; color: #507067; font-size: 12px; }
.funnel > div:nth-child(2) { background: #e8f0f4; }
.funnel > div:nth-child(3) { background: #eef0f5; }
.funnel > div:nth-child(4) { background: #f5f0e7; }
.funnel > div:nth-child(5) { background: #e6f3eb; color: var(--brand-700); }
.funnel strong { font-variant-numeric: tabular-nums; }
.top-products-card { margin-top: 15px; }
.top-products-card .detail-section-title a { color: var(--brand-600); font-size: 12px; }
.rank { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: #edf2f0; color: #63766f; font-size: 12px; font-weight: 700; }
.top-products-card tbody tr:nth-child(-n+3) .rank { background: var(--brand-100); color: var(--brand-700); }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); min-width: 220px; max-width: calc(100% - 36px); padding: 12px 17px; border-radius: 11px; background: #0d2923; color: #fff; box-shadow: 0 16px 44px rgba(0,0,0,.22); font-size: 13px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .admin-main { padding-inline: 24px; }
  .order-table th, .order-table td { padding-inline: 12px; }
  .order-table:not(.product-admin-table) th:nth-child(3),
  .order-table:not(.product-admin-table) td:nth-child(3) { display: none; }
  .product-admin-table th:nth-child(3), .product-admin-table td:nth-child(3),
  .product-admin-table th:nth-child(7), .product-admin-table td:nth-child(7) { display: none; }
}

@media (min-width: 961px) and (max-width: 1080px) {
  .order-table:not(.product-admin-table) th:nth-child(5),
  .order-table:not(.product-admin-table) td:nth-child(5) { display: none; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding-top: 18px; }
  .mobile-admin-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; margin: -18px -24px 22px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
  .mobile-admin-bar .brand { color: var(--text-strong); }
  .mobile-admin-bar nav { display: flex; gap: 4px; margin-left: auto; }
  .mobile-admin-bar nav a { padding: 7px 9px; border-radius: 8px; color: var(--text-muted); font-size: 12px; }
  .mobile-admin-bar nav a.active { background: var(--brand-100); color: var(--brand-700); font-weight: 700; }
  .mobile-logout { margin-left: 0; }
  .order-detail-layout, .analytics-layout, .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail-grid > .detail-section:last-child { grid-column: auto; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { min-height: 300px; padding: 32px; }
  .auth-art h1 { margin-top: 48px; font-size: 54px; }
  .auth-panel { padding: 48px 28px; }
  .auth-box > .brand { margin-bottom: 42px; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1180px); }
  .nav { min-height: 62px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand small, .nav-links { display: none; }
  .nav-actions .ghost-button { display: none; }
  .hero { padding: 42px 0 50px; }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: clamp(38px, 11vw, 46px); line-height: 1.16; letter-spacing: -.02em; }
  .hero-copy { margin: 20px 0 25px; font-size: 15px; line-height: 1.75; }
  .hero-actions > * { flex: 1; padding-inline: 13px; }
  .stat-row { gap: 25px; margin-top: 30px; }
  .stat strong { font-size: 19px; }
  .hero-visual, .hero-image { min-height: 300px; height: 300px; }
  .hero-image { width: 100%; border-radius: 23px; object-position: 65% center; }
  .hero-card { left: 12px; bottom: 12px; padding: 12px 14px; }
  .hero-card strong { font-size: 14px; }
  .trust-bar { margin-top: -13px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { padding: 15px 17px; }
  .section { padding: 68px 0; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading > p { margin-top: 13px; font-size: 14px; }
  .product-grid { gap: 11px; }
  .product-info { padding: 14px; }
  .product-info h3 { font-size: 16px; }
  .product-info p { min-height: 46px; font-size: 13px; }
  .price { font-size: 20px; }
  .price small { display: none; }
  .add-button { width: 36px; height: 36px; }
  .product-tag { top: 9px; left: 9px; padding: 5px 7px; font-size: 11px; }
  .product-brand { left: 9px; bottom: 9px; font-size: 9px; }
  .story-card { grid-template-columns: 1fr; gap: 27px; padding: 29px 20px; }
  .footer-grid { display: grid; }
  .modal { border-radius: 18px; }
  .age-card { padding: 28px 22px; border-radius: 19px; }
  .age-card h2 { font-size: 26px; }
  .modal-header { padding: 21px 20px 15px; }
  .modal-header h2 { font-size: 24px; }
  .modal-body { padding: 6px 20px 23px; }
  .field { height: 46px; }
  .field, .admin-field, .date-range input { font-size: 16px; }
  .ghost-button, .solid-button, .admin-action, .detail-button, .filter-button { min-height: 44px; }
  .auth-art { min-height: 270px; padding: 27px 22px; }
  .auth-art h1 { margin-top: 42px; font-size: 40px; line-height: 1.16; }
  .auth-art p { font-size: 14px; }
  .auth-panel { padding: 39px 22px; }
  .auth-box h2 { font-size: 29px; }
  .admin-main { padding: 17px 14px 70px; }
  .mobile-admin-bar { margin: -17px -14px 18px; padding: 11px 14px; }
  .mobile-admin-bar .brand { margin-right: auto; }
  .mobile-admin-bar .brand span:last-child { display: none; }
  .mobile-admin-bar nav { margin-left: 0; }
  .admin-topbar { align-items: flex-end; }
  .admin-topbar h1, .detail-head h1 { font-size: 25px; }
  .admin-topbar p { font-size: 13px; }
  .admin-badge { padding: 7px 9px; font-size: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { min-height: 105px; padding: 14px; }
  .kpi-card > strong { font-size: 21px; }
  .admin-toolbar { display: grid; padding: 13px; }
  .search-wrap { width: 100%; }
  .date-range { order: 2; overflow: visible; width: 100%; }
  .date-range label { min-width: 0; min-height: 64px; flex: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding-block: 7px; line-height: 1.3; }
  .date-range input { width: 100%; }
  .filter-row { overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .order-toolbar .filter-row { order: 3; }
  .table-meta { margin-left: 8px; }
  .order-table, .order-table tbody, .order-table tr, .order-table td { display: block; }
  .order-table thead { display: none; }
  .order-table tr { position: relative; padding: 15px; border-top: 1px solid #edf1ef; }
  .order-table tr:first-child { border-top: 0; }
  .order-table td { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border: 0; font-size: 13px; }
  .order-table td::before { content: attr(data-label); width: 68px; flex: 0 0 auto; color: var(--text-faint); font-size: 12px; }
  .order-table td:last-child { position: absolute; right: 14px; bottom: 14px; }
  .order-table td:last-child::before { display: none; }
  .order-table:not(.product-admin-table) td:nth-child(2),
  .order-table:not(.product-admin-table) td:nth-child(3),
  .order-table:not(.product-admin-table) td:nth-child(5),
  .order-table:not(.product-admin-table) td:nth-child(7) { display: none; }
  .product-admin-table td:nth-child(2), .product-admin-table td:nth-child(3),
  .product-admin-table td:nth-child(4), .product-admin-table td:nth-child(6),
  .product-admin-table td:nth-child(7) { display: none; }
  .table-product { min-width: 0; }
  .top-products-card { overflow-x: auto; }
  .top-products-card .order-table { display: table; min-width: 650px; }
  .top-products-card .order-table thead { display: table-header-group; }
  .top-products-card .order-table tbody { display: table-row-group; }
  .top-products-card .order-table tr { display: table-row; padding: 0; }
  .top-products-card .order-table td { display: table-cell; padding: 12px; }
  .top-products-card .order-table td::before { display: none; }
  .top-products-card .order-table td:last-child { position: static; }
  .detail-head { display: grid; align-items: start; }
  .detail-actions { width: 100%; }
  .detail-actions button { flex: 1; }
  .order-overview { align-items: flex-end; padding: 16px; }
  .order-overview h2 { max-width: 210px; font-size: 15px; word-break: break-all; }
  .overview-total strong { font-size: 22px; }
  .commerce-product-row { grid-template-columns: 58px 1fr auto; }
  .commerce-product-row img { width: 58px; height: 58px; }
  .commerce-product-row .quantity { display: none; }
  .recipient-grid, .shipment-summary { grid-template-columns: 1fr; gap: 14px; }
  .tracking-event { grid-template-columns: 76px 14px minmax(0, 1fr); }
  .tracking-event:not(:last-child)::after { left: 82px; }
  .wide { grid-column: auto; }
  .product-profile .detail-content { min-height: 0; grid-template-columns: 1fr; }
  .product-profile img { max-height: 220px; }
  .product-profile h2 { font-size: 23px; }
  .metric-grid { gap: 9px; }
  .analytics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .analytics-kpi { min-height: 102px; padding: 14px; }
  .analytics-kpi > strong { font-size: 21px; }
  .bar-chart { height: 210px; }
}

@media (max-width: 380px) {
  .mobile-admin-bar nav a { padding-inline: 7px; }
  .analytics-grid, .kpi-grid { grid-template-columns: 1fr; }
  .product-info h3 { font-size: 15px; }
}
