@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --ink-900: #111827;
  --ink-800: #1f2937;
  --ink-700: #374151;
  --nav-900: #101522;
  --nav-800: #172033;
  --page: #f4f6f1;
  --surface-0: #ffffff;
  --surface-50: #f7f8f4;
  --surface-100: #edf0e8;
  --line: #dfe4d8;

  --amber: #c9792b;
  --amber-ink: #8a4b18;
  --amber-soft: #fff0dc;
  --copper: #a85f2a;
  --emerald: #168a61;
  --emerald-ink: #0c5f43;
  --emerald-soft: #ddf5ea;
  --azure: #3267a8;
  --azure-ink: #204a7f;
  --azure-soft: #e1ecfb;
  --magenta: #b14f5f;
  --magenta-ink: #8f2f42;
  --magenta-soft: #f9e2e6;
  --violet: #6f5b9a;
  --violet-ink: #4d3c76;
  --violet-soft: #ebe6f6;

  --text-900: #17172b;
  --text-700: #4e5268;
  --text-500: #747990;
  --text-400: #9aa0ae;
  --gradient-brand: linear-gradient(135deg, #c9792b 0%, #e0a348 100%);

  --font-display: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--page);
  color: var(--text-900);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(22,138,97,.25); } 70% { box-shadow: 0 0 0 10px rgba(22,138,97,0); } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.section.active { animation: fadeInUp .25s ease both; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--nav-900), #0b101c);
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #171006;
  flex-shrink: 0;
  box-shadow: 0 10px 24px -16px rgba(224,163,72,.9);
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 10px 24px -16px rgba(0,178,255,.9);
}
.login-brand-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
}
.login-brand-lockup {
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto 22px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 18px 40px -28px rgba(0, 178, 255, .8);
}
.brand-text { line-height: 1.15; }
.brand-text strong { font-size: 16px; font-weight: 800; display: block; letter-spacing: -.01em; }
.brand-text span { font-size: 10.5px; color: rgba(255,255,255,.52); letter-spacing: .09em; text-transform: uppercase; }
.nav-group { margin-bottom: 22px; }
.sidebar nav { overflow-y: auto; min-height: 0; padding-right: 2px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
.nav-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 0 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.72); font-size: 14px; font-weight: 550;
  margin-bottom: 3px; transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.nav-item.active { background: #ffffff; color: var(--nav-900); font-weight: 750; box-shadow: 0 12px 24px -20px rgba(0,0,0,.5); }
.nav-item .ic { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item .badge-count {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  background: rgba(255,255,255,.12); padding: 1px 7px; border-radius: 20px;
}
.nav-item.active .badge-count { background: var(--surface-100); color: var(--text-700); }
.sidebar-foot { margin-top: 14px; flex-shrink: 0; padding: 14px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .plan-label { font-size: 10.5px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .08em; }
.sidebar-foot .plan-name { font-weight: 800; font-size: 16px; margin: 3px 0 9px; }
.sidebar-foot .upgrade-btn { display: block; text-align: center; font-size: 13px; font-weight: 750; background: #e0a348; color: #201305; padding: 9px; border-radius: var(--radius-sm); transition: filter .18s, transform .15s; }
.sidebar-foot .upgrade-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 25px; font-weight: 800; margin: 0; letter-spacing: -.025em; }
.topbar .sub { font-size: 13.5px; color: var(--text-500); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.store-pill { display: flex; align-items: center; gap: 10px; background: var(--surface-0); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; }
.store-pill .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.store-pill .name { font-size: 13.5px; font-weight: 700; }
.store-pill .loc { font-size: 11px; color: var(--text-500); }
.content { padding: 30px 36px 60px; }
.section { display: none; }
.section.active { display: block; }

.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid currentColor;
}
.stamp.amber { color: var(--amber-ink); background: var(--amber-soft); }
.stamp.emerald { color: var(--emerald-ink); background: var(--emerald-soft); }
.stamp.magenta { color: var(--magenta-ink); background: var(--magenta-soft); }
.stamp.azure { color: var(--azure-ink); background: var(--azure-soft); }
.stamp.ink { color: var(--text-700); background: var(--surface-50); border-color: var(--line); }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 1100px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.card {
  background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px 24px; box-shadow: 0 18px 50px -44px rgba(17,24,39,.55);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-1px); border-color: #cbd3c3; box-shadow: 0 20px 50px -40px rgba(17,24,39,.72); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.card-head .hint { font-size: 12.5px; color: var(--text-500); }
.kpi { border-left: 4px solid var(--line); position: relative; overflow: hidden; }
.kpi.amber { border-left-color: var(--amber); }
.kpi.magenta { border-left-color: var(--magenta); }
.kpi.emerald { border-left-color: var(--emerald); }
.kpi.azure { border-left-color: var(--azure); }
.kpi .label { font-size: 12px; color: var(--text-500); text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.kpi .value { font-family: var(--font-mono); font-size: 29px; font-weight: 650; margin: 7px 0 3px; letter-spacing: -.03em; }
.kpi .delta { font-size: 12.5px; color: var(--text-500); }

.btn {
  border: none; border-radius: var(--radius-sm); padding: 9px 15px;
  font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .14s ease, box-shadow .18s ease, opacity .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink-900); color: #fff; box-shadow: 0 12px 28px -20px rgba(17,24,39,.75); }
.btn-amber { background: #e0a348; color: #201305; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-magenta { background: var(--magenta); color: #fff; }
.btn-ghost { background: var(--surface-100); color: var(--text-700); }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--text-700); }
.btn-outline:hover { border-color: var(--ink-700); color: var(--text-900); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; filter: none !important; }
.btn-block { width: 100%; justify-content: center; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-500); font-weight: 800; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; border-bottom: 1px solid var(--surface-100); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.row-clickable { transition: background .15s ease; }
tr.row-clickable:hover { background: var(--surface-50); cursor: pointer; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.cell-name { font-weight: 700; }
.cell-sub { font-size: 12px; color: var(--text-500); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.paid, .chip.completed, .chip.confirmed, .chip.delivered, .chip.approved { background: var(--emerald-soft); color: var(--emerald-ink); }
.chip.pending_payment, .chip.pending_review, .chip.pending_collection, .chip.pending, .chip.draft, .chip.pending_approval { background: var(--amber-soft); color: var(--amber-ink); }
.chip.fulfilling, .chip.sent, .chip.assigned, .chip.out_for_delivery, .chip.accepted, .chip.needs_info { background: var(--azure-soft); color: var(--azure-ink); }
.chip.cancelled, .chip.failed, .chip.declined { background: var(--magenta-soft); color: var(--magenta-ink); }
.chip.partially_paid { background: var(--amber-soft); color: var(--amber-ink); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-700); margin-bottom: 6px; }
.field input, .field select, .field textarea, .thread-actions input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  font-family: var(--font-body); font-size: 14px; background: var(--surface-0); color: var(--text-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder, .thread-actions input::placeholder { color: var(--text-400); }
.field input:focus, .field select:focus, .field textarea:focus, .thread-actions input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(201,121,43,.14); }
.field input[disabled] { color: var(--text-500); background: var(--surface-50); }

.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-0); min-height: 560px; }
.thread-list { border-right: 1px solid var(--line); overflow-y: auto; }
.thread-item { padding: 16px 18px; border-bottom: 1px solid var(--surface-100); cursor: pointer; transition: background .15s ease; }
.thread-item:hover, .thread-item.active { background: var(--surface-50); }
.thread-item .top-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.thread-item .t-name { font-weight: 800; font-size: 14px; }
.thread-item .t-time { font-size: 11px; color: var(--text-400); }
.thread-item .t-preview { font-size: 12.5px; color: var(--text-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-pane { display: flex; flex-direction: column; }
.thread-pane-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.thread-messages { flex: 1; padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: var(--surface-50); }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; animation: popIn .2s ease both; }
.bubble.inbound { align-self: flex-start; background: var(--surface-0); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.outbound { align-self: flex-end; background: var(--emerald); color: #fff; border-bottom-right-radius: 4px; }
.bubble .time { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }
.thread-actions { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.thread-actions input { flex: 1; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.kanban-col { background: var(--surface-50); border-radius: var(--radius-md); padding: 14px; min-height: 200px; border: 1px solid var(--line); }
.kanban-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; color: var(--text-500); }
.kanban-card { background: var(--surface-0); border-radius: 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); font-size: 13px; transition: transform .15s ease, border-color .15s ease; }
.kanban-card:hover { transform: translateY(-2px); border-color: var(--amber); }
.kanban-card .kc-id { font-family: var(--font-mono); font-size: 11px; color: var(--text-500); }
.kanban-card .kc-driver { font-size: 12px; color: var(--text-500); margin-top: 4px; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; cursor: pointer; inset: 0; background: var(--surface-100); border: 1.5px solid var(--line); border-radius: 30px; transition: background .2s ease; }
.switch-track::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 2.5px; background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.switch input:checked + .switch-track { background: var(--emerald); border-color: transparent; }
.switch input:checked + .switch-track::before { transform: translateX(17px); }

.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--page); }
.login-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 42px 48px; width: 620px; max-width: calc(100vw - 32px); animation: modalPop .28s ease both; box-shadow: 0 28px 70px -44px rgba(17,24,39,.75); }
.login-card h1 { font-size: 22px; text-align: center; margin: 0 0 4px; font-weight: 800; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-400); }
.empty .ic-empty { font-size: 32px; margin-bottom: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-row .bar-label { width: 110px; font-size: 13px; color: var(--text-700); flex-shrink: 0; }
.bar-track { flex: 1; height: 10px; background: var(--surface-100); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-row .bar-val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-500); width: 30px; text-align: right; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink-900); border: 1px solid rgba(255,255,255,.12); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 650; z-index: 50; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .25s ease, transform .25s ease; box-shadow: 0 18px 40px -20px rgba(0,0,0,.55); }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.46); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 40; animation: fadeInUp .18s ease both; }
.modal { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; width: 440px; max-width: 92vw; max-height: 86vh; overflow-y: auto; animation: modalPop .2s ease both; box-shadow: 0 30px 80px -40px rgba(17,24,39,.8); }
.modal h3 { margin: 0 0 16px; font-weight: 800; }
.modal-close-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .two-col, .inbox { grid-template-columns: 1fr; } .kanban { grid-template-columns: repeat(2,1fr); } }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.tag-collection { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-500); }
.muted { color: var(--text-500); }

.signal-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 70;
  width: 58px; height: 58px; border-radius: 16px;
  background: var(--ink-900);
  border: 1px solid rgba(255,255,255,.12); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px -24px rgba(17,24,39,.9);
  transition: transform .18s ease, background .18s ease;
}
.signal-fab:hover { transform: translateY(-2px); background: var(--ink-800); }
.signal-fab svg { width: 28px; height: 28px; }
.signal-badge {
  position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px; border-radius: 50%;
  background: var(--emerald); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
  box-shadow: 0 0 0 3px var(--page);
}
.signal-badge.urgent { animation: pulseGlow 1.8s infinite; }
.signal-panel {
  position: fixed; bottom: 98px; right: 26px; z-index: 70;
  width: 360px; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -42px rgba(17,24,39,.85);
  transform-origin: bottom right; animation: modalPop .2s ease both; overflow: hidden;
  color: var(--text-900);
}
.signal-panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--ink-900); color: #fff; }
.signal-panel-head .signal-avatar { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.signal-panel-head .signal-avatar svg { width: 22px; height: 22px; }
.signal-panel-head strong { font-size: 15px; display: block; font-weight: 800; }
.signal-panel-head span { font-size: 11.5px; opacity: .72; }
.signal-panel-close { margin-left: auto; background: rgba(255,255,255,.09); border: none; color: #fff; width: 28px; height: 28px; border-radius: 8px; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.signal-panel-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; color: var(--text-900); }
.signal-insight { display: flex; gap: 10px; padding: 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; background: #fbfbf7; border: 1px solid var(--line); color: var(--text-900); cursor: pointer; transition: transform .15s ease, border-color .15s ease; animation: popIn .2s ease both; }
.signal-insight:hover { transform: translateX(2px); border-color: var(--amber); }
.signal-insight .mi-icon { width: 9px; height: 9px; border-radius: 50%; background: var(--azure); margin-top: 5px; flex-shrink: 0; }
.signal-insight.urgent .mi-icon { background: var(--magenta); }
.signal-insight.warning .mi-icon { background: var(--amber); }
.signal-insight.positive .mi-icon { background: var(--emerald); }
.signal-panel-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.signal-panel-foot input { flex: 1; background: var(--surface-0); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; color: var(--text-900); font-size: 13px; font-family: var(--font-body); }
.signal-panel-foot input:focus { outline: none; border-color: var(--amber); }
.signal-panel-foot button { background: var(--ink-900); color: #fff; border: none; border-radius: var(--radius-sm); width: 38px; flex-shrink: 0; font-weight: 800; }
.signal-loading { text-align: center; padding: 30px 0; color: var(--text-500); font-size: 13px; }

/* EcommerceWorx brand-board refresh */
:root {
  --ink-900: #101828;
  --ink-800: #172033;
  --ink-700: #243047;
  --nav-900: #050a12;
  --nav-800: #0b1220;
  --page: #070c15;
  --surface-0: #101828;
  --surface-50: #0d1422;
  --surface-100: #172033;
  --line: rgba(0, 178, 255, .18);
  --amber: #ff8a00;
  --amber-ink: #ffc53d;
  --amber-soft: rgba(255, 138, 0, .12);
  --copper: #ff8a00;
  --emerald: #22c55e;
  --emerald-ink: #9ef01a;
  --emerald-soft: rgba(34, 197, 94, .13);
  --azure: #00b2ff;
  --azure-ink: #66d9ff;
  --azure-soft: rgba(0, 178, 255, .13);
  --magenta: #7c3aed;
  --magenta-ink: #c084fc;
  --magenta-soft: rgba(124, 58, 237, .14);
  --violet: #7c3aed;
  --violet-ink: #c084fc;
  --violet-soft: rgba(124, 58, 237, .14);
  --text-900: #f8fafc;
  --text-700: #cbd5e1;
  --text-500: #94a3b8;
  --text-400: #64748b;
  --gradient-brand: linear-gradient(135deg, #0066ff 0%, #00b2ff 46%, #22c55e 100%);
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  background:
    linear-gradient(135deg, rgba(0, 102, 255, .16), transparent 32%),
    linear-gradient(225deg, rgba(34, 197, 94, .10), transparent 34%),
    #070c15;
  color: var(--text-900);
}

.login-screen {
  background:
    linear-gradient(135deg, rgba(0, 102, 255, .18), transparent 36%),
    linear-gradient(225deg, rgba(158, 240, 26, .12), transparent 38%),
    #070c15;
}

.login-card,
.sidebar-foot,
.topbar,
.store-pill,
.card,
.fieldset,
.summary-card,
.drawer,
.modal,
.table-wrap,
.panel,
.list-card,
.reconciliation-card,
.campaign-card,
.banner-card,
.insight-card,
.settings-card,
.kanban-col,
.kanban-card,
.signal-panel {
  background: rgba(16, 24, 40, .9);
  border-color: rgba(0, 178, 255, .18);
  color: var(--text-900);
  box-shadow: 0 24px 70px -52px rgba(0, 178, 255, .6), inset 0 1px 0 rgba(255,255,255,.04);
}

.login-card {
  border: 1px solid rgba(0, 178, 255, .22);
  box-shadow: 0 32px 90px -46px rgba(0, 178, 255, .55), inset 0 1px 0 rgba(255,255,255,.05);
}

.login-card h1,
.topbar h1,
.card-head h3,
.modal h3,
.signal-panel-head strong {
  font-family: var(--font-display);
  color: var(--text-900);
  letter-spacing: 0;
}

.login-brand-lockup {
  border: 1px solid rgba(0, 178, 255, .18);
  box-shadow: 0 0 0 1px rgba(255,255,255,.03), 0 20px 52px -34px rgba(0,178,255,.85);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 178, 255, .12), transparent 30%),
    linear-gradient(180deg, #050a12, #0b1220);
  border-right: 1px solid rgba(0, 178, 255, .16);
}

.brand-logo,
.store-pill .avatar {
  background: #0b1220;
  border: 1px solid rgba(0, 178, 255, .24);
  box-shadow: 0 0 24px -12px rgba(0, 178, 255, .9);
}

.brand-text span,
.nav-label,
.sidebar-foot .plan-label,
.cell-sub,
.topbar .sub,
.card-head .hint,
.store-pill .loc,
.summary-row,
.field label,
.muted,
.empty,
.bar-row .bar-label,
.bar-row .bar-val,
.kanban-card .kc-id,
.kanban-card .kc-driver {
  color: var(--text-500) !important;
}

.nav-item {
  color: rgba(226, 232, 240, .72);
}

.nav-item:hover {
  background: rgba(0, 178, 255, .10);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(135deg, #0066ff, #00b2ff);
  color: #fff;
  box-shadow: 0 14px 34px -22px rgba(0, 178, 255, .9);
}

.nav-item.active .badge-count,
.nav-item .badge-count {
  background: rgba(16, 24, 40, .72);
  color: #9ef01a;
  border: 1px solid rgba(158, 240, 26, .22);
}

.topbar {
  backdrop-filter: blur(18px);
}

.content {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .07), transparent 35%),
    linear-gradient(225deg, rgba(0, 178, 255, .08), transparent 36%);
  min-height: calc(100vh - 82px);
}

.card:hover,
.kanban-card:hover,
.signal-insight:hover {
  border-color: rgba(0, 178, 255, .34);
  box-shadow: 0 28px 80px -52px rgba(0, 178, 255, .78), inset 0 1px 0 rgba(255,255,255,.05);
}

.store-pill .name,
.product-title,
.summary-row.total,
.metric strong,
.kpi-value,
.table td,
.table th,
table,
.data-table,
.table {
  color: var(--text-900);
}

.btn-primary,
.sidebar-foot .upgrade-btn,
.button.primary,
.signal-panel-foot button {
  background: linear-gradient(135deg, #0066ff, #00b2ff 52%, #22c55e);
  color: #fff;
  border: 0;
  box-shadow: 0 18px 42px -24px rgba(0, 178, 255, .95);
}

.btn-outline,
.btn-ghost,
.button.ghost {
  background: rgba(16, 24, 40, .5);
  color: var(--text-900);
  border-color: rgba(0, 178, 255, .24);
}

.btn-amber,
.button.accent {
  background: linear-gradient(135deg, #ff8a00, #ffc53d);
  color: #101828;
  box-shadow: 0 18px 42px -28px rgba(255, 138, 0, .9);
}

.field input,
.field select,
.field textarea,
.signal-panel-foot input,
input,
select,
textarea {
  background: rgba(5, 10, 18, .78);
  color: var(--text-900);
  border-color: rgba(0, 178, 255, .22);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.signal-panel-foot input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #00b2ff;
  box-shadow: 0 0 0 3px rgba(0, 178, 255, .16);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(148, 163, 184, .8);
}

.stamp.azure,
.stamp.emerald,
.stamp.amber,
.stamp.magenta,
.stamp.ink {
  background: rgba(16, 24, 40, .72);
  border-color: currentColor;
}

.stamp.azure { color: #00b2ff; }
.stamp.emerald { color: #9ef01a; }
.stamp.amber { color: #ffc53d; }
.stamp.magenta { color: #c084fc; }
.stamp.ink { color: #cbd5e1; }

.bar-track,
.progress-track,
.switch-track,
.metric,
.option-card,
.tab,
.chip,
.tag,
.badge {
  background: rgba(5, 10, 18, .6);
  border-color: rgba(0, 178, 255, .18);
}

.option-card.selected,
.tab.active,
.chip.active {
  border-color: #00b2ff;
  background: rgba(0, 178, 255, .12);
  color: #fff;
}

.toast,
.signal-fab {
  background: #101828;
  border-color: rgba(0, 178, 255, .26);
  box-shadow: 0 22px 60px -32px rgba(0, 178, 255, .9);
}

th,
td,
.divider,
.drawer-head,
.drawer-foot,
.signal-panel-foot {
  border-color: rgba(0, 178, 255, .12) !important;
}

.signal-panel-head {
  background: linear-gradient(135deg, #0066ff, #101828 62%, #22c55e);
}

.signal-panel-body,
.signal-insight {
  background: #0b1220;
  color: var(--text-900);
  border-color: rgba(0, 178, 255, .16);
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-index,
.settings-detail {
  background: rgba(16, 24, 40, .72);
  border: 1px solid rgba(0, 178, 255, .18);
  border-radius: var(--radius-md);
  box-shadow: 0 28px 80px -56px rgba(0, 178, 255, .8);
}

.settings-index {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 134px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-index-head,
.settings-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 178, 255, .12);
}

.settings-index-head h3,
.settings-detail-head h2 {
  margin: 2px 0 0;
  letter-spacing: 0;
}

.settings-detail-head p {
  margin: 6px 0 0;
  max-width: 680px;
  color: var(--text-500);
  font-size: 13px;
  line-height: 1.5;
}

.settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  background: rgba(16, 24, 40, .72);
  border: 1px solid rgba(0, 178, 255, .18);
  border-radius: var(--radius-md);
}

.settings-hero h2 {
  margin: 8px 0 6px;
  letter-spacing: 0;
}

.platform-demo-hero {
  align-items: center;
}

.platform-demo-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.platform-demo-menu {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(16, 24, 40, .72);
  border: 1px solid rgba(0, 178, 255, .18);
  border-radius: var(--radius-md);
}

.platform-demo-menu-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-700);
  text-align: left;
  font-weight: 800;
  padding: 11px 12px;
  cursor: pointer;
}

.platform-demo-menu-item:hover {
  background: rgba(0, 178, 255, .10);
  color: var(--text-900);
}

.platform-demo-menu-item.active {
  background: linear-gradient(135deg, rgba(0, 102, 255, .32), rgba(34, 197, 94, .16));
  border-color: rgba(0, 178, 255, .38);
  color: #fff;
}

.platform-demo-main {
  min-width: 0;
}

.platform-demo-main [data-platform-demo-panel][hidden] {
  display: none;
}

.hero-actions,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.settings-kicker,
.settings-group-label {
  color: var(--text-500);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.settings-search-wrap {
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(0, 178, 255, .12);
}

.settings-search {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.settings-groups {
  overflow-y: auto;
  padding: 14px;
}

.settings-group {
  margin-bottom: 18px;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-group-label {
  padding: 0 6px 8px;
}

.settings-nav-item,
.settings-overview-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-900);
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  margin-bottom: 6px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.settings-nav-item span,
.settings-overview-row span {
  font-weight: 800;
  font-size: 13.5px;
}

.settings-nav-item small,
.settings-overview-row small {
  color: var(--text-500);
  font-size: 11.5px;
  line-height: 1.45;
}

.settings-nav-item:hover,
.settings-overview-row:hover {
  background: rgba(0, 178, 255, .10);
  border-color: rgba(0, 178, 255, .20);
  transform: translateX(2px);
}

.settings-nav-item.active {
  background: linear-gradient(135deg, rgba(0, 102, 255, .28), rgba(34, 197, 94, .16));
  border-color: rgba(0, 178, 255, .38);
  box-shadow: inset 3px 0 0 #00b2ff;
}

.settings-detail {
  min-width: 0;
  padding-bottom: 20px;
}

#settings-tab-body {
  padding: 20px;
}

.settings-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-overview-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.settings-two-col,
.settings-three-col {
  display: grid;
  gap: 16px;
  align-items: start;
}

.settings-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-three-col {
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.4fr) minmax(180px, .8fr);
}

.settings-panel {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, .72);
}

.stamp-stack,
.settings-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.settings-actions-row {
  margin: 14px 0;
}

.settings-warning-strip {
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(245, 158, 11, .10);
  color: var(--text-700);
  font-size: 12.5px;
  line-height: 1.45;
}

.settings-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.storefront-studio-canvas-placeholder {
  display: grid;
  gap: 12px;
  min-height: 280px;
  align-content: center;
  border: 1px dashed rgba(0, 102, 255, .28);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: linear-gradient(180deg, rgba(0, 102, 255, .08), rgba(34, 197, 94, .08));
}

.settings-overview-row.selected {
  background: rgba(0, 178, 255, .12);
  border-color: rgba(0, 178, 255, .32);
  box-shadow: inset 3px 0 0 #00b2ff;
}

@media (max-width: 1100px) {
  .settings-two-col,
  .settings-three-col {
    grid-template-columns: 1fr;
  }
}

.settings-overview-card {
  height: 100%;
}

.store-profile-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.store-profile-main,
.store-profile-side {
  display: grid;
  gap: 16px;
}

.store-profile-address-grid {
  display: grid;
  gap: 14px;
}

.store-profile-address-block {
  border: 1px solid rgba(0, 178, 255, .14);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, .025);
}

.store-profile-address-block h4 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0;
}

.store-profile-swatches {
  display: flex;
  gap: 8px;
  margin: -2px 0 14px;
}

.store-profile-swatches span {
  width: 36px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .22);
}

.profile-preview-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.profile-preview-card p {
  margin: 0 0 12px;
  color: var(--text-700);
  line-height: 1.55;
}

.store-profile-blockers {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.store-profile-blockers li {
  border-left: 3px solid var(--amber);
  padding: 8px 0 8px 10px;
}

.store-profile-blockers strong,
.store-profile-blockers span {
  display: block;
}

.store-profile-blockers strong {
  font-size: 11px;
  color: var(--text-900);
}

.store-profile-blockers span {
  color: var(--text-500);
  font-size: 12.5px;
  line-height: 1.45;
}

.access-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.access-main,
.access-side,
.access-role-list,
.access-grant-list {
  display: grid;
  gap: 16px;
}

.access-blockers {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.access-blockers li {
  border-left: 3px solid var(--amber);
  padding: 7px 0 7px 10px;
}

.access-blockers strong,
.access-blockers span {
  display: block;
}

.access-blockers strong {
  font-size: 11px;
}

.access-blockers span {
  color: var(--text-500);
  font-size: 12.5px;
  line-height: 1.45;
}

.access-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.access-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.access-permission-group,
.access-role-card,
.access-grant-row {
  border: 1px solid rgba(0, 178, 255, .14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .025);
}

.access-permission-group {
  padding: 13px;
}

.access-permission-group h4 {
  margin: 0 0 10px;
  font-size: 12.5px;
  letter-spacing: 0;
}

.access-permission-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  color: var(--text-700);
  font-size: 12.5px;
}

.access-permission-option input {
  width: 16px;
  height: 16px;
}

.access-permission-option small {
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-role-card,
.access-grant-row {
  padding: 12px;
}

.access-grant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.settings-issues {
  min-height: 18px;
  color: var(--magenta-ink);
  font-size: 13px;
  margin-bottom: 10px;
}

.settings-overview-card .settings-overview-row:last-child {
  margin-bottom: 0;
}

.settings-card-wide {
  max-width: 900px;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 178, 255, .12);
}

.settings-row:first-of-type {
  border-top: 0;
}

.settings-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
}

.settings-metric-row > div {
  background: rgba(5, 10, 18, .52);
  border: 1px solid rgba(0, 178, 255, .16);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.settings-metric-row span {
  display: block;
  color: var(--text-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-metric-row strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 20px;
}

.settings-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.security-audit-shell {
  display: grid;
  gap: 18px;
}

.security-grid-two,
.security-form-grid,
.audit-filter-grid {
  display: grid;
  gap: 14px;
}

.security-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  max-width: 900px;
}

.security-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-filter-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.security-state-list {
  display: grid;
  gap: 10px;
}

.security-state-row,
.settings-toggle-row,
.security-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.security-state-row {
  padding: 12px 0;
  border-top: 1px solid rgba(0, 178, 255, .12);
}

.security-state-row:first-child {
  border-top: 0;
}

.settings-toggle-row {
  padding: 10px 0;
  color: var(--text-700);
  font-size: 13px;
  border-top: 1px solid rgba(0, 178, 255, .1);
}

.settings-metric-row.compact strong {
  font-size: 16px;
}

.security-actions {
  justify-content: flex-start;
  margin: 4px 0 14px;
}

.form-issues {
  min-height: 18px;
  color: var(--magenta-ink);
  font-size: 13px;
  margin: 8px 0 10px;
}

@media (max-width: 1100px) {
  .settings-shell,
  .settings-overview-grid,
  .store-profile-shell,
  .access-shell,
  .access-permission-grid,
  .security-grid-two,
  .platform-demo-layout,
  .audit-filter-grid {
    grid-template-columns: 1fr;
  }

  .settings-index {
    position: static;
    max-height: none;
  }

  .platform-demo-menu {
    position: static;
  }
}

@media (max-width: 700px) {
  .settings-row,
  .settings-metric-row,
  .store-profile-address-grid,
  .access-grant-row,
  .security-form-grid,
  .security-state-row,
  .settings-toggle-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .security-state-row,
  .settings-toggle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .security-actions {
    flex-wrap: wrap;
  }

  .settings-detail-head,
  .settings-index-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .login-card {
    width: calc(100vw - 28px);
    padding: 26px 20px;
  }
  .login-brand-lockup {
    width: 100%;
  }
}
