/* ============================================================
   606 STORE — App shell, pages & feature styles
   ============================================================ */

#root { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 90;
  height: 64px; display: flex; align-items: center;
  background: rgba(22,22,28,0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 22px; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent-hi), var(--accent-dim));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 4px 16px -6px var(--accent-glow);
  font-weight: 700; font-size: 13px; color: var(--text-on-accent); letter-spacing: -0.04em;
  font-family: var(--font-mono);
}
.logo-name { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; }
.logo-name b { color: var(--accent-hi); font-weight: 600; }
/* Custom uploaded logo (replaces the 606 mark + name lockup). */
.logo-img { height: 34px; width: auto; max-width: 170px; object-fit: contain; display: block; }
.footer-col .logo-img { max-width: 190px; }
/* Admin settings logo preview */
.logo-preview { width: 96px; height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--border); padding: 7px; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  height: 36px; padding: 0 13px; border-radius: var(--r-sm); display: flex; align-items: center;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: all .15s var(--ease); white-space: nowrap;
}
.nav-link:hover { color: var(--text-1); background: var(--surface-2); }
.nav-link.active { color: var(--text-1); }

.nav-search-wrap { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-search {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 14px;
  background: var(--bg-deep); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-3); min-width: 0; flex: 1; max-width: 600px; transition: box-shadow .18s var(--ease), background .18s var(--ease);
}
.nav-search > svg { flex-shrink: 0; }
.nav-search:focus-within { background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.nav-search input { background: none; border: none; outline: none; color: var(--text-1); font-size: 14px; width: 100%; min-width: 0; }
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.kbd { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); flex-shrink: 0; margin-right: 6px; }

/* Right-side action cluster — consistent 40px controls */
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-md); flex-shrink: 0; position: relative;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
  background: transparent; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-icon-btn:hover { background: var(--surface-2); color: var(--text-1); }
.nav-icon-btn:active { transform: translateY(1px); }
.nav-icon-btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: var(--r-md); }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { color: var(--text-1); }
.nav-btn { --btn-h: 40px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--text-on-accent);
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-family: var(--font-mono);
  box-shadow: 0 0 0 2px var(--bg-base);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 64px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-strong);
}
.hero-eyebrow .led { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.hero h1 { max-width: 22ch; margin: 4px 0 14px; }
.hero h1 .accent { color: var(--accent-hi); }
.hero-sub { max-width: 52ch; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.hero-tg { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--info); background: var(--info-bg); text-decoration: none; box-shadow: inset 0 0 0 1px var(--border); transition: transform .15s, box-shadow .15s; }
.hero-tg:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--info); }
.hero-tg svg { color: var(--info); }
.hero-pitch { max-width: 54ch; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.hero-pitch b { color: var(--text-1); font-weight: 600; }
.hero-bulk { display: flex; align-items: flex-start; gap: 8px; max-width: 54ch; margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.hero-bulk svg { color: var(--info); flex-shrink: 0; margin-top: 2px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.trust-chip {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 15px 0 12px;
  border-radius: var(--r-md); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-1);
}
.trust-chip svg { color: var(--accent-hi); }

.hero-panel {
  border-radius: var(--r-xl); padding: 20px; position: relative; overflow: hidden;
}
.hero-panel-glow { position: absolute; inset: 0; background: radial-gradient(80% 70% at 70% 10%, var(--accent-soft), transparent 60%); pointer-events: none; }

/* ---------- Section headers ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head h2 { letter-spacing: -0.025em; }
.section-head p { color: var(--text-2); font-size: 14.5px; margin-top: 6px; }

/* ---------- Category rail ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; text-align: left;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-2); }
.cat-card .cat-name { font-size: 14.5px; font-weight: 600; }
.cat-card .cat-count { font-size: 12px; color: var(--text-3); }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chip-filter {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); transition: all .15s var(--ease); white-space: nowrap;
}
.chip-filter:hover { color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip-filter.active { color: var(--text-on-accent); background: var(--accent); box-shadow: none; }

/* ---------- Product grid / card ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prod-card {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(180deg, var(--surface-1), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--border); cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease);
}
.prod-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-3); }
.prod-card.out { opacity: 0.72; }
.prod-art-wrap { padding: 12px 12px 0; position: relative; }
.prod-badges { position: absolute; top: 18px; left: 18px; display: flex; gap: 6px; z-index: 2; }
.prod-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.prod-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; }
.price-unit { font-size: 11px; color: var(--text-3); font-family: var(--font-sans); font-weight: 400; }
.stock-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ---------- How it works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how-card { padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); position: relative; }
.how-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-hi); font-weight: 600; }
.how-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); box-shadow: inset 0 0 0 1px var(--accent-line); margin: 14px 0 14px; }

/* ---------- Footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-col h5 { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-link { display: block; font-size: 13.5px; color: var(--text-2); padding: 5px 0; transition: color .14s var(--ease); cursor: pointer; }
.footer-link:hover { color: var(--text-1); }

/* Made-by-Spacie credit */
.made-by { display: inline-flex; align-items: center; gap: 9px; opacity: 0.7; transition: opacity .15s var(--ease); direction: ltr; }
.made-by:hover { opacity: 1; }
.made-by img { height: 22px; width: auto; display: block; }

.tg-handle {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px;
  border-radius: var(--r-pill); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-strong);
  font-size: 13.5px; font-weight: 500; color: var(--text-1); font-family: var(--font-mono); transition: all .15s var(--ease);
}
.tg-handle:hover { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent-hi); }
.tg-handle svg { color: var(--info); }

/* ---------- Auth ---------- */
.auth-wrap { flex: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: calc(100vh - 64px); }
.auth-aside { position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth-aside-glow { position: absolute; inset: 0; background: radial-gradient(70% 80% at 30% 20%, var(--accent-soft), transparent 60%); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-feat { display: flex; gap: 13px; align-items: flex-start; padding: 13px 0; }
.auth-feat-ico { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-hi); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .2s var(--ease); }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px; padding: 34px 0 56px; }
.pdp-gallery { display: flex; flex-direction: column; gap: 12px; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pdp-thumb { border-radius: 10px; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s var(--ease); }
.pdp-thumb.active { box-shadow: inset 0 0 0 2px var(--accent); }
.buy-card { position: sticky; top: 84px; padding: 22px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.total-amount { font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.spec-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.spec-row:last-child { border-bottom: none; }
.spec-row .k { color: var(--text-3); }
.spec-row .v { color: var(--text-1); font-weight: 500; }

/* ---------- Cart drawer ---------- */
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-line-total { font-family: var(--font-mono); font-weight: 600; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 28px; padding: 30px 0 56px; align-items: start; }
.pay-stage { padding: 26px; }
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.coin-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--r-md);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; transition: all .15s var(--ease);
}
.coin-opt:hover { box-shadow: inset 0 0 0 1px var(--border-strong); transform: translateY(-2px); }
.coin-opt.active { box-shadow: inset 0 0 0 1.5px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.coin-glyph { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; font-weight: 600; }
.pay-address { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: var(--r-md); background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pay-address .addr { font-family: var(--font-mono); font-size: 13px; color: var(--text-1); word-break: break-all; flex: 1; }
.countdown-ring { position: relative; width: 56px; height: 56px; }
.status-steps { display: flex; flex-direction: column; gap: 2px; }
.status-step { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.status-step .si { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-3); transition: all .25s var(--ease); }
.status-step.done .si { background: var(--success-bg); color: var(--success); box-shadow: inset 0 0 0 1px var(--success-line); }
.status-step.active .si { background: var(--accent-soft); color: var(--accent-hi); box-shadow: inset 0 0 0 1px var(--accent-line); animation: pulse-ring 1.6s infinite; }
@keyframes pulse-ring { 0%,100% { box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 0 var(--accent-soft); } 50% { box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 6px transparent; } }
.status-step .st { font-size: 14px; font-weight: 500; color: var(--text-3); transition: color .2s; }
.status-step.done .st, .status-step.active .st { color: var(--text-1); }

.cred-reveal { animation: rise .5s var(--ease-out) both; }
.cred-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-radius: var(--r-sm); background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--border); }
.cred-line .cred-text { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-1); }
.success-burst { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); box-shadow: inset 0 0 0 1.5px var(--success-line), 0 0 40px -6px rgba(111,174,138,0.5); animation: pop .5s var(--ease-out) both; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; flex: 1; min-height: calc(100vh - 64px); }
.admin-side { border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg-deep); }
.admin-nav-item { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 13px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: all .14s var(--ease); cursor: pointer; }
.admin-nav-item:hover { background: var(--surface-1); color: var(--text-1); }
.admin-nav-item.active { background: var(--surface-2); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.admin-nav-item.active svg { color: var(--accent-hi); }
.admin-main { padding: 28px 32px; overflow: auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 18px; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface-1), var(--bg-deep)); box-shadow: inset 0 0 0 1px var(--border); }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-value { font-family: var(--font-mono); font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 4px; }
.stat-delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.stat-delta.up { color: var(--success); } .stat-delta.down { color: var(--danger); }

/* ---------- Tables ---------- */
.tbl-wrap { border-radius: var(--r-lg); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text-1); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; color: var(--text-1); }
.tbl tbody tr { transition: background .12s var(--ease); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .mono { font-size: 12.5px; }

.pagination { display: flex; align-items: center; gap: 6px; }
.page-btn { min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); transition: all .14s; }
.page-btn:hover { color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.page-btn.active { background: var(--accent); color: var(--text-on-accent); box-shadow: none; }

.menu { position: absolute; min-width: 180px; padding: 6px; border-radius: var(--r-md); z-index: 60; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 11px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-1); cursor: pointer; width: 100%; transition: background .12s; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-bg); }

.pool-line { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--border); font-family: var(--font-mono); font-size: 12px; }
.pool-line .idx { color: var(--text-3); width: 26px; }

/* ---------- Breadcrumb ---------- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumb a { color: var(--text-3); transition: color .14s; }
.crumb a:hover { color: var(--text-1); }
.crumb svg { color: var(--text-3); }

/* ---------- Mobile nav drawer ---------- */
.mnav { display: none; }
.mobile-bar { display: none; }

/* ---------- Telegram float ---------- */
.tg-float-wrap { position: fixed; bottom: 22px; left: 22px; z-index: 80; }
.tg-float {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 14px;
  border-radius: var(--r-pill); background: linear-gradient(150deg, var(--surface-2), var(--surface-1));
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-3); font-size: 13.5px; font-weight: 600; color: var(--text-1);
  transition: transform .18s var(--ease), box-shadow .2s; cursor: pointer;
}
.tg-float:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--accent-line), var(--sh-3); }
.tg-float .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.tg-pop { position: absolute; bottom: calc(100% + 10px); left: 0; right: auto; min-width: 248px; max-width: min(248px, calc(100vw - 44px)); max-height: calc(100vh - 110px); overflow-y: auto; animation: modal-in .2s var(--ease-out); }
[dir="rtl"] .tg-pop { left: auto; right: 0; }

/* ---------- Dropdown menu header (profile / support) ---------- */
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 9px 6px; }
.profile-btn { --btn-h: 40px; padding-left: 6px; padding-right: 10px; gap: 7px; }
.profile-btn .ico-chev { color: var(--text-3); transition: transform .15s var(--ease); }

/* ---------- Profile settings: two cards side by side ---------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

/* ---------- Combined credentials block (re-viewable delivery) ---------- */
.cred-block {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text-1);
  background: var(--bg-deep); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border-strong);
  padding: 14px 15px; margin: 0; max-height: 280px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
}

/* ---------- Legal pages ---------- */
.legal-layout { display: grid; grid-template-columns: 232px 1fr; gap: 40px; align-items: start; }
.legal-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 3px; }
.legal-doc-link {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 13px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: all .14s var(--ease); cursor: pointer; text-align: left;
}
.legal-doc-link:hover { background: var(--surface-1); color: var(--text-1); }
.legal-doc-link.active { background: var(--surface-2); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.legal-doc-link.active svg { color: var(--accent-hi); }
.legal { max-width: 760px; }
.legal-head { padding-bottom: 6px; }
.legal-section h2 { color: var(--text-1); }
.legal-section .t-body { color: var(--text-2); }
.legal-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.legal-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.legal-list li svg { color: var(--success); flex-shrink: 0; margin-top: 4px; }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 22px; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Hero / catalog layout (class-based so it can go responsive) ---------- */
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.catalog-search { min-width: 200px; max-width: 260px; }

/* ---------- Home CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 38px 42px; border-radius: var(--r-xl);
  background: linear-gradient(150deg, var(--surface-2), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-2);
}
.cta-band-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 130% at 88% 8%, var(--accent-soft), transparent 58%); }
.cta-band-btn { position: relative; z-index: 1; }

/* ---------- Admin: featured product picker ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card {
  display: flex; flex-direction: column; padding: 12px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .18s var(--ease);
}
.feature-card.on { box-shadow: inset 0 0 0 1.5px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.feature-rank {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  background: var(--accent); color: var(--text-on-accent); box-shadow: 0 2px 8px -2px var(--accent-glow);
}
@media (max-width: 1080px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .cta-band-btn { width: 100%; }
}
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Admin dashboard splits + mobile nav ---------- */
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-split-a { grid-template-columns: 1.5fr 1fr; }
.admin-mobile-nav { display: none; }
.admin-mtab {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; flex-shrink: 0;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; transition: all .14s var(--ease);
}
.admin-mtab:hover { color: var(--text-1); }
.admin-mtab.active { color: var(--text-on-accent); background: var(--accent); box-shadow: none; }
.admin-mtab.active svg { color: var(--text-on-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 860px) {
  .nav-links, .nav-search-wrap { display: none; }
  .mnav { display: inline-flex; }
  .hero { padding: 48px 0 40px; }
  .hero-side { display: none; }
  .pdp { grid-template-columns: 1fr; gap: 24px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .admin-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .admin-side { display: none; }
  .admin-mobile-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-deep); position: sticky; top: 64px; z-index: 40; }
  .admin-main { padding: 20px 16px; }
  .admin-head { flex-wrap: wrap; }
  .admin-split, .admin-split-a { grid-template-columns: 1fr; }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mobile-bar { display: flex; }
  .container { padding: 0 18px; }
  /* wide tables scroll horizontally instead of overflowing the page */
  .tbl-wrap { overflow-x: auto; overflow-y: hidden; }
  .tbl { min-width: 620px; }
}
@media (max-width: 680px) {
  .section-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .catalog-controls { width: 100%; }
  .catalog-search { flex: 1; min-width: 0; max-width: none; }
  .pdp { gap: 18px; }
  .buy-card { position: static; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (max-width: 560px) {
  .prod-grid, .cat-grid, .how-grid, .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .nav-inner { gap: 10px; }
  .profile-btn > span { display: none; }
  .container { padding: 0 16px; }
  .pay-stage { padding: 18px; }
  .modal, .drawer { border-radius: var(--r-lg); }
}

/* Featured row is always 4 curated items — balance as 4 → 2 → 1 (never an orphan 3+1).
   Declared after the responsive block so it overrides the shared .prod-grid columns. */
.featured-row { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .featured-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .featured-row { grid-template-columns: 1fr; } }

/* Admin role tag */
.tag-admin { color: var(--accent-hi); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tag-admin svg { color: var(--accent-hi); }

/* Inventory file-import dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 26px 18px; border-radius: var(--r-lg); cursor: pointer;
  background: var(--bg-deep); border: 1.5px dashed var(--border-strong);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dropzone:hover { border-color: var(--accent-line); }
.dropzone.drag { border-color: var(--accent-hi); background: var(--accent-soft); }

/* Admin category grid: 3 on desktop (admin-main is narrow), responsive down. */
.admin-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 980px) { .admin-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .admin-cat-grid { grid-template-columns: 1fr; } }

/* ----- Admin data tables become stacked cards on phones (no horizontal scroll) ----- */
@media (max-width: 720px) {
  .tbl-wrap { overflow: visible; }
  .tbl-wrap > div { overflow: visible; }
  .tbl { min-width: 0; display: block; }
  .tbl thead { display: none; }
  .tbl tbody { display: block; }
  .tbl tr {
    display: flex; flex-direction: column; position: relative; padding: 14px 14px;
    border-bottom: 1px solid var(--border);
  }
  .tbl tbody tr:hover { background: transparent; }
  .tbl tbody tr:last-child { border-bottom: none; }
  .tbl td {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 5px 0; border: none; text-align: right; font-size: 13px; white-space: normal;
  }
  .tbl td::before {
    content: attr(data-label); color: var(--text-3); font-size: 10.5px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; text-align: left; flex-shrink: 0;
  }
  /* primary cell = card title (full width, no label, pinned to top) */
  .tbl td.td-title { display: block; order: -1; padding: 0 40px 9px 0; }
  .tbl td.td-title::before { display: none; }
  .tbl td.td-title .clamp-2 { font-size: 14px; font-weight: 600; }
  /* row-action menu pinned to the card's top-right */
  .tbl td.td-actions { position: absolute; top: 10px; right: 8px; padding: 0; }
  .tbl td.td-actions::before { display: none; }
  .tbl td:empty { display: none; }
  .tbl .mono { font-size: 12.5px; }
}
