@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e6e8ef;
  --border-strong: #d5d9e3;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --primary: #9333ea;
  --primary-hover: #7e22ce;
  --primary-soft: #f5edff;
  --primary-text: #ffffff;
  --ring: rgba(147, 51, 234, 0.25);
  --gold: #38d9ff;
  --neon: linear-gradient(90deg, #5eff9b, #38d9ff 50%, #e040fb);

  --ok: #15803d; --ok-soft: #e8f7ee;
  --warn: #b45309; --warn-soft: #fff4e0;
  --danger: #dc2626; --danger-soft: #fdecec;
  --info: #1d4ed8; --info-soft: #e8f0ff;
  --accent: #7c3aed; --accent-soft: #f3ecff;
  --neutral-soft: #eef0f4;

  --side-bg: #0d0e13;
  --side-bg-2: #1a1226;
  --side-text: #c7cee6;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.14);
  --sidebar-w: 248px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --surface: #15161d;
    --surface-2: #101117;
    --border: #24252f;
    --border-strong: #33343f;
    --text: #e7ebf5;
    --text-2: #b6c0d8;
    --muted: #8b97b3;
    --primary: #c084fc;
    --primary-hover: #d8b4fe;
    --primary-soft: #2a1740;
    --primary-text: #12061f;
    --ring: rgba(192, 132, 252, 0.3);
    --ok: #4ade80; --ok-soft: #10291c;
    --warn: #fbbf24; --warn-soft: #2d2410;
    --danger: #f87171; --danger-soft: #331618;
    --info: #7aa7ff; --info-soft: #14213f;
    --accent: #b79bff; --accent-soft: #241a40;
    --neutral-soft: #1d1e27;
    --side-bg: #08090c;
    --side-bg-2: #160f20;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }
.break { word-break: break-all; }
.hidden { display: none !important; }
em { font-style: normal; color: var(--muted); font-weight: 400; }
.top-gap { margin-top: 14px; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- app shell ---------- */

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; padding: 18px 14px calc(18px + var(--safe-bottom));
  background: linear-gradient(180deg, var(--side-bg), var(--side-bg-2));
  color: var(--side-text); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 22px; }
.brand-text { flex: 1; min-width: 0; }
.logo { width: 46px; height: 46px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(56, 217, 255, 0.35), 0 0 18px rgba(192, 64, 251, 0.35); }
.logo.lg { width: 120px; height: 120px; margin: -8px auto 10px; display: block; }
.brand-name { color: #fff; font-weight: 650; font-size: 15px; line-height: 1.25; }
.brand-sub { font-size: 12px; color: #38d9ff; }
.icon-btn.close-menu { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: var(--side-text); font: inherit; font-weight: 500; cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 3px 0 0 #38d9ff; }
.nav-badge {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #f59e0b; color: #1a1300; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; margin: 0; }

.main { margin-left: var(--sidebar-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 19px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions form, .mobile-actions form { margin: 0; }
.content { padding: 24px 32px 64px; max-width: 1240px; width: 100%; }
.page-intro { color: var(--muted); margin-bottom: 18px; max-width: 720px; }
.mobile-actions { display: none; }
.scrim { display: none; }
.bottom-nav { display: none; }

/* ---------- phone & tablet ---------- */

@media (max-width: 960px) {
  .sidebar { transform: translateX(-105%); transition: transform 0.25s ease; box-shadow: var(--shadow-lg); width: min(300px, 86vw); }
  .sidebar.open { transform: none; }
  .sidebar.open + .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8, 12, 24, 0.55); }
  .icon-btn.close-menu { display: inline-grid; background: transparent; border-color: rgba(255, 255, 255, 0.15); color: #fff; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 16px; min-height: 58px; padding-top: max(10px, env(safe-area-inset-top)); }
  .page-title { font-size: 18px; }
  .topbar-actions { display: none; }
  .content { padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px); }
  .page-intro { font-size: 14px; margin-bottom: 14px; }
  .mobile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
  .mobile-actions.at-end { margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
  .mobile-actions > *, .mobile-actions form .btn { flex: 1 1 140px; }
  .mobile-actions .btn { width: 100%; min-height: 48px; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
  }
  .tab-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  }
  .tab-link.active { color: var(--primary); }
  .tab-icon { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; }
  .tab-link.active .tab-icon { background: var(--primary-soft); }
  .tab-icon .icon { width: 22px; height: 22px; }
  .tab-icon .nav-badge { position: absolute; top: -4px; right: 2px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 5px; }

  input:not([type="checkbox"]):not([type="file"]):not([type="radio"]), textarea, select { font-size: 16px !important; }
}

/* ---------- building blocks ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card.highlight { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { margin-top: 2px; font-size: 13.5px; }
@media (max-width: 640px) { .card { padding: 16px; margin-bottom: 14px; } }

.link { color: var(--primary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.link .icon { width: 14px; height: 14px; }
.link:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap; text-align: center;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .icon-btn:focus-visible, .tab-link:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn.primary { background: var(--primary); color: var(--primary-text); box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn.ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 9px; }
.btn.sm .icon { width: 16px; height: 16px; }
.btn.lg { min-height: 50px; font-size: 15.5px; padding: 12px 20px; }
.btn.block { width: 100%; }
.btn.copied { color: var(--ok); border-color: var(--ok); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.muted { background: var(--neutral-soft); color: var(--muted); }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.alert .icon { margin-top: 2px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.warn { background: var(--warn-soft); color: var(--warn); margin: 0; }
.alert.ok { background: var(--ok-soft); color: var(--ok); margin: 0; }
.alert.muted { background: var(--neutral-soft); color: var(--text-2); margin: 0; }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px;
  background: #111827; color: #fff; font-weight: 550; box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease;
}
.toast.success .icon { color: #4ade80; }
.toast.error { background: var(--danger); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 960px) { .toast { left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); } }

.empty { text-align: center; padding: 44px 20px; }
.empty-icon { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 16px; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 14px; color: var(--text); }
.field.narrow { max-width: 360px; }
.field small { font-weight: 400; font-size: 13px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input:not([type="checkbox"]):not([type="file"]):not([type="radio"]), textarea, select {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 400; transition: border-color 0.15s, box-shadow 0.15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 46px; line-height: 1.5; }
.input-affix { display: flex; align-items: stretch; }
.input-affix > span {
  display: grid; place-items: center; min-width: 46px; padding: 0 12px; border: 1px solid var(--border-strong); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--muted); font-weight: 600;
}
.input-affix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; min-height: 36px; }
.checkbox input { width: 20px; height: 20px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }

.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--border-strong); flex: none; transition: background 0.2s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--ring); }
.switch > span:last-child { display: flex; flex-direction: column; }
.switch > span:last-child .muted { font-size: 13px; font-weight: 400; }

.advanced { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 4px 14px; }
.advanced summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--text-2); }
.advanced[open] { padding-bottom: 14px; }
.advanced .field, .advanced .row-2 { margin-top: 6px; }

.dropzone {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px dashed var(--border-strong); background: var(--surface-2); transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dz-empty { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; font-size: 14px; }
.dz-empty .icon { width: 30px; height: 30px; color: var(--primary); }
.dropzone.has-image .dz-empty {
  position: absolute; left: 12px; right: 12px; bottom: 12px; flex-direction: row; justify-content: center; padding: 10px;
  background: rgba(15, 23, 42, 0.78); color: #fff; border-radius: 10px;
}
.dropzone.has-image .dz-empty .muted { display: none; }
.dropzone.has-image .dz-empty .icon { width: 18px; height: 18px; color: #fff; }

.sticky-save {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end;
  padding: 14px 0; margin-bottom: 18px; background: linear-gradient(transparent, var(--bg) 35%);
}
@media (max-width: 960px) {
  .sticky-save { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 12px 0; }
  .sticky-save .btn { width: 100%; }
}

/* ---------- home ---------- */

.hello { margin-bottom: 18px; }
.hello h2 { font-size: 23px; font-weight: 700; margin-bottom: 2px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.quick {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick-text span { color: var(--muted); font-size: 13px; }
.quick-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: #f59e0b; color: #1a1300; font-weight: 700; display: grid; place-items: center; font-size: 13px; }
@media (max-width: 1100px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .quick-grid { gap: 10px; }
  .quick { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; position: relative; }
  .quick .chev { display: none; }
  .quick-count { position: absolute; top: 12px; right: 12px; }
  .quick-text strong { font-size: 14.5px; }
  .quick-text span { font-size: 12.5px; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon.violet { background: var(--accent-soft); color: var(--accent); }
.kpi-icon.amber { background: var(--warn-soft); color: var(--warn); }
.kpi-icon.blue { background: var(--info-soft); color: var(--info); }
.kpi-icon.green { background: var(--ok-soft); color: var(--ok); }
.kpi-body { min-width: 0; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .kpis { gap: 10px; }
  .kpi { flex-direction: column; gap: 8px; padding: 14px; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 10px; }
  .kpi-icon .icon { width: 17px; height: 17px; }
  .kpi-value { font-size: 20px; }
}

.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--primary); opacity: 0.9; }
.chart .bar:hover { opacity: 1; }
.chart .bar.zero { fill: var(--border-strong); }
.chart .bar-label { fill: var(--muted); font-size: 13px; font-family: inherit; }
@media (max-width: 560px) { .chart .bar-label { font-size: 22px; } .chart g:nth-child(even) .bar-label { display: none; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } .grid-2 > .card { margin-bottom: 14px; } }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-radius: 10px; min-height: 56px; }
.list-row:hover { background: var(--surface-2); }
.list li + li { border-top: 1px solid var(--border); }
.list-meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
.list-meta strong { font-size: 15px; }

/* ---------- tables (become cards on phones) ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--neutral-soft); border-radius: 12px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-count { font-size: 12px; padding: 0 7px; border-radius: 999px; background: var(--border); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary); }

.search { position: relative; display: flex; align-items: center; min-width: 240px; flex: 0 1 340px; margin: 0; }
.search .icon { position: absolute; left: 13px; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 40px !important; }
@media (max-width: 640px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .tabs { margin: 0 -16px; padding: 4px 16px; border-radius: 0; background: transparent; }
  .tab { background: var(--neutral-soft); }
  .tab.active { background: var(--primary); color: var(--primary-text); }
  .tab.active .tab-count { background: rgba(255, 255, 255, 0.25); color: inherit; }
  .search { flex: 1; min-width: 0; }
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.card:not(.flush) .table th { background: none; padding: 8px 10px; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.card:not(.flush) .table td { padding: 10px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background 0.1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .sub { color: var(--muted); font-size: 12.5px; }
.c-items { color: var(--text-2); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; color: var(--muted); }
.chev-cell { width: 32px; }

@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: center; }
  .card:not(.flush) .table tbody tr { padding: 12px 0; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td, .card:not(.flush) .table td { display: block; padding: 0; border: 0; min-width: 0; }
  .table .chev-cell { display: none; }

  .orders-t .c-customer { grid-row: 1; grid-column: 1; }
  .orders-t .c-total { grid-row: 1; grid-column: 2; }
  .orders-t .c-order { grid-row: 2; grid-column: 1; display: flex; gap: 6px; align-items: baseline; }
  .orders-t .c-order .sub::before { content: "· "; }
  .orders-t .c-status { grid-row: 2; grid-column: 2; justify-self: end; }
  .orders-t .c-items { grid-row: 3; grid-column: 1 / -1; max-width: none; white-space: normal; font-size: 13.5px; }
  .orders-t .c-total .sub { display: none; }

  .customers-t .c-customer { grid-row: 1; grid-column: 1; }
  .customers-t .c-spent { grid-row: 1; grid-column: 2; }
  .customers-t .c-seen { grid-row: 2; grid-column: 1; font-size: 13px; color: var(--muted); }
  .customers-t .c-seen::before { content: "Last seen "; }
  .customers-t .c-orders { grid-row: 2; grid-column: 2; font-size: 13px; color: var(--muted); }
  .customers-t .c-orders::after { content: " orders"; }
  .customers-t .c-id, .customers-t .c-joined { display: none !important; }
}

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { color: var(--muted); font-size: 12.5px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #c7d2fe, #ddd6fe); color: #3730a3; font-weight: 700; font-size: 13px;
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }

/* ---------- order page ---------- */

.order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.order-head h2 { font-size: 22px; font-weight: 700; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.product-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
@media (max-width: 1000px) {
  .grid-main, .product-form { grid-template-columns: 1fr; gap: 0; }
  .reverse-mobile > .col:first-child { order: 2; }
  .product-form .dropzone { max-width: 320px; margin: 0 auto; width: 100%; }
}

.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stepper li { position: relative; display: flex; align-items: center; gap: 10px; }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 12px; }
.stepper li.done:not(:last-child)::after { background: var(--ok); }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--border-strong); color: var(--muted); font-weight: 700; font-size: 13px; background: var(--surface);
}
.step-dot .icon { width: 16px; height: 16px; stroke-width: 3; }
.stepper li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.current .step-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step-text { display: flex; flex-direction: column; font-size: 14px; white-space: nowrap; }
.step-text .muted { font-size: 12.5px; }
@media (max-width: 760px) {
  .stepper { grid-template-columns: 1fr; }
  .stepper li { padding-bottom: 18px; }
  .stepper li:last-child { padding-bottom: 0; }
  .stepper li:not(:last-child)::after { position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; height: auto; margin: 0; }
}

.line-items { list-style: none; margin: 0; padding: 0; }
.line-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.line-item + .line-item { border-top: 1px solid var(--border); }
.line-item img, .thumb-ph { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.thumb-ph { display: grid; place-items: center; background: var(--neutral-soft); color: var(--muted); }
.li-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { color: var(--text); font-weight: 700; font-size: 17px; }

.kv { display: grid; grid-template-columns: 100px 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.customer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px; margin: -6px; border-radius: 10px; }
.customer:hover { background: var(--surface-2); }
.address { display: flex; gap: 10px; font-style: normal; line-height: 1.65; font-size: 15px; }
.address .icon { color: var(--primary); margin-top: 4px; }
.tracking { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.tracking > span { flex: 1; min-width: 0; }

.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); flex-wrap: wrap; }
.danger-zone form { margin: 0; }
@media (max-width: 640px) { .danger-zone form, .danger-zone .btn { width: 100%; } }

/* ---------- products ---------- */

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow 0.15s;
}
.product-card:hover { box-shadow: var(--shadow-lg); }
.product-img { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--neutral-soft); color: var(--muted); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img > .icon { width: 34px; height: 34px; }
.hidden-product .product-img img { opacity: 0.45; filter: grayscale(0.6); }
.overlay-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(15, 23, 42, 0.82); color: #fff; font-size: 12px; font-weight: 600; }
.overlay-badge .icon { width: 14px; height: 14px; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-name { font-weight: 600; line-height: 1.35; }
.product-name:hover { color: var(--primary); }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 4px; }
.product-actions form { margin: 0; }
.product-actions .btn { width: 100%; }
.add-product-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 260px; padding: 20px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.add-product-card:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.add-plus { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; background: var(--primary-soft); color: var(--primary); transition: transform 0.15s; }
.add-plus .icon { width: 30px; height: 30px; stroke-width: 2.5; }
.add-product-card:hover .add-plus { transform: scale(1.08); background: var(--primary); color: var(--primary-text); }
.add-product-card .muted { font-size: 13px; }
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .add-product-card { min-height: 200px; padding: 12px; }
  .add-plus { width: 52px; height: 52px; }
  .product-body { padding: 10px; gap: 8px; }
  .product-name { font-size: 14px; }
  .price { font-size: 15px; }
  .product-meta .pill { font-size: 11px; padding: 2px 8px; }
  .product-actions { gap: 6px; }
  .product-actions .btn { padding: 6px; font-size: 13px; gap: 5px; }
  .product-actions .btn .icon { width: 15px; height: 15px; }
}

/* ---------- settings ---------- */

.settings-section { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; margin-bottom: 8px; }
.settings-intro { padding-top: 6px; }
.settings-intro p { font-size: 14px; margin-top: 4px; }
@media (max-width: 900px) { .settings-section { grid-template-columns: 1fr; gap: 8px; } .settings-intro { padding: 6px 2px 0; } }
.banner-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.banner-preview { width: 320px; max-width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.banner-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 280px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wallet-label { display: flex; align-items: center; gap: 10px; }
.wallet-label .pill { margin-left: auto; }
.coin-icon { position: relative; width: 30px; height: 30px; flex: none; }
.coin-icon > svg { width: 100%; height: 100%; display: block; }
.coin-badge { position: absolute; right: -4px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.coin-badge svg { width: 100%; height: 100%; display: block; }
.coin-name { display: flex; flex-direction: column; line-height: 1.25; }
.coin-name small { font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- customers ---------- */

.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile h2 { font-size: 18px; }
.profile .pill { margin-top: 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 0; border-radius: 12px; background: var(--surface-2); }
.mini-stats > div { display: flex; flex-direction: column; gap: 2px; }
.mini-stats > div + div { border-left: 1px solid var(--border); }
.mini-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.mini-stats .muted { font-size: 12.5px; }
a.who:hover .who-name { color: var(--primary); }

/* ---------- messages ---------- */

.threads { list-style: none; margin: 0; padding: 0; }
.threads li + li { border-top: 1px solid var(--border); }
.thread { display: flex; align-items: center; gap: 14px; padding: 14px 20px; min-height: 72px; transition: background 0.1s; }
.thread:hover { background: var(--surface-2); }
.thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-top { display: flex; align-items: baseline; gap: 8px; }
.thread-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-time { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.thread-preview { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.thread.unread .thread-preview { color: var(--text); font-weight: 600; }
.unread-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 640px) { .thread { padding: 12px 14px; } }

.chat-card { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 420px; overflow: hidden; margin-bottom: 0; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); overscroll-behavior: contain; }
.chat .empty { margin: auto; }
.msg { display: flex; flex-direction: column; max-width: min(560px, 82%); }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 18px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.msg.in .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg.out .bubble { background: var(--primary); color: var(--primary-text); border-bottom-right-radius: 6px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-photo { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; }
.msg-time { font-size: 11.5px; color: var(--muted); margin-top: 4px; padding: 0 4px; }
.order-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.order-chip .icon { width: 14px; height: 14px; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea { flex: 1; resize: none; max-height: 160px; min-height: 46px; border-radius: 23px; padding: 11px 16px; }
.send-btn { min-height: 46px; border-radius: 23px; }
@media (max-width: 960px) {
  /* Chat screen fills the phone like a messaging app (no tab bar). */
  body:has(.chat-card) .bottom-nav { display: none; }
  body:has(.chat-card) .main { height: 100vh; height: 100dvh; min-height: 0; }
  .content:has(.chat-card) { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
  .content:has(.chat-card) .mobile-actions { margin-bottom: 12px; }
  .chat-card { flex: 1; height: auto; min-height: 0; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .composer { padding-bottom: calc(12px + var(--safe-bottom)); }
  .msg { max-width: 88%; }
  .send-btn span { display: none; }
  .send-btn { width: 46px; padding: 0; }
}

/* ---------- broadcast ---------- */

.audience { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); }
.audience .icon { color: var(--primary); }
.counter { align-self: flex-end; }
.tg-preview { padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #cfd9c9, #a8bfae); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tg-bubble { max-width: 100%; background: #fff; color: #0f172a; border-radius: 14px 14px 14px 4px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.tg-photo { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.tg-text { padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; min-width: 160px; }
.tg-text .muted { color: #64748b; }
.tg-button { align-self: stretch; text-align: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); color: #0f172a; font-weight: 600; font-size: 14px; }
@media (prefers-color-scheme: dark) {
  .tg-preview { background: linear-gradient(135deg, #1b2735, #0f1a24); }
  .tg-bubble { background: #212d3b; color: #e7ebf5; }
  .tg-button { background: rgba(255, 255, 255, 0.12); color: #fff; }
}
.bc-list { list-style: none; margin: 0; padding: 0; }
.bc-item { padding: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.bc-item + .bc-item { border-top: 1px solid var(--border); }
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-text .icon { width: 15px; height: 15px; color: var(--muted); vertical-align: -2px; }
progress { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--border); appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--border); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

/* ---------- login ---------- */

.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 500px at 15% 0%, rgba(94, 255, 155, 0.14) 0%, transparent 60%), radial-gradient(900px 500px at 90% 100%, rgba(224, 64, 251, 0.18) 0%, transparent 60%), #0b0c10;
}
.login-card {
  width: 100%; max-width: 400px; padding: 34px 28px; border-radius: 22px; text-align: center;
  background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 { font-size: 23px; font-weight: 700; }
.login-card p { margin-top: -8px; margin-bottom: 8px; }
.login-card .field { text-align: left; }
.login-card .btn { margin-top: 6px; }
@media (max-width: 960px) { .login-card input { font-size: 16px !important; } }

.bot-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- public pages (landing + privacy) ---------- */

.public-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 15% 0%, rgba(94, 255, 155, 0.12) 0%, transparent 60%), radial-gradient(900px 500px at 90% 100%, rgba(224, 64, 251, 0.16) 0%, transparent 60%), #0b0c10;
  color: #e7e9f0;
}
.public-card { width: 100%; max-width: 460px; padding: 32px 26px; border-radius: 22px; background: #15161d; border: 1px solid #24252f; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.public-card.legal { max-width: 720px; text-align: left; gap: 10px; line-height: 1.65; }
.public-card h1 { font-size: 26px; font-weight: 750; }
.public-card h2 { font-size: 17px; margin-top: 12px; }
.public-card a:not(.btn) { color: #38d9ff; }
.public-card ul { margin: 0; padding-left: 20px; }
.public-card .muted { color: #8b8fa3; }
.public-logo { width: 160px; height: 160px; margin: -8px auto 0; border-radius: 50%; }
.public-tagline { color: #38d9ff; font-weight: 600; }
.public-text { color: #b9bccb; }
.public-points { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 6px !important; }
.public-points li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #101117; }
.public-points .icon { color: #c084fc; }
.public-foot { font-size: 13px; color: #8b8fa3; margin-top: 4px; }
.public-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.public-page .btn.primary { background: linear-gradient(90deg, #5eff9b, #38d9ff 50%, #e040fb); color: #0b0c10; border: 0; }

/* ---------- growth: sources + tracked links ---------- */
.grow { margin-bottom: 18px; }
.src-list, .link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.src-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 14px; }
.link-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.link-list li:first-child { border-top: 0; padding-top: 0; }
.link-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 560px) { .link-list li { flex-direction: column; align-items: stretch; } .link-actions .btn { flex: 1; } }

/* ---------- public catalogue ---------- */
.public-page:has(.public-wrap) { display: block; }
.public-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 0 24px; display: flex; flex-direction: column; gap: 22px; }
.public-wrap > .public-card { margin: 40px auto; }
.public-hero { display: flex; align-items: center; gap: 26px; padding: 26px; border-radius: 22px; background: #15161d; border: 1px solid #24252f; }
.public-hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.public-hero .public-logo { margin: 0; flex: none; }
.public-hero .public-text { margin: 8px 0 16px; }
.public-h2 { font-size: 21px; font-weight: 750; margin: 4px 0 14px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pp-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #15161d; border: 1px solid #24252f; transition: transform 0.15s, border-color 0.15s; }
.pp-card:hover { transform: translateY(-3px); border-color: #3a2a55; }
.pp-img { aspect-ratio: 1; display: block; background: #101117; }
.pp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-placeholder { object-fit: contain !important; padding: 18%; opacity: 0.85; }
.pp-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pp-body h3 { font-size: 16px; margin: 0; }
.pp-body h3 a { color: #fff !important; text-decoration: none; }
.pp-desc { color: #9a9db0; font-size: 13.5px; margin: 0; flex: 1; }
.pp-meta { display: flex; align-items: center; justify-content: space-between; }
.pp-price { font-weight: 800; font-size: 18px; color: #fff; }
.pp-price.lg { font-size: 28px; margin: 4px 0; }
.pp-sold { color: #f87171; font-weight: 600; font-size: 13px; }
.pp-stock { color: #5eff9b; font-weight: 600; }
.public-points { flex-direction: row !important; flex-wrap: wrap; }
.public-points li { flex: 1 1 240px; }
.public-crumbs { color: #8b8fa3; font-size: 14px; }
.public-crumbs a { color: #38d9ff; text-decoration: none; }
.pp-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 24px; border-radius: 22px; background: #15161d; border: 1px solid #24252f; }
.pp-detail-img { border-radius: 16px; overflow: hidden; background: #101117; aspect-ratio: 1; }
.pp-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-detail-body { display: flex; flex-direction: column; gap: 10px; }
.pp-detail-body h1 { font-size: 30px; font-weight: 800; }
.pp-full-desc { color: #c3c6d4; line-height: 1.7; }
.public-foot a { color: #38d9ff; }
@media (max-width: 720px) {
  .public-hero { flex-direction: column; text-align: center; padding: 22px 18px; }
  .public-hero .btn { width: 100%; }
  .pp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pp-body { padding: 10px; }
  .pp-detail { grid-template-columns: 1fr; padding: 16px; }
}

/* ---------- SEO landing: trust bar ---------- */
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust-item { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 14px; background: #15161d; border: 1px solid #24252f; }
.trust-item .icon { color: #c084fc; flex: none; width: 22px; height: 22px; }
.trust-item span { display: flex; flex-direction: column; font-size: 13px; color: #9a9db0; }
.trust-item strong { font-size: 14px; color: #e7e9f0; margin-bottom: 1px; }
@media (max-width: 720px) { .trust-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; } .trust-item { padding: 12px; } }
@media (max-width: 400px) { .trust-bar { grid-template-columns: 1fr; } }

.section-intro { color: #b9bccb; margin: -8px 0 16px; line-height: 1.6; }
.section-intro strong { color: #e7e9f0; }

/* ---------- SEO landing: how-to steps ---------- */
.how-section { padding: 0; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.how-step { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 14px; border-radius: 16px; background: #15161d; border: 1px solid #24252f; position: relative; gap: 8px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #5eff9b, #38d9ff); color: #0b0c10; font-weight: 800; font-size: 15px; display: grid; place-items: center; flex: none; }
.how-step .icon { color: #c084fc; width: 22px; height: 22px; }
.how-step strong { color: #e7e9f0; font-size: 14px; }
.how-step p { color: #9a9db0; font-size: 13px; margin: 0; }
@media (max-width: 900px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .how-steps { grid-template-columns: 1fr 1fr; } }

/* ---------- SEO landing: why cards ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why-card { padding: 20px; border-radius: 16px; background: #15161d; border: 1px solid #24252f; display: flex; flex-direction: column; gap: 8px; }
.why-card .icon { color: #c084fc; width: 24px; height: 24px; }
.why-card h3 { font-size: 15px; font-weight: 700; color: #e7e9f0; margin: 0; }
.why-card p { color: #9a9db0; font-size: 13.5px; margin: 0; line-height: 1.55; }
@media (max-width: 720px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- SEO landing: FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border-radius: 14px; background: #15161d; border: 1px solid #24252f; overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 650; font-size: 15px; color: #e7e9f0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: #c084fc; font-weight: 400; transition: transform 0.2s; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 20px 16px; margin: 0; color: #b9bccb; line-height: 1.65; font-size: 14px; }

/* ---------- SEO landing: CTA ---------- */
.cta-section { text-align: center; padding: 40px 24px; border-radius: 22px; background: linear-gradient(135deg, rgba(94, 255, 155, 0.08), rgba(192, 132, 252, 0.12)); border: 1px solid #2a2a3a; }
.cta-section h2 { font-size: 24px; font-weight: 800; color: #e7e9f0; display: block; margin-bottom: 8px; }
.cta-section p { color: #b9bccb; margin-bottom: 18px; }
.cta-section strong { color: #e7e9f0; }

/* ---------- blog ---------- */
.blog-header { margin-bottom: 4px; }
.blog-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.blog-grid.lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.blog-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; background: #15161d; border: 1px solid #24252f; transition: transform 0.15s, border-color 0.15s; text-decoration: none; color: inherit; }
.blog-card:hover { transform: translateY(-2px); border-color: #3a2a55; }
.blog-card h2, .blog-card h3 { font-size: 16px; font-weight: 700; color: #e7e9f0; margin: 0; line-height: 1.35; }
.blog-card p { color: #9a9db0; font-size: 13.5px; margin: 0; line-height: 1.5; }
.blog-date { font-size: 12px; color: #64748b; margin-top: auto; }

.blog-article { max-width: 760px; }
.blog-article header { margin-bottom: 20px; }
.blog-article h1 { font-size: 28px; font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.blog-meta { color: #8b8fa3; font-size: 14px; }

.blog-body { line-height: 1.75; color: #c3c6d4; font-size: 15px; }
.blog-body h2 { font-size: 20px; font-weight: 750; color: #e7e9f0; margin: 28px 0 10px; display: block; }
.blog-body h3 { font-size: 17px; font-weight: 700; color: #e7e9f0; margin: 22px 0 8px; }
.blog-body p { margin: 0 0 14px; }
.blog-body ul, .blog-body ol { margin: 0 0 14px; padding-left: 22px; }
.blog-body li { margin-bottom: 6px; }
.blog-body strong { color: #e7e9f0; }
.blog-body a { color: #38d9ff; }

.blog-cta { margin-top: 32px; padding: 28px; border-radius: 18px; background: linear-gradient(135deg, rgba(94, 255, 155, 0.08), rgba(192, 132, 252, 0.12)); border: 1px solid #2a2a3a; text-align: center; }
.blog-cta h2 { font-size: 20px; font-weight: 750; color: #e7e9f0; display: block; margin-bottom: 6px; }
.blog-cta p { color: #b9bccb; margin-bottom: 14px; }
.blog-cta strong { color: #e7e9f0; }

@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article h1 { font-size: 22px; }
}
