:root {
  --primary: #2563eb;
  --accent: #14b8a6;
  --bg: #f2f4fa;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --panel-muted: #eef2f8;
  --ink: #182033;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e8f1;
  --line-strong: #d5dbe8;
  --success: #07966b;
  --warning: #b7791f;
  --danger: #d92d20;
  --sidebar-bg: #111a2f;
  --sidebar-panel: #17223b;
  --sidebar-ink: #d7e0f2;
  --sidebar-muted: #8190ac;
  --shadow: 0 14px 38px rgba(27, 39, 73, .07);
  --shadow-lg: 0 24px 70px rgba(27, 39, 73, .13);
  --radius: 16px;
  --radius-lg: 22px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #131b2d;
  --panel-soft: #172136;
  --panel-muted: #1d2940;
  --ink: #edf2ff;
  --muted: #9aa8bf;
  --muted-2: #6f7d96;
  --line: #26334a;
  --line-strong: #34415a;
  --sidebar-bg: #080e1b;
  --sidebar-panel: #111a2c;
  --sidebar-ink: #e6ecf8;
  --sidebar-muted: #7787a5;
  --shadow: 0 16px 44px rgba(0, 0, 0, .18);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  transition: background .2s ease, color .2s ease;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
svg { display: block; }

/* Shared brand */
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}
.brand-name { font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.muted { color: var(--muted); }

/* Theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(31, 42, 68, .05);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.theme-icon-sun, .theme-icon-moon { grid-area: 1 / 1; font-size: 18px; line-height: 1; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }
.auth-theme-toggle { position: fixed; top: 22px; right: 22px; z-index: 20; }

/* Auth */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, .14), transparent 34%),
    radial-gradient(circle at 76% 82%, rgba(20, 184, 166, .12), transparent 31%),
    var(--bg);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 58px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  top: -270px;
  right: -180px;
  border: 70px solid rgba(37, 99, 235, .05);
}
.auth-copy { max-width: 650px; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.01;
  letter-spacing: -.058em;
}
.auth-copy p { max-width: 560px; margin: 0; color: var(--muted); font-size: 17px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.feature-chip {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 13px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 34px;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 42%, transparent);
  backdrop-filter: blur(12px);
}
.auth-card {
  width: min(440px, 100%);
  padding: 31px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.auth-card h2 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.035em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }

/* Portal shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 19px 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  color: var(--sidebar-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 24%),
    var(--sidebar-bg);
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar .brand { padding: 2px 8px 19px; }
.sidebar .brand-name { color: #fff; }
.sidebar .brand .muted { color: var(--sidebar-muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  margin: 19px 11px 7px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-item {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 10px;
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
  transition: .18s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.30), rgba(20,184,166,.13));
  box-shadow: inset 0 0 0 1px rgba(110,168,255,.13);
}
.nav-icon { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 19px; }
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 8px; min-width: 0; }
.user-mini > div:last-child { min-width: 0; }
.user-mini strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 12px; }
.user-mini span { display: block; color: var(--sidebar-muted); font-size: 10px; }
.avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #164e63;
  font-weight: 950;
  background: linear-gradient(145deg, #bfdbfe, #99f6e4);
}
.avatar-small { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; font-size: 12px; }
.main { grid-column: 2; min-width: 0; padding: 0 25px 110px; }
.topbar {
  min-height: 70px;
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 -25px 22px;
  padding: 12px 25px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(16px);
}
.page-title h1 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.page-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  text-decoration: none;
}
.profile-chip strong, .profile-chip small { display: block; }
.profile-chip strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.profile-chip small { color: var(--muted); font-size: 10px; }
.mobile-menu { display: none; }

/* Dashboard */
.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}
.workspace-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.dashboard-intro h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.dashboard-intro p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.system-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.system-pill span { width: 8px; height: 8px; border-radius: 50%; background: #18b77b; box-shadow: 0 0 0 4px rgba(24,183,123,.12); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.stat-card {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  padding: 17px 18px;
  color: #fff;
  text-decoration: none;
  border: 0;
  box-shadow: 0 14px 28px rgba(42, 57, 96, .13);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 19px 38px rgba(42,57,96,.18); }
.stat-card::after {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  right: -40px;
  bottom: -52px;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
}
.stat-sky { background: linear-gradient(135deg, #2878d8, #46b9d7); }
.stat-violet { background: linear-gradient(135deg, #6457cf, #8d73e7); }
.stat-rose { background: linear-gradient(135deg, #c84d91, #e878af); }
.stat-mint { background: linear-gradient(135deg, #119b7a, #47c99e); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-label { color: rgba(255,255,255,.88); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.stat-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.17);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { position: relative; z-index: 1; margin-top: 12px; font-size: 30px; font-weight: 950; letter-spacing: -.045em; }
.stat-money { font-size: clamp(20px, 2vw, 27px); }
.stat-foot { position: relative; z-index: 1; margin-top: 5px; color: rgba(255,255,255,.76); font-size: 10px; }
.card { padding: 19px; }
.section-gap { margin-top: 15px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.card-title { font-size: 14px; font-weight: 950; letter-spacing: -.02em; }
.card-subtitle { margin-top: 2px; color: var(--muted); font-size: 10px; }
.text-link { color: var(--primary); font-size: 10px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 10px; font-weight: 850; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 13%, transparent); }
.relay-monitor { padding-bottom: 13px; }
.monitor-head { margin-bottom: 13px; }
.monitor-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.monitor-metric { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.monitor-metric:nth-child(1) { background: color-mix(in srgb, #ecfdf5 72%, var(--panel)); }
.monitor-metric:nth-child(2) { background: color-mix(in srgb, #fef9c3 52%, var(--panel)); }
.monitor-metric:nth-child(3) { background: color-mix(in srgb, #eff6ff 68%, var(--panel)); }
html[data-theme="dark"] .monitor-metric:nth-child(1),
html[data-theme="dark"] .monitor-metric:nth-child(2),
html[data-theme="dark"] .monitor-metric:nth-child(3) { background: var(--panel-soft); }
.monitor-metric span, .monitor-metric small { display: block; }
.monitor-metric span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.monitor-metric strong { display: block; margin: 4px 0 2px; font-size: 21px; letter-spacing: -.04em; }
.monitor-metric small { color: var(--muted-2); font-size: 9px; }
.trend-chart { margin-top: 15px; overflow: hidden; }
.trend-chart svg { width: 100%; height: 150px; }
.chart-grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 5 7; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-point { fill: var(--panel); stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: -2px; }
.chart-labels span { display: grid; gap: 1px; color: var(--muted-2); font-size: 9px; text-align: center; }
.chart-labels strong { color: var(--ink); font-size: 10px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 15px; }
.dashboard-side-stack { display: grid; gap: 15px; align-content: start; }
.quick-actions { display: grid; gap: 5px; }
.quick-actions a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.quick-actions a:hover { background: var(--panel-soft); transform: translateX(2px); }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { font-size: 11px; }
.quick-actions small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.quick-actions b { color: var(--muted-2); font-size: 16px; }
.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); }
.quick-icon svg { width: 17px; height: 17px; }
.agency-list { display: grid; }
.agency-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.agency-row:first-child { border-top: 0; padding-top: 0; }
.agency-row .avatar { width: 36px; height: 36px; flex-basis: 36px; }
.agency-row strong, .agency-row span { display: block; }
.agency-row strong { font-size: 11px; }
.agency-row > div:nth-child(2) span { color: var(--muted); font-size: 9px; }
.compact-empty { padding: 18px 10px; }
.performance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.performance-item { display: grid; grid-template-columns: 27px 1fr; gap: 10px; align-items: center; padding: 8px 0; }
.rank { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); font-size: 10px; font-weight: 950; }
.performance-main { min-width: 0; }
.performance-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.performance-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.performance-title span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.progress-track { height: 5px; margin: 6px 0 4px; overflow: hidden; border-radius: 999px; background: var(--panel-muted); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.performance-main small { color: var(--muted-2); font-size: 8px; }

/* Forms, tables, buttons */
.content-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr); gap: 15px; margin-top: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field.full, .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 10px; font-weight: 850; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--panel);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input, .field select { height: 42px; }
.field textarea { min-height: 108px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.field input[readonly] { color: var(--muted); background: var(--panel-soft); }
.help { margin-top: 5px; color: var(--muted); font-size: 9px; }
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 68%, var(--accent))); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 22%, transparent); }
.button.secondary { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); }
.button.soft { color: var(--ink); background: var(--panel-soft); border: 1px solid var(--line); }
.button.danger { color: #b42318; background: #fff1f0; }
html[data-theme="dark"] .button.danger { color: #fda29b; background: rgba(217,45,32,.15); }
.button.small { min-height: 32px; padding: 0 10px; font-size: 9px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.clean-table { border-radius: 10px; }
.table { width: 100%; min-width: 700px; border-collapse: collapse; }
.table th { padding: 10px 12px; background: var(--panel-soft); color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.table td { padding: 11px 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 10px; vertical-align: top; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--panel-soft) 70%, transparent); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 7px; font-size: 8px; font-weight: 900; }
.badge.success { color: #067647; background: #ecfdf3; }
.badge.warning { color: #a15c00; background: #fff7d6; }
.badge.danger { color: #b42318; background: #fef3f2; }
.badge.info { color: #1d4ed8; background: #eff6ff; }
html[data-theme="dark"] .badge.success { color: #6ce9a6; background: rgba(7,150,107,.16); }
html[data-theme="dark"] .badge.warning { color: #f5d56c; background: rgba(183,121,31,.17); }
html[data-theme="dark"] .badge.danger { color: #fda29b; background: rgba(217,45,32,.16); }
html[data-theme="dark"] .badge.info { color: #84adff; background: rgba(37,99,235,.17); }
.code-box { display: flex; align-items: center; gap: 7px; max-width: 520px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.code-box input { width: 100%; border: 0; outline: 0; color: var(--muted); background: transparent; font-size: 9px; }
.empty { padding: 30px 18px; color: var(--muted); text-align: center; font-size: 11px; }
.alert { margin-bottom: 15px; padding: 11px 13px; border-radius: 10px; font-size: 10px; }
.alert.success { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; }
.alert.error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
.alert.info { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
html[data-theme="dark"] .alert.success, html[data-theme="dark"] .alert.error, html[data-theme="dark"] .alert.info { background: var(--panel-soft); border-color: var(--line); color: var(--ink); }
.checkbox-list { max-height: 230px; display: grid; gap: 6px; overflow: auto; padding: 9px; border: 1px solid var(--line); border-radius: 11px; }
.checkbox-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 8px; }
.checkbox-item:hover { background: var(--panel-soft); }
.checkbox-item input { margin-top: 3px; }
.payment-preview { display: grid; gap: 10px; }
.pay-box { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.pay-box strong { display: block; margin-bottom: 4px; }
.qr-preview { width: 100%; max-width: 230px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.toast-copy { position: fixed; right: 20px; bottom: 20px; z-index: 120; padding: 10px 14px; border-radius: 10px; color: #fff; background: #111a2f; box-shadow: 0 18px 45px rgba(0,0,0,.24); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; font-size: 10px; }
.toast-copy.show { opacity: 1; transform: translateY(0); }
.bottom-nav { display: none; }

/* Checkout, receipt, product access */
.checkout-page { min-height: 100vh; padding: 30px 15px; background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 9%, transparent), transparent 32%), var(--bg); }
.checkout-shell { width: min(1050px, 100%); margin: auto; }
.checkout-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; }
.product-panel, .checkout-card, .receipt-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-lg); }
.product-panel { padding: 27px; }
.checkout-card { height: max-content; padding: 23px; }
.product-cover { aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 17%, var(--panel)), color-mix(in srgb, var(--accent) 17%, var(--panel))); }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover-placeholder { color: var(--primary); font-size: 64px; font-weight: 950; }
.product-panel h1 { margin: 21px 0 10px; font-size: 34px; line-height: 1.08; letter-spacing: -.045em; }
.product-description { color: var(--muted); font-size: 13px; }
.price { margin-top: 19px; font-size: 29px; font-weight: 950; letter-spacing: -.04em; }
.seller-card { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 12px; border-radius: 11px; background: var(--panel-soft); }
.checkout-card h2 { margin: 0 0 5px; font-size: 19px; letter-spacing: -.03em; }
.checkout-card > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.receipt-shell { width: min(740px, 100%); margin: auto; }
.receipt-card { overflow: hidden; }
.receipt-top { padding: 25px; text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 11%, var(--panel)), color-mix(in srgb, var(--accent) 10%, var(--panel))); }
.receipt-body { padding: 24px; }
.receipt-code { font-size: 20px; font-weight: 950; letter-spacing: .03em; }
.receipt-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.receipt-row:last-child { border-bottom: 0; }
.receipt-total { font-size: 19px; font-weight: 950; }
.payment-options { display: grid; gap: 10px; margin-top: 17px; }
.footer-note { margin-top: 18px; color: var(--muted); text-align: center; font-size: 10px; }
pre { color: var(--ink); background: var(--panel-soft) !important; border-color: var(--line) !important; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns, .content-grid { grid-template-columns: 1fr; }
  .dashboard-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 20px; border: 0; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 24px 0 70px rgba(0,0,0,.28); }
  .main { padding: 0 14px 92px; }
  .topbar { margin: 0 -14px 18px; padding: 11px 14px; }
  .mobile-menu { display: inline-flex; }
  .page-title p { display: none; }
  .profile-chip > span:last-child { display: none; }
  .top-actions .button.secondary { display: none; }
  .dashboard-intro { align-items: flex-start; }
  .system-pill { display: none; }
  .monitor-metrics { grid-template-columns: 1fr; }
  .dashboard-side-stack { grid-template-columns: 1fr; }
  .performance-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full, .full { grid-column: auto; }
  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 48;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: 0 17px 45px rgba(22,31,55,.15);
  }
  .bottom-nav a { padding: 7px 3px; border-radius: 9px; color: var(--muted); text-align: center; text-decoration: none; font-size: 8px; font-weight: 850; }
  .bottom-nav a.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); }
  .checkout-head { align-items: flex-start; }
  .product-panel, .checkout-card { padding: 19px; }
  .product-panel h1 { font-size: 28px; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 130px; }
  .dashboard-intro h2 { font-size: 20px; }
  .auth-card { padding: 23px; }
  .topbar { gap: 8px; }
  .page-title h1 { font-size: 18px; }
  .card { padding: 15px; }
  .chart-labels strong { display: none; }
  .checkout-page { padding: 17px 9px; }
  .receipt-body { padding: 19px; }
  .receipt-row { font-size: 11px; }
  .theme-toggle { width: 40px; height: 40px; }
}
