:root {
  color-scheme: light;
  --bg: #f5efe4;
  --sidebar-a: #071d18;
  --sidebar-b: #064736;
  --card: #fffdf8;
  --card-soft: #fbf2e5;
  --ink: #0d201a;
  --muted: #64716a;
  --subtle: #8d968d;
  --border: #eadfcd;
  --border-strong: #d9c8ad;
  --primary: #08765e;
  --primary-dark: #075846;
  --secondary: #f1a93a;
  --secondary-dark: #d58122;
  --coral: #d96f57;
  --indigo: #304b7a;
  --success-tint: #e8f5ef;
  --danger: #b44b43;
  --danger-soft: #fde7e2;
  --violet: #7456a8;
  --blue: #2d6fa8;
  --shadow-sm: 0 10px 28px rgba(35, 28, 17, 0.07);
  --shadow-md: 0 26px 76px rgba(35, 28, 17, 0.13);
  --shadow-focus: 0 0 0 4px rgba(17, 132, 111, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
}

/* Premium SaaS refresh: visual-only layer, existing routes and data flow stay untouched. */
:root {
  --bg: #f7f1e8;
  --sidebar-a: #08231d;
  --sidebar-b: #07533f;
  --card: #fffefa;
  --card-soft: #fbf5eb;
  --ink: #0b211b;
  --muted: #63726a;
  --subtle: #96a099;
  --border: #eadfce;
  --border-strong: #dbc9ad;
  --primary: #07866b;
  --primary-dark: #055d4a;
  --secondary: #f2aa38;
  --secondary-dark: #cf7a20;
  --shadow-sm: 0 12px 34px rgba(31, 25, 15, 0.06);
  --shadow-md: 0 28px 84px rgba(31, 25, 15, 0.1);
}

body {
  background:
    radial-gradient(circle at 82% -6%, rgba(242, 170, 56, 0.22), transparent 30%),
    radial-gradient(circle at 22% 2%, rgba(7, 134, 107, 0.1), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, #f7f1e8 48%, #f2eadf 100%);
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.workspace {
  width: 100%;
  max-width: 1720px;
  width: calc(100% - 292px);
  max-width: none;
  margin: 0 0 0 292px;
  padding: 24px clamp(22px, 3vw, 44px) 58px;
  min-width: 0;
  overflow-x: hidden;
}

.sidebar {
  gap: 20px;
  padding: 28px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(circle at 88% 28%, rgba(24, 169, 137, 0.28), transparent 34%),
    linear-gradient(180deg, #09241e 0%, #063b2f 58%, #064a39 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 20px 0 70px rgba(8, 28, 24, 0.16);
}

.brand-block {
  gap: 7px;
  padding: 2px 2px 8px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07));
}

.sidebar h1,
.topbar-title h2,
.panel h2,
.panel h3,
.metric strong,
.chart-head strong,
.finance-empty-state h2 {
  letter-spacing: 0;
}

.sidebar h1 {
  font-size: 29px;
}

.brand-subtitle {
  color: rgba(248, 247, 241, 0.7);
}

.side-nav {
  gap: 7px;
}

.side-nav-link {
  min-height: 46px;
  gap: 12px;
  padding: 0 13px;
  border-radius: 16px;
  color: rgba(248, 247, 241, 0.74);
  transition:
    transform 170ms ease,
    background 170ms ease,
    border-color 170ms ease,
    color 170ms ease,
    box-shadow 170ms ease;
}

.side-nav-link::before {
  content: "•";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.side-nav-link[data-route="dashboard"]::before {
  content: "⌂";
}

.side-nav-link[data-route="supplies"]::before {
  content: "+";
}

.side-nav-link[data-route="products"]::before {
  content: "▦";
}

.side-nav-link[data-route="warehouse"]::before {
  content: "▣";
}

.side-nav-link[data-route="finance"]::before {
  content: "₽";
}

.side-nav-link[data-route="reports"]::before {
  content: "⇧";
}

.side-nav-link[data-route="settings"]::before {
  content: "⚙";
}

.side-nav-link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.09);
}

.side-nav-link.is-active {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 34px rgba(0, 0, 0, 0.14);
}

.side-nav-link.is-active::before {
  background: linear-gradient(145deg, #fff2cc, var(--secondary));
  color: #20342e;
  box-shadow: 0 10px 24px rgba(242, 170, 56, 0.22);
}

.primary-action {
  min-height: 48px;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(207, 122, 32, 0.22);
}

.sidebar-help {
  gap: 6px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
}

.topbar {
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, auto);
  gap: 20px;
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 242, 0.88)),
    var(--card);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(250px, 300px) auto minmax(190px, 260px);
  align-items: center;
  gap: 12px;
}

.topbar .profile-switcher,
.topbar .account-box {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.topbar #stockUpdatedAt {
  line-height: 1.35;
}

.panel,
.chart-card,
.metric,
.table-wrap,
.stock-controls,
.finance-empty-state {
  border-color: rgba(219, 201, 173, 0.68);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 247, 0.9)),
    var(--card);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

.tab-panel.is-active {
  gap: 28px;
}

.summary-grid,
.stock-summary,
.sales-summary {
  gap: 18px;
}

.metric {
  min-height: 134px;
  padding: 22px 22px 20px;
  border-radius: 22px;
}

.metric span:not(.metric-icon) {
  display: block;
  max-width: calc(100% - 52px);
  color: #65736c;
}

.metric strong {
  margin-top: 28px;
  color: #0a251e;
  font-size: clamp(26px, 2vw, 36px);
}

.metric-icon,
.panel-icon {
  border-radius: 16px;
  background: linear-gradient(145deg, #e8f6f1, #fff7e7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 12px 26px rgba(7, 134, 107, 0.12);
}

.metric:hover,
.panel:hover,
.chart-card:hover,
.warehouse-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.top-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.sales-summary {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)) !important;
}

.tab-panel,
.panel,
.chart-card,
.stock-data-panel,
.analytics-panel,
.stock-warehouse-dashboard {
  min-width: 0;
}

.receipt-table {
  min-width: 1180px;
}

.receipt-results-table {
  min-width: 1120px;
}

.top-grid .summary-grid .metric {
  min-height: 116px;
}

input,
select,
textarea {
  border-color: rgba(219, 201, 173, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.form-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.receipt-table td,
.receipt-table th,
.receipt-results-table td,
.receipt-results-table th {
  padding: 14px 13px;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  border-radius: 22px;
}

.table-wrap table {
  border-collapse: separate;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f4ead9, #eee1cd);
  color: #627069;
}

td,
th {
  border-bottom-color: rgba(234, 223, 205, 0.82);
}

tbody tr {
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

tbody tr:hover {
  background: rgba(232, 246, 241, 0.72);
}

.stock-controls {
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 250px) minmax(190px, 250px) auto;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}

.stock-table {
  min-width: 1480px;
}

.stock-table td {
  height: 74px;
}

.stock-table tbody tr:nth-child(even) td,
.report-summary-table tbody tr:nth-child(even),
.receipt-table tbody tr:nth-child(even),
.receipt-results-table tbody tr:nth-child(even) {
  background: rgba(255, 249, 239, 0.58);
}

.stock-table .photo-thumb,
.photo-thumb {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(31, 25, 15, 0.08);
}

.stock-badge,
.value-badge,
.status-pill {
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(7, 134, 107, 0.08);
}

.stock-badge.is-low,
.status-pill.is-low,
.value-badge.is-negative {
  background: #fdebe6;
  color: #a3443b;
}

.stock-badge.is-ok,
.status-pill.is-high,
.value-badge.is-positive {
  background: #e5f5ef;
  color: #055d4a;
}

.warehouse-overview-grid {
  align-items: center;
}

.warehouse-table,
.warehouse-bars,
.forecast-list,
.attention-list {
  display: grid;
  gap: 12px;
}

.warehouse-card,
.warehouse-bar,
.attention-item,
.forecast-item,
.report-registry-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(31, 25, 15, 0.045);
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.warehouse-card:hover,
.warehouse-bar:hover,
.attention-item:hover,
.forecast-item:hover,
.report-registry-item:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 134, 107, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(31, 25, 15, 0.08);
}

.warehouse-drawer {
  border-radius: 26px 0 0 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 242, 0.96)),
    var(--card);
  box-shadow: -28px 0 86px rgba(8, 28, 24, 0.18);
}

.warehouse-drawer-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.finance-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 300px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(219, 201, 173, 0.68);
  border-radius: 24px;
}

.finance-empty-state[hidden] {
  display: none !important;
}

.finance-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(145deg, #e5f5ef, #fff0ce);
  color: var(--primary-dark);
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(7, 134, 107, 0.12);
}

.finance-empty-state h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
}

.finance-empty-state p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

#salesPanel.finance-is-empty .sales-summary,
#salesPanel.finance-is-empty .analytics-panel,
#salesPanel.finance-is-empty .panel:has(.report-summary-table) {
  display: none;
}

.report-summary-table {
  min-width: 1500px;
}

.report-summary-table td {
  height: 68px;
}

.finance-cost-input {
  height: 38px;
  border-radius: 13px;
  text-align: center;
}

.report-layout {
  grid-template-columns: minmax(340px, 470px) minmax(260px, 1fr);
}

.upload-box {
  min-height: 220px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 12%, rgba(242, 170, 56, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(232, 246, 241, 0.92), rgba(255, 250, 242, 0.9));
}

.upload-box span {
  display: grid;
  gap: 8px;
  place-items: center;
}

.upload-box span::before {
  content: "XLSX / CSV";
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  box-shadow: 0 18px 38px rgba(31, 25, 15, 0.08);
}

.mapping-grid label,
.report-layout label:not(.upload-box) {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .topbar #stockUpdatedAt,
  .topbar .account-box {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .workspace {
    padding: 18px 14px 36px;
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    min-height: 0;
    border-radius: 0 0 26px 26px;
  }

  .workspace {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

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

  .side-nav-link {
    min-height: 44px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .topbar .profile-switcher,
  .topbar .account-box,
  .topbar .secondary-action,
  .topbar #stockUpdatedAt {
    width: 100%;
    max-width: none;
  }

  .sales-summary,
  .stock-summary,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .chart-card {
    padding: 18px;
    border-radius: 22px;
  }

  .stock-controls,
  .mapping-grid,
  .report-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep auth controls stable after legacy responsive rules. */
.auth-card .auth-login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.auth-card .auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.auth-card .auth-remember input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: #8b5cf6;
}

.auth-card .auth-remember span {
  display: inline;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
}

.auth-card .auth-text-action {
  width: auto;
  min-height: auto;
  margin: 0;
  box-shadow: none;
}

/* Highest-priority landing motion layout. */
body:not(.is-authenticated) .stockpilot-hero-shell {
  grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.1fr) !important;
  gap: clamp(44px, 6vw, 100px) !important;
}
body:not(.is-authenticated) .stockpilot-hero {
  max-width: 680px !important;
  padding: clamp(24px, 3vw, 48px) !important;
  border: 1px solid rgba(167,139,250,.12) !important;
  border-radius: 34px !important;
  background: radial-gradient(circle at 0% 0%, rgba(124,77,255,.16), transparent 38%), linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)) !important;
}
body:not(.is-authenticated) .stockpilot-hero h1 {
  max-width: 620px !important;
  font-size: clamp(48px, 5vw, 72px) !important;
  line-height: .98 !important;
  letter-spacing: -.04em !important;
}
body:not(.is-authenticated) .stockpilot-demo-preview .stockpilot-mockup {
  transform: rotateY(-3deg) rotateX(1deg) !important;
  transition: transform 480ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease, box-shadow 480ms ease !important;
}
body:not(.is-authenticated) .stockpilot-demo-preview:hover .stockpilot-mockup,
body:not(.is-authenticated) .stockpilot-demo-preview:focus-visible .stockpilot-mockup {
  transform: translateY(-10px) rotateY(0) rotateX(0) scale(1.015) !important;
  border-color: rgba(196,181,253,.48) !important;
  box-shadow: 0 55px 140px rgba(0,0,0,.56), 0 0 110px rgba(124,77,255,.28) !important;
}
@media (max-width: 1120px) {
  body:not(.is-authenticated) .stockpilot-hero-shell { grid-template-columns: 1fr !important; }
  body:not(.is-authenticated) .stockpilot-hero { max-width: none !important; }
}

/* Account components must stay product-like after global theme button rules. */
body.is-authenticated[data-studio-theme] .sidebar-account-card {
  color: var(--text-main, var(--text-primary)) !important;
  border-color: color-mix(in srgb, var(--border, var(--border-color)) 82%, transparent) !important;
  background: color-mix(in srgb, var(--bg-card) 78%, transparent) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18) !important;
}

body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  color: var(--text-muted) !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authenticated[data-studio-theme] .account-center-nav nav button:hover,
body.is-authenticated[data-studio-theme] .account-center-nav nav button.is-active {
  color: var(--text-main, var(--text-primary)) !important;
  border-color: var(--border, var(--border-color)) !important;
  background: color-mix(in srgb, var(--accent, var(--accent-primary)) 11%, var(--bg-card)) !important;
  box-shadow: none !important;
}

body.is-authenticated[data-studio-theme] .account-avatar-grid button {
  color: var(--text-muted) !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authenticated[data-studio-theme] .account-avatar-grid button:hover,
body.is-authenticated[data-studio-theme] .account-avatar-grid button.is-active {
  color: var(--text-main, var(--text-primary)) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authenticated[data-studio-theme] :is(.account-store-item, .security-action-list button) {
  color: var(--text-main, var(--text-primary)) !important;
  border-color: var(--border, var(--border-color)) !important;
  background: var(--bg-card) !important;
  box-shadow: none !important;
}

body.is-authenticated[data-studio-theme] .security-action-list .security-logout {
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border, var(--border-color))) !important;
  background: color-mix(in srgb, var(--danger) 7%, var(--bg-card)) !important;
}

/* Final account polish */
.topbar-account-trigger {
  display: none !important;
}

body.is-authenticated .sidebar-account-card {
  min-height: 62px !important;
  padding: 9px 10px !important;
  border: 1px solid color-mix(in srgb, var(--border, var(--border-color)) 82%, transparent) !important;
  border-radius: 15px !important;
  background: color-mix(in srgb, var(--bg-card, #15162c) 78%, transparent) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18) !important;
  color: var(--text-main, var(--text-primary)) !important;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease !important;
}

body.is-authenticated .sidebar-account-card:hover {
  transform: translateY(-1px) !important;
  border-color: color-mix(in srgb, var(--accent, var(--accent-primary)) 48%, var(--border, var(--border-color))) !important;
  background: color-mix(in srgb, var(--bg-card-hover, #1d1c3b) 88%, transparent) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .24) !important;
}

.account-avatar {
  width: 40px !important;
  height: 40px !important;
  overflow: hidden;
  color: #fff !important;
}

.account-avatar svg,
.account-avatar-option svg {
  width: 52%;
  height: 52%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-avatar.is-large {
  width: 46px !important;
  height: 46px !important;
}

.account-avatar.is-xl {
  width: 72px !important;
  height: 72px !important;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent, var(--accent-primary)) 32%, transparent) !important;
}

.sidebar-account-copy strong {
  color: var(--text-main, var(--text-primary)) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

.sidebar-account-copy small {
  color: var(--text-muted) !important;
  font-size: 9px !important;
}

.sidebar-account-chevron {
  color: var(--text-muted) !important;
  font-size: 16px !important;
  transition: transform 160ms ease;
}

.sidebar-account-card:hover .sidebar-account-chevron {
  transform: translateY(2px);
}

.account-center-backdrop {
  background: color-mix(in srgb, var(--bg-main, #050612) 76%, transparent) !important;
  backdrop-filter: blur(14px) saturate(.8) !important;
}

.account-center {
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  width: min(860px, calc(100vw - 28px)) !important;
  height: min(740px, calc(100vh - 28px)) !important;
  grid-template-columns: 186px minmax(0, 1fr) !important;
  border: 1px solid color-mix(in srgb, var(--border, var(--border-color)) 86%, transparent) !important;
  border-radius: 22px !important;
  background: var(--bg-panel, var(--bg-secondary)) !important;
  box-shadow: 0 44px 140px rgba(0, 0, 0, .62), 0 0 70px color-mix(in srgb, var(--accent, var(--accent-primary)) 10%, transparent) !important;
  transform: translate(-50%, calc(-50% + 12px)) scale(.985) !important;
}

.account-center.is-open {
  transform: translate(-50%, -50%) scale(1) !important;
}

.account-center-nav {
  gap: 14px !important;
  padding: 15px 11px !important;
  border-color: var(--border, var(--border-color)) !important;
  background: color-mix(in srgb, var(--sidebar-bg, #080a18) 94%, var(--accent, #8b5cf6) 6%) !important;
}

.account-center-user {
  gap: 9px !important;
  padding: 5px !important;
}

.account-center-nav nav {
  gap: 3px !important;
}

.account-center-nav nav button {
  min-height: 38px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 10px !important;
}

.account-center-nav nav button:hover {
  color: var(--text-main, var(--text-primary)) !important;
  border-color: var(--border, var(--border-color)) !important;
  background: color-mix(in srgb, var(--bg-card, #15162c) 74%, transparent) !important;
  transform: none !important;
}

.account-center-nav nav button.is-active {
  color: var(--text-main, var(--text-primary)) !important;
  border-color: color-mix(in srgb, var(--accent, var(--accent-primary)) 34%, var(--border, var(--border-color))) !important;
  background: color-mix(in srgb, var(--accent, var(--accent-primary)) 13%, var(--bg-card, #15162c)) !important;
  box-shadow: inset 2px 0 0 var(--accent, var(--accent-primary)) !important;
}

.account-center-nav nav button b {
  color: var(--accent, var(--accent-primary)) !important;
  background: color-mix(in srgb, var(--accent, var(--accent-primary)) 14%, transparent) !important;
}

.account-center-content {
  padding: 0 18px 20px !important;
  background: radial-gradient(circle at 92% -8%, color-mix(in srgb, var(--accent, var(--accent-primary)) 12%, transparent), transparent 30%), var(--bg-main, var(--bg-primary)) !important;
}

.account-center-head {
  padding: 15px 0 12px !important;
  background: color-mix(in srgb, var(--bg-main, var(--bg-primary)) 88%, transparent) !important;
}

.account-center-head h2 {
  font-size: 19px !important;
}

.account-center-head button {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-color: var(--border, var(--border-color)) !important;
  background: var(--bg-card) !important;
  box-shadow: none !important;
}

.account-center-section {
  gap: 11px !important;
}

.account-center-section .panel {
  padding: 14px !important;
  border-color: var(--border, var(--border-color)) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--bg-card, #15162c) 91%, transparent) !important;
  box-shadow: none !important;
}

.account-profile-hero {
  gap: 14px !important;
  min-height: 102px;
  background: linear-gradient(125deg, color-mix(in srgb, var(--accent, var(--accent-primary)) 14%, var(--bg-card)), var(--bg-card)) !important;
}

.account-profile-identity {
  min-width: 0;
}

.account-profile-hero h3 {
  color: var(--text-main, var(--text-primary)) !important;
  font-size: 19px !important;
}

.account-profile-hero p {
  margin-bottom: 9px !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.account-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-plan,
.account-store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--accent-primary)) 22%, transparent);
  border-radius: 999px;
  color: var(--accent, var(--accent-primary));
  background: color-mix(in srgb, var(--accent, var(--accent-primary)) 10%, transparent);
  font-size: 8px;
  font-weight: 850;
}

.account-store-badge {
  color: var(--text-muted);
  border-color: var(--border, var(--border-color));
  background: var(--bg-card);
}

.account-form-card {
  gap: 10px !important;
}

.account-form-card .panel-header,
.avatar-picker-card .panel-header {
  margin-bottom: 0 !important;
}

.account-form-card .panel-header h2,
.avatar-picker-card .panel-header h2,
.account-section-card .panel-header h2 {
  font-size: 15px !important;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.account-form-card label {
  gap: 5px !important;
}

.account-form-card input {
  min-height: 38px !important;
  padding: 0 10px !important;
  border-color: var(--input-border, var(--border)) !important;
  border-radius: 10px !important;
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  font-size: 10px !important;
}

.account-created-card {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border, var(--border-color));
  border-radius: 10px;
  background: var(--input-bg);
}

.account-created-card span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-created-card strong {
  color: var(--text-main, var(--text-primary));
  font-size: 10px;
}

.account-form-card .secondary-action {
  min-height: 36px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
}

.account-avatar-grid {
  grid-template-columns: repeat(6, 72px) !important;
  justify-content: space-between;
  gap: 13px 8px !important;
  padding-top: 3px;
}

.account-avatar-grid button {
  min-height: 96px !important;
  display: grid !important;
  grid-template-rows: 72px auto;
  justify-items: center !important;
  align-content: start !important;
  gap: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.account-avatar-grid button:hover,
.account-avatar-grid button.is-active {
  color: var(--text-main, var(--text-primary)) !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.account-avatar-option {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent, var(--accent-primary)) 28%, var(--border, var(--border-color)));
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.22), transparent 27%), linear-gradient(145deg, color-mix(in srgb, var(--accent, var(--accent-primary)) 88%, #fff 12%), var(--accent-2, var(--accent-secondary)));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent, var(--accent-primary)) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.account-avatar-grid button:hover .account-avatar-option {
  transform: translateY(-2px) scale(1.03);
  border-color: color-mix(in srgb, var(--accent, var(--accent-primary)) 70%, #fff);
  box-shadow: 0 15px 34px color-mix(in srgb, var(--accent, var(--accent-primary)) 32%, transparent);
}

.account-avatar-grid button.is-active .account-avatar-option {
  border: 2px solid #fff;
  outline: 2px solid var(--accent, var(--accent-primary));
  outline-offset: 2px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent, var(--accent-primary)) 12%, transparent), 0 16px 36px color-mix(in srgb, var(--accent, var(--accent-primary)) 36%, transparent);
}

.account-avatar-grid button small {
  color: currentColor !important;
  font-size: 8px !important;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
}

.account-store-list,
.security-action-list {
  gap: 8px !important;
}

.account-store-item,
.security-action-list button {
  min-height: 64px !important;
  padding: 10px 12px !important;
  border-color: var(--border, var(--border-color)) !important;
  border-radius: 12px !important;
  color: var(--text-main, var(--text-primary)) !important;
  background: var(--bg-card) !important;
  box-shadow: none !important;
}

.account-store-item:hover,
.security-action-list button:hover {
  border-color: color-mix(in srgb, var(--accent, var(--accent-primary)) 40%, var(--border, var(--border-color))) !important;
  background: var(--bg-card-hover) !important;
  transform: none !important;
}

.account-store-item.is-active {
  border-color: color-mix(in srgb, var(--accent, var(--accent-primary)) 62%, var(--border, var(--border-color))) !important;
  background: color-mix(in srgb, var(--accent, var(--accent-primary)) 9%, var(--bg-card)) !important;
}

.account-store-actions {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
}

.account-store-actions em,
.account-store-actions b {
  padding: 5px 7px;
  border: 1px solid var(--border, var(--border-color));
  border-radius: 8px;
  color: var(--text-muted) !important;
  background: color-mix(in srgb, var(--bg-panel) 70%, transparent);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.account-store-actions em {
  color: var(--accent, var(--accent-primary)) !important;
}

.security-action-list .security-logout {
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border, var(--border-color))) !important;
  background: color-mix(in srgb, var(--danger) 7%, var(--bg-card)) !important;
}

.security-action-list .security-logout b {
  color: var(--danger) !important;
}

#accountStudioHost .studio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#accountStudioHost .studio-panel {
  padding: 12px !important;
  border-radius: 14px !important;
}

#accountStudioHost .studio-theme-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#accountStudioHost .studio-theme-card {
  min-height: 72px !important;
  padding: 8px !important;
}

#accountStudioHost :is(.studio-dnd-preview, .studio-size-grid) {
  display: none !important;
}

#accountIntegrationsHost .stock-hero {
  padding: 14px !important;
  border-radius: 16px !important;
}

@media (max-width: 760px) {
  .account-center {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 16px) !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  .account-center-nav {
    display: block !important;
    padding: 8px !important;
    overflow-x: auto;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border, var(--border-color)) !important;
  }

  .account-center-nav nav {
    display: flex !important;
    width: max-content;
  }

  .account-center-user {
    display: none !important;
  }

  .account-center-content {
    padding: 0 12px 16px !important;
  }

  .account-avatar-grid {
    grid-template-columns: repeat(3, 72px) !important;
    justify-content: space-around;
  }

  .account-form-grid,
  #accountStudioHost .studio-grid,
  .account-integration-summary {
    grid-template-columns: 1fr !important;
  }

  .account-store-item {
    align-items: flex-start !important;
    flex-direction: column;
  }
}

/* Studio runtime theme layer. Keep this last so legacy component colors cannot win. */
.theme-neon-purple {
  --bg-main:#070815;--bg-panel:#0d0e20;--bg-card:#15162c;--bg-card-hover:#211f42;
  --text-main:#f7f5ff;--text-muted:#aaa6bd;--text-soft:#7f7a96;--border:#302d51;
  --accent:#8b5cf6;--accent-2:#6d28d9;--accent-glow:0 18px 48px rgba(139,92,246,.28);
  --button-bg:#7c3aed;--button-text:#fff;--input-bg:#0e0f21;--input-text:#f7f5ff;
  --success:#22c55e;--warning:#f59e0b;--danger:#ef4444;--info:#60a5fa;
  --chart-1:#8b5cf6;--chart-2:#22c55e;--chart-3:#f59e0b;
}
.theme-midnight-black {
  --bg-main:#030304;--bg-panel:#090a0c;--bg-card:#111216;--bg-card-hover:#1b1c21;
  --text-main:#f4f4f5;--text-muted:#b2b2ba;--text-soft:#797981;--border:#2b2c32;
  --accent:#e4e4e7;--accent-2:#71717a;--accent-glow:0 16px 38px rgba(255,255,255,.09);
  --button-bg:#e4e4e7;--button-text:#09090b;--input-bg:#0a0b0e;--input-text:#f4f4f5;
  --success:#4ade80;--warning:#fbbf24;--danger:#f87171;--info:#93c5fd;
  --chart-1:#fafafa;--chart-2:#4ade80;--chart-3:#fbbf24;
}
.theme-emerald-green {
  --bg-main:#03110d;--bg-panel:#071a14;--bg-card:#0b241b;--bg-card-hover:#103326;
  --text-main:#effdf7;--text-muted:#acd7c3;--text-soft:#739e8a;--border:#19503b;
  --accent:#10b981;--accent-2:#047857;--accent-glow:0 18px 48px rgba(16,185,129,.25);
  --button-bg:#059669;--button-text:#fff;--input-bg:#061b14;--input-text:#effdf7;
  --success:#34d399;--warning:#fbbf24;--danger:#fb7185;--info:#5eead4;
  --chart-1:#10b981;--chart-2:#5eead4;--chart-3:#fbbf24;
}
.theme-ocean-blue {
  --bg-main:#030c18;--bg-panel:#07162a;--bg-card:#0c2039;--bg-card-hover:#102d50;
  --text-main:#f1f8ff;--text-muted:#b4d1e9;--text-soft:#789ab8;--border:#1d4c75;
  --accent:#38bdf8;--accent-2:#1d4ed8;--accent-glow:0 18px 48px rgba(56,189,248,.25);
  --button-bg:#0284c7;--button-text:#fff;--input-bg:#071a30;--input-text:#f1f8ff;
  --success:#34d399;--warning:#fbbf24;--danger:#fb7185;--info:#60a5fa;
  --chart-1:#38bdf8;--chart-2:#34d399;--chart-3:#fbbf24;
}
.theme-sunset-orange {
  --bg-main:#160906;--bg-panel:#25100a;--bg-card:#32160e;--bg-card-hover:#462117;
  --text-main:#fff8f2;--text-muted:#ebc5b2;--text-soft:#ad806c;--border:#6a3522;
  --accent:#fb923c;--accent-2:#c2410c;--accent-glow:0 18px 48px rgba(251,146,60,.25);
  --button-bg:#ea580c;--button-text:#fff;--input-bg:#241008;--input-text:#fff8f2;
  --success:#4ade80;--warning:#fbbf24;--danger:#fb7185;--info:#7dd3fc;
  --chart-1:#fb923c;--chart-2:#4ade80;--chart-3:#fbbf24;
}
.theme-arctic-white {
  --bg-main:#f3f6fc;--bg-panel:#e9eef8;--bg-card:#fff;--bg-card-hover:#f5f7fc;
  --text-main:#172033;--text-muted:#526078;--text-soft:#77839a;--border:#d8e0ee;
  --accent:#4f46e5;--accent-2:#3730a3;--accent-glow:0 16px 38px rgba(79,70,229,.16);
  --button-bg:#4f46e5;--button-text:#fff;--input-bg:#fff;--input-text:#172033;
  --success:#059669;--warning:#d97706;--danger:#dc2626;--info:#2563eb;
  --chart-1:#4f46e5;--chart-2:#059669;--chart-3:#d97706;
}

:is(.theme-neon-purple,.theme-midnight-black,.theme-emerald-green,.theme-ocean-blue,.theme-sunset-orange,.theme-arctic-white) {
  --bg-primary:var(--bg-main);--bg-secondary:var(--bg-panel);--text-primary:var(--text-main);
  --text-secondary:var(--text-muted);--border-color:var(--border);--accent-primary:var(--accent);
  --accent-secondary:var(--accent-2);--input-border:var(--border);--sidebar-bg:var(--bg-panel);
  --topbar-bg:var(--bg-panel);--chart-4:var(--info);--studio-accent:var(--accent);--studio-accent-dark:var(--accent-2);
  color-scheme:dark;
}
.theme-arctic-white { color-scheme:light; }

body.is-authenticated {
  color:var(--text-main)!important;
  background:radial-gradient(circle at 80% -10%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 30%),var(--bg-main)!important;
}
body.is-authenticated :is(.workspace,.tab-panel,.stock-page-section,.events-workspace,.seller-ai-workspace,.product-detail-page) {
  color:var(--text-main)!important;background-color:transparent!important;
}
body.is-authenticated .sidebar { color:var(--text-main)!important;background:var(--bg-panel)!important;border-color:var(--border)!important; }
body.is-authenticated .topbar { color:var(--text-main)!important;background:color-mix(in srgb,var(--bg-panel) 94%,transparent)!important;border-color:var(--border)!important; }

body.is-authenticated :is(
  .panel,.metric,.stock-kpi,.seller-alert,.seller-opportunity-card,.seller-opportunity-task,
  .control-panel,.product-card,.product-catalog-card,.product-detail-metric,.product-chart-card,
  .product-insight-card,.product-recommendations,.demand-card,.liquidity-mini-card,.home-distribution-row,
  .warehouse-card,.warehouse-bar,.forecast-item,.attention-item,.recommendation-row,.control-insight-item,
  .ai-recommendation-item,.seller-event,.business-event-card,.action-history-row,.notification-dropdown,
  .notification-item,.warehouse-drawer,.warehouse-drawer-item,.stock-empty,.chart-empty-mini,.product-chart-empty,
  .product-catalog-toolbar,.stock-controls,.events-toolbar,.events-hero-panel,.seller-ai-column,
  .account-center,.account-center-content,.account-section-card,.account-profile-hero,.account-form-card,
  .avatar-picker-card,.studio-panel,.studio-theme-card,.studio-toggle-grid label,.studio-size-grid label
) {
  color:var(--text-main)!important;background:var(--bg-card)!important;border-color:var(--border)!important;
}
body.is-authenticated :is(.panel,.metric,.stock-kpi,.product-card,.business-event-card,.studio-theme-card):hover {
  background:var(--bg-card-hover)!important;border-color:color-mix(in srgb,var(--accent) 58%,var(--border))!important;
}
body.is-authenticated :is(h1,h2,h3,h4,strong,.metric strong,.stock-kpi strong,.topbar-title h2,.sidebar h1) { color:var(--text-main)!important; }
body.is-authenticated :is(p,small,.report-date,.metric-note,.brand-subtitle,.market-token-note,.studio-title-row,.studio-theme-card span,.studio-setting-stack label,.studio-size-grid label) { color:var(--text-muted)!important; }
body.is-authenticated :is(.eyebrow,.seller-pill,.metric-icon,.panel-icon,.studio-beta-badge,.account-plan) { color:var(--accent)!important; }

body.is-authenticated :is(input,select,textarea,.checkbox-control) {
  color:var(--input-text)!important;background:var(--input-bg)!important;border-color:var(--border)!important;
}
body.is-authenticated :is(input,textarea)::placeholder { color:var(--text-soft)!important; }
body.is-authenticated input[type="checkbox"] { accent-color:var(--accent)!important; }
body.is-authenticated :is(input,select,textarea):focus { border-color:var(--accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)!important; }

body.is-authenticated :is(.secondary-action,.primary-action,.seller-primary-action,.period-btn.is-active,.product-filter-btn.is-active,.notification-open-all) {
  color:var(--button-text)!important;background:var(--button-bg)!important;border-color:var(--accent)!important;
}
body.is-authenticated :is(.secondary-action,.primary-action,.seller-primary-action,.period-btn,.product-filter-btn,.ghost-action):hover {
  border-color:var(--accent)!important;box-shadow:var(--accent-glow)!important;
}
body.is-authenticated .ghost-action { color:var(--text-main)!important;background:var(--bg-card)!important;border-color:var(--border)!important; }
body.is-authenticated .side-nav-link { color:var(--text-muted)!important;background:transparent!important;border-color:transparent!important; }
body.is-authenticated .side-nav-link:hover { color:var(--text-main)!important;background:var(--bg-card-hover)!important; }
body.is-authenticated .side-nav-link.is-active { color:var(--button-text)!important;background:var(--button-bg)!important;border-color:var(--accent)!important;box-shadow:var(--accent-glow)!important; }

body.is-authenticated :is(table,thead,tbody,tr,th,td,.product-warehouse-head,.product-warehouse-row,.warehouse-data-table) { color:var(--text-muted)!important;border-color:var(--border)!important; }
body.is-authenticated :is(th,.product-warehouse-head) { color:var(--text-soft)!important;background:var(--bg-panel)!important; }
body.is-authenticated :is(td,.product-warehouse-row) { background:var(--bg-card)!important; }
body.is-authenticated :is(.auth-modal,.supply-modal,.manual-supply-modal,.demo-warning-modal,.notification-dropdown,.warehouse-drawer,.account-center) { color:var(--text-main)!important;background:var(--bg-panel)!important;border-color:var(--border)!important; }
body.is-authenticated :is(.product-detail-tags span,.liquidity-badge,.api-status-dot,.event-filter-btn,.events-view-tab) { color:var(--text-muted)!important;background:var(--bg-card)!important;border-color:var(--border)!important; }
body.is-authenticated :is(.event-filter-btn.is-active,.events-view-tab.is-active) { color:var(--button-text)!important;background:var(--button-bg)!important;border-color:var(--accent)!important; }
body.is-authenticated :is(.is-success,.status-success,.api-status-dot.is-live) { color:var(--success)!important; }
body.is-authenticated :is(.is-warning,.status-warning) { color:var(--warning)!important; }
body.is-authenticated :is(.is-danger,.is-error,.status-danger,.api-status-dot.is-error) { color:var(--danger)!important; }
body.is-authenticated :is(.is-info,.status-info) { color:var(--info)!important; }

body.is-authenticated .product-line-chart .is-violet,
body.is-authenticated .product-chart-legend .is-violet { color:var(--chart-1)!important;stroke:var(--chart-1)!important;background:var(--chart-1)!important; }
body.is-authenticated .product-line-chart .is-green,
body.is-authenticated .product-chart-legend .is-green { color:var(--chart-2)!important;stroke:var(--chart-2)!important;background:var(--chart-2)!important; }
body.is-authenticated .product-line-chart .is-orange,
body.is-authenticated .product-chart-legend .is-orange { color:var(--chart-3)!important;stroke:var(--chart-3)!important;background:var(--chart-3)!important; }
body.is-authenticated .product-line-chart .is-blue,
body.is-authenticated .product-chart-legend .is-blue { color:var(--info)!important;stroke:var(--info)!important;background:var(--info)!important; }
body.is-authenticated :is(.product-chart-grid,.chart-line) { stroke:color-mix(in srgb,var(--text-soft) 26%,transparent)!important; }

[data-dashboard-widget][data-studio-hidden="true"] { display:none!important; }
.studio-dashboard-empty:not([hidden]) { display:grid!important; }

[data-dashboard-widget][data-studio-size="small"] { min-height:0!important; }
.home-kpi-grid > [data-studio-size="small"] { min-height:88px!important;padding:12px!important; }
.home-kpi-grid > [data-studio-size="large"] { grid-column:span 2!important;min-height:160px!important;padding:26px!important; }
.home-kpi-grid > [data-studio-size="large"] strong { font-size:clamp(28px,3vw,48px)!important; }
.seller-opportunity-card[data-studio-size="small"] { min-height:190px!important;grid-template-columns:1fr!important;padding:18px!important; }
.seller-opportunity-card[data-studio-size="small"] :is(.seller-opportunity-task,.seller-opportunity-visual) { display:none!important; }
.seller-opportunity-card[data-studio-size="large"] { min-height:430px!important;padding:38px!important; }
.home-chart-panel[data-studio-size="small"] .product-line-chart { max-height:170px!important; }
.home-chart-panel[data-studio-size="large"] { grid-column:1/-1!important;min-height:430px!important; }
.seller-alert-strip[data-studio-size="small"] .seller-alert { min-height:52px!important;padding:9px!important; }
.seller-alert-strip[data-studio-size="large"] { grid-template-columns:repeat(2,minmax(0,1fr))!important; }

.density-compact body.is-authenticated .workspace,
body.is-authenticated.density-compact .workspace { padding:12px 16px 30px!important; }
.density-compact body.is-authenticated :is(.topbar,.panel,.metric,.stock-kpi,.product-card),
body.is-authenticated.density-compact :is(.topbar,.panel,.metric,.stock-kpi,.product-card) { padding:11px!important; }
.density-compact body.is-authenticated :is(.stock-page-section:not([hidden]),.control-center-grid,.home-analytics-grid,.summary-grid,.product-catalog-grid),
body.is-authenticated.density-compact :is(.stock-page-section:not([hidden]),.control-center-grid,.home-analytics-grid,.summary-grid,.product-catalog-grid) { gap:8px!important; }
.density-compact body.is-authenticated :is(td,th),
body.is-authenticated.density-compact :is(td,th) { padding:6px 8px!important; }

.motion-minimal *,body.motion-minimal * { animation:none!important;transition-duration:1ms!important;scroll-behavior:auto!important; }
.motion-minimal :is(.panel,.metric,.stock-kpi,.product-card,button):hover,
body.motion-minimal :is(.panel,.metric,.stock-kpi,.product-card,button):hover { transform:none!important;box-shadow:none!important; }
.motion-rich body.is-authenticated .stock-page-section:not([hidden]) :is(.panel,.metric,.stock-kpi,.product-card),
body.is-authenticated.motion-rich .stock-page-section:not([hidden]) :is(.panel,.metric,.stock-kpi,.product-card) { animation:studio-card-in 520ms cubic-bezier(.2,.8,.2,1) both; }
.motion-rich body.is-authenticated :is(.panel,.metric,.stock-kpi,.product-card):hover,
body.is-authenticated.motion-rich :is(.panel,.metric,.stock-kpi,.product-card):hover { transform:translateY(-3px);box-shadow:var(--accent-glow)!important; }

/* Seller OS Studio: authoritative design-token layer. */
body[data-studio-theme="neon-purple"] {
  --bg-primary:#070815;--bg-secondary:#0d0e20;--bg-card:#15162c;--bg-card-hover:#1d1c3b;
  --text-primary:#f7f5ff;--text-secondary:#c7c3d8;--text-muted:#918ca8;--border-color:#2d2b4a;
  --accent-primary:#8b5cf6;--accent-secondary:#6d28d9;--accent-glow:0 16px 42px rgba(139,92,246,.28);
  --success:#22c55e;--warning:#f59e0b;--danger:#ef4444;--info:#60a5fa;
  --chart-1:#8b5cf6;--chart-2:#22c55e;--chart-3:#f59e0b;--chart-4:#60a5fa;
  --button-bg:#7c3aed;--button-text:#fff;--input-bg:#101124;--input-text:#f7f5ff;--input-border:#393654;
  --sidebar-bg:#080a18;--topbar-bg:#101126;
}
body[data-studio-theme="midnight-black"] {
  --bg-primary:#020203;--bg-secondary:#08090b;--bg-card:#101114;--bg-card-hover:#181a1f;
  --text-primary:#f4f4f5;--text-secondary:#d4d4d8;--text-muted:#8b8b94;--border-color:#292a30;
  --accent-primary:#e4e4e7;--accent-secondary:#71717a;--accent-glow:0 14px 34px rgba(255,255,255,.08);
  --success:#4ade80;--warning:#fbbf24;--danger:#f87171;--info:#93c5fd;
  --chart-1:#fafafa;--chart-2:#4ade80;--chart-3:#fbbf24;--chart-4:#93c5fd;
  --button-bg:#e4e4e7;--button-text:#09090b;--input-bg:#0b0c0f;--input-text:#f4f4f5;--input-border:#34353b;
  --sidebar-bg:#030304;--topbar-bg:#0b0c0f;
}
body[data-studio-theme="emerald-green"] {
  --bg-primary:#03110d;--bg-secondary:#071a14;--bg-card:#0b241b;--bg-card-hover:#103126;
  --text-primary:#effdf7;--text-secondary:#bde8d3;--text-muted:#7fa994;--border-color:#174936;
  --accent-primary:#10b981;--accent-secondary:#047857;--accent-glow:0 16px 42px rgba(16,185,129,.25);
  --success:#34d399;--warning:#fbbf24;--danger:#fb7185;--info:#5eead4;
  --chart-1:#10b981;--chart-2:#5eead4;--chart-3:#fbbf24;--chart-4:#60a5fa;
  --button-bg:#059669;--button-text:#fff;--input-bg:#071c15;--input-text:#effdf7;--input-border:#20533f;
  --sidebar-bg:#02100c;--topbar-bg:#082019;
}
body[data-studio-theme="ocean-blue"] {
  --bg-primary:#030c18;--bg-secondary:#07162a;--bg-card:#0c2039;--bg-card-hover:#102b4d;
  --text-primary:#f1f8ff;--text-secondary:#c4ddf4;--text-muted:#82a4c4;--border-color:#1b466d;
  --accent-primary:#38bdf8;--accent-secondary:#1d4ed8;--accent-glow:0 16px 42px rgba(56,189,248,.24);
  --success:#34d399;--warning:#fbbf24;--danger:#fb7185;--info:#60a5fa;
  --chart-1:#38bdf8;--chart-2:#34d399;--chart-3:#fbbf24;--chart-4:#818cf8;
  --button-bg:#0284c7;--button-text:#fff;--input-bg:#071a30;--input-text:#f1f8ff;--input-border:#245279;
  --sidebar-bg:#020b16;--topbar-bg:#081b31;
}
body[data-studio-theme="sunset-orange"] {
  --bg-primary:#160906;--bg-secondary:#25100a;--bg-card:#32160e;--bg-card-hover:#432016;
  --text-primary:#fff8f2;--text-secondary:#f4d4c3;--text-muted:#b58d7c;--border-color:#673321;
  --accent-primary:#fb923c;--accent-secondary:#c2410c;--accent-glow:0 16px 42px rgba(251,146,60,.24);
  --success:#4ade80;--warning:#fbbf24;--danger:#fb7185;--info:#7dd3fc;
  --chart-1:#fb923c;--chart-2:#4ade80;--chart-3:#fbbf24;--chart-4:#7dd3fc;
  --button-bg:#ea580c;--button-text:#fff;--input-bg:#241008;--input-text:#fff8f2;--input-border:#75402b;
  --sidebar-bg:#120704;--topbar-bg:#261108;
}

body.is-authenticated[data-studio-theme] {
  color:var(--text-primary)!important;
  background:radial-gradient(circle at 78% -8%,color-mix(in srgb,var(--accent-primary) 18%,transparent),transparent 30%),var(--bg-primary)!important;
}
body.is-authenticated[data-studio-theme] .workspace,
body.is-authenticated[data-studio-theme] .tab-panel { color:var(--text-primary)!important;background:transparent!important; }
body.is-authenticated[data-studio-theme] .sidebar { background:var(--sidebar-bg)!important;border-color:var(--border-color)!important; }
body.is-authenticated[data-studio-theme] .topbar { color:var(--text-primary)!important;background:color-mix(in srgb,var(--topbar-bg) 94%,transparent)!important;border-color:var(--border-color)!important; }

body.is-authenticated[data-studio-theme] :is(.panel,.metric,.stock-kpi,.seller-alert,.product-card,.product-detail-metric,.demand-card,.liquidity-mini-card,.home-distribution-row,.warehouse-card,.warehouse-bar,.forecast-item,.attention-item,.recommendation-row,.control-insight-item,.ai-recommendation-item,.seller-event,.business-event-card,.action-history-row,.notification-dropdown,.warehouse-drawer,.warehouse-drawer-item,.stock-empty,.chart-empty-mini,.product-chart-empty,.product-catalog-toolbar,.stock-controls,.studio-theme-card,.studio-toggle-grid label) {
  color:var(--text-primary)!important;background:var(--bg-card)!important;border-color:var(--border-color)!important;
}
body.is-authenticated[data-studio-theme] :is(.panel,.metric,.stock-kpi,.product-card,.business-event-card,.studio-theme-card):hover {
  background:var(--bg-card-hover)!important;border-color:color-mix(in srgb,var(--accent-primary) 55%,var(--border-color))!important;
}
body.is-authenticated[data-studio-theme] :is(h1,h2,h3,h4,strong,.metric strong,.stock-kpi strong,.topbar-title h2,.sidebar h1) { color:var(--text-primary)!important; }
body.is-authenticated[data-studio-theme] :is(p,small,.report-date,.metric-note,.brand-subtitle,.market-token-note,.studio-title-row,.studio-theme-card span,.studio-setting-stack label,.studio-size-grid label) { color:var(--text-muted)!important; }
body.is-authenticated[data-studio-theme] :is(.eyebrow,.seller-pill,.metric-icon,.panel-icon,.studio-beta-badge) { color:var(--accent-primary)!important; }

body.is-authenticated[data-studio-theme] :is(button,.secondary-action,.ghost-action,.seller-primary-action,.period-btn,.product-filter-btn,.notification-open-all):not(.side-nav-link):not(.studio-theme-card):not(.notification-bell):not(.notification-item):not(.control-insight-item):not(.ai-recommendation-item):not(.seller-event):not(.sidebar-account-card):not(.account-center-close):not([data-account-section]):not([data-account-avatar]):not(.account-store-item):not([data-security-action]):not(#logoutBtn):not(#accountSaveProfile) {
  color:var(--button-text)!important;background:var(--button-bg)!important;border-color:color-mix(in srgb,var(--accent-primary) 60%,var(--border-color))!important;
}
body.is-authenticated[data-studio-theme] :is(button,.secondary-action,.ghost-action,.seller-primary-action,.period-btn,.product-filter-btn):not(.side-nav-link):not(.studio-theme-card):not(.notification-bell):not(.notification-item):not(.control-insight-item):not(.ai-recommendation-item):not(.seller-event):not(.sidebar-account-card):not(.account-center-close):not([data-account-section]):not([data-account-avatar]):not(.account-store-item):not([data-security-action]):not(#logoutBtn):not(#accountSaveProfile):hover {
  filter:brightness(1.08);box-shadow:var(--accent-glow)!important;
}
body.is-authenticated[data-studio-theme] .side-nav-link { color:var(--text-secondary)!important;border-color:transparent!important;background:transparent!important; }
body.is-authenticated[data-studio-theme] .side-nav-link:hover { color:var(--text-primary)!important;background:var(--bg-card-hover)!important; }
body.is-authenticated[data-studio-theme] .side-nav-link.is-active { color:var(--button-text)!important;background:var(--button-bg)!important;border-color:var(--accent-primary)!important;box-shadow:var(--accent-glow)!important; }

body.is-authenticated[data-studio-theme] :is(input,select,textarea,.checkbox-control) {
  color:var(--input-text)!important;background:var(--input-bg)!important;border-color:var(--input-border)!important;
}
body.is-authenticated[data-studio-theme] :is(input,textarea)::placeholder { color:var(--text-muted)!important; }
body.is-authenticated[data-studio-theme] input[type="checkbox"] { accent-color:var(--accent-primary)!important; }
body.is-authenticated[data-studio-theme] :is(input,select,textarea):focus { border-color:var(--accent-primary)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-primary) 22%,transparent)!important; }

body.is-authenticated[data-studio-theme] :is(table,thead,tbody,tr,th,td,.product-warehouse-head,.product-warehouse-row,.warehouse-data-table) {
  color:var(--text-secondary)!important;border-color:var(--border-color)!important;
}
body.is-authenticated[data-studio-theme] :is(th,.product-warehouse-head) { color:var(--text-muted)!important;background:var(--bg-secondary)!important; }
body.is-authenticated[data-studio-theme] :is(td,.product-warehouse-row) { background:var(--bg-card)!important; }

body.is-authenticated[data-studio-theme] :is(.modal,.auth-modal,.supply-modal,.manual-supply-modal,.demo-warning-modal,.notification-dropdown,.warehouse-drawer) {
  color:var(--text-primary)!important;background:var(--bg-secondary)!important;border-color:var(--border-color)!important;
}
body.is-authenticated[data-studio-theme] :is(.notification-item,.event-filter-btn,.events-view-tab,.api-status-dot,.product-detail-tags span,.liquidity-badge) {
  color:var(--text-secondary)!important;background:var(--bg-card)!important;border-color:var(--border-color)!important;
}
body.is-authenticated[data-studio-theme] :is(.notification-item:hover,.event-filter-btn.is-active,.events-view-tab.is-active) {
  color:var(--button-text)!important;background:var(--button-bg)!important;border-color:var(--accent-primary)!important;
}

body.is-authenticated[data-studio-theme] .product-line-chart .is-violet,
body.is-authenticated[data-studio-theme] .product-chart-legend .is-violet,
body.is-authenticated[data-studio-theme] .chart-bubble-dot.is-violet { color:var(--chart-1)!important;stroke:var(--chart-1)!important;background:var(--chart-1)!important; }
body.is-authenticated[data-studio-theme] .product-line-chart .is-green,
body.is-authenticated[data-studio-theme] .product-chart-legend .is-green { color:var(--chart-2)!important;stroke:var(--chart-2)!important;background:var(--chart-2)!important; }
body.is-authenticated[data-studio-theme] .product-line-chart .is-orange,
body.is-authenticated[data-studio-theme] .product-chart-legend .is-orange { color:var(--chart-3)!important;stroke:var(--chart-3)!important;background:var(--chart-3)!important; }
body.is-authenticated[data-studio-theme] .product-line-chart .is-blue,
body.is-authenticated[data-studio-theme] .product-chart-legend .is-blue { color:var(--chart-4)!important;stroke:var(--chart-4)!important;background:var(--chart-4)!important; }
body.is-authenticated[data-studio-theme] :is(.product-chart-grid,.chart-line) { stroke:color-mix(in srgb,var(--text-muted) 22%,transparent)!important; }

.studio-theme-card.is-disabled { opacity:.48;cursor:not-allowed;filter:saturate(.3); }
.studio-reset-action { width:fit-content;margin-top:14px; }
.studio-dashboard-empty { min-height:260px;display:grid;place-items:center;align-content:center;gap:12px;text-align:center; }
.studio-dashboard-empty strong { font-size:24px; }
.studio-dashboard-empty span { color:var(--text-muted); }

[data-dashboard-widget][data-studio-size="small"] { min-height:0!important; }
.seller-opportunity-card[data-studio-size="small"] .seller-opportunity-task,
.seller-opportunity-card[data-studio-size="small"] .seller-opportunity-visual { display:none!important; }
.seller-opportunity-card[data-studio-size="small"] { grid-template-columns:1fr!important;padding:20px!important; }
.seller-opportunity-card[data-studio-size="large"] { min-height:410px!important;padding:38px!important; }
.home-analytics-grid > [data-studio-size="large"],
.seller-os-grid > [data-studio-size="large"] { grid-column:1/-1!important; }
.home-kpi-grid > [data-studio-size="large"] { grid-column:span 2!important;min-height:160px!important; }
.home-kpi-grid > [data-studio-size="large"] strong { font-size:clamp(28px,3vw,46px)!important; }
.seller-alert-strip[data-studio-size="small"] .seller-alert { padding:10px!important;min-height:54px!important; }

body.density-compact .workspace { padding-top:12px!important;padding-left:18px!important;padding-right:18px!important; }
body.density-compact :is(.topbar,.panel,.metric,.stock-kpi,.product-card) { padding:12px!important; }
body.density-compact :is(.stock-page-section:not([hidden]),.control-center-grid,.home-analytics-grid,.summary-grid,.product-catalog-grid) { gap:8px!important; }
body.density-compact :is(td,th) { padding:7px 9px!important; }
body.density-compact :is(.metric,.stock-kpi) { min-height:92px!important; }

body.motion-minimal * { animation:none!important;transition:none!important;scroll-behavior:auto!important; }
body.motion-minimal :is(.panel,.metric,.stock-kpi,.product-card,button):hover { transform:none!important;box-shadow:none!important; }
body.motion-maximum .stock-page-section:not([hidden]) :is(.panel,.metric,.stock-kpi,.product-card) { animation:studio-card-in 520ms cubic-bezier(.2,.8,.2,1) both; }
body.motion-maximum :is(.panel,.metric,.stock-kpi,.product-card):hover { transform:translateY(-3px);box-shadow:var(--accent-glow)!important; }

/* Product account shell */
.api-status-strip,
.profile-switcher,
.studio-topbar-link {
  display: none !important;
}

.sidebar-account-card {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 10px;
  border: 1px solid var(--border-color, rgba(167, 139, 250, .18));
  border-radius: 16px;
  color: var(--text-primary, #f7f5ff);
  text-align: left;
  background: color-mix(in srgb, var(--bg-card, #15162c) 86%, transparent);
  cursor: pointer;
}

.sidebar-account-card:hover {
  border-color: color-mix(in srgb, var(--accent-primary, #8b5cf6) 58%, transparent);
  background: var(--bg-card-hover, #1d1c3b);
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent-primary, #8b5cf6) 48%, transparent);
  border-radius: 50%;
  color: var(--text-primary, #fff);
  background:
    radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--accent-primary, #8b5cf6) 52%, #fff), transparent 28%),
    linear-gradient(145deg, var(--accent-primary, #8b5cf6), var(--accent-secondary, #5b21b6));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent-primary, #8b5cf6) 24%, transparent);
  font-size: 17px;
}

.account-avatar.is-large { width: 44px; height: 44px; font-size: 20px; }
.account-avatar.is-xl { width: 72px; height: 72px; font-size: 32px; }

.sidebar-account-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sidebar-account-copy strong,
.sidebar-account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-copy strong { font-size: 12px; }
.sidebar-account-copy small { color: var(--text-muted, #918ca8); font-size: 10px; }
.sidebar-account-chevron { color: var(--text-muted, #918ca8); font-size: 18px; }

.topbar-actions {
  align-items: center !important;
}

.topbar-sync-action {
  min-height: 40px !important;
  white-space: nowrap;
}

.topbar #stockUpdatedAt {
  max-width: 150px !important;
  color: var(--text-muted, #918ca8) !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
}

.topbar-account-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--border-color, rgba(167, 139, 250, .18));
  border-radius: 14px;
  color: var(--text-primary, #fff);
  background: var(--bg-card, #15162c);
  cursor: pointer;
}

.topbar-account-trigger > span:not(.account-avatar) {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.topbar-account-trigger b { color: var(--text-muted, #918ca8); }

.account-center-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 3, 10, .72);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.account-center-backdrop.is-open { opacity: 1; }

.account-center {
  position: fixed;
  z-index: 121;
  inset: clamp(12px, 4vh, 42px) clamp(12px, 5vw, 76px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-color, #2d2b4a);
  border-radius: 24px;
  color: var(--text-primary, #f7f5ff);
  background: var(--bg-secondary, #0d0e20);
  box-shadow: 0 40px 140px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(12px) scale(.99);
  transition: opacity 180ms ease, transform 180ms ease;
}

.account-center.is-open { opacity: 1; transform: translateY(0) scale(1); }

.account-center-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px;
  border-right: 1px solid var(--border-color, #2d2b4a);
  background: var(--sidebar-bg, #080a18);
}

.account-center-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}

.account-center-user div { min-width: 0; display: grid; gap: 3px; }
.account-center-user strong,
.account-center-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-center-user strong { font-size: 12px; }
.account-center-user small { color: var(--text-muted, #918ca8); font-size: 9px; }

.account-center-nav nav { display: grid; gap: 4px; }
.account-center-nav nav button,
.account-center-logout {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text-secondary, #c7c3d8);
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.account-center-nav nav button:hover,
.account-center-nav nav button.is-active {
  color: var(--text-primary, #fff);
  border-color: var(--border-color, #2d2b4a);
  background: var(--bg-card, #15162c);
}

.account-center-nav nav button b {
  padding: 3px 5px;
  border-radius: 6px;
  color: var(--button-text, #fff);
  background: var(--accent-primary, #8b5cf6);
  font-size: 7px;
  text-transform: uppercase;
}

.account-center-logout {
  margin-top: auto;
  color: var(--danger, #ef4444);
}

.account-center-content {
  min-width: 0;
  overflow-y: auto;
  padding: 0 26px 30px;
  background:
    radial-gradient(circle at 88% -8%, color-mix(in srgb, var(--accent-primary, #8b5cf6) 14%, transparent), transparent 28%),
    var(--bg-primary, #070815);
}

.account-center-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
  background: color-mix(in srgb, var(--bg-primary, #070815) 90%, transparent);
  backdrop-filter: blur(16px);
}

.account-center-head h2 { margin: 2px 0 0; font-size: 22px; }
.account-center-head button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color, #2d2b4a);
  border-radius: 11px;
  color: var(--text-primary, #fff);
  background: var(--bg-card, #15162c);
  cursor: pointer;
  font-size: 20px;
}

.account-center-section { display: none; gap: 16px; }
.account-center-section.is-active { display: grid; }
.account-center-section .panel { padding: 20px; }

.account-profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-profile-hero h3 { margin: 0 0 4px; font-size: 20px; }
.account-profile-hero p { margin: 0 0 8px; color: var(--text-muted, #918ca8); }
.account-plan {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-primary, #8b5cf6);
  background: color-mix(in srgb, var(--accent-primary, #8b5cf6) 14%, transparent);
  font-size: 9px;
  font-weight: 850;
}

.account-form-card { display: grid; gap: 13px; }
.account-form-card label { display: grid; gap: 6px; color: var(--text-muted, #918ca8); font-size: 10px; font-weight: 800; }
.account-form-card input { min-height: 44px; }
.account-form-card .secondary-action { width: fit-content; }

.account-meta-grid,
.account-integration-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-meta-grid div,
.account-integration-summary div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--border-color, #2d2b4a);
  border-radius: 12px;
  background: var(--bg-card, #15162c);
}

.account-meta-grid span,
.account-integration-summary span { color: var(--text-muted, #918ca8); font-size: 9px; }
.account-meta-grid strong,
.account-integration-summary strong { font-size: 11px; }
.account-integration-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.account-avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.account-avatar-grid button {
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border-color, #2d2b4a);
  border-radius: 13px;
  color: var(--text-secondary, #c7c3d8);
  background: var(--bg-card, #15162c);
  cursor: pointer;
}

.account-avatar-grid button:hover,
.account-avatar-grid button.is-active { border-color: var(--accent-primary, #8b5cf6); box-shadow: var(--accent-glow); }
.account-avatar-grid button span { font-size: 25px; }
.account-avatar-grid button small { color: var(--text-muted, #918ca8); font-size: 8px; }

.account-store-list,
.security-action-list { display: grid; gap: 8px; }

.account-store-item,
.security-action-list button {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #2d2b4a);
  border-radius: 13px;
  color: var(--text-primary, #fff);
  text-align: left;
  background: var(--bg-card, #15162c);
  cursor: pointer;
}

.account-store-item.is-active { border-color: var(--accent-primary, #8b5cf6); }
.account-store-item span,
.security-action-list button span { display: grid; gap: 4px; }
.account-store-item small,
.security-action-list button small { color: var(--text-muted, #918ca8); font-size: 9px; }
.account-store-item b,
.security-action-list button b { color: var(--accent-primary, #8b5cf6); }

.account-section-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.account-section-intro p { margin: 0; color: var(--text-muted, #918ca8); font-size: 11px; }

#accountStudioHost .studio-hero { display: none; }
#accountStudioHost .studio-grid { grid-template-columns: 1fr; }
#accountStudioHost .studio-panel { padding: 20px; }
#accountIntegrationsHost .stock-hero { display: grid !important; margin: 0; }

@media (max-width: 900px) {
  .account-center { inset: 8px; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .account-center-nav { display: block; padding: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border-color, #2d2b4a); }
  .account-center-nav nav { display: flex; width: max-content; }
  .account-center-nav nav button { white-space: nowrap; }
  .account-center-user,
  .account-center-logout { display: none; }
  .account-center-content { padding: 0 14px 20px; }
  .account-avatar-grid { grid-template-columns: repeat(3, 1fr); }
  .account-integration-summary,
  .account-meta-grid { grid-template-columns: 1fr; }
  .topbar-account-trigger > span:not(.account-avatar) { display: none; }
}

/* Seller OS events center */
.side-nav-link[data-route="events"]::before { content: "🔔" !important; filter: saturate(.15) brightness(1.7); }
.notification-center { position: relative; }
.notification-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 14px;
  color: #fff;
  background: rgba(124,77,255,.1);
  cursor: pointer;
}
.notification-bell span { font-size: 17px; filter: saturate(.2) brightness(1.8); }
.notification-bell b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #090d1c;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: 10px;
  line-height: 16px;
}
.notification-dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(167,139,250,.22);
  border-radius: 22px;
  background: radial-gradient(circle at 100% 0%, rgba(124,77,255,.2), transparent 35%), rgba(8,13,29,.97);
  box-shadow: 0 28px 90px rgba(0,0,0,.58);
  backdrop-filter: blur(22px);
}
.notification-dropdown-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.notification-dropdown-head div { display: grid; gap: 3px; }
.notification-dropdown-head strong { color: #fff; }
.notification-dropdown-head span { color: rgba(226,232,240,.48); font-size: 11px; }
.notification-dropdown-head button,
.notification-open-all {
  border: 0;
  color: #c4b5fd;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}
.notification-dropdown-list { display: grid; max-height: 430px; overflow: auto; }
.notification-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 11px;
  padding: 13px 16px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
  color: #fff;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.notification-item:hover { background: rgba(124,77,255,.1); }
.notification-item.is-read { opacity: .56; }
.notification-item i,
.business-event-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-style: normal;
  font-weight: 950;
}
.notification-item span { display: grid; gap: 4px; }
.notification-item strong { font-size: 12px; }
.notification-item small { color: rgba(226,232,240,.58); font-size: 11px; line-height: 1.45; }
.notification-item em { color: rgba(226,232,240,.34); font-size: 9px; font-style: normal; }
.notification-open-all { width: 100%; min-height: 46px; background: rgba(124,77,255,.08); }
.notification-empty { padding: 24px; color: rgba(226,232,240,.5); text-align: center; }

.events-workspace { display: grid; gap: 16px; }
.events-hero-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.events-hero-panel h2 { margin: 6px 0 0; color: #fff; font-size: clamp(26px,3vw,40px); }
.events-summary { display: grid; grid-template-columns: repeat(4, minmax(100px,1fr)); gap: 9px; }
.events-summary div { min-width: 105px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; background: rgba(255,255,255,.035); }
.events-summary span { display: block; color: rgba(226,232,240,.52); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.events-summary strong { display: block; margin-top: 7px; color: #fff; font-size: 22px; }
.events-view-tabs { display: flex; gap: 8px; }
.events-view-tab,
.event-filter-btn {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(167,139,250,.15);
  border-radius: 12px;
  color: rgba(226,232,240,.62);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-weight: 850;
}
.events-view-tab.is-active,
.event-filter-btn.is-active { color: #fff; border-color: rgba(167,139,250,.44); background: rgba(124,77,255,.2); box-shadow: 0 10px 28px rgba(124,77,255,.14); }
.events-feed-view { display: grid; gap: 14px; }
.events-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: end; padding: 16px !important; }
.event-filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.events-toolbar-controls { display: flex; gap: 10px; }
.events-toolbar-controls label { display: grid; gap: 6px; }
.events-toolbar-controls span { color: rgba(226,232,240,.45); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.events-toolbar-controls input,
.events-toolbar-controls select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(167,139,250,.16);
  border-radius: 11px;
  color: #fff;
  background: rgba(2,6,23,.46);
  outline: none;
}
.events-feed { display: grid; gap: 11px; }
.business-event-card {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  color: #fff;
  background: radial-gradient(circle at 100% 0%, rgba(124,77,255,.08), transparent 32%), rgba(11,18,32,.76);
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
}
.business-event-card.is-read { opacity: .68; }
.business-event-content { display: grid; gap: 8px; }
.business-event-meta { display: flex; gap: 12px; color: rgba(226,232,240,.42); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.business-event-card h3 { margin: 0; color: #fff; font-size: 18px; }
.business-event-card p { margin: 0; color: rgba(226,232,240,.62); line-height: 1.5; }
.business-event-source { display: flex; gap: 8px; color: rgba(226,232,240,.4); font-size: 10px; }
.business-event-source strong { color: rgba(226,232,240,.7); }
.business-event-actions { display: grid; gap: 8px; min-width: 160px; }
.business-event-actions button { min-height: 38px; }
.event-detail-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.event-detail-grid div { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); }
.event-detail-grid span { display: block; color: rgba(226,232,240,.4); font-size: 9px; text-transform: uppercase; }
.event-detail-grid strong { display: block; margin-top: 4px; font-size: 12px; }
.is-critical .business-event-icon, .notification-item.is-critical i { color: #fecaca; background: rgba(239,68,68,.2); }
.is-attention .business-event-icon, .notification-item.is-attention i { color: #fde68a; background: rgba(245,158,11,.2); }
.is-opportunity .business-event-icon, .notification-item.is-opportunity i { color: #bbf7d0; background: rgba(34,197,94,.18); }
.is-info .business-event-icon, .notification-item.is-info i { color: #bfdbfe; background: rgba(59,130,246,.18); }
.business-event-card.is-critical { border-color: rgba(239,68,68,.25); }
.business-event-card.is-attention { border-color: rgba(245,158,11,.22); }
.business-event-card.is-opportunity { border-color: rgba(34,197,94,.2); }
.business-event-card.is-info { border-color: rgba(59,130,246,.18); }
.action-history-list { display: grid; gap: 2px; }
.action-history-row { display: grid; grid-template-columns: 150px 180px 1fr 120px; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.065); color: rgba(226,232,240,.68); }
.action-history-row time, .action-history-row em { color: rgba(226,232,240,.4); font-size: 11px; font-style: normal; }
.action-history-row strong { color: #fff; font-size: 12px; }
.events-empty { display: grid; gap: 6px; place-items: center; min-height: 180px; padding: 25px; color: rgba(226,232,240,.5); border: 1px dashed rgba(167,139,250,.18); border-radius: 20px; background: rgba(255,255,255,.025); }
.events-empty strong { color: #fff; }
.seller-event { width: 100%; text-align: left; border: 0; cursor: pointer; }

@media (max-width: 1180px) {
  .events-hero-panel, .events-toolbar { align-items: stretch; flex-direction: column; }
  .events-summary { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .notification-dropdown { position: fixed; top: 78px; left: 12px; right: 12px; width: auto; }
  .events-toolbar-controls, .events-view-tabs { display: grid; grid-template-columns: 1fr; }
  .business-event-card { grid-template-columns: 40px 1fr; }
  .business-event-actions { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .action-history-row { grid-template-columns: 1fr; gap: 5px; }
}

/* Final landing motion overrides. */
.stockpilot-hero-shell {
  grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.1fr) !important;
  gap: clamp(44px, 6vw, 100px) !important;
}
.stockpilot-hero {
  max-width: 680px !important;
  padding: clamp(24px, 3vw, 48px) !important;
  border: 1px solid rgba(167, 139, 250, .12) !important;
  border-radius: 34px !important;
  background: radial-gradient(circle at 0% 0%, rgba(124,77,255,.16), transparent 38%), linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 35px 100px rgba(0,0,0,.2) !important;
}
.stockpilot-hero h1 {
  max-width: 620px !important;
  font-size: clamp(48px, 5vw, 72px) !important;
  line-height: .98 !important;
  letter-spacing: -.04em !important;
}
.stockpilot-demo-preview {
  cursor: pointer !important;
  outline: none;
  perspective: 1200px;
}
.stockpilot-demo-preview .stockpilot-mockup {
  transform: rotateY(-3deg) rotateX(1deg) !important;
  transition: transform 480ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease, box-shadow 480ms ease !important;
}
.stockpilot-demo-preview:hover .stockpilot-mockup,
.stockpilot-demo-preview:focus-visible .stockpilot-mockup {
  transform: translateY(-10px) rotateY(0) rotateX(0) scale(1.015) !important;
  border-color: rgba(196,181,253,.48) !important;
  box-shadow: 0 55px 140px rgba(0,0,0,.56), 0 0 110px rgba(124,77,255,.28) !important;
}
@media (max-width: 1120px) {
  .stockpilot-hero-shell { grid-template-columns: 1fr !important; }
  .stockpilot-hero { max-width: none !important; }
}

/* Landing demo interaction and motion transition */
.stockpilot-hero-shell {
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.1fr);
  gap: clamp(44px, 6vw, 100px);
}

.stockpilot-hero {
  max-width: 680px;
  padding: clamp(24px, 3vw, 48px) !important;
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 77, 255, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 35px 100px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.stockpilot-hero h1 {
  max-width: 620px;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.stockpilot-demo-preview {
  cursor: pointer;
  outline: none;
  perspective: 1200px;
}

.stockpilot-demo-preview::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8% -5% 4%;
  border-radius: 50%;
  background: rgba(124, 77, 255, 0.22);
  filter: blur(70px);
  opacity: 0.52;
  transition: opacity 320ms ease, transform 420ms ease;
}

.stockpilot-demo-preview:hover::before,
.stockpilot-demo-preview:focus-visible::before {
  opacity: 0.9;
  transform: scale(1.08);
}

.stockpilot-demo-preview .stockpilot-mockup {
  transition: transform 480ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease, box-shadow 480ms ease;
  transform: rotateY(-3deg) rotateX(1deg);
  transform-origin: center;
}

.stockpilot-demo-preview:hover .stockpilot-mockup,
.stockpilot-demo-preview:focus-visible .stockpilot-mockup {
  transform: translateY(-10px) rotateY(0deg) rotateX(0deg) scale(1.015);
  border-color: rgba(196, 181, 253, 0.48);
  box-shadow: 0 55px 140px rgba(0, 0, 0, 0.56), 0 0 110px rgba(124, 77, 255, 0.28);
}

.stockpilot-demo-preview:hover .floating-card {
  animation-play-state: paused;
}

.preview-demo-cta {
  position: absolute;
  z-index: 8;
  right: 18px;
  top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 14px;
  align-items: center;
  min-width: 190px;
  padding: 11px 12px 11px 14px;
  color: #fff;
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 15px;
  background: rgba(76, 29, 149, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), 0 0 34px rgba(124, 77, 255, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 240ms ease, transform 300ms cubic-bezier(.2,.8,.2,1);
}

.preview-demo-cta span {
  color: rgba(237, 233, 254, 0.65);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-demo-cta strong {
  font-size: 13px;
  line-height: 1.2;
}

.preview-demo-cta i {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  font-style: normal;
}

.stockpilot-demo-preview:hover .preview-demo-cta,
.stockpilot-demo-preview:focus-visible .preview-demo-cta {
  opacity: 1;
  transform: translateY(0);
}

.demo-launch-transition {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
  opacity: 0;
  background: #070b19;
  transition: visibility 0s linear 700ms, opacity 260ms ease;
}

.demo-launch-transition.is-active {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.demo-launch-orb {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #c4b5fd 0%, #8b5cf6 28%, #5b21b6 62%, #1e1b4b 100%);
  box-shadow: 0 0 100px rgba(139, 92, 246, 0.72);
  transform: scale(0.2);
}

.demo-launch-transition.is-active .demo-launch-orb {
  animation: demoOrbExpand 720ms cubic-bezier(.65,0,.25,1) forwards;
}

.demo-launch-transition.is-revealing .demo-launch-orb {
  animation: demoOrbReveal 650ms cubic-bezier(.2,.8,.2,1) forwards;
}

.demo-launch-message {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: #fff;
  opacity: 0;
  transform: translateY(14px) scale(.96);
}

.demo-launch-transition.is-active .demo-launch-message {
  animation: demoLaunchMessageIn 360ms 220ms ease forwards;
}

.demo-launch-transition.is-revealing .demo-launch-message {
  opacity: 0;
  transition: opacity 180ms ease;
}

.demo-launch-message strong { font-size: clamp(20px, 3vw, 34px); }
.demo-launch-message small { color: rgba(237, 233, 254, 0.62); font-weight: 700; }

body.demo-dashboard-enter .app-shell {
  opacity: 0;
  transform: scale(.985) translateY(12px);
}

body.demo-dashboard-enter.demo-dashboard-ready .app-shell {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 560ms 80ms ease, transform 650ms 80ms cubic-bezier(.2,.8,.2,1);
}

@keyframes demoOrbExpand {
  0% { transform: scale(.18); opacity: .7; }
  55% { transform: scale(4); opacity: 1; }
  100% { transform: scale(24); opacity: 1; }
}

@keyframes demoOrbReveal {
  from { transform: scale(24); opacity: 1; }
  to { transform: scale(31); opacity: 0; }
}

@keyframes demoLaunchMessageIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1120px) {
  .stockpilot-hero-shell {
    grid-template-columns: 1fr;
  }
  .stockpilot-hero {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .stockpilot-hero {
    padding: 24px !important;
  }
  .stockpilot-hero h1 {
    font-size: clamp(42px, 13vw, 62px);
  }
  .preview-demo-cta {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-launch-orb,
  .demo-launch-message,
  .stockpilot-demo-preview .stockpilot-mockup {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Warehouse geography map */
.warehouse-overview-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.35fr) !important;
  align-items: stretch !important;
  gap: 18px !important;
}

.warehouse-map-wrap {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 34%, rgba(124, 77, 255, 0.22), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(96, 165, 250, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
}

.russia-warehouse-map {
  position: absolute;
  inset: 14px;
  overflow: hidden;
  border-radius: 18px;
}

.russia-map-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.russia-map-outline {
  fill: rgba(124, 77, 255, 0.12);
  stroke: rgba(168, 85, 247, 0.5);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 28px rgba(124, 77, 255, 0.28));
}

.russia-map-inner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.russia-map-shape circle {
  fill: rgba(255, 255, 255, 0.24);
}

.warehouse-map-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 16.66% 25%, 12.5% 20%;
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 78%);
}

.warehouse-map-point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  display: grid;
  grid-template-columns: var(--size) max-content;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 0;
  transform: translate(-50%, -50%);
}

.warehouse-map-point > span {
  position: relative;
  width: var(--size);
  height: var(--size);
  background: linear-gradient(145deg, #7c4dff, #a855f7);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(124, 77, 255, 0.16), 0 0 34px rgba(124, 77, 255, 0.62);
}

.warehouse-map-point > span::after {
  position: absolute;
  inset: -10px;
  content: "";
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: inherit;
  animation: mapPulse 2.4s ease-out infinite;
}

.warehouse-map-point strong {
  max-width: 168px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.warehouse-map-point em {
  grid-column: 2;
  width: fit-content;
  margin-top: -6px;
  padding: 3px 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  background: rgba(5, 8, 22, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.warehouse-map-point.is-major > span {
  background: linear-gradient(145deg, #22c55e, #7c4dff);
  box-shadow: 0 0 0 9px rgba(34, 197, 94, 0.14), 0 0 38px rgba(34, 197, 94, 0.48);
}

.warehouse-map-point.is-low > span {
  background: linear-gradient(145deg, #ef4444, #a855f7);
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.16), 0 0 34px rgba(239, 68, 68, 0.42);
}

.warehouse-map-point.is-fbs > span {
  background: linear-gradient(145deg, #60a5fa, #7c4dff);
}

.warehouse-map-point.is-unknown {
  opacity: 0.75;
}

.warehouse-map-point:hover {
  z-index: 5;
}

.warehouse-map-point:hover > span {
  transform: scale(1.18);
}

.warehouse-map-point:hover strong,
.warehouse-map-point:hover em {
  color: #fff;
}

.warehouse-map-summary {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 14px 16px;
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.warehouse-map-summary span {
  color: rgba(247, 244, 255, 0.54);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.warehouse-map-summary strong {
  color: #fff;
  font-size: 30px;
  font-weight: 860;
  letter-spacing: -0.04em;
}

.warehouse-map-empty {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 4;
  padding: 14px;
  color: rgba(247, 244, 255, 0.68);
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

@keyframes mapPulse {
  from {
    opacity: 0.75;
    transform: scale(0.78);
  }
  to {
    opacity: 0;
    transform: scale(1.45);
  }
}

@media (max-width: 1180px) {
  .warehouse-overview-grid {
    grid-template-columns: 1fr !important;
  }

  .warehouse-map-wrap {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .warehouse-map-wrap {
    min-height: 310px;
  }

  .warehouse-map-point {
    grid-template-columns: var(--size);
  }

  .warehouse-map-point strong,
  .warehouse-map-point em {
    display: none;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 83% 2%, rgba(241, 169, 58, 0.3), transparent 28%),
    radial-gradient(circle at 34% 15%, rgba(8, 118, 94, 0.14), transparent 24%),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 58%, #efe4d5 100%),
    var(--bg);
  color: var(--ink);
  animation: pageFadeIn 520ms ease both;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
  touch-action: manipulation;
}

button:hover {
  transform: translateY(-1px);
}

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

.auth-gateway {
  position: relative;
  z-index: 1000;
  width: 100%;
  min-height: 100vh;
  overflow: auto;
  display: block;
  padding: clamp(18px, 4vw, 58px);
  background:
    linear-gradient(rgba(8, 28, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 28, 24, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 16% 12%, rgba(241, 169, 58, 0.34), transparent 26%),
    radial-gradient(circle at 76% 12%, rgba(8, 118, 94, 0.2), transparent 28%),
    radial-gradient(circle at 58% 88%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(135deg, #fffaf0 0%, #f1e5d5 58%, #eadfcd 100%);
  background-size:
    56px 56px,
    56px 56px,
    auto,
    auto,
    auto,
    auto;
}

body:not(.is-authenticated) .app-shell {
  display: none;
}

body:not(.is-authenticated) {
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-gateway.is-hidden {
  display: none;
}

.landing-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.23;
  background-image:
    radial-gradient(rgba(8, 28, 24, 0.12) 0.6px, transparent 0.6px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}

.landing-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.4;
  pointer-events: none;
  animation: glowDrift 9s ease-in-out infinite alternate;
}

.landing-glow-one {
  left: 10%;
  top: 6%;
  background: rgba(8, 118, 94, 0.28);
}

.landing-glow-two {
  right: 8%;
  bottom: 8%;
  background: rgba(241, 169, 58, 0.34);
  animation-delay: -3s;
}

.landing-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  min-height: calc(100vh - clamp(36px, 8vw, 116px));
  max-width: 1540px;
  margin: 0 auto;
}

.auth-hero {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 3vw, 36px);
  animation: landingFade 720ms ease both;
}

.auth-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 26px;
  border-color: rgba(241, 169, 58, 0.36);
  background: linear-gradient(145deg, #0a211b, #075846);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 22px 48px rgba(7, 88, 70, 0.28);
}

.auth-hero h1 {
  max-width: 780px;
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: clamp(42px, 5.8vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-hero p:not(.eyebrow) {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 640;
  line-height: 1.55;
}

.auth-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  animation: slideUpSoft 780ms 160ms ease both;
}

.ghost-action {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 820;
  box-shadow: 0 14px 34px rgba(35, 28, 17, 0.08);
}

.demo-action {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(8, 118, 94, 0.18);
  border-radius: 14px;
  background: rgba(232, 245, 239, 0.72);
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 820;
}

.auth-hero-actions button:hover {
  box-shadow: 0 24px 48px rgba(7, 88, 70, 0.16);
}

.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  animation: slideUpSoft 820ms 260ms ease both;
}

.landing-trust span {
  padding: 9px 12px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.landing-preview {
  position: relative;
  min-height: 620px;
  animation: previewIn 820ms 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dashboard-mockup {
  position: absolute;
  inset: 7% 5% 4% 4%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 4%, rgba(241, 169, 58, 0.22), transparent 28%),
    radial-gradient(circle at 12% 12%, rgba(8, 118, 94, 0.14), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 241, 0.72));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.94) inset,
    0 34px 90px rgba(35, 28, 17, 0.18),
    0 0 0 10px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.landing-preview:hover .dashboard-mockup {
  transform: translateY(-4px) rotateX(1deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.94) inset,
    0 44px 110px rgba(7, 88, 70, 0.2),
    0 0 0 10px rgba(255, 255, 255, 0.18);
}

.mockup-topbar,
.mockup-kpis,
.mockup-warehouse,
.mockup-table {
  position: relative;
  z-index: 1;
}

.mockup-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.mockup-topbar div {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(8, 118, 94, 0.12);
}

.mockup-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.mockup-kpis div,
.mockup-warehouse,
.mockup-table {
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 14px 34px rgba(35, 28, 17, 0.08);
}

.mockup-kpis div {
  min-height: 112px;
  padding: 18px;
}

.mockup-kpis span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.mockup-kpis strong {
  display: block;
  margin-top: 14px;
  color: var(--primary-dark);
  font-size: clamp(23px, 2vw, 31px);
  letter-spacing: -0.02em;
}

.mockup-chart {
  position: relative;
  height: 160px;
  margin: 16px 0;
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(rgba(8, 28, 24, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 28, 24, 0.04) 1px, transparent 1px),
    rgba(255, 253, 248, 0.72);
  background-size: 32px 32px;
}

.chart-bars {
  position: absolute;
  inset: 22px 22px 18px;
  display: flex;
  align-items: end;
  gap: 13px;
}

.chart-bars span {
  flex: 1;
  min-width: 22px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #1b8c72, #075846);
  box-shadow: 0 12px 22px rgba(8, 118, 94, 0.18);
  transform-origin: bottom;
  animation: barGrow 900ms ease both;
}

.chart-bars span:nth-child(even) {
  background: linear-gradient(180deg, #f2b84b, #d58122);
}

.chart-line {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 48px;
  height: 58px;
  border-top: 4px solid rgba(8, 118, 94, 0.24);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.mockup-warehouse {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px;
}

.mockup-warehouse > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mockup-warehouse strong,
.mockup-warehouse span {
  display: block;
}

.mockup-warehouse strong {
  font-size: 14px;
}

.mockup-warehouse div div span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.warehouse-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--success-tint);
  color: var(--primary);
  box-shadow: 0 12px 24px rgba(8, 118, 94, 0.12);
}

.warehouse-icon.orange {
  background: #fff0d3;
  color: var(--secondary-dark);
}

.mockup-table {
  margin-top: 16px;
  padding: 8px;
}

.mockup-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.55fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.mockup-row:not(.is-head):hover {
  background: rgba(232, 245, 239, 0.68);
}

.mockup-row.is-head {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.mockup-row b {
  justify-self: start;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--success-tint);
  color: var(--primary-dark);
  font-size: 11px;
}

.mockup-row .warn {
  background: #fff0d3;
  color: var(--secondary-dark);
}

.mockup-row .danger-badge {
  background: var(--danger-soft);
  color: var(--danger);
}

.floating-card {
  position: absolute;
  z-index: 3;
  min-width: 154px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 48px rgba(35, 28, 17, 0.16);
  backdrop-filter: blur(18px);
  animation: floatCard 5.8s ease-in-out infinite;
}

.floating-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.floating-card strong {
  display: block;
  margin-top: 7px;
  color: var(--primary-dark);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.float-stock {
  top: 7%;
  left: 0;
}

.float-profit {
  top: 16%;
  right: -1%;
  animation-delay: -1.2s;
}

.float-forecast {
  left: -2%;
  bottom: 16%;
  animation-delay: -2.2s;
}

.float-report {
  right: 3%;
  bottom: 5%;
  animation-delay: -3.2s;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.auth-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 24, 0.22);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 239, 0.88));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 34px 94px rgba(8, 28, 24, 0.24);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-modal.is-open .auth-card {
  transform: translateY(0) scale(1);
}

.auth-card h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.auth-card .secondary-action {
  min-height: 50px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 292px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 30px 22px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 4%, rgba(241, 169, 58, 0.18), transparent 25%),
    radial-gradient(circle at 90% 42%, rgba(23, 155, 124, 0.38), transparent 34%),
    linear-gradient(180deg, var(--sidebar-a), var(--sidebar-b));
  color: #f8f7f1;
  box-shadow:
    inset -1px 0 rgba(255, 255, 255, 0.08),
    18px 0 58px rgba(8, 28, 24, 0.18);
}

.brand-block {
  display: grid;
  gap: 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 38px rgba(0, 0, 0, 0.2);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sidebar h1 {
  max-width: 230px;
  margin: 0;
  font-size: 31px;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 0;
  color: rgba(248, 247, 241, 0.68);
  font-size: 14px;
  font-weight: 700;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(248, 247, 241, 0.72);
  cursor: pointer;
  font-weight: 820;
  text-align: left;
}

.side-nav-link::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 0 rgba(8, 118, 94, 0);
}

.side-nav-link:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-nav-link.is-active {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 38px rgba(0, 0, 0, 0.16);
}

.side-nav-link.is-active::before {
  background: var(--secondary);
  box-shadow: 0 0 0 5px rgba(241, 169, 58, 0.12);
}

.eyebrow {
  margin: 0;
  color: var(--secondary-dark);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-action,
.secondary-action,
.tab {
  border: 0;
  cursor: pointer;
  font-weight: 740;
}

.primary-action {
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffd66f, var(--secondary-dark));
  color: #14201c;
  box-shadow: 0 18px 36px rgba(217, 133, 36, 0.28);
}

.primary-action::before {
  content: "+ ";
  font-size: 18px;
}

.primary-action:hover {
  box-shadow: 0 22px 48px rgba(217, 133, 36, 0.38);
}

.secondary-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, #16a084, var(--primary-dark));
  color: white;
  box-shadow: 0 14px 28px rgba(17, 132, 111, 0.22);
}

.secondary-action::before {
  content: "+ ";
  font-size: 16px;
}

.shipment-list {
  display: grid;
  gap: 10px;
  overflow: auto;
}

body:not([data-active-tab="receipt"]) .shipment-list,
body:not([data-active-tab="receipt"]) .primary-action {
  display: none;
}

.shipment-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.shipment-open {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}

.shipment-item:hover {
  transform: translateY(-3px) scale(1.01);
  background: rgba(255, 255, 255, 0.12);
}

.shipment-item.is-active {
  border-color: rgba(17, 132, 111, 0.62);
  background: linear-gradient(145deg, #fffdf8, #f4fff9);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.shipment-open span {
  display: block;
  margin-top: 6px;
  color: currentColor;
  opacity: 0.62;
  font-size: 12px;
  font-weight: 650;
}

.shipment-delete {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.shipment-item.is-active .shipment-delete {
  background: var(--danger-soft);
  color: var(--danger);
}

.sidebar-help {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

.sidebar-help strong {
  color: #fff;
  font-size: 13px;
}

.sidebar-help span,
.sidebar-copy {
  font-size: 12px;
  line-height: 1.45;
}

.profile-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.profile-switcher label {
  gap: 7px;
}

.profile-switcher label span {
  color: rgba(255, 255, 255, 0.62);
}

.profile-switcher select {
  height: 42px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.profile-switcher select option {
  color: var(--ink);
}

.profile-switcher button {
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffd66f, var(--secondary-dark));
  color: #14201c;
  cursor: pointer;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(217, 133, 36, 0.24);
}

.account-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.account-box span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 760;
}

.account-box button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.sidebar-copy {
  color: rgba(255, 255, 255, 0.46);
}

.workspace {
  min-width: 0;
  margin-left: 292px;
  width: calc(100% - 292px);
  max-width: none;
  overflow-x: hidden;
  padding: 22px 28px 46px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid rgba(232, 220, 203, 0.82);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 249, 239, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 54px rgba(35, 28, 17, 0.11);
  backdrop-filter: blur(22px);
}

.topbar-title {
  display: grid;
  gap: 3px;
}

.topbar-title h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.topbar .profile-switcher {
  min-width: 250px;
  padding: 8px;
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.74);
  backdrop-filter: none;
}

.topbar .profile-switcher label span {
  color: var(--muted);
}

.topbar .profile-switcher select {
  height: 40px;
  border-color: var(--border);
  background: #fff;
  color: var(--ink);
}

.topbar .account-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.74);
  backdrop-filter: none;
}

.topbar .account-box span {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .account-box button {
  min-height: 36px;
  padding: 0 12px;
  background: var(--success-tint);
  color: var(--primary-dark);
}

.topbar #stockUpdatedAt {
  max-width: 240px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 6px;
  border: 1px solid rgba(232, 220, 203, 0.82);
  border-radius: 20px;
  background: rgba(255, 251, 244, 0.82);
  backdrop-filter: blur(22px);
  box-shadow:
    0 20px 46px rgba(35, 28, 17, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.tab::before {
  content: "●";
  margin-right: 8px;
  color: transparent;
  font-size: 10px;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.tab.is-active {
  background: linear-gradient(145deg, #ffffff, #fff9ee);
  color: var(--primary-dark);
  box-shadow:
    0 12px 28px rgba(35, 28, 17, 0.11),
    0 0 0 1px rgba(8, 118, 94, 0.08),
    0 0 34px rgba(8, 118, 94, 0.1);
}

.tab.is-active::before {
  color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
  gap: 26px;
  animation: panelRise 420ms ease both;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
  gap: 22px;
}

.panel {
  padding: 26px;
  border: 1px solid rgba(234, 223, 205, 0.94);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 253, 248, 0.92)),
    var(--card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 18px 44px rgba(35, 28, 17, 0.075);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.panel:hover {
  border-color: var(--border-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 28px 70px rgba(35, 28, 17, 0.13);
  transform: translateY(-2px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel h2,
.panel h3 {
  margin: 5px 0 0;
  letter-spacing: -0.015em;
}

.panel h2 {
  font-size: 23px;
  line-height: 1.16;
  font-weight: 720;
}

.report-date {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.period-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(17, 132, 111, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdfa, #f5ead7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 34px rgba(35, 28, 17, 0.1);
}

.period-switcher.compact {
  gap: 7px;
  padding: 6px;
  border-radius: 15px;
}

.period-btn {
  min-height: 38px;
  border: 1px solid rgba(232, 220, 203, 0.92);
  border-radius: 13px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.72);
  color: #42524b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.period-btn:hover {
  border-color: rgba(17, 132, 111, 0.24);
  background: #ffffff;
  color: var(--ink);
}

.period-btn.is-active {
  border-color: rgba(17, 132, 111, 0.36);
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(17, 132, 111, 0.2);
}

.metric-note {
  margin-top: -4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.25;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--success-tint), #fff6de);
  color: var(--primary);
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(17, 132, 111, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

label.is-disabled {
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  height: 48px;
  padding: 0 14px;
}

textarea {
  margin-top: 14px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(17, 132, 111, 0.56);
  box-shadow: var(--shadow-focus);
}

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

.sales-summary {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 18px;
}

.average-summary {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.metric {
  position: relative;
  min-height: 138px;
  padding: 22px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 16%, rgba(244, 181, 72, 0.14), transparent 28%),
    linear-gradient(145deg, #ffffff, #fffaf1 82%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 14px 34px rgba(35, 28, 17, 0.08);
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.metric::after {
  content: none;
}

.metric:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.94) inset,
    0 28px 64px rgba(35, 28, 17, 0.14);
}

.metric-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(17, 132, 111, 0.11);
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 950;
}

.metric:nth-child(2) .metric-icon {
  background: rgba(244, 181, 72, 0.22);
  color: #98630f;
}

.metric:nth-child(3) .metric-icon {
  background: rgba(217, 111, 87, 0.13);
  color: #9f4534;
}

.metric:nth-child(5) .metric-icon {
  background: rgba(15, 31, 26, 0.08);
  color: var(--sidebar-b);
}

.metric.accent .metric-icon {
  background: #d9f1ea;
  color: var(--primary-dark);
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 30px;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric.accent {
  background:
    radial-gradient(circle at 88% 18%, rgba(17, 132, 111, 0.18), transparent 30%),
    linear-gradient(145deg, var(--success-tint), #ffffff 76%);
  border-color: rgba(17, 132, 111, 0.18);
}

.metric.accent strong {
  color: var(--primary-dark);
}

.analytics-panel {
  padding-bottom: 28px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.analytics-grid .expense-structure-card {
  min-height: 300px;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 18px;
  margin-top: 18px;
}

.chart-card {
  min-height: 294px;
  padding: 22px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 20px;
  background:
    radial-gradient(circle at 94% 0%, rgba(244, 181, 72, 0.14), transparent 30%),
    linear-gradient(150deg, #fffdfa, #fff8eb);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 42px rgba(35, 28, 17, 0.08);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.chart-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 30px 74px rgba(35, 28, 17, 0.14);
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.chart-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chart-head strong {
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: right;
}

.bar-chart {
  display: grid;
  gap: 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px minmax(160px, 1fr) 120px;
  gap: 14px;
  align-items: center;
}

.bar-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.bar-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #efe4d2, #f8efe1);
  box-shadow: inset 0 1px 3px rgba(35, 28, 17, 0.13);
}

.bar-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    linear-gradient(90deg, #18a98d, var(--primary-dark));
  box-shadow: 0 8px 18px rgba(17, 132, 111, 0.2);
  transition: width 520ms cubic-bezier(0.2, 0.9, 0.25, 1);
  animation: barGlow 1.9s ease-in-out infinite alternate;
}

.bar-row:nth-child(2) .bar-track i {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    linear-gradient(90deg, var(--secondary), var(--secondary-dark));
  box-shadow: 0 8px 18px rgba(217, 133, 36, 0.2);
}

.bar-row:nth-child(3) .bar-track i {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    linear-gradient(90deg, #7bcbb8, var(--primary-dark));
}

.bar-track i.is-negative {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent),
    linear-gradient(90deg, #e38c83, var(--danger));
  box-shadow: 0 8px 18px rgba(180, 75, 67, 0.2);
}

.expense-structure {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.pie-chart {
  position: relative;
  width: 172px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f3efe6;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    inset 0 -10px 22px rgba(35, 28, 17, 0.08),
    0 18px 32px rgba(35, 28, 17, 0.14),
    0 0 0 10px rgba(255, 255, 255, 0.56);
  animation: pieFloat 4.2s ease-in-out infinite;
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff, #fff6e8 72%);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 8px 18px rgba(35, 28, 17, 0.12);
}

.pie-legend {
  display: grid;
  gap: 12px;
}

.pie-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pie-legend strong {
  color: var(--ink);
  font-weight: 900;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.commission {
  background: var(--primary);
}

.legend-dot.logistics {
  background: var(--secondary);
}

.legend-dot.tax {
  background: var(--coral);
}

.legend-dot.cost {
  background: var(--indigo);
}

.analytics-insight {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(17, 132, 111, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(232, 245, 239, 0.96), rgba(255, 248, 235, 0.9));
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(17, 132, 111, 0.08);
}

.status-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #f3eadc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.status-pill.is-high {
  background: var(--success-tint);
  color: var(--primary-dark);
}

.status-pill.is-medium {
  background: #fff0ce;
  color: #98630f;
}

.status-pill.is-low {
  background: var(--danger-soft);
  color: var(--danger);
}

.final-insight-list {
  display: grid;
  gap: 12px;
}

.final-insight-list p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 14px;
}

.scenario-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.scenario-results div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.scenario-results span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scenario-results strong {
  display: block;
  margin-top: 14px;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 850;
}

.stock-summary {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
}

.home-kpi-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 16px;
}

.home-kpi-grid .stock-kpi {
  min-height: 142px;
}

.home-kpi-grid .stock-kpi strong {
  letter-spacing: -0.04em;
}

.control-center-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
  gap: 18px;
}

.control-panel {
  min-height: 360px;
}

.control-insight-list,
.ai-recommendation-list {
  display: grid;
  gap: 12px;
}

.control-insight-item,
.ai-recommendation-item,
.product-card-main {
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.control-insight-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 111, 87, 0.1), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 236, 0.66));
  box-shadow: 0 14px 30px rgba(35, 28, 17, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.control-insight-item:hover,
.ai-recommendation-item:hover,
.product-catalog-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 48px rgba(35, 28, 17, 0.12);
}

.control-insight-item span,
.ai-recommendation-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.control-insight-item strong,
.ai-recommendation-item strong {
  color: var(--ink);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-insight-item small,
.ai-recommendation-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.control-insight-item em {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff0ce;
  color: #98630f;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.control-insight-item em.is-dead,
.control-insight-item em.is-low-demand {
  background: var(--danger-soft);
  color: var(--danger);
}

.control-insight-item em.is-hit,
.control-insight-item em.is-liquid {
  background: var(--success-tint);
  color: var(--primary-dark);
}

.control-insight-item b {
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 880;
  white-space: nowrap;
}

.ai-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(17, 132, 111, 0.14), transparent 34%),
    radial-gradient(circle at 4% 100%, rgba(242, 184, 75, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 239, 0.74));
}

.ai-recommendation-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(203, 229, 220, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 28px rgba(8, 45, 36, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ai-icon {
  display: grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--success-tint), #c9f0e5);
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.home-products-panel .panel-header {
  margin-bottom: 18px;
}

.stock-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  background:
    radial-gradient(circle at 8% 10%, rgba(8, 118, 94, 0.1), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(241, 169, 58, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 237, 0.9));
}

.stock-hero::after {
  content: "";
  position: absolute;
  inset: auto 22px -58px auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(8, 118, 94, 0.1), transparent 66%);
  pointer-events: none;
}

.stock-hero .panel-header {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.stock-hero .secondary-action {
  min-width: 172px;
  min-height: 48px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent),
    linear-gradient(135deg, #0f9879, var(--primary-dark));
  box-shadow:
    0 18px 38px rgba(8, 118, 94, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.stock-kpi {
  position: relative;
  min-height: 122px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(8, 118, 94, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 239, 0.8));
  animation: panelRise 420ms ease both;
}

.stock-kpi:nth-child(2) .metric-icon,
.stock-kpi:nth-child(7) .metric-icon {
  background: linear-gradient(145deg, #eaf4ff, #2d6fa8);
  color: #fff;
}

.stock-kpi:nth-child(4) .metric-icon,
.stock-kpi:nth-child(6) .metric-icon {
  background: linear-gradient(145deg, #fff0ce, var(--secondary-dark));
  color: #fff;
}

.stock-kpi:nth-child(5) .metric-icon {
  background: linear-gradient(145deg, #e9fff7, var(--primary));
  color: #fff;
}

.stock-kpi:nth-child(8) .metric-icon {
  background: linear-gradient(145deg, #efe8ff, var(--violet));
  color: #fff;
}

.stock-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 18px;
}

.stock-warehouse-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.72fr);
  gap: 18px;
}

.warehouse-overview-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.warehouse-donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.warehouse-donut {
  width: 226px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f3efe6;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.62),
    inset 0 -14px 26px rgba(35, 28, 17, 0.08),
    0 30px 58px rgba(8, 45, 36, 0.16),
    0 0 0 12px rgba(255, 255, 255, 0.56);
  animation: pieFloat 4.6s ease-in-out infinite;
}

.warehouse-donut::after {
  content: "";
  position: absolute;
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff, #fff6e8 74%);
  box-shadow: inset 0 0 0 1px var(--border), 0 10px 20px rgba(35, 28, 17, 0.1);
}

.warehouse-donut-center {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 4px;
  place-items: center;
}

.warehouse-donut-center span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warehouse-donut-center strong {
  color: var(--primary-dark);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.warehouse-grid,
.forecast-list,
.attention-list {
  display: grid;
  gap: 12px;
}

.forecast-list {
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.warehouse-card,
.forecast-item,
.attention-item,
.mini-empty {
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 239, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(35, 28, 17, 0.055);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.warehouse-card:hover,
.forecast-item:hover,
.attention-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 42px rgba(35, 28, 17, 0.1);
}

.warehouse-card {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(84px, auto)) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
}

.warehouse-card strong,
.forecast-item strong,
.attention-item strong,
.mini-empty strong {
  color: var(--ink);
  font-weight: 820;
}

.warehouse-card span,
.forecast-item span,
.attention-item span,
.mini-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.warehouse-card em,
.forecast-item em {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--success-tint);
  color: var(--primary-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.warehouse-card em.is-medium {
  background: #fff0ce;
  color: #98630f;
}

.warehouse-card em.is-low {
  background: var(--danger-soft);
  color: var(--danger);
}

.warehouse-bars {
  display: grid;
  gap: 18px;
}

.warehouse-bar {
  display: grid;
  gap: 8px;
}

.warehouse-bar div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.warehouse-bar strong {
  color: var(--primary-dark);
}

.warehouse-bar i {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f1e7, #eadfcd);
  box-shadow: inset 0 1px 3px rgba(35, 28, 17, 0.12);
}

.warehouse-bar > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  box-shadow: 0 8px 18px rgba(8, 118, 94, 0.22);
  animation: barGlow 1.9s ease-in-out infinite alternate;
}

.warehouse-bar:nth-child(2) > i > b {
  background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
  box-shadow: 0 8px 18px rgba(213, 129, 34, 0.2);
}

.warehouse-bar:nth-child(3) > i > b {
  background: linear-gradient(90deg, var(--blue), #174d80);
  box-shadow: 0 8px 18px rgba(45, 111, 168, 0.18);
}

.warehouse-bar:nth-child(4) > i > b {
  background: linear-gradient(90deg, var(--violet), #593f88);
  box-shadow: 0 8px 18px rgba(116, 86, 168, 0.18);
}

.warehouse-bar:hover > i > b {
  filter: brightness(1.08) saturate(1.2);
}

.recommendation-row {
  padding: 12px 14px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.recommendation-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--success-tint);
  color: var(--primary-dark);
  font-size: 12px;
}

.recommendation-row.is-medium strong {
  background: #fff0ce;
  color: #98630f;
}

.recommendation-row.is-negative strong {
  background: var(--danger-soft);
  color: var(--danger);
}

.recommendation-row small {
  color: var(--muted);
  font-weight: 760;
}

.recommendation-row .recommendation-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.recommendation-row .recommendation-row-head span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recommendation-row .recommendation-row-head b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.recommendation-destination {
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 132, 111, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(17, 132, 111, 0.1), transparent 34%),
    rgba(234, 247, 243, 0.58);
}

.recommendation-destination em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recommendation-destination b {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.recommendation-reasons {
  display: grid !important;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.recommendation-reasons span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.recommendation-reasons b {
  margin-right: 6px;
  color: var(--ink);
  font-weight: 900;
}

.forecast-item,
.attention-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.forecast-item div,
.attention-item div {
  display: grid;
  gap: 5px;
}

.forecast-item.is-warn em {
  background: #fff0ce;
  color: #98630f;
}

.forecast-item.is-danger em {
  background: var(--danger-soft);
  color: var(--danger);
}

.forecast-item.is-neutral em {
  background: #eee8dc;
  color: var(--muted);
}

.liquidity-mini-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 118, 94, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 249, 239, 0.68));
  box-shadow: 0 12px 28px rgba(35, 28, 17, 0.055);
}

.liquidity-mini-card.is-risk {
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 111, 87, 0.12), transparent 30%),
    linear-gradient(145deg, #fffdfa, #fff4ef);
}

.liquidity-mini-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.liquidity-mini-card strong {
  color: var(--ink);
  font-weight: 840;
  overflow-wrap: anywhere;
}

.liquidity-mini-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.liquidity-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 12px;
  font-style: normal;
  font-weight: 880;
  white-space: nowrap;
}

.liquidity-badge.is-hit {
  background: #efe8ff;
  color: #5f3f99;
}

.liquidity-badge.is-liquid {
  background: var(--success-tint);
  color: var(--primary-dark);
}

.liquidity-badge.is-medium {
  background: #fff0ce;
  color: #98630f;
}

.liquidity-badge.is-low-demand {
  background: #ffe4c9;
  color: #a65610;
}

.liquidity-badge.is-dead {
  background: var(--danger-soft);
  color: var(--danger);
}

.demand-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.demand-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 118, 94, 0.09), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 239, 0.68));
  box-shadow: 0 16px 34px rgba(35, 28, 17, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.demand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(35, 28, 17, 0.11);
}

.demand-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.demand-card-head .photo-thumb {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}

.demand-card-head div {
  min-width: 0;
}

.demand-card-head strong {
  display: block;
  color: var(--ink);
  font-weight: 860;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demand-card-head span,
.demand-card-foot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.demand-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.demand-card-stats div {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.demand-card-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.demand-card-stats strong {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 880;
}

.demand-chart {
  width: 100%;
  height: 112px;
  overflow: visible;
}

.demand-chart rect {
  fill: rgba(17, 132, 111, 0.12);
}

.demand-chart polyline {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
}

.demand-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.product-catalog-panel {
  overflow: hidden;
}

.product-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(170px, 230px) minmax(0, 1.2fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(17, 132, 111, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 237, 0.54));
}

.product-filter-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.product-filter-btn {
  min-height: 42px;
  border: 1px solid rgba(234, 223, 205, 0.92);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  cursor: pointer;
  font-weight: 820;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.product-filter-btn:hover {
  transform: translateY(-1px);
  color: var(--primary-dark);
  box-shadow: 0 12px 24px rgba(35, 28, 17, 0.08);
}

.product-filter-btn.is-active {
  border-color: rgba(17, 132, 111, 0.26);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 16px 32px rgba(8, 118, 94, 0.2);
}

.product-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.product-catalog-grid.is-compact {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.product-catalog-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 262px;
  padding: 16px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(17, 132, 111, 0.1), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 239, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 16px 34px rgba(35, 28, 17, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-catalog-card.is-compact {
  min-height: 220px;
}

.product-card-main {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  color: inherit;
}

.product-card-main .photo-thumb {
  width: 68px;
  height: 68px;
  border-radius: 18px;
}

.product-card-main span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-card-main strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 880;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.product-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.product-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  font-style: normal;
  font-weight: 880;
}

.product-card-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.product-card-kpis div {
  display: grid;
  gap: 5px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(234, 223, 205, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.product-card-kpis span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.product-card-kpis strong {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 880;
  overflow-wrap: anywhere;
}

.product-card-chart {
  padding: 8px 0 0;
}

.product-card-chart .demand-chart {
  height: 64px;
}

.product-open-btn {
  min-height: 42px;
  border: 1px solid rgba(17, 132, 111, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(234, 247, 243, 0.92), rgba(255, 255, 255, 0.86));
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 860;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.product-open-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(8, 118, 94, 0.16);
}

.home-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 18px;
}

.home-chart-panel .product-chart-wrap {
  margin-top: 6px;
}

.home-chart-panel .product-line-chart {
  height: 260px;
}

.home-distribution-list {
  display: grid;
  gap: 16px;
}

.home-distribution-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.home-distribution-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.home-distribution-row strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 880;
}

.home-distribution-row i {
  grid-column: 1 / -1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe6d7;
  box-shadow: inset 0 1px 2px rgba(35, 28, 17, 0.1);
}

.home-distribution-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.home-distribution-row b.is-green {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
}

.home-distribution-row b.is-blue {
  background: linear-gradient(90deg, #326da8, #6aa9dc);
}

.home-distribution-row b.is-orange {
  background: linear-gradient(90deg, var(--secondary-dark), var(--secondary));
}

.finance-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
}

.finance-product-list {
  display: grid;
  gap: 10px;
}

.finance-product-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(234, 223, 205, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.finance-product-item .photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.finance-product-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-product-item strong {
  color: var(--ink);
  font-weight: 840;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-product-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.finance-product-item b {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 880;
  white-space: nowrap;
}

.product-identity-cell {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.product-identity-cell strong {
  color: var(--ink);
  font-weight: 840;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-identity-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

/* Performance layer: keep premium look on desktop, but make scrolling light on phones. */
.panel,
.metric,
.chart-card,
.product-catalog-card,
.demand-card,
.forecast-item,
.attention-item,
.warehouse-card,
.liquidity-mini-card {
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

@media (max-width: 860px) {
  html,
  body {
    overscroll-behavior-y: none;
  }

  .panel,
  .chart-card,
  .metric,
  .table-wrap,
  .stock-controls,
  .finance-empty-state,
  .product-catalog-card,
  .demand-card,
  .warehouse-card,
  .forecast-item,
  .attention-item,
  .liquidity-mini-card,
  .control-insight-item,
  .ai-recommendation-item {
    box-shadow: 0 8px 18px rgba(35, 28, 17, 0.055) !important;
    transition: none !important;
  }

  .metric:hover,
  .panel:hover,
  .chart-card:hover,
  .warehouse-card:hover,
  .forecast-item:hover,
  .attention-item:hover,
  .product-catalog-card:hover,
  .control-insight-item:hover,
  .ai-recommendation-item:hover {
    transform: none !important;
    box-shadow: 0 8px 18px rgba(35, 28, 17, 0.055) !important;
  }

  .landing-preview,
  .floating-card,
  .auth-card,
  .wb-token-box,
  .warehouse-drawer,
  .topbar,
  .panel,
  .chart-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .landing-glow,
  .warehouse-donut,
  .warehouse-bar b,
  .stock-kpi,
  .product-line-chart polyline,
  tbody tr {
    animation: none !important;
  }

  .demand-chart polyline,
  .product-line-chart polyline,
  .product-chart-hit {
    filter: none !important;
  }

  .workspace {
    will-change: auto;
  }
}

.attention-item {
  border-color: rgba(217, 111, 87, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 111, 87, 0.1), transparent 30%),
    linear-gradient(145deg, #fffdfa, #fff4ef);
}

.mini-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  text-align: center;
}

.stock-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 210px) minmax(160px, 210px) minmax(170px, 230px) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(234, 223, 205, 0.7);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 248, 237, 0.52));
}

.stock-controls label {
  min-width: 0;
}

.stock-controls input,
.stock-controls select {
  background: rgba(255, 255, 255, 0.94);
}

.export-action {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: linear-gradient(135deg, #fff6de, var(--secondary));
  color: #4c3510;
  cursor: pointer;
  font-weight: 820;
  box-shadow: 0 14px 28px rgba(217, 133, 36, 0.16);
}

.toggle-row {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.toggle-row span {
  font-size: 13px;
  text-transform: none;
}

.stock-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(17, 132, 111, 0.28);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--success-tint), #fff8e8);
  color: var(--primary-dark);
  text-align: center;
}

#stockPanel.is-loading .stock-empty,
#stockPanel.is-loading .table-wrap,
#stockPanel.is-loading .warehouse-grid,
#stockPanel.is-loading .warehouse-bars,
#stockPanel.is-loading .forecast-list,
#stockPanel.is-loading .attention-list {
  position: relative;
  overflow: hidden;
}

#stockPanel.is-loading .stock-empty::after,
#stockPanel.is-loading .table-wrap::after,
#stockPanel.is-loading .warehouse-grid::after,
#stockPanel.is-loading .warehouse-bars::after,
#stockPanel.is-loading .forecast-list::after,
#stockPanel.is-loading .attention-list::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  animation: skeletonSweep 1.1s ease-in-out infinite;
}

.stock-empty strong {
  font-size: 20px;
}

.stock-empty span {
  color: var(--muted);
  font-weight: 720;
}

.stock-error {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(180, 75, 67, 0.18);
  border-radius: 16px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 780;
}

.wb-token-box {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 237, 0.56));
  backdrop-filter: blur(16px);
}

.wb-token-box button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  cursor: pointer;
  font-weight: 780;
  box-shadow: 0 14px 28px rgba(17, 132, 111, 0.18);
}

.wb-token-box button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.wb-token-box button.secondary-action {
  border: 1px solid rgba(232, 220, 203, 0.95);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-dark);
  box-shadow: none;
}

.market-token-box {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}

.market-token-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.market-token-note[data-state="ok"] {
  color: var(--primary-dark);
}

.market-token-note[data-state="error"] {
  color: var(--danger);
}

.market-token-note[data-state="loading"] {
  color: var(--warning);
}

body:not(.is-admin) .market-token-box {
  display: none;
}

.stock-table {
  min-width: 1780px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.stock-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, #f8efe1, #efe2cf);
  border-bottom: 0;
}

.stock-table th:nth-child(1),
.stock-table td:nth-child(1) {
  width: 92px;
}

.stock-table th:nth-child(2),
.stock-table td:nth-child(2) {
  width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-table th:nth-child(3),
.stock-table td:nth-child(3) {
  width: 126px;
  overflow-wrap: anywhere;
}

.stock-table th:nth-child(4),
.stock-table td:nth-child(4),
.stock-table th:nth-child(5),
.stock-table td:nth-child(5) {
  width: 130px;
}

.stock-table th:nth-child(6),
.stock-table td:nth-child(6),
.stock-table th:nth-child(7),
.stock-table td:nth-child(7),
.stock-table th:nth-child(8),
.stock-table td:nth-child(8) {
  width: 110px;
}

.stock-table th:nth-child(9),
.stock-table td:nth-child(9) {
  width: 176px;
}

.stock-table th:nth-child(10),
.stock-table td:nth-child(10) {
  width: 150px;
}

.stock-table th:nth-child(11),
.stock-table td:nth-child(11) {
  width: 126px;
}

.stock-table th:nth-child(12),
.stock-table td:nth-child(12) {
  width: 92px;
}

.stock-table th:nth-child(13),
.stock-table td:nth-child(13) {
  width: 190px;
}

.stock-table th:nth-child(14),
.stock-table td:nth-child(14) {
  width: 130px;
}

.stock-table td {
  height: 76px;
  border-top: 1px solid rgba(234, 223, 205, 0.72);
  border-bottom: 1px solid rgba(234, 223, 205, 0.72);
  background: rgba(255, 255, 255, 0.76);
}

.stock-table tbody tr:nth-child(even) td {
  background: rgba(255, 249, 239, 0.72);
}

.stock-table td:first-child {
  border-left: 1px solid rgba(234, 223, 205, 0.72);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.stock-table td:last-child {
  border-right: 1px solid rgba(234, 223, 205, 0.72);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.stock-table tbody tr:hover td {
  background: rgba(232, 245, 239, 0.84);
  transform: translateY(-1px);
}

.stock-table tbody tr,
.report-summary-table tbody tr {
  animation: tableRowIn 220ms ease both;
}

.stock-table .photo-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(35, 28, 17, 0.12);
  transition: transform 180ms ease;
}

.stock-table .photo-thumb:hover {
  transform: scale(1.08);
}

.product-link-button {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  text-align: left;
}

.product-link-button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-detail-page,
#productDetailContent {
  display: grid;
  gap: 22px;
}

.product-detail-empty {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-soft);
}

.product-detail-empty[hidden] {
  display: none;
}

.product-detail-state {
  display:flex!important;
  align-items:center;
  gap:18px;
  min-height:150px;
  padding:26px!important;
}

.product-detail-state > span {
  display:grid;
  flex:0 0 48px;
  width:48px;
  height:48px;
  place-items:center;
  border:1px solid rgba(251,113,133,.3);
  border-radius:15px;
  color:#fb7185;
  background:rgba(251,113,133,.09);
  font-size:20px;
  font-weight:900;
}

.product-detail-state > div {
  flex:1;
  min-width:0;
}

.product-detail-state h2,
.product-detail-state p {
  margin:0!important;
}

.product-detail-state p {
  margin-top:7px!important;
  color:var(--text-muted,#aaa4bf)!important;
}

.product-detail-skeleton {
  display:grid;
  gap:18px;
}

.product-skeleton-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.product-skeleton-card {
  min-height:118px;
  padding:20px;
  border:1px solid var(--border,rgba(148,163,184,.15));
  border-radius:20px;
  background:var(--bg-card,#15152c);
  overflow:hidden;
}

.product-skeleton-card.is-hero {
  min-height:220px;
}

.product-skeleton-card.is-chart {
  min-height:300px;
}

.product-skeleton-card :is(i,span,strong) {
  display:block;
  width:72%;
  height:14px;
  margin:12px 0;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.13),rgba(255,255,255,.04));
  background-size:220% 100%;
  animation:product-skeleton-shimmer 1.35s linear infinite;
}

.product-skeleton-card i {
  width:78px;
  height:78px;
  border-radius:22px;
}

.product-skeleton-card strong {
  width:45%;
  height:28px;
}

.product-intelligence-fallback {
  display:flex!important;
  align-items:center;
  min-height:130px;
  border-style:dashed!important;
  border-color:rgba(139,92,246,.3)!important;
}

.product-intelligence-fallback h2,
.product-intelligence-fallback p {
  margin:0!important;
}

.product-intelligence-fallback p {
  margin-top:8px!important;
  color:var(--text-muted,#aaa4bf)!important;
}

@keyframes product-skeleton-shimmer {
  to { background-position:-220% 0; }
}

.product-detail-hero {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
}

.product-detail-photo .photo-thumb {
  width: 118px;
  height: 118px;
  border-radius: 26px;
  box-shadow: 0 22px 42px rgba(8, 28, 24, 0.16);
}

.product-detail-title {
  display: grid;
  gap: 12px;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-pdf-action {
  border-color: rgba(167, 139, 250, 0.48);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.32), rgba(79, 70, 229, 0.2));
  box-shadow: 0 10px 28px rgba(76, 29, 149, 0.22);
}

.product-detail-title h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.product-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-tags span {
  padding: 8px 11px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.product-detail-stock,
.product-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-detail-metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(232, 220, 203, 0.92);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.1), transparent 36%),
    rgba(255, 253, 248, 0.82);
  box-shadow: 0 12px 28px rgba(35, 28, 17, 0.06);
}

.product-detail-metric span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-detail-metric strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.product-detail-metric.is-accent {
  border-color: rgba(17, 132, 111, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(123, 203, 184, 0.22), transparent 38%),
    linear-gradient(145deg, rgba(234, 247, 243, 0.9), rgba(255, 253, 248, 0.86));
}

.product-detail-metric.is-accent strong {
  color: var(--primary-dark);
}

.product-detail-metric.is-negative strong {
  color: var(--danger);
}

.product-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.product-chart-card {
  min-height: 330px;
}

.product-chart-card .panel-header {
  align-items: flex-start;
}

.product-chart-wrap {
  position: relative;
  margin-top: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.product-chart-wrap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-line-chart {
  width: 100%;
  height: 260px;
  overflow: visible;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(123, 203, 184, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 253, 248, 0.72), rgba(246, 244, 239, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-line-chart polyline {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 4px 8px rgba(8, 28, 24, 0.08));
  pointer-events: none;
  animation: chartLineIn 320ms ease both;
}

.product-chart-grid,
.product-chart-axis-line {
  stroke: rgba(226, 216, 201, 0.72);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.product-chart-grid {
  stroke-dasharray: 0;
}

.product-chart-y-label,
.product-chart-x-label {
  fill: #6a756e;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
}

.product-chart-y-label {
  text-anchor: end;
}

.product-chart-x-label {
  text-anchor: middle;
}

.product-chart-hit {
  fill: transparent;
  stroke-width: 0;
  opacity: 0;
  cursor: crosshair;
  pointer-events: all;
  transition:
    opacity 160ms ease,
    filter 160ms ease,
    fill 160ms ease;
}

.product-chart-hit:hover {
  opacity: 0.92;
  filter: drop-shadow(0 0 8px rgba(8, 118, 94, 0.3));
}

.product-line-chart .is-green,
.product-chart-legend .is-green {
  stroke: var(--primary);
  background: var(--primary);
}

.product-line-chart .is-orange,
.product-chart-legend .is-orange {
  stroke: var(--secondary-dark);
  background: var(--secondary-dark);
}

.product-line-chart .is-blue,
.product-chart-legend .is-blue {
  stroke: #326da8;
  background: #326da8;
}

.product-line-chart polyline.is-green,
.product-line-chart polyline.is-orange,
.product-line-chart polyline.is-blue {
  fill: none;
}

.product-chart-hit.is-green {
  fill: var(--primary);
}

.product-chart-hit.is-orange {
  fill: var(--secondary-dark);
}

.product-chart-hit.is-blue {
  fill: #326da8;
}

.product-chart-tooltip {
  position: fixed;
  z-index: 3000;
  display: grid;
  gap: 5px;
  min-width: 178px;
  padding: 12px 13px;
  border: 1px solid rgba(232, 220, 203, 0.92);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.12), transparent 42%),
    rgba(255, 253, 248, 0.96);
  color: var(--ink);
  box-shadow: 0 22px 54px rgba(8, 28, 24, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.product-chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-chart-tooltip strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.product-chart-tooltip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

@keyframes chartLineIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.product-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.product-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.product-chart-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 18px;
  border: 1px dashed rgba(17, 132, 111, 0.28);
  border-radius: 20px;
  color: var(--muted);
  font-weight: 820;
  background: rgba(234, 247, 243, 0.32);
}

.product-insight-card,
.product-recommendations {
  min-height: 260px;
}

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

.recommendation-list div {
  padding: 14px 15px;
  border: 1px solid rgba(17, 132, 111, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(123, 203, 184, 0.16), transparent 42%),
    rgba(255, 253, 248, 0.78);
  color: var(--primary-dark);
  font-weight: 820;
}

.product-intelligence-summary {
  display:grid;
  gap:18px;
  overflow:hidden;
  border-color:rgba(139,92,246,.32)!important;
  background:
    radial-gradient(circle at 88% 0%,rgba(124,58,237,.2),transparent 34%),
    var(--bg-card,#15152c)!important;
}
.product-intelligence-summary .panel-header > strong {
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:14px;
  font-size:24px;
}
.product-intelligence-summary .panel-header > strong.is-positive { color:#34d399; }
.product-intelligence-summary .panel-header > strong.is-negative { color:#fb7185; }
.product-factor-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.product-factor {
  display:grid;
  gap:14px;
  padding:18px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(255,255,255,.025);
}
.product-factor span {
  display:inline-flex;
  margin-bottom:9px;
  color:#a78bfa;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.product-factor h3 { margin:0;color:var(--text-main,#f7f4ff);font-size:16px; }
.product-factor p { margin:6px 0 0!important;color:var(--text-muted,#aaa4bf)!important;font-size:12px!important;line-height:1.55!important; }
.product-factor footer { padding-top:12px;border-top:1px solid rgba(255,255,255,.07); }
.product-factor footer b { color:#34d399;font-size:10px;text-transform:uppercase;letter-spacing:.08em; }
.product-factor.is-danger { border-color:rgba(251,113,133,.28); }
.product-factor.is-attention { border-color:rgba(245,158,11,.28); }
.product-factor.is-success { border-color:rgba(52,211,153,.28); }
.product-intelligence-grid {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:18px;
}
.product-price-intelligence { grid-row:span 2; }
.product-price-intelligence,
.product-promo-intelligence,
.product-season-intelligence,
.product-event-intelligence {
  min-width:0;
  overflow:hidden;
}
.product-price-chart {
  display:grid;
  gap:10px;
  margin-top:18px;
  padding:14px;
  border:1px solid rgba(139,92,246,.2);
  border-radius:18px;
  background:rgba(8,9,22,.42);
}
.product-price-chart svg { width:100%;height:230px;overflow:visible; }
.product-price-chart rect { fill:rgba(52,211,153,.26); }
.product-price-chart polyline { fill:none;stroke:#a78bfa;stroke-width:3;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 7px rgba(139,92,246,.5)); }
.product-price-chart > div { display:flex;flex-wrap:wrap;gap:18px;color:var(--text-muted,#aaa4bf);font-size:11px;font-weight:750; }
.product-promo-history,
.product-season-groups { display:grid;gap:9px;margin-top:14px; }
.product-promo-history > div,
.product-season-groups > div {
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.product-promo-history strong,
.product-season-groups strong { color:var(--text-main,#f7f4ff);font-size:12px; }
.product-promo-history span,
.product-season-groups span,
.product-event-intelligence > p { color:var(--text-muted,#aaa4bf);font-size:11px;line-height:1.5; }
.product-intelligence-empty {
  padding:18px;
  border:1px dashed rgba(139,92,246,.28);
  border-radius:15px;
  color:var(--text-muted,#aaa4bf);
  font-size:12px;
  line-height:1.55;
}

.product-warehouse-visibility {
  overflow: hidden;
}

.product-warehouse-table {
  display: grid;
  gap: 8px;
}

.product-warehouse-head,
.product-warehouse-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(100px, 0.6fr));
  gap: 12px;
  align-items: center;
}

.product-warehouse-head {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--table-head);
  color: var(--muted);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-warehouse-row {
  padding: 14px 16px;
  border: 1px solid rgba(232, 220, 203, 0.9);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.74);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.product-warehouse-row:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 132, 111, 0.24);
  box-shadow: 0 18px 34px rgba(35, 28, 17, 0.1);
}

.product-warehouse-row strong {
  display: grid;
  gap: 4px;
}

.product-warehouse-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-weight: 850;
}

.stock-qty {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(17, 132, 111, 0.1);
}

.stock-badge.is-ok {
  background: var(--success-tint);
  color: var(--primary-dark);
}

.stock-badge.is-low {
  background: #fff0ce;
  color: #98630f;
}

.stock-badge.is-empty {
  background: #eee8dc;
  color: var(--muted);
}

.stock-total-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 126px;
}

.warehouse-drawer-trigger {
  min-height: 34px;
  border: 1px solid rgba(17, 132, 111, 0.18);
  border-radius: 999px;
  padding: 0 12px;
  background: linear-gradient(145deg, var(--success-tint), #fff9ea);
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(17, 132, 111, 0.08);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.warehouse-drawer-trigger:hover,
.warehouse-drawer-trigger:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #dff6ee, #fff2cf);
  box-shadow: 0 14px 26px rgba(17, 132, 111, 0.16);
  outline: 0;
}

.warehouse-popover {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.warehouse-popover-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 190px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--success-tint), #fff8e8);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
  cursor: default;
  white-space: nowrap;
}

.warehouse-popover-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  display: grid;
  gap: 8px;
  min-width: 230px;
  max-width: 320px;
  padding: 12px;
  border: 1px solid rgba(234, 223, 205, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 239, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 46px rgba(35, 28, 17, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.warehouse-popover:hover .warehouse-popover-list,
.warehouse-popover:focus-within .warehouse-popover-list {
  opacity: 1;
  transform: translateY(0);
}

.warehouse-popover-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(232, 245, 239, 0.62);
}

.warehouse-popover-list strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.warehouse-popover-list span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.warehouse-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 32, 25, 0.24);
  opacity: 0;
  transition: opacity 220ms ease;
}

.warehouse-drawer-backdrop.is-open {
  opacity: 1;
}

.warehouse-drawer {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(234, 223, 205, 0.92);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 239, 0.96));
  box-shadow: 0 28px 70px rgba(21, 42, 34, 0.24);
  transform: translateX(calc(100% + 40px));
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.warehouse-drawer.is-open {
  transform: translateX(0);
}

.warehouse-drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(234, 223, 205, 0.82);
}

.warehouse-drawer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.warehouse-drawer-head span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 780;
  line-height: 1.35;
}

.warehouse-drawer-head button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.warehouse-drawer-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 24px;
}

.warehouse-drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-drawer-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 132, 111, 0.12);
  border-radius: 16px;
  background: rgba(232, 245, 239, 0.58);
}

.warehouse-drawer-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-drawer-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1;
}

.warehouse-drawer-list {
  display: grid;
  gap: 10px;
}

.warehouse-drawer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(234, 223, 205, 0.92);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 12px 28px rgba(35, 28, 17, 0.06);
  opacity: 0;
  transform: translateX(16px);
  animation: drawerRowIn 260ms ease forwards;
  animation-delay: var(--row-delay, 0ms);
}

.warehouse-drawer-item strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.warehouse-drawer-item span {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--success-tint);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
}

.warehouse-drawer-item b {
  color: var(--primary-dark);
  font-size: 18px;
  white-space: nowrap;
}

.fbs-debug-panel {
  display: grid;
  gap: 16px;
}

.fbs-debug-list {
  display: grid;
  gap: 12px;
}

.fbs-debug-card {
  border: 1px solid rgba(227, 214, 193, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  padding: 14px;
  box-shadow: 0 14px 34px rgba(36, 30, 20, 0.06);
}

.fbs-debug-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.fbs-debug-card span,
.fbs-debug-card small,
.fbs-debug-card p,
.fbs-debug-card em {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.fbs-debug-card summary {
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.fbs-debug-card pre {
  max-height: 320px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #10261f;
  color: #f6fff9;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fbs-debug-warehouses {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.fbs-debug-warehouses div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(18, 132, 111, 0.08);
}

.fbs-debug-warehouses b {
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: linear-gradient(180deg, #f7eddc, #efe2ce);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

td,
th {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th:first-child {
  border-top-left-radius: 16px;
}

th:last-child {
  border-top-right-radius: 16px;
}

tbody tr {
  transition:
    background 160ms ease,
    transform 160ms ease;
}

tbody tr:hover {
  background: rgba(232, 245, 239, 0.72);
}

td {
  font-size: 14px;
}

.report-summary-table,
.average-profit-table {
  min-width: 1180px;
}

.report-summary-table {
  min-width: 1540px;
  table-layout: fixed;
}

.reports-registry {
  display: grid;
  gap: 12px;
}

.report-registry-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(234, 223, 205, 0.86);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 239, 0.74));
  box-shadow: 0 12px 28px rgba(35, 28, 17, 0.055);
}

.report-registry-item > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-registry-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.report-registry-item span,
.report-registry-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 740;
}

.report-registry-item em {
  color: var(--danger);
}

.report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.report-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: var(--success-tint);
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 820;
}

.report-actions button.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.report-summary-table tbody tr,
.average-profit-table tbody tr {
  background: rgba(255, 253, 250, 0.78);
}

.report-summary-table td,
.average-profit-table td {
  height: 70px;
}

.report-summary-table th,
.report-summary-table td {
  line-height: 1.22;
  vertical-align: middle;
}

.report-summary-table th {
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-summary-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.report-summary-table th:nth-child(1),
.report-summary-table td:nth-child(1) {
  width: 74px;
}

.report-summary-table th:nth-child(2),
.report-summary-table td:nth-child(2) {
  width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-summary-table th:nth-child(3),
.report-summary-table td:nth-child(3) {
  width: 86px;
}

.report-summary-table th:nth-child(4),
.report-summary-table td:nth-child(4),
.report-summary-table th:nth-child(5),
.report-summary-table td:nth-child(5) {
  width: 142px;
}

.report-summary-table th:nth-child(6),
.report-summary-table td:nth-child(6),
.report-summary-table th:nth-child(7),
.report-summary-table td:nth-child(7) {
  width: 128px;
}

.report-summary-table th:nth-child(8),
.report-summary-table td:nth-child(8),
.report-summary-table th:nth-child(10),
.report-summary-table td:nth-child(10) {
  width: 112px;
}

.report-summary-table th:nth-child(9),
.report-summary-table td:nth-child(9),
.report-summary-table th:nth-child(11),
.report-summary-table td:nth-child(11) {
  width: 132px;
}

.report-summary-table th:nth-child(12),
.report-summary-table td:nth-child(12),
.report-summary-table th:nth-child(13),
.report-summary-table td:nth-child(13) {
  width: 76px;
}

.report-summary-table tbody tr:nth-child(even) {
  background: rgba(255, 249, 239, 0.7);
}

.report-summary-table tbody tr:hover {
  background: rgba(232, 245, 239, 0.8);
}

.finance-cost-input {
  width: 112px;
  min-height: 36px;
  border: 1px solid rgba(17, 132, 111, 0.16);
  border-radius: 12px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-weight: 850;
  text-align: right;
}

.finance-cost-input::placeholder {
  color: rgba(101, 116, 107, 0.82);
  font-weight: 760;
}

.finance-source-strip {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 132, 111, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(232, 245, 239, 0.86), rgba(255, 249, 239, 0.82));
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.45;
}

.result-muted {
  color: var(--muted);
  font-weight: 800;
}

.report-summary-table td:nth-child(8),
.report-summary-table td:nth-child(9),
.report-summary-table td:nth-child(10),
.report-summary-table td:nth-child(11),
.average-profit-table td:nth-child(3),
.average-profit-table td:nth-child(5) {
  color: var(--primary-dark);
  font-weight: 850;
}

td:nth-child(n + 3),
th:nth-child(n + 3) {
  text-align: right;
}

.receipt-table td:nth-child(3),
.receipt-table th:nth-child(3),
.report-summary-table td:first-child,
.report-summary-table th:first-child,
.average-profit-table td:first-child,
.average-profit-table th:first-child {
  text-align: left;
}

.report-summary-table td:nth-child(2),
.report-summary-table th:nth-child(2),
.average-profit-table td:nth-child(2),
.average-profit-table th:nth-child(2) {
  text-align: left;
}

.value-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--success-tint), #fff9eb);
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(17, 132, 111, 0.1);
}

.value-badge.is-negative {
  background: var(--danger-soft);
  color: var(--danger);
}

.value-badge.is-medium {
  background: #fff0ce;
  color: #98630f;
}

.value-badge.is-positive {
  background: var(--success-tint);
  color: var(--primary-dark);
}

td input {
  min-width: 110px;
  height: 40px;
  border-radius: 12px;
}

td select {
  min-width: 132px;
  height: 40px;
  border-radius: 12px;
}

td input:disabled {
  border-color: rgba(232, 220, 203, 0.72);
  background: rgba(245, 238, 226, 0.72);
  color: var(--subtle);
  cursor: not-allowed;
}

.cost-mode-badge {
  min-width: 118px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 0 12px;
  color: var(--primary-dark);
  background: linear-gradient(145deg, var(--success-tint), #fff8e8);
  font-size: 13px;
  font-weight: 780;
  box-shadow: inset 0 0 0 1px rgba(17, 132, 111, 0.12);
}

.cost-mode-badge.is-russia {
  color: #8a5316;
  background: linear-gradient(145deg, #fff2d8, #fffaf0);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 72, 0.22);
}

td .name-input {
  min-width: 180px;
}

.photo-thumb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf9, #f3eadc);
  color: var(--muted);
  font-size: 18px;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-photo-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.photo-upload-btn,
.photo-remove-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.photo-upload-btn {
  background: var(--success-tint);
  color: var(--primary-dark);
}

.photo-upload-btn input {
  display: none;
}

.photo-remove-btn {
  background: var(--danger-soft);
  color: var(--danger);
}

.delete-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-weight: 950;
}

.delete-btn:hover {
  box-shadow: 0 10px 18px rgba(181, 71, 63, 0.13);
}

.result-negative {
  color: var(--danger);
  font-weight: 800;
}

.result-positive {
  color: var(--primary-dark);
  font-weight: 800;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(260px, 1fr);
  gap: 22px;
  align-items: end;
  padding: 6px 0 4px;
}

.upload-box {
  min-height: 176px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(15, 118, 110, 0.46);
  border-radius: 20px;
  background:
    radial-gradient(circle at 70% 10%, rgba(244, 181, 72, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(232, 245, 239, 0.88), #fffaf1 74%),
    var(--card);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.upload-box:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 22px 52px rgba(17, 132, 111, 0.16);
}

.upload-box input {
  display: none;
}

.upload-box span {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 900;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--success-tint), #fff8e8);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.mapping-grid label,
.report-layout label:not(.upload-box) {
  padding: 14px;
  border: 1px solid rgba(231, 226, 216, 0.72);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf9, #fff8ee);
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tableRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawerRowIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes barGlow {
  from {
    filter: saturate(1);
  }
  to {
    filter: saturate(1.18) brightness(1.04);
  }
}

@keyframes pieFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}

@keyframes skeletonSweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes landingFade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpSoft {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes previewIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes glowDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(28px, -18px, 0) scale(1.08);
  }
}

@keyframes barGrow {
  from {
    transform: scaleY(0.2);
    opacity: 0.4;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .landing-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .landing-preview {
    min-height: 590px;
  }

  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .top-grid,
  .report-layout,
  .analytics-grid,
  .decision-grid,
  .stock-dashboard-grid,
  .stock-warehouse-dashboard,
  .warehouse-overview-grid,
  .demand-card-grid {
    grid-template-columns: 1fr;
  }

  .sales-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .report-summary-table {
    min-width: 0;
    border-spacing: 0 12px;
  }

  .report-summary-table thead {
    display: none;
  }

  .report-summary-table,
  .report-summary-table tbody,
  .report-summary-table tr,
  .report-summary-table td {
    display: block;
    width: 100%;
  }

  .report-summary-table tbody tr {
    padding: 12px 14px;
    border: 1px solid rgba(234, 223, 205, 0.92);
    border-radius: 18px;
    background:
      radial-gradient(circle at 100% 0%, rgba(241, 169, 58, 0.08), transparent 32%),
      rgba(255, 253, 248, 0.92);
    box-shadow: 0 12px 28px rgba(35, 28, 17, 0.06);
  }

  .report-summary-table td {
    display: grid;
    grid-template-columns: minmax(120px, 42%) minmax(0, 1fr);
    align-items: center;
    min-height: 38px;
    height: auto;
    padding: 8px 0;
    border: 0;
    text-align: right !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .report-summary-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
  }

  .report-summary-table td:first-child {
    display: none;
  }

  .report-summary-table td:nth-child(2) {
    grid-template-columns: 1fr;
    padding-bottom: 12px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    text-align: left !important;
  }

  .report-summary-table td:nth-child(2)::before {
    margin-bottom: 4px;
  }

  .finance-cost-input {
    justify-self: end;
  }
}

@media (max-width: 860px) {
  .auth-gateway {
    position: static;
    min-height: 100vh;
  }

  .landing-preview {
    min-height: 560px;
  }

  .dashboard-mockup {
    inset: 8% 0 2%;
  }

  .floating-card {
    min-width: 138px;
    padding: 12px 13px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
    position: static;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .topbar .profile-switcher,
  .topbar .account-box,
  .topbar #stockUpdatedAt {
    width: 100%;
    max-width: none;
  }

  .form-grid,
  .mapping-grid,
  .summary-grid,
  .sales-summary,
  .stock-summary,
  .stock-controls,
  .wb-token-box,
  .market-token-box {
    grid-template-columns: 1fr;
  }

  .warehouse-card {
    grid-template-columns: 1fr;
  }

  .expense-structure,
  .bar-row,
  .scenario-grid,
  .scenario-results {
    grid-template-columns: 1fr;
  }

  .bar-row strong {
    text-align: left;
  }
}

@media (max-width: 640px) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 80ms !important;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:not(.is-authenticated) {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    background: linear-gradient(180deg, #fff9ef 0%, #f3eadc 100%);
  }

  .auth-gateway {
    padding: 16px;
    background:
      radial-gradient(circle at 70% 0%, rgba(8, 118, 94, 0.12), transparent 34%),
      linear-gradient(180deg, #fff9ef, #f2e7d7);
  }

  .landing-glow,
  .landing-noise {
    display: none;
  }

  .landing-shell {
    display: block;
    min-height: auto;
  }

  .auth-hero {
    min-height: calc(100vh - 32px);
    padding: 22px 4px;
    justify-content: center;
  }

  .auth-hero h1 {
    font-size: clamp(34px, 11vw, 48px);
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .auth-hero p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.5;
  }

  .auth-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-hero-actions button {
    width: 100%;
  }

  .landing-trust {
    display: none;
  }

  .auth-card {
    padding: 22px;
    border-radius: 22px;
  }

  .auth-modal-backdrop,
  .dashboard-mockup,
  .floating-card,
  .shipment-item,
  .profile-switcher,
  .account-box,
  .tabs {
    backdrop-filter: none !important;
  }

  .landing-preview {
    display: block;
    min-height: auto;
    margin-top: 18px;
    padding-bottom: 26px;
  }

  .dashboard-mockup {
    position: relative;
    inset: auto;
    padding: 14px;
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(35, 28, 17, 0.08);
    transform: none !important;
  }

  .landing-preview:hover .dashboard-mockup {
    transform: none;
    box-shadow: 0 12px 26px rgba(35, 28, 17, 0.08);
  }

  .mockup-kpis {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mockup-kpis div {
    min-height: 82px;
    padding: 14px;
  }

  .mockup-kpis strong {
    margin-top: 8px;
    font-size: 24px;
  }

  .mockup-chart {
    display: none;
  }

  .mockup-warehouse {
    grid-template-columns: 1fr;
  }

  .mockup-row {
    grid-template-columns: 1fr 0.7fr;
  }

  .mockup-row b,
  .mockup-row span:nth-child(2) {
    display: none;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 34px rgba(8, 28, 24, 0.16);
    position: relative;
    z-index: 20;
  }

  .brand-block {
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px 12px;
  }

  .brand-block .eyebrow,
  .brand-subtitle,
  .sidebar-help,
  .sidebar-copy {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .sidebar h1 {
    max-width: none;
    font-size: 22px;
    line-height: 1.05;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 2px;
  }

  .side-nav-link {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 0 14px;
    border-color: rgba(255, 255, 255, 0.36);
    background: #f8f7f1;
    color: #17211c;
    box-shadow: 0 10px 22px rgba(5, 32, 26, 0.12);
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
  }

  .side-nav-link:hover {
    border-color: rgba(255, 255, 255, 0.66);
    background: #fffdf8;
    color: #17211c;
  }

  .side-nav-link.is-active {
    border-color: rgba(255, 255, 255, 0.72);
    background: linear-gradient(145deg, #fffdf8, #f4ead8);
    color: #17211c;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.86),
      0 14px 26px rgba(5, 32, 26, 0.16);
  }

  .side-nav-link::before {
    display: none;
  }

  .primary-action {
    position: relative;
    z-index: 1;
    min-height: 48px;
    border-radius: 14px;
  }

  .shipment-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .shipment-item {
    min-width: 220px;
    padding: 12px;
    border-radius: 14px;
  }

  .profile-switcher,
  .account-box {
    padding: 12px;
    border-radius: 16px;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 12px;
    position: relative;
    z-index: 1;
  }

  .app-shell,
  .tab-panel,
  .top-grid,
  .report-layout,
  .analytics-grid,
  .decision-grid,
  .stock-dashboard-grid,
  .stock-warehouse-dashboard,
  .warehouse-overview-grid,
  .panel,
  .chart-card,
  .stock-hero,
  .warehouse-grid,
  .forecast-list,
  .attention-list,
  .warehouse-bars {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .tabs {
    top: 0;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 6px;
    gap: 4px;
    overflow-x: auto;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .panel {
    width: 100%;
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(35, 28, 17, 0.06);
  }

  .panel:hover,
  .chart-card:hover,
  .metric:hover {
    transform: none;
  }

  .tab-panel.is-active {
    gap: 16px;
    animation: none;
  }

  .panel-header {
    align-items: flex-start;
    gap: 12px;
  }

  .panel h2,
  .panel h3 {
    font-size: 22px;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .form-grid,
  .summary-grid,
  .sales-summary,
  .stock-summary {
    gap: 12px;
  }

  .metric {
    min-height: 116px;
    padding: 18px;
    border-radius: 18px;
  }

  .metric strong {
    font-size: 30px;
    overflow-wrap: anywhere;
  }

  label input,
  label select,
  label textarea,
  .wb-token-box input {
    min-height: 46px;
    border-radius: 14px;
    font-size: 16px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    contain: layout paint;
  }

  table {
    min-width: 760px;
  }

  .receipt-table,
  .receipt-results-table,
  .stock-table {
    min-width: 920px;
  }

  .report-summary-table {
    min-width: 0;
  }

  th,
  td {
    padding: 10px 9px;
    font-size: 12px;
  }

  .chart-card {
    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(35, 28, 17, 0.06);
  }

  .expense-structure {
    gap: 16px;
  }

  .warehouse-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .warehouse-bar div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .warehouse-bar span,
  .warehouse-card strong,
  .forecast-item strong,
  .attention-item strong,
  .mini-empty strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .forecast-item,
  .attention-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
  }

  .forecast-item div,
  .attention-item div {
    min-width: 0;
  }

  .forecast-item span,
  .attention-item span,
  .forecast-item em,
  .attention-item em,
  .mini-empty span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .forecast-item em,
  .warehouse-card em {
    width: auto;
    justify-self: start;
    line-height: 1.25;
  }

  .pie-chart {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .period-switcher {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .stock-hero::after,
  #stockPanel.is-loading .stock-empty::after,
  #stockPanel.is-loading .table-wrap::after,
  #stockPanel.is-loading .warehouse-grid::after,
  #stockPanel.is-loading .warehouse-bars::after,
  #stockPanel.is-loading .forecast-list::after,
  #stockPanel.is-loading .attention-list::after {
    display: none;
  }

  .stock-controls {
    gap: 10px;
  }

  .stock-table .photo-thumb,
  .photo-thumb {
    width: 42px;
    height: 42px;
  }

  .warehouse-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 86vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(calc(100% + 24px));
  }

  .warehouse-drawer.is-open {
    transform: translateY(0);
  }

  .warehouse-drawer-head,
  .warehouse-drawer-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .warehouse-drawer-summary {
    grid-template-columns: 1fr;
  }

  .mobile-more-row td {
    background: var(--success-tint);
    color: var(--primary-dark);
    font-weight: 800;
    white-space: normal;
   }

  .warehouse-popover-list {
    right: auto;
    left: 0;
    max-width: min(280px, calc(100vw - 48px));
  }
}

@media (max-width: 640px) {
  .app-shell {
    display: block;
    min-height: 100svh;
  }

  .sidebar {
    padding: 14px;
  }

  .side-nav {
    margin: 0 -2px;
  }

  .side-nav-link {
    min-height: 44px;
    border-radius: 14px;
  }

  .sidebar .primary-action {
    width: 100%;
  }

  .profile-switcher {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .account-box {
    align-items: stretch;
  }

  .account-box button {
    min-height: 42px;
  }

  .workspace {
    padding: 10px;
  }

  .topbar {
    position: relative;
    top: auto;
    z-index: 1;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 14px 34px rgba(35, 28, 17, 0.1);
    backdrop-filter: none;
  }

  .topbar-title h2 {
    font-size: 20px;
    line-height: 1.1;
  }

  .topbar-title span {
    font-size: 11px;
  }

  .topbar-actions {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar .profile-switcher {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 8px;
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .topbar .profile-switcher label span {
    color: var(--muted);
  }

  .topbar .profile-switcher select,
  .topbar .secondary-action,
  .topbar .account-box button {
    min-height: 44px;
  }

  .topbar .profile-switcher select {
    border-color: var(--border);
    background: #fff;
    color: var(--ink);
    opacity: 1;
  }

  .topbar .secondary-action,
  .topbar .account-box {
    width: 100%;
  }

  .topbar #stockUpdatedAt,
  .topbar .account-box span {
    color: var(--muted);
  }

  .topbar #stockUpdatedAt {
    min-height: 40px;
    display: grid;
    place-items: center;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }

  .topbar .account-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .topbar .account-box span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auth-hero {
    min-height: auto;
    padding: max(22px, env(safe-area-inset-top)) 4px 26px;
  }

  .auth-hero h1 {
    max-width: 9ch;
  }

  .landing-preview {
    scroll-margin-top: 18px;
  }

  .auth-modal {
    width: min(100%, 420px);
    max-height: calc(100dvh - 28px);
    overflow: auto;
    padding: 22px;
  }

  .stock-summary,
  .sales-summary,
  .average-summary,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 98px;
    padding: 14px;
    border-radius: 17px;
  }

  .metric span:not(.metric-icon) {
    font-size: 10.5px;
    line-height: 1.25;
  }

  .metric strong {
    font-size: 24px;
    line-height: 1.08;
  }

  .metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .panel {
    padding: 14px;
    border-radius: 17px;
  }

  .panel-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel-header .secondary-action,
  .panel-header .export-action,
  .panel-header button {
    width: 100%;
  }

  .panel h2,
  .panel h3 {
    font-size: 20px;
  }

  .panel > .eyebrow,
  .panel-header .eyebrow {
    font-size: 10px;
  }

  .stock-hero,
  .chart-card {
    padding: 14px;
    border-radius: 17px;
  }

  .stock-controls,
  .report-layout,
  .mapping-grid,
  .scenario-grid,
  .scenario-results,
  .decision-grid,
  .expense-structure,
  .wb-token-box {
    grid-template-columns: 1fr;
  }

  .wb-token-box button,
  .stock-controls button,
  .stock-controls label {
    width: 100%;
  }

  .forecast-list,
  .attention-list {
    max-height: none;
    overflow: visible;
  }

  .forecast-item,
  .attention-item {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .forecast-item img,
  .attention-item img,
  .mini-product-image {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .forecast-item strong,
  .attention-item strong {
    font-size: 16px;
    line-height: 1.15;
  }

  .warehouse-donut-wrap {
    min-height: 180px;
  }

  .warehouse-donut {
    width: 168px;
    height: 168px;
  }

  .warehouse-donut::after {
    width: 92px;
    height: 92px;
  }

  .warehouse-bars {
    gap: 14px;
  }

  .warehouse-bar {
    gap: 8px;
  }

  .table-wrap {
    margin: 0 -2px;
    border-radius: 15px;
    overscroll-behavior-x: contain;
  }

  table {
    min-width: 720px;
  }

  .receipt-table,
  .receipt-results-table,
  .stock-table {
    min-width: 860px;
  }

  th,
  td {
    padding: 9px 8px;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .auth-gateway {
    padding: 12px;
  }

  .auth-hero h1 {
    font-size: clamp(38px, 14vw, 56px);
  }

  .auth-hero-actions button {
    min-height: 56px;
    border-radius: 16px;
  }

  .brand-block {
    grid-template-columns: 34px 1fr;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .sidebar h1 {
    font-size: 20px;
  }

  .workspace {
    padding: 8px;
  }

  .topbar {
    top: 6px;
    padding: 10px;
    border-radius: 16px;
  }

  .stock-summary,
  .sales-summary,
  .average-summary,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 88px;
  }

  .metric strong {
    font-size: 25px;
  }

  .panel {
    padding: 12px;
  }

  .panel h2,
  .panel h3 {
    font-size: 19px;
  }

  .form-grid {
    gap: 10px;
  }

  label input,
  label select,
  label textarea,
  .wb-token-box input {
    min-height: 48px;
  }

  table {
    min-width: 680px;
  }

  .receipt-table,
  .receipt-results-table,
  .stock-table {
    min-width: 820px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    isolation: isolate !important;
  }

  .sidebar {
    position: relative !important;
    z-index: 50 !important;
    pointer-events: auto !important;
  }

  .side-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 60 !important;
    pointer-events: auto !important;
  }

  .side-nav-link {
    position: relative !important;
    z-index: 61 !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 0 !important;
    padding: 0 14px !important;
    border-color: rgba(255, 255, 255, 0.36) !important;
    border-radius: 14px !important;
    background: #f8f7f1 !important;
    color: #17211c !important;
    box-shadow: 0 10px 22px rgba(5, 32, 26, 0.12) !important;
    font-size: 14px !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
  }

  .side-nav-link::before {
    display: none !important;
  }

  .side-nav-link.is-active {
    background: linear-gradient(145deg, #fffdf8, #f4ead8) !important;
    color: #17211c !important;
  }

  .topbar {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    border: 1px solid rgba(232, 220, 203, 0.86) !important;
    border-radius: 18px !important;
    background: rgba(255, 253, 248, 0.96) !important;
    box-shadow: 0 14px 34px rgba(35, 28, 17, 0.1) !important;
    backdrop-filter: none !important;
    pointer-events: auto !important;
  }

  .topbar-actions {
    position: relative !important;
    z-index: 2 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    pointer-events: auto !important;
  }

  .topbar .profile-switcher,
  .topbar .account-box {
    width: 100% !important;
    max-width: none !important;
    border-color: var(--border) !important;
    background: rgba(255, 253, 248, 0.98) !important;
    color: var(--ink) !important;
    opacity: 1 !important;
  }

  .topbar .profile-switcher label span,
  .topbar #stockUpdatedAt,
  .topbar .account-box span {
    color: var(--muted) !important;
    opacity: 1 !important;
  }

  .topbar .profile-switcher select,
  .topbar .secondary-action,
  .topbar .account-box button {
    min-height: 44px !important;
  }

  .topbar .profile-switcher select {
    border-color: var(--border) !important;
    background: #fff !important;
    color: var(--ink) !important;
    opacity: 1 !important;
  }
}

/* Final premium overrides, kept last on purpose. */
:root {
  --bg: #f7f1e8;
  --card: #fffefa;
  --ink: #0b211b;
  --muted: #63726a;
  --border: #eadfce;
  --border-strong: #dbc9ad;
  --primary: #07866b;
  --primary-dark: #055d4a;
  --secondary: #f2aa38;
  --secondary-dark: #cf7a20;
  --shadow-sm: 0 12px 34px rgba(31, 25, 15, 0.06);
  --shadow-md: 0 28px 84px rgba(31, 25, 15, 0.1);
}

body {
  background:
    radial-gradient(circle at 82% -6%, rgba(242, 170, 56, 0.2), transparent 30%),
    radial-gradient(circle at 20% 2%, rgba(7, 134, 107, 0.1), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, #f7f1e8 52%, #f2eadf 100%) !important;
}

.workspace {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px clamp(22px, 3vw, 44px) 58px;
}

.sidebar {
  gap: 20px;
  padding: 28px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(circle at 88% 28%, rgba(24, 169, 137, 0.28), transparent 34%),
    linear-gradient(180deg, #09241e 0%, #063b2f 58%, #064a39 100%) !important;
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 20px 0 70px rgba(8, 28, 24, 0.16);
}

.sidebar h1,
.topbar-title h2,
.panel h2,
.panel h3,
.metric strong,
.chart-head strong,
.finance-empty-state h2 {
  letter-spacing: 0 !important;
}

.side-nav-link {
  min-height: 46px;
  gap: 12px;
  padding: 0 13px;
  border-radius: 16px;
}

.side-nav-link::before {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.side-nav-link[data-route="dashboard"]::before {
  content: "⌂";
}

.side-nav-link[data-route="supplies"]::before {
  content: "+";
}

.side-nav-link[data-route="products"]::before {
  content: "▦";
}

.side-nav-link[data-route="warehouse"]::before {
  content: "▣";
}

.side-nav-link[data-route="finance"]::before {
  content: "₽";
}

.side-nav-link[data-route="reports"]::before {
  content: "⇧";
}

.side-nav-link[data-route="settings"]::before {
  content: "⚙";
}

.side-nav-link.is-active::before {
  background: linear-gradient(145deg, #fff2cc, var(--secondary));
  color: #20342e;
  box-shadow: 0 10px 24px rgba(242, 170, 56, 0.22);
}

.topbar {
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, auto);
  gap: 20px;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 242, 0.88)) !important;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(250px, 300px) auto minmax(190px, 250px) auto;
  align-items: center;
  gap: 12px;
}

.panel,
.chart-card,
.metric,
.table-wrap,
.stock-controls,
.finance-empty-state {
  min-width: 0;
  border-color: rgba(219, 201, 173, 0.68) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 247, 0.9)) !important;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

.metric {
  min-width: 0;
  min-height: 134px;
  padding: 22px 22px 20px;
  border-radius: 22px;
}

.metric span:not(.metric-icon) {
  display: block;
  max-width: calc(100% - 52px);
  color: #65736c;
}

.metric strong {
  margin-top: 28px;
  color: #0a251e;
  font-size: clamp(26px, 2vw, 36px);
}

.metric:hover,
.panel:hover,
.chart-card:hover,
.warehouse-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.top-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

input,
select,
textarea {
  border-color: rgba(219, 201, 173, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.table-wrap {
  max-width: 100%;
  width: 100%;
  overflow: auto;
  border-radius: 22px;
  overscroll-behavior-x: contain;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f4ead9, #eee1cd) !important;
  color: #627069;
}

tbody tr {
  transition: background 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

tbody tr:hover {
  background: rgba(232, 246, 241, 0.72) !important;
}

.stock-controls {
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 250px) minmax(190px, 250px) auto;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}

.stock-table {
  min-width: 1320px;
}

.stock-table td {
  height: 74px;
}

.stock-table .photo-thumb,
.photo-thumb {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(31, 25, 15, 0.08);
}

.stock-badge,
.value-badge,
.status-pill {
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(7, 134, 107, 0.08);
}

.stock-badge.is-low,
.status-pill.is-low,
.value-badge.is-negative {
  background: #fdebe6;
  color: #a3443b;
}

.stock-badge.is-ok,
.status-pill.is-high,
.value-badge.is-positive {
  background: #e5f5ef;
  color: #055d4a;
}

.warehouse-table,
.warehouse-bars,
.forecast-list,
.attention-list {
  display: grid;
  gap: 12px;
}

.warehouse-card,
.warehouse-bar,
.attention-item,
.forecast-item,
.report-registry-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(31, 25, 15, 0.045);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease, background 170ms ease;
}

.warehouse-card:hover,
.warehouse-bar:hover,
.attention-item:hover,
.forecast-item:hover,
.report-registry-item:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 134, 107, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(31, 25, 15, 0.08);
}

.warehouse-drawer {
  border-radius: 26px 0 0 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 242, 0.96)) !important;
  box-shadow: -28px 0 86px rgba(8, 28, 24, 0.18);
}

.finance-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 300px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(219, 201, 173, 0.68);
  border-radius: 24px;
}

.finance-empty-state[hidden] {
  display: none !important;
}

.finance-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(145deg, #e5f5ef, #fff0ce);
  color: var(--primary-dark);
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(7, 134, 107, 0.12);
}

.finance-empty-state h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
}

.finance-empty-state p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

#salesPanel.finance-is-empty .sales-summary,
#salesPanel.finance-is-empty .analytics-panel,
#salesPanel.finance-is-empty .panel:has(.report-summary-table) {
  display: none;
}

.report-summary-table {
  min-width: 1320px;
}

.report-summary-table td {
  height: 68px;
}

.finance-cost-input {
  height: 38px;
  border-radius: 13px;
  text-align: center;
}

.upload-box {
  min-height: 220px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 12%, rgba(242, 170, 56, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(232, 246, 241, 0.92), rgba(255, 250, 242, 0.9)) !important;
}

.upload-box span {
  display: grid;
  gap: 8px;
  place-items: center;
}

.upload-box span::before {
  content: "XLSX / CSV";
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  box-shadow: 0 18px 38px rgba(31, 25, 15, 0.08);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    grid-template-columns: minmax(220px, 1fr) auto;
  }
}

@media (max-width: 860px) {
  .workspace {
    padding: 18px 14px 36px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    border-radius: 0 0 26px 26px;
  }

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

  .topbar-actions,
  .stock-controls,
  .mapping-grid,
  .report-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar .profile-switcher,
  .topbar .account-box,
  .topbar .secondary-action,
  .topbar #stockUpdatedAt {
    width: 100%;
    max-width: none;
  }

  .sales-summary,
  .stock-summary,
  .home-kpi-grid,
  .control-center-grid,
  .home-analytics-grid,
  .finance-top-grid,
  .product-catalog-toolbar,
  .product-catalog-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .product-filter-row {
    justify-content: flex-start;
  }

  .control-insight-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .control-insight-item em,
  .control-insight-item b {
    justify-self: start;
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .side-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .side-nav-link {
    justify-content: flex-start !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    border-radius: 14px !important;
    font-size: 12.5px !important;
    line-height: 1.12 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .side-nav-link::before {
    display: grid !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }

  .primary-action {
    width: 100% !important;
    min-height: 46px !important;
  }

  .home-kpi-grid .stock-kpi,
  .stock-kpi {
    min-height: 112px;
    padding: 18px !important;
  }

  .control-panel,
  .home-products-panel,
  .product-catalog-panel {
    padding: 18px !important;
  }

  .product-catalog-toolbar {
    padding: 12px;
  }

  .product-filter-btn {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  .product-catalog-card {
    min-height: 0;
    padding: 14px;
  }

  .product-card-main {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .product-card-main .photo-thumb {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .product-card-main strong {
    font-size: 15px;
  }

  .product-card-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Stable sticky sidebar layout. Keeps menu visible without covering content. */
@media (min-width: 861px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 292px minmax(0, 1fr) !important;
    align-items: start !important;
    min-height: 100vh !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    z-index: 30 !important;
    width: auto !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }

  .workspace {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block !important;
  }

  .sidebar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  .workspace {
    width: 100% !important;
    margin: 0 !important;
  }

  .product-detail-hero,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-hero {
    align-items: start;
  }

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

  .product-warehouse-table {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .product-warehouse-head,
  .product-warehouse-row {
    min-width: 720px;
  }
}

@media (max-width: 640px) {
  .product-detail-page,
  #productDetailContent {
    gap: 14px;
  }

  .product-detail-hero {
    padding: 18px !important;
    gap: 16px;
  }

  .product-detail-title h2 {
    font-size: 26px;
  }

  .product-detail-photo .photo-thumb {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .product-detail-stock,
  .product-detail-stats,
  .product-kpi-grid {
    grid-template-columns: 1fr;
  }

  .product-chart-card {
    min-height: 0;
  }

  .product-chart-card .panel-header {
    gap: 12px;
  }

  .product-line-chart {
    height: 170px;
  }
}

/* Dark Premium SaaS UI 2026. Visual-only layer: routes, APIs and formulas stay unchanged. */
:root {
  color-scheme: dark;
  --bg: #070912;
  --bg-2: #0b0e1a;
  --sidebar-a: rgba(9, 11, 24, 0.92);
  --sidebar-b: rgba(14, 10, 31, 0.96);
  --card: rgba(16, 19, 34, 0.72);
  --card-soft: rgba(21, 24, 42, 0.74);
  --ink: #f7f7ff;
  --muted: #a7adbf;
  --subtle: #757d95;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(156, 107, 255, 0.34);
  --primary: #7c4dff;
  --primary-dark: #5f33dd;
  --secondary: #9c6bff;
  --secondary-dark: #7c4dff;
  --coral: #ff6b8a;
  --indigo: #65a7ff;
  --success-tint: rgba(29, 213, 157, 0.12);
  --danger: #ff6b7a;
  --danger-soft: rgba(255, 107, 122, 0.14);
  --violet: #9c6bff;
  --blue: #61a7ff;
  --shadow-sm: 0 18px 54px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 34px 120px rgba(0, 0, 0, 0.42);
  --shadow-focus: 0 0 0 4px rgba(124, 77, 255, 0.22);
  --glass: rgba(18, 21, 38, 0.68);
  --glass-strong: rgba(22, 25, 45, 0.88);
  --purple-glow: 0 0 0 1px rgba(156, 107, 255, 0.2), 0 22px 70px rgba(124, 77, 255, 0.18);
  --green: #20e0a4;
  --warning: #ffbf63;
}

* {
  scrollbar-color: rgba(156, 107, 255, 0.58) rgba(255, 255, 255, 0.06);
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 22% -10%, rgba(124, 77, 255, 0.22), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(156, 107, 255, 0.18), transparent 28%),
    radial-gradient(circle at 72% 72%, rgba(42, 135, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #070912 0%, #090b16 48%, #050711 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 92%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background:
    radial-gradient(circle at 18% 28%, rgba(124, 77, 255, 0.18), transparent 23%),
    radial-gradient(circle at 96% 22%, rgba(156, 107, 255, 0.16), transparent 24%);
  filter: blur(28px);
  animation: premiumGlowDrift 12s ease-in-out infinite alternate;
}

.auth-gateway {
  background:
    radial-gradient(circle at 16% 12%, rgba(124, 77, 255, 0.24), transparent 28%),
    radial-gradient(circle at 86% 28%, rgba(156, 107, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #070912, #0b0e1a 58%, #100c21) !important;
  color: var(--ink);
}

.landing-shell,
.auth-card,
.dashboard-mockup {
  color: var(--ink);
}

.auth-hero,
.landing-preview,
.auth-card,
.dashboard-mockup,
.floating-card {
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(13, 16, 31, 0.76) !important;
  box-shadow: var(--shadow-md), var(--purple-glow);
  backdrop-filter: blur(22px);
}

.auth-hero h1,
.auth-card h2 {
  color: var(--ink);
}

.landing-trust span,
.mockup-row,
.mockup-kpis div,
.mockup-warehouse > div {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.app-shell {
  background: transparent !important;
}

@media (min-width: 861px) {
  .app-shell {
    grid-template-columns: 292px minmax(0, 1fr) !important;
  }
}

.sidebar {
  background:
    radial-gradient(circle at 76% 8%, rgba(124, 77, 255, 0.34), transparent 32%),
    linear-gradient(180deg, var(--sidebar-a), var(--sidebar-b)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.05), 26px 0 90px rgba(0, 0, 0, 0.34) !important;
  backdrop-filter: blur(28px);
}

.brand-block {
  position: relative;
}

.brand-block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(156, 107, 255, 0.42), transparent);
}

.brand-mark {
  color: #fff !important;
  border: 1px solid rgba(156, 107, 255, 0.38);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(145deg, #7c4dff, #2f1d86) !important;
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.36);
}

.sidebar h1,
.brand-subtitle,
.sidebar-help strong,
.account-box span,
.sidebar-copy {
  color: var(--ink) !important;
}

.brand-subtitle,
.sidebar-help span,
.sidebar-copy {
  color: var(--muted) !important;
}

.side-nav {
  gap: 8px !important;
}

.side-nav-link {
  position: relative;
  min-height: 44px !important;
  padding: 0 13px !important;
  overflow: hidden;
  color: rgba(247, 247, 255, 0.72) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transform: translateZ(0);
}

.side-nav-link::before {
  content: attr(data-icon) !important;
  width: 28px !important;
  height: 28px !important;
  color: rgba(247, 247, 255, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.side-nav-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background:
    radial-gradient(circle at 16% 50%, rgba(124, 77, 255, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(124, 77, 255, 0.22), rgba(156, 107, 255, 0.08));
  transition: opacity 180ms ease;
}

.side-nav-link:hover,
.side-nav-link.is-active {
  color: #fff !important;
  border-color: rgba(156, 107, 255, 0.34) !important;
  transform: translateX(3px);
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.18);
}

.side-nav-link:hover::after,
.side-nav-link.is-active::after {
  opacity: 1;
}

.side-nav-link.is-active::before {
  color: #fff !important;
  border-color: rgba(184, 151, 255, 0.62);
  background: linear-gradient(145deg, #7c4dff, #9c6bff) !important;
  box-shadow: 0 0 24px rgba(124, 77, 255, 0.42);
}

.primary-action,
.secondary-action,
#syncWbStockBtn,
#saveWbTokenBtn,
#saveMpstatsTokenBtn,
#testMpstatsTokenBtn,
.export-action,
.ghost-action,
.demo-action {
  color: #fff !important;
  border: 1px solid rgba(156, 107, 255, 0.35) !important;
  background: linear-gradient(135deg, #7c4dff, #9c6bff) !important;
  box-shadow: 0 18px 54px rgba(124, 77, 255, 0.28) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ghost-action,
.demo-action,
#testMpstatsTokenBtn,
.export-action {
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.primary-action:hover,
.secondary-action:hover,
#syncWbStockBtn:hover,
#saveWbTokenBtn:hover,
#saveMpstatsTokenBtn:hover,
#testMpstatsTokenBtn:hover,
.export-action:hover,
.ghost-action:hover,
.demo-action:hover {
  transform: translateY(-2px);
  border-color: rgba(198, 174, 255, 0.72) !important;
  box-shadow: 0 22px 72px rgba(124, 77, 255, 0.36) !important;
}

.sidebar-help,
.account-box,
.shipment-list > *,
.topbar,
.panel,
.metric,
.chart-card,
.table-wrap,
.stock-controls,
.finance-empty-state,
.product-catalog-card,
.control-insight-item,
.warehouse-card,
.warehouse-bar,
.attention-item,
.finance-product-item,
.product-detail-hero,
.product-chart-card,
.product-detail-metric,
.product-warehouse-row,
.product-warehouse-head,
.warehouse-drawer,
.stock-empty,
.wb-token-box,
.market-token-box,
.reports-registry-panel {
  color: var(--ink);
  border: 1px solid var(--border) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    var(--glass) !important;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px);
}

.panel:hover,
.metric:hover,
.product-catalog-card:hover,
.warehouse-bar:hover,
.finance-product-item:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 107, 255, 0.35) !important;
  box-shadow: var(--shadow-md), var(--purple-glow) !important;
}

.workspace {
  color: var(--ink);
  animation: premiumFadeUp 420ms ease both;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  grid-template-columns: minmax(220px, 1fr) minmax(0, auto) !important;
  border-radius: 22px !important;
}

.topbar-title h2,
.panel h2,
.panel h3,
.metric strong,
.stock-kpi strong,
.product-detail-title h2,
.finance-empty-state h2 {
  color: var(--ink) !important;
}

.topbar-title h2 {
  font-size: clamp(26px, 2vw, 34px);
}

.topbar-actions {
  grid-template-columns: auto minmax(220px, 280px) auto minmax(190px, 260px) !important;
}

.api-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.api-status-dot {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 14px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.api-status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(32, 224, 164, 0.72);
}

.topbar .profile-switcher,
.topbar .account-box,
.topbar #stockUpdatedAt,
.report-date,
.metric-note {
  color: var(--muted) !important;
}

.profile-switcher,
.topbar .account-box,
.period-switcher,
.product-filter-row {
  border-color: var(--border) !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

input,
select,
textarea {
  color: var(--ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(156, 107, 255, 0.68) !important;
  box-shadow: var(--shadow-focus) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(167, 173, 191, 0.7) !important;
}

label span,
.eyebrow,
.stock-table th,
.report-summary-table th,
table th {
  color: rgba(206, 213, 235, 0.8) !important;
}

.eyebrow {
  letter-spacing: 0.12em !important;
  color: #b897ff !important;
}

.metric,
.stock-kpi {
  position: relative;
  min-height: 132px;
  overflow: hidden;
}

.metric::after,
.stock-kpi::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% 42%;
  height: 88px;
  opacity: 0.5;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.42), transparent 68%);
  filter: blur(18px);
}

.metric-icon {
  color: #fff !important;
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.95), rgba(156, 107, 255, 0.72)) !important;
  box-shadow: 0 0 30px rgba(124, 77, 255, 0.36);
}

.metric strong,
.stock-kpi strong {
  font-weight: 760 !important;
  text-shadow: 0 0 28px rgba(124, 77, 255, 0.18);
}

.accent,
.metric.accent,
.stock-kpi.accent,
.product-detail-metric.is-accent {
  border-color: rgba(156, 107, 255, 0.4) !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(124, 77, 255, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(124, 77, 255, 0.16), rgba(255, 255, 255, 0.035)),
    var(--glass) !important;
}

.stock-error,
.danger-badge,
.stock-badge.is-low,
.stock-badge.is-empty,
.is-negative,
.warehouse-bar.is-negative strong,
.recommendation-row.is-negative strong {
  color: #ffd7dc !important;
  border-color: rgba(255, 107, 122, 0.28) !important;
  background: rgba(255, 107, 122, 0.13) !important;
}

.stock-badge.is-ok,
.is-positive,
.warehouse-bar.is-positive strong,
.recommendation-row.is-positive strong {
  color: #caffed !important;
  border-color: rgba(32, 224, 164, 0.26) !important;
  background: rgba(32, 224, 164, 0.12) !important;
}

.is-medium,
.stock-badge,
.recommendation-row.is-medium strong {
  color: #ffe2ad !important;
  border-color: rgba(255, 191, 99, 0.25) !important;
  background: rgba(255, 191, 99, 0.12) !important;
}

.period-btn,
.product-filter-btn {
  color: var(--muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  transition: transform 170ms ease, background 170ms ease, color 170ms ease, box-shadow 170ms ease;
}

.period-btn:hover,
.product-filter-btn:hover,
.period-btn.is-active,
.product-filter-btn.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, #7c4dff, #9c6bff) !important;
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.25);
  transform: translateY(-1px);
}

.table-wrap {
  overflow: auto;
  border-radius: 20px !important;
}

table,
.stock-table,
.report-summary-table {
  color: var(--ink) !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

thead th,
.stock-table th,
.report-summary-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(29, 32, 54, 0.98), rgba(20, 23, 42, 0.94)) !important;
  backdrop-filter: blur(18px);
}

tbody tr,
.stock-table tbody tr {
  transition: transform 160ms ease, background 160ms ease;
}

td,
.stock-table td,
.report-summary-table td {
  color: rgba(247, 247, 255, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

tbody tr:hover td,
.stock-table tbody tr:hover td,
.report-summary-table tbody tr:hover td {
  background: rgba(124, 77, 255, 0.12) !important;
  border-color: rgba(156, 107, 255, 0.23) !important;
}

.photo-thumb,
.product-card-main .photo-thumb,
.stock-table .photo-thumb {
  border-color: rgba(156, 107, 255, 0.26) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.product-catalog-toolbar,
.stock-controls {
  border-radius: 20px !important;
}

.product-card-main strong,
.attention-item strong,
.control-insight-item strong,
.warehouse-card strong,
.warehouse-bar b,
.recommendation-row b,
.finance-product-item strong {
  color: var(--ink) !important;
}

.product-card-main small,
.attention-item span,
.control-insight-item span,
.warehouse-card span,
.warehouse-bar small,
.recommendation-row small,
.finance-product-item small {
  color: var(--muted) !important;
}

.warehouse-donut,
.pie-chart {
  box-shadow: 0 0 0 1px rgba(156, 107, 255, 0.24), 0 26px 70px rgba(124, 77, 255, 0.2) !important;
  filter: saturate(1.18);
}

.warehouse-donut::after,
.pie-chart::after {
  background: radial-gradient(circle at 35% 28%, #12162a, #080a14 72%) !important;
}

.warehouse-donut-center span,
.warehouse-donut-center strong {
  color: var(--ink) !important;
}

.product-line-chart,
.demand-chart {
  background:
    radial-gradient(circle at 16% 8%, rgba(124, 77, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)) !important;
  border-radius: 18px;
}

.product-line-chart polyline,
.demand-chart polyline {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(124, 77, 255, 0.48));
}

.product-line-chart polyline:nth-of-type(1),
.demand-chart polyline {
  stroke: #7c4dff !important;
}

.product-line-chart polyline:nth-of-type(2) {
  stroke: #20e0a4 !important;
}

.product-line-chart polyline:nth-of-type(3) {
  stroke: #ffbf63 !important;
}

.product-chart-grid,
.product-chart-axis-line {
  stroke: rgba(255, 255, 255, 0.08) !important;
}

.product-chart-y-label,
.product-chart-x-label,
.product-chart-legend {
  fill: var(--muted) !important;
  color: var(--muted) !important;
}

.product-chart-hit {
  fill: rgba(255, 255, 255, 0.001);
  stroke: rgba(156, 107, 255, 0.52);
  transition: r 160ms ease, stroke 160ms ease;
}

.product-chart-hit:hover {
  stroke: #fff;
  filter: drop-shadow(0 0 12px rgba(124, 77, 255, 0.82));
}

.product-chart-tooltip {
  color: var(--ink) !important;
  border: 1px solid rgba(156, 107, 255, 0.32) !important;
  background: rgba(12, 14, 27, 0.94) !important;
  box-shadow: var(--shadow-md), var(--purple-glow) !important;
}

.bar-track,
.warehouse-bar i {
  background: rgba(255, 255, 255, 0.07) !important;
}

.bar-track i,
.warehouse-bar > i > b {
  background: linear-gradient(90deg, #7c4dff, #9c6bff) !important;
  box-shadow: 0 0 24px rgba(124, 77, 255, 0.44);
}

#stockPanel.is-loading .stock-empty::after,
#stockPanel.is-loading .table-wrap::after,
#stockPanel.is-loading .warehouse-grid::after,
#stockPanel.is-loading .warehouse-bars::after,
#stockPanel.is-loading .forecast-list::after,
#stockPanel.is-loading .attention-list::after {
  background: linear-gradient(90deg, transparent, rgba(156, 107, 255, 0.18), transparent) !important;
}

.tab-panel.is-active > *,
.stock-page-section:not([hidden]),
.product-catalog-card,
.metric,
.panel {
  animation: premiumFadeUp 360ms ease both;
}

.ai-panel,
.warehouse-share-card {
  border-color: rgba(156, 107, 255, 0.28) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(124, 77, 255, 0.12), rgba(255, 255, 255, 0.03)),
    var(--glass) !important;
}

.panel-icon {
  color: #fff !important;
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.94), rgba(156, 107, 255, 0.7)) !important;
  box-shadow: 0 0 26px rgba(124, 77, 255, 0.42);
}

.stock-empty,
.product-chart-empty {
  color: var(--muted) !important;
}

.warehouse-drawer-backdrop {
  background: rgba(0, 0, 0, 0.58) !important;
  backdrop-filter: blur(10px);
}

@keyframes premiumFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premiumGlowDrift {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1%, 1%, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  .topbar-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .api-status-strip {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body {
    background:
      radial-gradient(circle at 50% -12%, rgba(124, 77, 255, 0.24), transparent 34%),
      linear-gradient(180deg, #070912, #090b16) !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    padding: 12px 12px 14px !important;
    border-radius: 0 0 24px 24px !important;
    max-height: none !important;
  }

  .brand-block {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    column-gap: 10px;
    padding-bottom: 8px;
  }

  .brand-block .eyebrow,
  .brand-subtitle,
  .sidebar-help,
  .sidebar-copy,
  .shipment-list,
  .sidebar .primary-action {
    display: none !important;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    grid-row: 1 / span 2;
  }

  .sidebar h1 {
    font-size: 20px !important;
  }

  .side-nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    padding: 6px 0 2px;
    scroll-snap-type: x mandatory;
  }

  .side-nav-link {
    flex: 0 0 auto;
    min-width: 126px;
    scroll-snap-align: start;
    white-space: nowrap !important;
  }

  .workspace {
    padding: 14px 12px 34px !important;
  }

  .topbar {
    position: relative;
    top: auto;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    border-radius: 20px !important;
  }

  .topbar-actions {
    grid-template-columns: 1fr !important;
  }

  .api-status-strip,
  .profile-switcher,
  #syncWbStockBtn,
  .topbar #stockUpdatedAt {
    width: 100%;
  }

  .home-kpi-grid,
  .stock-summary,
  .sales-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .metric,
  .stock-kpi {
    min-height: 118px;
  }

  .panel {
    border-radius: 20px !important;
    padding: 16px !important;
  }
}

@media (max-width: 560px) {
  .landing-shell {
    gap: 18px;
  }

  .auth-hero h1 {
    font-size: clamp(38px, 12vw, 58px) !important;
  }

  .home-kpi-grid,
  .stock-summary,
  .sales-summary,
  .product-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .side-nav-link {
    min-width: 112px;
    font-size: 12px !important;
  }

  .side-nav-link::before {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
  }

  .table-wrap {
    margin-inline: -8px;
    border-radius: 16px !important;
  }

  .stock-table,
  table {
    min-width: 780px;
  }

  .product-card-kpis,
  .product-detail-stock,
  .product-detail-stats {
    grid-template-columns: 1fr !important;
  }
}
/* Dark premium SaaS redesign - visual-only override */
:root {
  color-scheme: dark;
  --bg: #050711;
  --bg-2: #090b18;
  --surface: rgba(15, 18, 34, 0.78);
  --surface-2: rgba(20, 24, 44, 0.9);
  --surface-3: rgba(30, 34, 58, 0.82);
  --card: rgba(15, 18, 34, 0.76);
  --card-soft: rgba(22, 26, 48, 0.78);
  --ink: #f6f4ff;
  --muted: #9ca3b8;
  --subtle: #707891;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(156, 107, 255, 0.28);
  --primary: #7c4dff;
  --primary-dark: #5f36dd;
  --secondary: #9c6bff;
  --secondary-dark: #7c4dff;
  --success-tint: rgba(45, 212, 191, 0.13);
  --danger: #ff6b86;
  --danger-soft: rgba(255, 107, 134, 0.13);
  --violet: #9c6bff;
  --blue: #6ca8ff;
  --shadow-sm: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 26px 90px rgba(0, 0, 0, 0.42);
  --shadow-focus: 0 0 0 4px rgba(124, 77, 255, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #050711;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(124, 77, 255, 0.32), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(156, 107, 255, 0.2), transparent 32%),
    linear-gradient(180deg, #050711 0%, #080a15 48%, #050711 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 68%);
}

.app-shell,
.workspace {
  color: var(--ink);
  background: transparent !important;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 4%, rgba(124, 77, 255, 0.35), transparent 26%),
    radial-gradient(circle at 80% 24%, rgba(156, 107, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(8, 10, 22, 0.98), rgba(8, 9, 18, 0.92)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 24px 0 80px rgba(0, 0, 0, 0.48), inset -1px 0 rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(20px);
}

.brand-mark {
  color: #fff !important;
  background: linear-gradient(145deg, #7c4dff, #1a1230) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 34px rgba(124, 77, 255, 0.42), inset 0 1px rgba(255, 255, 255, 0.28);
}

.sidebar h1,
.brand-subtitle,
.sidebar .eyebrow,
.sidebar-copy {
  color: var(--ink) !important;
}

.sidebar .eyebrow {
  color: #b998ff !important;
}

.side-nav {
  gap: 8px !important;
}

.side-nav-link {
  position: relative;
  min-height: 44px !important;
  padding: 0 12px !important;
  overflow: hidden;
  color: rgba(246, 244, 255, 0.76) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.side-nav-link::before {
  width: 30px !important;
  height: 30px !important;
  color: #d9ccff !important;
  content: attr(data-icon) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 11px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.side-nav-link::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(124, 77, 255, 0.2), transparent 56%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.side-nav-link:hover {
  color: #fff !important;
  border-color: rgba(156, 107, 255, 0.24) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transform: translateX(3px) !important;
}

.side-nav-link:hover::after {
  opacity: 1;
}

.side-nav-link.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.38), rgba(156, 107, 255, 0.16)) !important;
  border-color: rgba(156, 107, 255, 0.38) !important;
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.18), 0 16px 42px rgba(124, 77, 255, 0.24) !important;
}

.side-nav-link.is-active::before {
  color: #fff !important;
  background: linear-gradient(145deg, #9c6bff, #7c4dff) !important;
  box-shadow: 0 0 26px rgba(124, 77, 255, 0.62) !important;
}

.primary-action,
.secondary-action,
.export-action,
#saveWbTokenBtn,
#saveMpstatsTokenBtn,
#testMpstatsTokenBtn,
.period-btn.is-active,
.product-filter-btn.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, #7c4dff, #9c6bff) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 16px 44px rgba(124, 77, 255, 0.28) !important;
}

.ghost-action,
.period-btn,
.product-filter-btn {
  color: #d9dded !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.primary-action:hover,
.secondary-action:hover,
.export-action:hover,
.ghost-action:hover,
.period-btn:hover,
.product-filter-btn:hover {
  box-shadow: 0 20px 54px rgba(124, 77, 255, 0.34) !important;
  transform: translateY(-1px);
}

.sidebar-help,
.account-box,
.shipment-list > *,
.topbar,
.panel,
.metric,
.chart-card,
.table-wrap,
.stock-controls,
.product-catalog-card,
.warehouse-card,
.warehouse-bar,
.attention-item,
.finance-product-item,
.control-insight-item,
.product-detail-hero,
.product-detail-metric,
.product-chart-card,
.warehouse-drawer,
.auth-card,
.landing-preview,
.dashboard-mockup {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(14, 17, 32, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px);
}

.panel,
.metric,
.chart-card,
.table-wrap,
.product-catalog-card {
  border-radius: 20px !important;
}

.topbar {
  border-radius: 22px !important;
}

.topbar::before {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #bff8e9;
  content: "WB API online / MPStats ready";
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 999px;
}

.eyebrow {
  color: #b998ff !important;
  letter-spacing: 0.12em;
}

.report-date,
.metric-note,
small,
.brand-subtitle,
.sidebar-help span {
  color: var(--muted) !important;
}

h1,
h2,
h3,
strong,
b {
  color: var(--ink);
}

.metric {
  min-height: 134px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric:hover,
.panel:hover,
.product-catalog-card:hover,
.warehouse-bar:hover {
  border-color: rgba(156, 107, 255, 0.28) !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), 0 0 40px rgba(124, 77, 255, 0.12) !important;
  transform: translateY(-2px);
}

.metric strong {
  color: #fff !important;
  text-shadow: 0 0 24px rgba(156, 107, 255, 0.24);
}

.metric.accent,
.stock-kpi.accent {
  background:
    radial-gradient(circle at 86% 12%, rgba(124, 77, 255, 0.32), transparent 38%),
    linear-gradient(145deg, rgba(124, 77, 255, 0.14), rgba(255, 255, 255, 0.04)) !important;
  border-color: rgba(156, 107, 255, 0.32) !important;
}

.metric-icon,
.panel-icon,
.finance-empty-icon {
  color: #fff !important;
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.96), rgba(156, 107, 255, 0.72)) !important;
  box-shadow: 0 0 28px rgba(124, 77, 255, 0.36) !important;
}

input,
select,
textarea {
  color: #fff !important;
  background: rgba(4, 7, 17, 0.68) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(156, 107, 255, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.2) !important;
}

::placeholder {
  color: rgba(218, 222, 240, 0.42) !important;
}

.table-wrap {
  overflow: auto;
}

table,
.stock-table {
  color: var(--ink) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

th,
.stock-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #b8bed4 !important;
  background: rgba(12, 15, 30, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(18px);
}

td,
.stock-table td {
  color: #edf0fb !important;
  background: rgba(255, 255, 255, 0.025) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

tbody tr:hover td,
.stock-table tbody tr:hover td {
  background: rgba(124, 77, 255, 0.11) !important;
}

.stock-badge,
.liquidity-badge,
.product-status,
.recommendation-row-head strong,
.market-token-note {
  color: #d9ccff !important;
  background: rgba(124, 77, 255, 0.14) !important;
  border: 1px solid rgba(156, 107, 255, 0.24) !important;
  border-radius: 999px !important;
}

.stock-badge.is-low,
.is-negative,
.danger-badge {
  color: #ff9aaa !important;
  background: rgba(255, 107, 134, 0.14) !important;
  border-color: rgba(255, 107, 134, 0.26) !important;
}

.stock-badge.is-ok,
.is-positive {
  color: #94f7df !important;
  background: rgba(45, 212, 191, 0.13) !important;
  border-color: rgba(45, 212, 191, 0.22) !important;
}

.warehouse-donut,
.pie-chart {
  box-shadow: 0 0 45px rgba(124, 77, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

.warehouse-donut::after,
.pie-chart::after {
  background: radial-gradient(circle, rgba(9, 11, 24, 0.96), rgba(9, 11, 24, 0.76)) !important;
}

.product-line-chart,
.demand-chart {
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 24% 0%, rgba(124, 77, 255, 0.16), transparent 38%) !important;
  background-size: 100% 25%, 10% 100%, auto !important;
  border-radius: 18px;
}

.product-line-chart polyline,
.demand-chart polyline {
  stroke-width: 2.4 !important;
  filter: drop-shadow(0 0 8px rgba(156, 107, 255, 0.55));
}

.product-chart-grid,
.product-chart-axis-line {
  stroke: rgba(255, 255, 255, 0.1) !important;
}

.product-chart-y-label,
.product-chart-x-label {
  fill: rgba(221, 225, 242, 0.62) !important;
}

.product-chart-hit {
  fill: rgba(156, 107, 255, 0.18) !important;
  stroke: rgba(156, 107, 255, 0.9) !important;
}

.product-chart-tooltip {
  color: #fff !important;
  background: rgba(8, 10, 22, 0.96) !important;
  border: 1px solid rgba(156, 107, 255, 0.34) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42), 0 0 30px rgba(124, 77, 255, 0.18) !important;
}

.stock-error {
  color: #ff9aaa !important;
  background: rgba(255, 107, 134, 0.13) !important;
  border-color: rgba(255, 107, 134, 0.26) !important;
}

.auth-gateway {
  background:
    radial-gradient(circle at 12% 14%, rgba(124, 77, 255, 0.26), transparent 36%),
    radial-gradient(circle at 82% 28%, rgba(156, 107, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #050711, #090b18) !important;
}

.auth-hero h1 {
  color: #fff !important;
}

.auth-hero p {
  color: #aeb5ca !important;
}

.landing-glow {
  background: rgba(124, 77, 255, 0.22) !important;
}

@keyframes premiumFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softGlowPulse {
  from {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 0 rgba(124, 77, 255, 0);
  }

  to {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 42px rgba(124, 77, 255, 0.18);
  }
}

.tab-panel.is-active > *,
.stock-page-section:not([hidden]),
.panel,
.metric {
  animation: premiumFadeUp 420ms ease both;
}

.stock-kpi.accent {
  animation: softGlowPulse 2.4s ease-in-out infinite alternate;
}

#stockPanel.is-loading .stock-empty::after,
#stockPanel.is-loading .table-wrap::after,
#stockPanel.is-loading .warehouse-grid::after,
#stockPanel.is-loading .warehouse-bars::after,
#stockPanel.is-loading .forecast-list::after,
#stockPanel.is-loading .attention-list::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(156, 107, 255, 0.16), rgba(255, 255, 255, 0.05)) !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.48);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  body {
    background: #050711 !important;
  }

  .app-shell {
    display: block !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    height: auto !important;
    max-height: none !important;
    padding: 12px 12px 10px !important;
    border-radius: 0 0 24px 24px !important;
  }

  .brand-block {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 0 !important;
  }

  .brand-block .eyebrow,
  .brand-subtitle,
  .sidebar-help,
  .sidebar-copy,
  .shipment-list,
  .sidebar .primary-action {
    display: none !important;
  }

  .sidebar h1 {
    margin: 0 !important;
    font-size: 20px !important;
  }

  .side-nav {
    display: flex !important;
    gap: 8px !important;
    padding-bottom: 4px;
    margin-top: 12px !important;
    overflow-x: auto !important;
  }

  .side-nav-link {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 0 12px 0 8px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }

  .side-nav-link::before {
    width: 24px !important;
    height: 24px !important;
    border-radius: 9px !important;
  }

  .workspace {
    padding: 14px 12px 92px !important;
  }

  .topbar {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .topbar::before {
    padding: 7px 10px;
    font-size: 11px;
  }

  .topbar-actions {
    grid-template-columns: 1fr !important;
  }

  .summary-grid,
  .stock-summary,
  .sales-summary,
  .home-kpi-grid,
  .finance-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .metric {
    min-height: 118px !important;
    padding: 16px !important;
  }

  .metric strong {
    overflow-wrap: anywhere;
    font-size: clamp(24px, 8vw, 34px) !important;
  }

  .panel {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .product-catalog-grid,
  .control-center-grid,
  .home-analytics-grid,
  .stock-dashboard-grid,
  .stock-warehouse-dashboard {
    grid-template-columns: 1fr !important;
  }

  .table-wrap {
    border-radius: 16px !important;
  }
}

@media (max-width: 520px) {
  .summary-grid,
  .stock-summary,
  .sales-summary,
  .home-kpi-grid,
  .finance-top-grid {
    grid-template-columns: 1fr !important;
  }

  .product-card-kpis,
  .product-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .product-line-chart {
    height: 180px !important;
  }

  .stock-controls {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }

  .stock-table,
  table {
    min-width: 760px;
  }
}

/* Dark premium performance pass: keep glass on major shells, avoid heavy blur on long lists. */
.topbar::before {
  display: none !important;
  content: none !important;
}

.product-catalog-card,
.warehouse-bar,
.attention-item,
.finance-product-item,
.control-insight-item,
.product-detail-metric,
.warehouse-card,
.stock-table td,
.stock-table th,
td,
th {
  backdrop-filter: none !important;
}

@media (max-width: 860px) {
  .panel,
  .metric,
  .chart-card,
  .table-wrap,
  .product-catalog-card,
  .warehouse-card,
  .warehouse-bar,
  .attention-item,
  .finance-product-item,
  .control-insight-item,
  .product-detail-hero,
  .product-detail-metric,
  .product-chart-card,
  .auth-card,
  .landing-preview,
  .dashboard-mockup {
    backdrop-filter: none !important;
  }
}

/* Seller OS final visual system */
:root {
  --seller-bg: #050816;
  --seller-panel: rgba(11, 15, 30, 0.76);
  --seller-panel-strong: rgba(15, 19, 38, 0.92);
  --seller-line: rgba(255, 255, 255, 0.1);
  --seller-line-strong: rgba(124, 77, 255, 0.38);
  --seller-text: #f7f4ff;
  --seller-muted: #a3a8bd;
  --seller-purple: #7c4dff;
  --seller-purple-2: #a855f7;
  --seller-green: #22c55e;
  --seller-yellow: #f59e0b;
  --seller-red: #ef4444;
  --seller-blue: #60a5fa;
}

body {
  font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  color: var(--seller-text);
  background:
    radial-gradient(circle at 55% -10%, rgba(124, 77, 255, 0.28), transparent 30%),
    radial-gradient(circle at 95% 10%, rgba(168, 85, 247, 0.16), transparent 34%),
    radial-gradient(circle at 8% 38%, rgba(96, 165, 250, 0.09), transparent 30%),
    linear-gradient(180deg, #050816 0%, #070b18 48%, #050816 100%) !important;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  opacity: 0.08;
}

.app-shell {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) !important;
  min-height: 100vh;
}

.sidebar {
  position: sticky !important;
  top: 0;
  height: 100vh !important;
  padding: 18px 14px !important;
  background:
    linear-gradient(180deg, rgba(9, 13, 26, 0.94), rgba(6, 9, 19, 0.98)),
    radial-gradient(circle at 36% 5%, rgba(124, 77, 255, 0.26), transparent 34%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  padding: 8px 8px 22px !important;
}

.brand-mark {
  width: 44px !important;
  height: 44px !important;
  font-size: 15px !important;
  background: linear-gradient(145deg, #7c4dff, #2a145f) !important;
  border-radius: 13px !important;
}

.sidebar h1 {
  margin-top: 8px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  max-width: 170px;
  margin-top: 6px !important;
  color: rgba(247, 244, 255, 0.62) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.side-nav {
  margin-top: 10px !important;
}

.side-nav-link {
  min-height: 52px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 760 !important;
  border-radius: 13px !important;
}

.side-nav-link::before {
  width: 32px !important;
  height: 32px !important;
  font-size: 15px !important;
  border-radius: 11px !important;
}

.side-nav-link.is-active {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.72), rgba(124, 77, 255, 0.35)) !important;
  box-shadow: 0 18px 38px rgba(124, 77, 255, 0.26), inset 0 1px rgba(255, 255, 255, 0.2) !important;
}

#newShipmentBtn,
.shipment-list {
  display: none !important;
}

.account-box,
.sidebar-help {
  margin-top: auto !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-radius: 16px !important;
}

.workspace {
  padding: 18px 18px 40px !important;
}

.topbar {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 68px !important;
  padding: 10px 14px !important;
  margin-bottom: 14px !important;
  background: rgba(11, 15, 30, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
}

.topbar-title h2 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 820 !important;
}

.topbar-title .eyebrow {
  margin-bottom: 2px !important;
  font-size: 10px !important;
}

.topbar-actions {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
}

.api-status-strip,
.profile-switcher {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 7px 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 14px !important;
}

.api-status-dot {
  display: inline-flex !important;
  gap: 7px !important;
  align-items: center !important;
  color: rgba(247, 244, 255, 0.76) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

.api-status-dot::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--seller-green);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.72);
}

.profile-switcher label span {
  display: none !important;
}

.profile-switcher select {
  min-width: 132px !important;
  height: 34px !important;
  padding: 0 28px 0 10px !important;
  background: rgba(5, 8, 22, 0.7) !important;
  border-radius: 10px !important;
}

#addProfileBtn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

#syncWbStockBtn {
  min-height: 42px !important;
  padding: 0 16px !important;
  white-space: nowrap;
}

#stockUpdatedAt {
  max-width: 220px;
  margin: 0 !important;
  color: rgba(247, 244, 255, 0.54) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body[data-active-route="dashboard"] #stockPanel.is-active {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}

.seller-opportunity-card {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(280px, 1.1fr) minmax(300px, 0.78fr) 230px !important;
  gap: 26px !important;
  min-height: 282px;
  padding: 34px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 52%, rgba(124, 77, 255, 0.28), transparent 34%),
    radial-gradient(circle at 34% 28%, rgba(168, 85, 247, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(22, 15, 58, 0.86), rgba(9, 13, 28, 0.92)) !important;
  border-color: rgba(124, 77, 255, 0.55) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42), 0 0 70px rgba(124, 77, 255, 0.16) !important;
}

.seller-opportunity-card::before {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(100deg, transparent, rgba(168, 85, 247, 0.18), transparent);
  opacity: 0.65;
}

.seller-pill {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  margin-bottom: 12px;
  color: #d8c9ff;
  font-size: 12px;
  font-weight: 780;
  background: rgba(124, 77, 255, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: 999px;
}

.seller-opportunity-copy h2 {
  margin: 0 0 10px !important;
  font-size: clamp(26px, 3.2vw, 44px) !important;
  letter-spacing: -0.04em;
}

.seller-opportunity-copy > strong {
  display: block;
  margin: 2px 0 14px;
  color: #fff;
  font-size: clamp(48px, 7vw, 86px);
  font-weight: 860;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 0 44px rgba(168, 85, 247, 0.36);
}

.seller-opportunity-copy p:not(.eyebrow) {
  max-width: 420px;
  margin: 0 0 26px;
  color: rgba(247, 244, 255, 0.68);
  font-size: 15px;
  line-height: 1.55;
}

.seller-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 54px;
  color: #fff;
  font-size: 16px;
  font-weight: 820;
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(124, 77, 255, 0.34);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.seller-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 70px rgba(124, 77, 255, 0.42);
}

.seller-opportunity-task {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.seller-product-orb {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
  overflow: hidden;
  place-items: center;
  color: #fff;
  font-weight: 860;
  background: radial-gradient(circle at 30% 24%, #a855f7, #1a1740);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.seller-product-orb .product-photo,
.seller-product-orb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: inherit;
}

.seller-opportunity-task span,
.seller-opportunity-task dt {
  color: rgba(247, 244, 255, 0.48);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.seller-opportunity-task h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.seller-opportunity-task p,
.seller-opportunity-task dd {
  margin: 0;
  color: rgba(247, 244, 255, 0.76);
}

.seller-opportunity-task dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

#sellerOpportunityEffect {
  color: #55f090;
  font-weight: 850;
}

.seller-opportunity-visual {
  position: relative;
  z-index: 1;
  align-self: end;
  height: 210px;
  perspective: 700px;
}

.seller-opportunity-visual::before {
  position: absolute;
  right: 18px;
  bottom: 6px;
  width: 150px;
  height: 96px;
  content: "";
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.76), rgba(57, 31, 139, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 34px 70px rgba(124, 77, 255, 0.24);
  transform: rotateX(58deg) rotateZ(-12deg);
}

.seller-opportunity-visual i {
  position: absolute;
  right: calc(42px + var(--x, 0px));
  bottom: 62px;
  width: 22px;
  height: var(--h, 44px);
  background: linear-gradient(180deg, #a855f7, #5b2ad9);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.46);
}

.seller-opportunity-visual i:nth-child(1) { --x: 0px; --h: 52px; }
.seller-opportunity-visual i:nth-child(2) { --x: 30px; --h: 78px; }
.seller-opportunity-visual i:nth-child(3) { --x: 60px; --h: 112px; }
.seller-opportunity-visual i:nth-child(4) { --x: 90px; --h: 146px; }

.home-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.home-kpi-grid .stock-kpi {
  min-height: 136px !important;
  padding: 20px !important;
  background:
    radial-gradient(circle at 85% 20%, rgba(124, 77, 255, 0.18), transparent 32%),
    rgba(11, 15, 30, 0.74) !important;
}

.home-kpi-grid .stock-kpi span:not(.metric-icon) {
  color: rgba(247, 244, 255, 0.62) !important;
  font-size: 13px !important;
}

.home-kpi-grid .stock-kpi strong {
  margin-top: auto;
  font-size: clamp(24px, 2.4vw, 36px) !important;
  line-height: 1.05;
}

.seller-alert-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.seller-alert {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
}

.seller-alert::before {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  content: "!";
  border-radius: 13px;
}

.seller-alert span {
  color: rgba(247, 244, 255, 0.74);
  font-size: 14px;
}

.seller-alert strong {
  margin-left: auto;
  color: #fff;
  font-size: 26px;
}

.seller-alert.is-success::before { color: #9df7bd; background: rgba(34, 197, 94, 0.16); }
.seller-alert.is-warning::before { color: #ffd38a; background: rgba(245, 158, 11, 0.16); }
.seller-alert.is-danger::before { color: #ffb2b2; background: rgba(239, 68, 68, 0.18); }

.seller-os-grid {
  grid-template-columns: minmax(0, 1fr) 360px !important;
  align-items: stretch !important;
}

.seller-os-grid > .control-panel:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.seller-events-panel {
  grid-column: 2;
  grid-row: 1;
}

.seller-ai-side {
  grid-column: 2;
  grid-row: 2;
}

.seller-ai-side,
.seller-events-panel {
  min-height: 0;
}

.finance-os-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-os-card {
  display: grid;
  gap: 8px;
  min-height: 144px;
  padding: 20px !important;
  background:
    radial-gradient(circle at 84% 18%, rgba(124, 77, 255, 0.18), transparent 34%),
    rgba(11, 18, 32, 0.74) !important;
}

.finance-os-card.is-primary {
  background:
    radial-gradient(circle at 84% 18%, rgba(34, 197, 94, 0.22), transparent 36%),
    linear-gradient(145deg, rgba(124, 77, 255, 0.16), rgba(34, 197, 94, 0.06)),
    rgba(11, 18, 32, 0.78) !important;
  border-color: rgba(34, 197, 94, 0.26) !important;
}

.finance-os-card span,
.finance-flow-list span {
  color: rgba(247, 244, 255, 0.58);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-os-card strong {
  margin-top: auto;
  color: #fff;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.finance-os-card small {
  color: rgba(247, 244, 255, 0.52);
  font-size: 12px;
  line-height: 1.35;
}

.finance-operating-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.finance-flow-card {
  display: grid;
  gap: 18px;
  padding: 22px !important;
}

.finance-flow-card > strong {
  color: #fff;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.finance-flow-list {
  display: grid;
  gap: 10px;
}

.finance-flow-list div {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
}

.finance-flow-list strong {
  color: #f8fafc;
  font-size: 13px;
  text-align: right;
}

.control-insight-list,
.ai-recommendation-list,
.seller-events-list {
  display: grid;
  gap: 10px;
}

.ai-recommendation-item {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100%;
  min-height: 82px;
  padding: 14px !important;
  text-align: left;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
}

.ai-recommendation-item b {
  color: #55f090;
  font-size: 13px;
}

.ai-recommendation-item em {
  grid-column: 3;
  padding: 8px 10px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  border-radius: 10px;
}

.seller-event {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.seller-event > span {
  width: 32px;
  height: 32px;
  background: rgba(124, 77, 255, 0.18);
  border-radius: 10px;
}

.seller-event.is-success > span { background: rgba(34, 197, 94, 0.18); }
.seller-event.is-warning > span { background: rgba(245, 158, 11, 0.18); }
.seller-event.is-blue > span { background: rgba(96, 165, 250, 0.18); }

.seller-event strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.seller-event small {
  color: rgba(247, 244, 255, 0.55) !important;
  font-size: 12px;
}

.home-analytics-grid {
  grid-template-columns: minmax(0, 1fr) 390px !important;
  gap: 14px !important;
}

.home-products-panel {
  display: none !important;
}

.home-distribution-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px 14px !important;
  min-height: 66px;
  padding: 14px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 14px !important;
}

.home-distribution-row em {
  grid-column: 2;
  color: rgba(247, 244, 255, 0.7);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
}

.home-distribution-row.is-danger em { color: #ff8e8e; }
.home-distribution-row.is-warning em { color: #ffd38a; }
.home-distribution-row.is-success em { color: #80efad; }

.home-distribution-row i {
  grid-column: 1 / -1;
  height: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
}

.home-distribution-row b.is-green {
  background: linear-gradient(90deg, #22c55e, #7c4dff) !important;
}

.home-distribution-row b.is-blue {
  background: linear-gradient(90deg, #60a5fa, #a855f7) !important;
}

.product-chart-wrap {
  min-height: 270px;
  overflow: visible;
}

.product-line-chart {
  overflow: visible;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) !important;
  background-size: 100% 25%, 12.5% 100% !important;
}

.product-line-chart polyline {
  fill: none !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-line-chart polyline.is-violet,
.product-chart-legend .is-violet {
  stroke: #a855f7 !important;
  background: #a855f7 !important;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.52));
}

.product-chart-hit {
  r: 6;
  opacity: 0.72;
}

.product-chart-hit.is-violet {
  fill: rgba(168, 85, 247, 0.22) !important;
  stroke: #d7b8ff !important;
}

.panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(9, 13, 28, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}

.panel-header h2 {
  letter-spacing: -0.03em;
}

.primary-action,
.secondary-action,
.seller-primary-action,
.ghost-action,
button {
  cursor: pointer;
}

.tab-panel.is-active > .stock-page-section,
.seller-opportunity-card,
.metric,
.panel {
  animation: sellerFade 420ms ease both;
}

@keyframes sellerFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .seller-opportunity-card {
    grid-template-columns: 1fr minmax(260px, 0.8fr) !important;
  }

  .seller-opportunity-visual {
    display: none;
  }

  .home-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .seller-os-grid,
  .home-analytics-grid {
    grid-template-columns: 1fr !important;
  }

  .seller-os-grid > .control-panel:first-child,
  .seller-events-panel,
  .seller-ai-side {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .finance-os-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-operating-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block !important;
  }

  .sidebar {
    height: auto !important;
    padding: 12px !important;
    border-radius: 0 0 22px 22px !important;
  }

  .side-nav-link {
    min-height: 40px !important;
    font-size: 13px !important;
  }

  .workspace {
    padding: 12px 10px 88px !important;
  }

  .topbar {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }

  .topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  .api-status-strip,
  .profile-switcher,
  #syncWbStockBtn,
  #stockUpdatedAt {
    width: 100%;
    max-width: none;
  }

  .seller-opportunity-card {
    grid-template-columns: 1fr !important;
    min-height: auto;
    padding: 22px !important;
  }

  .seller-opportunity-copy > strong {
    font-size: clamp(42px, 16vw, 68px);
  }

  .home-kpi-grid,
  .seller-alert-strip,
  .finance-os-grid {
    grid-template-columns: 1fr !important;
  }

  .seller-alert {
    min-height: 72px;
  }

  .home-analytics-grid {
    grid-template-columns: 1fr !important;
  }

  .product-chart-wrap {
    min-height: 220px;
  }

  .product-line-chart {
    min-width: 100%;
  }
}

/* Final map overrides: this stays after legacy warehouse styles. */
.warehouse-overview-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.35fr) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.warehouse-map-wrap {
  display: block !important;
  min-height: 420px !important;
}

.russia-warehouse-map {
  position: absolute !important;
  inset: 14px !important;
}

.warehouse-map-point {
  position: absolute !important;
}

@media (max-width: 1180px) {
  .warehouse-overview-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Seller OS operational screens */
.seller-ai-workspace {
  display: grid;
  gap: 18px;
}

.seller-ai-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px !important;
  background:
    radial-gradient(circle at 86% 18%, rgba(124, 77, 255, 0.28), transparent 42%),
    linear-gradient(145deg, rgba(124, 77, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(10, 13, 28, 0.86) !important;
  border-color: rgba(156, 107, 255, 0.28) !important;
}

.seller-ai-hero-panel h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.02;
}

.seller-ai-score {
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

.seller-ai-score span,
.seller-ai-column-head span {
  color: rgba(231, 235, 250, 0.64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.seller-ai-score strong {
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
}

.seller-ai-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
}

.seller-ai-column {
  display: grid;
  gap: 14px;
  min-height: 420px;
  padding: 16px !important;
}

.seller-ai-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.seller-ai-column-head strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.075);
  border-radius: 12px;
}

.seller-ai-column.is-danger .seller-ai-column-head strong { background: rgba(239, 68, 68, 0.22); }
.seller-ai-column.is-warning .seller-ai-column-head strong { background: rgba(245, 158, 11, 0.22); }
.seller-ai-column.is-success .seller-ai-column-head strong { background: rgba(34, 197, 94, 0.2); }
.seller-ai-column.is-loss .seller-ai-column-head strong { background: rgba(168, 85, 247, 0.22); }

.seller-ai-task-list {
  display: grid;
  gap: 10px;
}

.seller-ai-task {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 13px;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.seller-ai-task:hover {
  transform: translateY(-2px);
  background: rgba(124, 77, 255, 0.11);
  border-color: rgba(156, 107, 255, 0.28);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28), 0 0 28px rgba(124, 77, 255, 0.12);
}

.seller-ai-task-photo .photo-thumb {
  width: 52px;
  height: 52px;
  border-radius: 15px;
}

.seller-ai-task-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.seller-ai-task-body strong {
  color: #fff !important;
  font-size: 13px;
}

.seller-ai-task-body b {
  color: #eef2ff !important;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.seller-ai-task-body small,
.seller-ai-task-body em {
  color: rgba(231, 235, 250, 0.58) !important;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.seller-ai-task-side {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.seller-ai-task-side i {
  color: #68f59b;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.seller-ai-task-side u {
  color: #d9ccff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.product-catalog-grid {
  grid-template-columns: 1fr !important;
}

.product-catalog-card {
  grid-template-columns: minmax(260px, 1.05fr) auto minmax(430px, 1.45fr) 180px 150px;
  align-items: center;
  min-height: 118px !important;
  padding: 14px !important;
}

.product-card-main {
  grid-template-columns: 58px minmax(0, 1fr) !important;
}

.product-card-main .photo-thumb {
  width: 58px !important;
  height: 58px !important;
  border-radius: 16px !important;
}

.product-card-main strong {
  color: #fff !important;
  font-size: 15px !important;
}

.product-card-badges {
  align-content: center;
  min-width: 132px;
  min-height: 0 !important;
}

.product-card-kpis {
  grid-template-columns: repeat(5, minmax(82px, 1fr)) !important;
  gap: 6px !important;
}

.product-card-kpis div {
  min-height: 54px !important;
  padding: 8px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.product-card-kpis span {
  color: rgba(231, 235, 250, 0.52) !important;
  font-size: 9px !important;
}

.product-card-kpis strong {
  color: #fff !important;
  font-size: 12px !important;
}

.product-card-chart .demand-chart {
  height: 46px !important;
}

.product-open-btn {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.9), rgba(168, 85, 247, 0.72)) !important;
  border-color: rgba(156, 107, 255, 0.34) !important;
}

@media (max-width: 1280px) {
  .seller-ai-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-catalog-card {
    grid-template-columns: minmax(240px, 1fr) auto;
  }

  .product-card-kpis,
  .product-card-chart,
  .product-open-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .seller-ai-hero-panel,
  .seller-ai-board,
  .product-catalog-card {
    grid-template-columns: 1fr !important;
  }

  .seller-ai-score {
    min-width: 0;
  }

  .seller-ai-column {
    min-height: 0;
  }

  .product-card-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Wide Russia warehouse map: map first, clean data table below. */
.warehouse-overview-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.warehouse-map-wrap {
  width: 100% !important;
  min-height: auto !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: #050816 !important;
  border: 0 !important;
  border-radius: 24px !important;
}

.russia-warehouse-map {
  position: absolute !important;
  inset: 18px !important;
  isolation: isolate;
  overflow: hidden !important;
  border-radius: 20px !important;
}

.warehouse-map-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  transform-origin: center center;
  transition: transform 220ms ease;
  touch-action: none;
}

.russia-warehouse-map.is-zoomed .warehouse-map-viewport {
  cursor: grab;
}

.russia-warehouse-map.is-dragging .warehouse-map-viewport {
  cursor: grabbing;
  transition: none;
}

.warehouse-map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  color: rgba(247, 244, 255, 0.82);
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(124, 77, 255, 0.26);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 0 34px rgba(124, 77, 255, 0.12);
  backdrop-filter: blur(16px);
}

.warehouse-map-controls button {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.warehouse-map-controls button:hover {
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  box-shadow: 0 10px 24px rgba(124, 77, 255, 0.3);
  transform: translateY(-1px);
}

.warehouse-map-controls span {
  min-width: 50px;
  color: rgba(247, 244, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.russia-map-shape {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.russia-map-outline {
  fill: rgba(124, 77, 255, 0.12) !important;
  stroke: rgba(168, 85, 247, 0.62) !important;
  stroke-width: 2.4 !important;
  vector-effect: non-scaling-stroke;
}

.russia-map-inner {
  stroke: rgba(255, 255, 255, 0.12) !important;
  stroke-width: 1.3 !important;
  vector-effect: non-scaling-stroke;
}

.warehouse-map-point {
  position: absolute !important;
  display: grid !important;
  grid-template-columns: var(--size) max-content !important;
  max-width: 230px;
  z-index: 4 !important;
}

.warehouse-map-point strong {
  max-width: 190px !important;
  font-size: 11px !important;
  padding: 4px 7px;
  background: rgba(5, 8, 22, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.warehouse-map-summary {
  display: none !important;
}

.russia-map-render {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36), 0 0 60px rgba(124, 77, 255, 0.14);
}

.warehouse-map-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.warehouse-map-layer .warehouse-map-point {
  pointer-events: auto;
}

.warehouse-map-empty {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 6;
  display: grid;
  gap: 6px;
  width: min(520px, calc(100% - 48px));
  padding: 16px 18px;
  color: rgba(247, 244, 255, 0.78);
  text-align: center;
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(124, 77, 255, 0.28);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32), 0 0 38px rgba(124, 77, 255, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.warehouse-map-empty strong {
  color: #fff;
  font-size: 15px;
}

.warehouse-map-empty span {
  color: rgba(247, 244, 255, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.warehouse-map-note {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 7;
  padding: 10px 12px;
  color: rgba(247, 244, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(5, 8, 22, 0.66);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.warehouse-table {
  width: 100% !important;
  overflow: hidden !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(11, 18, 32, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 22px !important;
}

.warehouse-data-table {
  width: 100%;
  border-collapse: collapse;
}

.warehouse-data-table th,
.warehouse-data-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.warehouse-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: rgba(247, 244, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.045);
}

.warehouse-data-table td {
  color: rgba(247, 244, 255, 0.78);
  font-size: 13px;
}

.warehouse-data-table td:first-child strong {
  color: #fff;
  font-size: 14px;
}

.warehouse-data-table tr:hover td {
  background: rgba(124, 77, 255, 0.08);
}

.warehouse-data-table em,
.warehouse-card em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  border-radius: 999px;
}

.warehouse-data-table em.is-high,
.warehouse-card em.is-high {
  color: #c4ffe0;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.warehouse-data-table em.is-medium,
.warehouse-card em.is-medium {
  color: #ffe3a7;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.warehouse-data-table em.is-low,
.warehouse-card em.is-low {
  color: #ffb5c2;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.24);
}

@media (max-width: 860px) {
  .warehouse-map-wrap {
    min-height: 0 !important;
  }

  .warehouse-map-point strong,
  .warehouse-map-point em {
    display: none !important;
  }

  .warehouse-table {
    overflow-x: auto !important;
  }

  .warehouse-data-table {
    min-width: 680px;
  }
}

/* Premium ChartSystem: unified dark SaaS charts. */
.pie-chart,
.warehouse-donut {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pie-chart::after,
.warehouse-donut::after {
  display: none !important;
}

.product-chart-card {
  overflow: hidden;
}

.product-chart-wrap {
  --chart-bg: #050816;
  --chart-card: #0b1220;
  --chart-accent: #8b5cf6;
  --chart-accent-soft: #a78bfa;
  --chart-glow: rgba(139, 92, 246, 0.25);
}

.product-line-chart {
  height: 268px !important;
  padding: 0;
  color: var(--chart-accent);
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, 0.17), transparent 34%),
    radial-gradient(circle at 78% 16%, rgba(34, 197, 94, 0.07), transparent 30%),
    linear-gradient(145deg, rgba(11, 18, 32, 0.98), rgba(5, 8, 22, 0.95)) !important;
  border: 1px solid rgba(167, 139, 250, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 26px 70px rgba(0, 0, 0, 0.28),
    0 0 42px rgba(139, 92, 246, 0.08) !important;
}

.product-chart-grid,
.product-chart-axis-line {
  stroke: rgba(255, 255, 255, 0.075) !important;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.product-chart-axis-line {
  stroke: rgba(167, 139, 250, 0.12) !important;
}

.product-chart-y-label,
.product-chart-x-label {
  fill: rgba(238, 242, 255, 0.44) !important;
  font-size: 9.8px;
  font-weight: 680;
}

.product-chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 10px currentColor);
  pointer-events: none;
  animation: chartLineIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.product-chart-area {
  color: inherit;
  opacity: 0.72;
  pointer-events: none;
  animation: chartFadeUp 620ms ease both;
}

.product-chart-bar {
  opacity: 0.76;
  fill: currentColor;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.22));
  transform-origin: bottom;
  animation: chartBarIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.product-line-chart .is-violet,
.product-chart-legend .is-violet,
.chart-bubble-dot.is-violet {
  color: #8b5cf6;
  stroke: #8b5cf6;
  background: #8b5cf6;
}

.product-line-chart .is-green,
.product-chart-legend .is-green,
.chart-bubble-dot.is-hit,
.chart-bubble-dot.is-liquid {
  color: #22c55e;
  stroke: #22c55e;
  background: #22c55e;
}

.product-line-chart .is-orange,
.product-chart-legend .is-orange,
.chart-bubble-dot.is-medium,
.chart-bubble-dot.is-low-demand {
  color: #f59e0b;
  stroke: #f59e0b;
  background: #f59e0b;
}

.product-line-chart .is-blue,
.product-chart-legend .is-blue {
  color: #60a5fa;
  stroke: #60a5fa;
  background: #60a5fa;
}

.product-line-chart .is-red,
.product-chart-legend .is-red,
.chart-bubble-dot.is-dead {
  color: #ef4444;
  stroke: #ef4444;
  background: #ef4444;
}

.product-chart-hover-line {
  opacity: 0;
  stroke: rgba(238, 242, 255, 0.32);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
  transition: opacity 160ms ease;
}

.product-chart-hover-dot {
  opacity: 0;
  fill: #050816;
  stroke: currentColor;
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 12px currentColor);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.product-chart-hover-group:hover .product-chart-hover-line,
.product-chart-hover-group:hover .product-chart-hover-dot {
  opacity: 1;
}

.product-chart-hit {
  fill: transparent !important;
  opacity: 1 !important;
  cursor: crosshair;
}

.product-chart-tooltip {
  min-width: 190px !important;
  padding: 12px 14px !important;
  color: #eef2ff !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, 0.26), transparent 42%),
    rgba(9, 14, 28, 0.94) !important;
  border: 1px solid rgba(167, 139, 250, 0.22) !important;
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.44),
    0 0 34px rgba(139, 92, 246, 0.16) !important;
  backdrop-filter: blur(14px);
}

.product-chart-tooltip strong {
  color: #fff !important;
}

.product-chart-tooltip span {
  color: rgba(238, 242, 255, 0.68) !important;
}

.product-chart-legend {
  gap: 14px !important;
  color: rgba(238, 242, 255, 0.56) !important;
}

.product-chart-legend i {
  width: 8px !important;
  height: 8px !important;
  box-shadow: 0 0 18px currentColor;
}

.demand-chart.chart-sparkline {
  width: 100%;
  height: 54px !important;
  overflow: visible;
  background: transparent !important;
}

.sparkline-line {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.34));
}

.sparkline-area {
  fill: url("#unused");
  fill: rgba(139, 92, 246, 0.16);
}

.demand-chart rect,
.demand-chart polyline {
  display: none !important;
}

.chart-distribution {
  display: grid !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  align-content: start;
  grid-auto-rows: auto;
  gap: 12px;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.expense-structure.is-distribution {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
}

.expense-structure.is-distribution .pie-legend {
  display: none !important;
}

.chart-distribution::after {
  display: none !important;
}

.chart-distribution-row {
  display: grid;
  grid-template-columns: minmax(138px, 0.8fr) minmax(180px, 1.4fr) 76px;
  gap: 14px;
  align-items: center;
  color: rgba(238, 242, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.chart-distribution-row span,
.chart-distribution-row strong {
  color: inherit;
}

.chart-distribution-track {
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.chart-distribution-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.chart-distribution-row.is-green { color: #22c55e; }
.chart-distribution-row.is-orange { color: #f59e0b; }
.chart-distribution-row.is-red { color: #ef4444; }
.chart-distribution-row.is-blue { color: #60a5fa; }

.chart-heatmap,
.chart-hour-heatmap,
.chart-bubble-wrap {
  margin-top: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(167, 139, 250, 0.13);
  border-radius: 18px;
}

.chart-heatmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: rgba(238, 242, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.chart-heatmap-head em {
  color: rgba(238, 242, 255, 0.42);
  font-style: normal;
}

.chart-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(30, minmax(7px, 1fr));
  gap: 4px;
}

.chart-hour-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(10px, 1fr));
  gap: 5px;
}

.chart-heat-cell {
  display: block;
  min-height: 15px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.035);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.chart-hour-grid .chart-heat-cell {
  min-height: 42px;
  display: grid;
  align-items: end;
  padding: 3px;
}

.chart-heat-cell small {
  color: rgba(238, 242, 255, 0.42);
  font-size: 8px;
}

.chart-heat-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.24);
}

.chart-heat-cell.is-low { background: rgba(139, 92, 246, 0.18); }
.chart-heat-cell.is-mid { background: rgba(139, 92, 246, 0.38); }
.chart-heat-cell.is-high { background: rgba(139, 92, 246, 0.66); }
.chart-heat-cell.is-hot { background: #a78bfa; box-shadow: 0 0 18px rgba(167, 139, 250, 0.34); }

.chart-heatmap-scale {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: rgba(238, 242, 255, 0.42);
  font-size: 10px;
  font-weight: 780;
}

.chart-heatmap-scale i {
  width: 16px;
  height: 9px;
  border-radius: 999px;
}

.chart-heatmap-scale i:nth-of-type(1) { background: rgba(139, 92, 246, 0.18); }
.chart-heatmap-scale i:nth-of-type(2) { background: rgba(139, 92, 246, 0.38); }
.chart-heatmap-scale i:nth-of-type(3) { background: rgba(139, 92, 246, 0.66); }
.chart-heatmap-scale i:nth-of-type(4) { background: #a78bfa; }

.chart-bubble {
  width: 100%;
  height: 230px;
  overflow: visible;
}

.chart-bubble-dot {
  fill: currentColor;
  opacity: 0.38;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  cursor: crosshair;
  transition: opacity 160ms ease, filter 160ms ease;
}

.chart-bubble-dot:hover,
.chart-bubble-dot.is-current {
  opacity: 0.88;
  filter: drop-shadow(0 0 18px currentColor);
}

.chart-empty-mini,
.product-chart-empty.is-compact {
  display: grid;
  place-items: center;
  min-height: 86px;
  color: rgba(238, 242, 255, 0.52);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(167, 139, 250, 0.16);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 850;
}

@keyframes chartFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 0.72; transform: translateY(0); }
}

@keyframes chartBarIn {
  from { opacity: 0; transform: scaleY(0.2); }
  to { opacity: 0.76; transform: scaleY(1); }
}

@media (max-width: 760px) {
  .product-line-chart {
    height: 220px !important;
  }

  .chart-heatmap-grid {
    grid-template-columns: repeat(15, minmax(8px, 1fr));
  }

  .chart-hour-grid {
    grid-template-columns: repeat(12, minmax(12px, 1fr));
  }

  .chart-distribution-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

/* Seller OS MVP polish: keep every empty/table/recommendation surface in the dark system. */
.mini-empty,
.stock-empty,
.product-chart-empty,
.chart-empty-mini,
.finance-empty-state,
.warehouse-bars .mini-empty,
.forecast-list .mini-empty,
.attention-list .mini-empty {
  color: rgba(238, 242, 255, 0.72) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 77, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(11, 18, 32, 0.82) !important;
  border: 1px solid rgba(167, 139, 250, 0.18) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.mini-empty strong,
.stock-empty strong,
.product-chart-empty strong,
.finance-empty-state h2 {
  color: rgba(255, 255, 255, 0.94) !important;
}

.mini-empty span,
.stock-empty span,
.product-chart-empty span,
.finance-empty-state p {
  color: rgba(238, 242, 255, 0.56) !important;
}

.warehouse-bars,
.warehouse-grid,
.warehouse-table,
.table-wrap,
.report-summary-table,
.stock-table,
.average-profit-table,
.receipt-table,
.receipt-results-table {
  color: rgba(238, 242, 255, 0.78) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 77, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(11, 18, 32, 0.78) !important;
  border-color: rgba(167, 139, 250, 0.16) !important;
}

.warehouse-data-table th,
.warehouse-data-table td,
.stock-table th,
.stock-table td,
.report-summary-table th,
.report-summary-table td,
table th,
table td {
  color: rgba(238, 242, 255, 0.76) !important;
  border-color: rgba(255, 255, 255, 0.075) !important;
}

.warehouse-data-table th,
.stock-table th,
.report-summary-table th,
table th {
  color: rgba(238, 242, 255, 0.58) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

.warehouse-data-table tr:hover td,
.stock-table tbody tr:hover td,
.report-summary-table tbody tr:hover td {
  background: rgba(124, 77, 255, 0.08) !important;
}

.recommendation-row {
  color: rgba(238, 242, 255, 0.76) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.14), transparent 32%),
    rgba(11, 18, 32, 0.76) !important;
  border-color: rgba(167, 139, 250, 0.18) !important;
}

.recommendation-row-head b,
.recommendation-row strong,
.recommendation-destination b {
  color: rgba(255, 255, 255, 0.94) !important;
}

.recommendation-row small,
.recommendation-reasons span {
  color: rgba(238, 242, 255, 0.58) !important;
}

.recommendation-destination,
.recommendation-reasons span {
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(167, 139, 250, 0.14) !important;
}

.api-status-dot[data-state="loading"] {
  color: rgba(255, 255, 255, 0.9) !important;
  background:
    linear-gradient(135deg, rgba(124, 77, 255, 0.24), rgba(168, 85, 247, 0.12)),
    rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(167, 139, 250, 0.34) !important;
}

.api-status-dot[data-state="empty"] {
  color: rgba(238, 242, 255, 0.68) !important;
}

.api-status-dot.is-error,
.api-status-dot[data-state="error"] {
  color: #fecaca !important;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(127, 29, 29, 0.12)),
    rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(239, 68, 68, 0.34) !important;
}

.api-status-dot.is-error::before,
.api-status-dot[data-state="error"]::before {
  background: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.42) !important;
}

/* StockPilot public landing */
body:not(.is-authenticated) {
  min-height: 100vh;
  overflow-x: hidden;
  background: #050816 !important;
}

body:not(.is-authenticated) .app-shell {
  display: none !important;
}

body.is-authenticated .auth-gateway,
.auth-gateway.is-hidden {
  display: none !important;
}

.auth-gateway {
  position: relative;
  display: block;
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 72px) 64px;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 77, 255, 0.28), transparent 32%),
    radial-gradient(circle at 78% 8%, rgba(168, 85, 247, 0.2), transparent 28%),
    radial-gradient(circle at 72% 82%, rgba(34, 197, 94, 0.08), transparent 28%),
    linear-gradient(135deg, #050816 0%, #080b1d 48%, #0e1026 100%) !important;
}

/* Seller OS auth and demo mode */
.auth-modal-backdrop {
  background:
    linear-gradient(rgba(5, 8, 22, 0.72), rgba(5, 8, 22, 0.82)),
    radial-gradient(circle at 25% 18%, rgba(124, 77, 255, 0.38), transparent 34%) !important;
  backdrop-filter: blur(18px) saturate(120%) !important;
}

.auth-modal-backdrop::after {
  content: "";
  position: absolute;
  inset: 7% 6%;
  opacity: 0.24;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    radial-gradient(circle at 72% 22%, rgba(139,92,246,.5), transparent 28%),
    #0b1020;
  background-size: 48px 48px, 48px 48px, auto, auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .52);
}

.auth-card {
  width: min(470px, 100%) !important;
  gap: 15px !important;
  color: #eef2ff !important;
  border: 1px solid rgba(167, 139, 250, 0.25) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.25), transparent 34%),
    linear-gradient(145deg, rgba(18, 23, 43, 0.96), rgba(7, 11, 26, 0.94)) !important;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255,255,255,.08), 0 0 60px rgba(124,77,255,.15) !important;
  backdrop-filter: blur(24px);
}

.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.auth-card-brand div { display: grid; gap: 2px; }
.auth-card-brand strong { color: #fff; font-size: 17px; }
.auth-card-brand small, .auth-card-subtitle { color: rgba(238,242,255,.56); }

.auth-card-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(196,181,253,.3);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #8b5cf6, #5b21b6);
  box-shadow: 0 12px 30px rgba(124,77,255,.38);
  font-weight: 950;
}

.auth-card h2 { color: #fff !important; }
.auth-card-subtitle { margin: -7px 0 4px; line-height: 1.55; font-size: 13px; font-weight: 650; }
.auth-card label:not(.auth-remember) { display: grid; gap: 8px; color: rgba(238,242,255,.72); font-size: 12px; font-weight: 800; }
.auth-card input:not([type="checkbox"]) {
  min-height: 48px;
  padding: 0 14px;
  color: #fff;
  outline: none;
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.auth-card input:not([type="checkbox"]):focus {
  border-color: rgba(167,139,250,.75);
  background: rgba(124,77,255,.09);
  box-shadow: 0 0 0 4px rgba(124,77,255,.13), 0 0 24px rgba(124,77,255,.16);
}
.auth-card input::placeholder { color: rgba(238,242,255,.3); }
.auth-login-options { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.auth-remember { display: flex; gap: 8px; align-items: center; color: rgba(238,242,255,.62); font-size: 12px; font-weight: 750; }
.auth-text-action { padding: 0; border: 0; color: #c4b5fd; background: transparent; cursor: pointer; font-weight: 800; }
.auth-text-action:hover { color: #fff; box-shadow: none; }
.auth-primary-submit { width: 100%; border-color: rgba(167,139,250,.42) !important; color: #fff !important; background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; box-shadow: 0 14px 34px rgba(109,40,217,.3) !important; }
.auth-demo-submit { width: 100%; color: #ddd6fe !important; border-color: rgba(167,139,250,.22) !important; background: rgba(124,77,255,.08) !important; }
.auth-register-switch { margin: 2px 0 0; text-align: center; color: rgba(238,242,255,.48); font-size: 12px; }
.auth-back-login { justify-self: center; }
.auth-success { margin: 0; padding: 12px 14px; color: #bbf7d0; border: 1px solid rgba(34,197,94,.25); border-radius: 14px; background: rgba(34,197,94,.09); font-size: 12px; line-height: 1.5; }
.auth-card .stock-error { margin: 0; padding: 12px 14px; border: 1px solid rgba(239,68,68,.28); border-radius: 14px; background: rgba(239,68,68,.09); }
.auth-card .modal-close { color: rgba(238,242,255,.58); border-color: rgba(167,139,250,.18); background: rgba(255,255,255,.05); }

.demo-topbar-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(167,139,250,.26);
  border-radius: 14px;
  color: #ddd6fe;
  background: rgba(124,77,255,.11);
}
.demo-topbar-banner[hidden] { display: none; }
.demo-topbar-banner strong { color: #fff; font-size: 12px; }
.demo-topbar-banner span { font-size: 11px; color: rgba(238,242,255,.56); }
.demo-topbar-banner button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 9px; color: #fff; background: #7c3aed; cursor: pointer; font-size: 11px; font-weight: 850; }
body.is-demo #wbApiStatusPill, body.is-demo #mpstatsStatusPill { color: #ddd6fe !important; border-color: rgba(167,139,250,.24) !important; background: rgba(124,77,255,.1) !important; }

.demo-warning-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  opacity: 0;
  background: rgba(3, 6, 18, .72);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease;
}
.demo-warning-backdrop.is-open { opacity: 1; }
.demo-warning-modal {
  position: fixed;
  z-index: 1410;
  left: 50%;
  top: 50%;
  width: min(430px, calc(100% - 32px));
  padding: 28px;
  color: #eef2ff;
  border: 1px solid rgba(167,139,250,.25);
  border-radius: 24px;
  background: radial-gradient(circle at 100% 0%, rgba(139,92,246,.24), transparent 34%), #0b1020;
  box-shadow: 0 34px 100px rgba(0,0,0,.6);
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}
.demo-warning-modal.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.demo-warning-modal h2 { margin: 16px 0 8px; color: #fff; }
.demo-warning-modal p:not(.eyebrow) { color: rgba(238,242,255,.62); line-height: 1.6; }
.demo-warning-modal > div { display: flex; gap: 10px; margin-top: 22px; }

@media (max-width: 920px) {
  .demo-topbar-banner { width: 100%; justify-content: space-between; }
  .demo-topbar-banner span { display: none; }
}

@media (max-width: 560px) {
  .auth-modal { padding: 10px; align-items: end; }
  .auth-card { width: 100% !important; max-height: calc(100vh - 20px); overflow: auto; border-radius: 24px 24px 16px 16px !important; }
  .auth-login-options { align-items: flex-start; }
  .demo-warning-modal > div { display: grid; }
}

.landing-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.landing-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.55;
  animation: stockpilotFloat 10s ease-in-out infinite;
}

.landing-glow-one {
  left: -120px;
  top: 160px;
  background: rgba(124, 77, 255, 0.42);
}

.landing-glow-two {
  right: -110px;
  bottom: 120px;
  background: rgba(168, 85, 247, 0.3);
  animation-delay: -4s;
}

.stockpilot-header,
.stockpilot-hero-shell,
.stockpilot-section,
.stockpilot-manifesto,
.stockpilot-final-cta {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin-inline: auto;
}

.stockpilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 24px;
  background: rgba(11, 18, 32, 0.62);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
}

.stockpilot-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.stockpilot-logo span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  box-shadow: 0 0 28px rgba(124, 77, 255, 0.42);
}

.stockpilot-logo strong {
  font-size: 18px;
  letter-spacing: 0;
}

.stockpilot-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stockpilot-nav a,
.stockpilot-link {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  color: rgba(248, 250, 252, 0.72);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.stockpilot-nav a {
  display: inline-flex;
  align-items: center;
}

.stockpilot-nav a:hover,
.stockpilot-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.stockpilot-small-cta {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(167, 139, 250, 0.42);
  border-radius: 15px;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stockpilot-small-cta:hover,
.auth-gateway .secondary-action:hover,
.auth-gateway .demo-action:hover {
  transform: translateY(-2px);
}

.stockpilot-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: clamp(46px, 8vw, 112px) 0;
}

.stockpilot-hero {
  max-width: 680px;
}

.stockpilot-badge,
.stockpilot-section .eyebrow,
.stockpilot-manifesto span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 999px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(124, 77, 255, 0.13);
}

.stockpilot-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 6vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.stockpilot-hero p {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.55;
}

.auth-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.auth-gateway .secondary-action,
.auth-gateway .demo-action {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.auth-gateway .secondary-action {
  border: 1px solid rgba(167, 139, 250, 0.52);
  color: #fff;
  background: linear-gradient(135deg, #7c4dff, #a855f7);
  box-shadow: 0 20px 52px rgba(124, 77, 255, 0.34);
}

.auth-gateway .demo-action {
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.landing-trust span {
  padding: 10px 12px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.045);
}

.stockpilot-preview {
  position: relative;
  min-height: 640px;
}

.stockpilot-mockup {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(124, 77, 255, 0.26), transparent 38%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 13, 29, 0.88));
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.48),
    0 0 90px rgba(124, 77, 255, 0.15);
  backdrop-filter: blur(26px);
  animation: stockpilotRise 0.75s ease both;
}

.stockpilot-mockup::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%);
}

.mockup-topbar,
.mockup-kpis,
.stockpilot-ai-card,
.mockup-chart,
.mockup-table {
  position: relative;
  z-index: 1;
}

.mockup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  color: rgba(226, 232, 240, 0.64);
  background: rgba(255, 255, 255, 0.045);
}

.mockup-topbar div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.72);
}

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

.mockup-kpis div,
.stockpilot-ai-card,
.mockup-chart,
.mockup-table {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.mockup-kpis div {
  padding: 16px;
}

.mockup-kpis span,
.stockpilot-ai-card span {
  display: block;
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mockup-kpis strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: 24px;
}

.stockpilot-ai-card {
  margin-top: 14px;
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.stockpilot-ai-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 22px;
}

.stockpilot-ai-card p {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.64);
}

.stockpilot-ai-card em {
  display: block;
  margin-top: 14px;
  color: #22c55e;
  font-style: normal;
  font-weight: 900;
}

.mockup-chart {
  position: relative;
  min-height: 190px;
  margin-top: 14px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.035);
  background-size: 100% 48px, 72px 100%, auto;
}

.chart-line {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 62px;
  height: 76px;
  border-radius: 999px 999px 0 0;
  border-top: 4px solid rgba(139, 92, 246, 0.92);
  transform: skewX(-18deg);
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.42));
}

.chart-bars {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  align-items: end;
  gap: 10px;
  height: 128px;
}

.chart-bars span {
  width: 18px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #a855f7, #7c4dff);
  box-shadow: 0 12px 32px rgba(124, 77, 255, 0.35);
}

.mockup-table {
  margin-top: 14px;
  padding: 8px;
}

.mockup-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
}

.mockup-row:not(.is-head):hover {
  background: rgba(255, 255, 255, 0.055);
}

.mockup-row.is-head {
  color: rgba(226, 232, 240, 0.44);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mockup-row b {
  color: #22c55e;
}

.mockup-row .warn {
  color: #fbbf24;
}

.mockup-row .danger-badge {
  color: #fca5a5;
}

.floating-card {
  position: absolute;
  z-index: 2;
  width: max-content;
  max-width: 230px;
  padding: 14px 16px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 20px;
  color: #fff;
  background: rgba(11, 18, 32, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  animation: stockpilotFloat 7s ease-in-out infinite;
}

.floating-card span {
  display: block;
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.floating-card strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.float-stock {
  left: -24px;
  top: 72px;
}

.float-profit {
  right: -18px;
  top: 168px;
  animation-delay: -2s;
}

.float-forecast {
  left: 36px;
  bottom: 56px;
  animation-delay: -4s;
}

.stockpilot-section,
.stockpilot-manifesto,
.stockpilot-final-cta {
  margin-top: 26px;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.16), transparent 34%),
    rgba(11, 18, 32, 0.68);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
}

.stockpilot-section h2,
.stockpilot-manifesto h2,
.stockpilot-final-cta h2 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
}

.stockpilot-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.stockpilot-feature-grid article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stockpilot-feature-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(255, 255, 255, 0.07);
}

.stockpilot-feature-grid article > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.9), rgba(168, 85, 247, 0.72));
  box-shadow: 0 16px 40px rgba(124, 77, 255, 0.24);
}

.stockpilot-feature-grid h3 {
  margin: 22px 0 0;
  color: #fff;
  font-size: 20px;
}

.stockpilot-feature-grid p,
.stockpilot-manifesto p,
.stockpilot-final-cta p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(226, 232, 240, 0.68);
  line-height: 1.6;
}

.stockpilot-manifesto {
  text-align: center;
}

.stockpilot-manifesto span {
  margin-inline: auto;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.stockpilot-manifesto h2,
.stockpilot-manifesto p,
.stockpilot-final-cta h2,
.stockpilot-final-cta p {
  margin-inline: auto;
}

.stockpilot-final-cta {
  margin-bottom: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.2), transparent 45%),
    rgba(11, 18, 32, 0.72);
}

.stockpilot-final-cta .auth-hero-actions {
  justify-content: center;
}

.auth-modal.is-open {
  display: grid;
}

.auth-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 30px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.2), transparent 34%),
    rgba(11, 18, 32, 0.92);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.5);
}

.auth-card h2 {
  margin: 0 0 22px;
  color: #fff;
  font-size: 34px;
}

.auth-card label {
  display: block;
  margin-top: 16px;
}

.auth-card label span {
  display: block;
  margin-bottom: 8px;
  color: rgba(226, 232, 240, 0.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-card input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 16px;
  color: #fff;
  font: inherit;
  background: rgba(2, 6, 23, 0.56);
  outline: none;
}

.auth-card input:focus {
  border-color: rgba(167, 139, 250, 0.72);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.16);
}

.auth-card .secondary-action {
  width: 100%;
  margin-top: 22px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 14px;
  color: #fff;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

@keyframes stockpilotFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes stockpilotRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .stockpilot-hero-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .stockpilot-preview {
    min-height: 0;
  }

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

  .floating-card {
    display: none;
  }
}

@media (max-width: 760px) {
  .auth-gateway {
    padding: 14px 14px 42px;
  }

  .stockpilot-header {
    align-items: stretch;
    border-radius: 22px;
  }

  .stockpilot-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .stockpilot-nav a {
    display: none;
  }

  .stockpilot-small-cta,
  .stockpilot-link {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .stockpilot-hero-shell {
    padding: 44px 0 18px;
    gap: 26px;
  }

  .stockpilot-hero h1 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .stockpilot-hero p {
    font-size: 16px;
  }

  .auth-hero-actions {
    display: grid;
  }

  .auth-gateway .secondary-action,
  .auth-gateway .demo-action {
    width: 100%;
  }

  .mockup-kpis {
    grid-template-columns: 1fr;
  }

  .mockup-row {
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: auto;
    padding-block: 10px;
  }

  .stockpilot-section,
  .stockpilot-manifesto,
  .stockpilot-final-cta {
    padding: 24px;
    border-radius: 24px;
  }

  .stockpilot-feature-grid {
    grid-template-columns: 1fr;
  }

  .stockpilot-feature-grid article {
    min-height: auto;
  }
}

/* Dark consistency fixes for product, warehouse and report surfaces. */
body.is-authenticated .product-catalog-panel,
body.is-authenticated .demand-panel,
body.is-authenticated .product-warehouse-visibility,
body.is-authenticated .stock-data-panel,
body.is-authenticated .warehouse-overview,
body.is-authenticated .warehouse-share-card,
body.is-authenticated .stock-dashboard-grid > .panel,
body.is-authenticated .attention-panel,
body.is-authenticated .product-detail-hero,
body.is-authenticated .product-chart-card,
body.is-authenticated .product-insight-card,
body.is-authenticated .product-recommendations {
  color: rgba(248, 250, 252, 0.9) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(17, 24, 39, 0.96), rgba(7, 11, 24, 0.96)) !important;
  border-color: rgba(167, 139, 250, 0.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 70px rgba(0, 0, 0, 0.3) !important;
}

body.is-authenticated .product-catalog-toolbar,
body.is-authenticated .stock-controls,
body.is-authenticated .fbs-debug-card,
body.is-authenticated .product-detail-metric,
body.is-authenticated .product-detail-stats .product-detail-metric,
body.is-authenticated .stock-empty,
body.is-authenticated .stock-empty.inline,
body.is-authenticated .chart-empty-mini,
body.is-authenticated .product-chart-empty,
body.is-authenticated .product-card-chart,
body.is-authenticated .demand-card,
body.is-authenticated .liquidity-mini-card,
body.is-authenticated .home-distribution-row,
body.is-authenticated .warehouse-card,
body.is-authenticated .warehouse-bar,
body.is-authenticated .forecast-item,
body.is-authenticated .attention-item,
body.is-authenticated .recommendation-row,
body.is-authenticated .product-warehouse-head,
body.is-authenticated .product-warehouse-row,
body.is-authenticated .warehouse-drawer,
body.is-authenticated .warehouse-drawer-item,
body.is-authenticated .warehouse-popover-list,
body.is-authenticated .fbs-debug-warehouses div,
body.is-authenticated .mockup-warehouse > div {
  color: rgba(238, 242, 255, 0.76) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(167, 139, 250, 0.14) !important;
  box-shadow: none !important;
}

body.is-authenticated .product-catalog-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 240px) minmax(0, 1.35fr);
  padding: 16px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.14), transparent 34%),
    rgba(11, 18, 32, 0.78) !important;
  border-radius: 22px !important;
}

body.is-authenticated .product-catalog-toolbar label span,
body.is-authenticated .stock-controls label span,
body.is-authenticated .product-detail-metric span,
body.is-authenticated .product-card-kpis span,
body.is-authenticated .forecast-item span,
body.is-authenticated .attention-item span,
body.is-authenticated .product-warehouse-head,
body.is-authenticated .product-warehouse-row small,
body.is-authenticated .warehouse-data-table th,
body.is-authenticated .report-date {
  color: rgba(226, 232, 240, 0.56) !important;
}

body.is-authenticated .product-catalog-toolbar input,
body.is-authenticated .product-catalog-toolbar select,
body.is-authenticated .stock-controls input,
body.is-authenticated .stock-controls select,
body.is-authenticated .stock-controls .checkbox-control,
body.is-authenticated .finance-cost-input,
body.is-authenticated input,
body.is-authenticated select,
body.is-authenticated textarea {
  color: rgba(248, 250, 252, 0.92) !important;
  background: rgba(3, 7, 18, 0.62) !important;
  border-color: rgba(167, 139, 250, 0.18) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.is-authenticated .product-catalog-toolbar input::placeholder,
body.is-authenticated .stock-controls input::placeholder,
body.is-authenticated input::placeholder,
body.is-authenticated textarea::placeholder {
  color: rgba(226, 232, 240, 0.38) !important;
}

body.is-authenticated .product-filter-btn,
body.is-authenticated .period-btn,
body.is-authenticated .warehouse-map-controls button,
body.is-authenticated .warehouse-map-controls span {
  color: rgba(238, 242, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(167, 139, 250, 0.16) !important;
  box-shadow: none !important;
}

body.is-authenticated .product-filter-btn:hover,
body.is-authenticated .period-btn:hover {
  color: #fff !important;
  background: rgba(124, 77, 255, 0.16) !important;
}

body.is-authenticated .product-filter-btn.is-active,
body.is-authenticated .period-btn.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, #7c4dff, #a855f7) !important;
  border-color: rgba(196, 181, 253, 0.36) !important;
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.24) !important;
}

body.is-authenticated .product-catalog-card {
  min-height: 0 !important;
  padding: 18px !important;
  color: rgba(248, 250, 252, 0.9) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.12), transparent 36%),
    rgba(11, 18, 32, 0.78) !important;
  border-color: rgba(167, 139, 250, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 20px 56px rgba(0, 0, 0, 0.22) !important;
}

body.is-authenticated .product-catalog-card:hover {
  border-color: rgba(167, 139, 250, 0.34) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 77, 255, 0.18), transparent 38%),
    rgba(15, 23, 42, 0.86) !important;
  transform: translateY(-2px);
}

body.is-authenticated .product-card-main strong,
body.is-authenticated .product-detail-title h2,
body.is-authenticated .product-detail-metric strong,
body.is-authenticated .forecast-item strong,
body.is-authenticated .attention-item strong,
body.is-authenticated .warehouse-card strong,
body.is-authenticated .warehouse-bar strong,
body.is-authenticated .warehouse-bar b,
body.is-authenticated .product-warehouse-row strong,
body.is-authenticated .stock-empty strong {
  color: #fff !important;
}

body.is-authenticated .product-card-main small,
body.is-authenticated .product-card-badges,
body.is-authenticated .warehouse-card span,
body.is-authenticated .warehouse-bar small,
body.is-authenticated .stock-empty span {
  color: rgba(226, 232, 240, 0.56) !important;
}

body.is-authenticated .product-card-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.is-authenticated .product-card-kpis div {
  min-height: 72px !important;
  padding: 11px 12px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(167, 139, 250, 0.12) !important;
  border-radius: 16px !important;
}

body.is-authenticated .product-card-kpis strong {
  color: rgba(248, 250, 252, 0.94) !important;
  font-size: 15px !important;
}

body.is-authenticated .product-open-btn,
body.is-authenticated .export-action,
body.is-authenticated .ghost-action {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.96), rgba(168, 85, 247, 0.82)) !important;
  border-color: rgba(196, 181, 253, 0.28) !important;
  box-shadow: 0 16px 42px rgba(124, 77, 255, 0.22) !important;
}

body.is-authenticated .demand-card-grid,
body.is-authenticated .forecast-list,
body.is-authenticated .attention-list,
body.is-authenticated .warehouse-bars,
body.is-authenticated .product-warehouse-table {
  background: transparent !important;
}

body.is-authenticated .forecast-item em {
  border: 1px solid transparent !important;
}

body.is-authenticated .forecast-item.is-good em,
body.is-authenticated .forecast-item:not(.is-warn):not(.is-danger):not(.is-neutral) em {
  color: #bbf7d0 !important;
  background: rgba(34, 197, 94, 0.14) !important;
  border-color: rgba(34, 197, 94, 0.22) !important;
}

body.is-authenticated .forecast-item.is-warn em {
  color: #fde68a !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.24) !important;
}

body.is-authenticated .forecast-item.is-danger em,
body.is-authenticated .attention-item.is-danger,
body.is-authenticated .risk-badge {
  color: #fecaca !important;
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.24) !important;
}

body.is-authenticated .forecast-item.is-neutral em {
  color: rgba(226, 232, 240, 0.62) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.is-authenticated .warehouse-data-table,
body.is-authenticated .stock-table,
body.is-authenticated .report-summary-table,
body.is-authenticated table {
  color: rgba(238, 242, 255, 0.76) !important;
  background: rgba(11, 18, 32, 0.82) !important;
}

body.is-authenticated .warehouse-data-table th,
body.is-authenticated .warehouse-data-table td,
body.is-authenticated .stock-table th,
body.is-authenticated .stock-table td,
body.is-authenticated .report-summary-table th,
body.is-authenticated .report-summary-table td,
body.is-authenticated table th,
body.is-authenticated table td {
  color: rgba(238, 242, 255, 0.76) !important;
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.075) !important;
}

body.is-authenticated .warehouse-data-table th,
body.is-authenticated .stock-table th,
body.is-authenticated .report-summary-table th,
body.is-authenticated table th {
  color: rgba(238, 242, 255, 0.52) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

body.is-authenticated .warehouse-data-table tr:hover td,
body.is-authenticated .stock-table tbody tr:hover td,
body.is-authenticated .report-summary-table tbody tr:hover td,
body.is-authenticated table tbody tr:hover td {
  background: rgba(124, 77, 255, 0.08) !important;
}

body.is-authenticated .product-warehouse-head {
  background: rgba(255, 255, 255, 0.065) !important;
}

body.is-authenticated .product-warehouse-row:hover {
  background: rgba(124, 77, 255, 0.1) !important;
  border-color: rgba(167, 139, 250, 0.28) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18) !important;
}

body.is-authenticated .product-detail-metric strong:contains("не указана") {
  color: #fbbf24 !important;
}

@media (max-width: 980px) {
  body.is-authenticated .product-catalog-toolbar {
    grid-template-columns: 1fr !important;
  }

  body.is-authenticated .product-filter-row {
    justify-content: flex-start !important;
  }

  body.is-authenticated .product-card-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Final dark consistency pass for StockPilot app surfaces. */
body.is-authenticated .product-catalog-panel,
body.is-authenticated .product-catalog-toolbar,
body.is-authenticated .product-filter-row,
body.is-authenticated .demand-panel,
body.is-authenticated .stock-page-section,
body.is-authenticated .stock-controls,
body.is-authenticated .forecast-list,
body.is-authenticated .attention-list,
body.is-authenticated .warehouse-table,
body.is-authenticated .warehouse-data-table,
body.is-authenticated .warehouse-bars,
body.is-authenticated .product-warehouse-table,
body.is-authenticated .product-warehouse-visibility,
body.is-authenticated .recommendation-list,
body.is-authenticated .product-recommendations,
body.is-authenticated .stock-empty,
body.is-authenticated .stock-empty.inline,
body.is-authenticated .empty-mini,
body.is-authenticated .chart-empty-mini,
body.is-authenticated .product-chart-empty,
body.is-authenticated .fbs-debug-card,
body.is-authenticated .mobile-more-row,
body.is-authenticated .data-table-card {
  color: rgba(248, 250, 252, 0.9) !important;
  background:
    radial-gradient(circle at 0 0, rgba(124, 77, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(7, 11, 24, 0.96)) !important;
  border-color: rgba(167, 139, 250, 0.18) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32) !important;
}

body.is-authenticated .product-catalog-toolbar,
body.is-authenticated .stock-controls {
  display: grid !important;
  align-items: end !important;
  gap: 14px !important;
  padding: 18px !important;
  border-radius: 20px !important;
}

body.is-authenticated .product-catalog-toolbar label span,
body.is-authenticated .stock-controls label,
body.is-authenticated .product-filter-row span,
body.is-authenticated .demand-card-stats span,
body.is-authenticated .demand-card-foot,
body.is-authenticated .forecast-item span,
body.is-authenticated .product-warehouse-row small,
body.is-authenticated .recommendation-list div,
body.is-authenticated .recommendation-row small,
body.is-authenticated .recommendation-reasons span,
body.is-authenticated .stock-empty span,
body.is-authenticated .empty-mini,
body.is-authenticated .chart-empty-mini {
  color: rgba(203, 213, 225, 0.72) !important;
}

body.is-authenticated .product-catalog-toolbar input,
body.is-authenticated .product-catalog-toolbar select,
body.is-authenticated .stock-controls input,
body.is-authenticated .stock-controls select,
body.is-authenticated .warehouse-table input,
body.is-authenticated .warehouse-table select {
  color: rgba(248, 250, 252, 0.94) !important;
  background: rgba(5, 8, 22, 0.82) !important;
  border: 1px solid rgba(167, 139, 250, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

body.is-authenticated .product-catalog-toolbar input::placeholder,
body.is-authenticated .stock-controls input::placeholder {
  color: rgba(203, 213, 225, 0.46) !important;
}

body.is-authenticated .product-filter-btn,
body.is-authenticated .product-sort-btn,
body.is-authenticated .catalog-view-btn,
body.is-authenticated .period-btn {
  color: rgba(226, 232, 240, 0.84) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(167, 139, 250, 0.18) !important;
  box-shadow: none !important;
}

body.is-authenticated .product-filter-btn.is-active,
body.is-authenticated .product-sort-btn.is-active,
body.is-authenticated .catalog-view-btn.is-active,
body.is-authenticated .period-btn.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.98), rgba(168, 85, 247, 0.82)) !important;
  border-color: rgba(196, 181, 253, 0.34) !important;
  box-shadow: 0 16px 38px rgba(124, 77, 255, 0.28) !important;
}

body.is-authenticated .product-catalog-card,
body.is-authenticated .demand-card,
body.is-authenticated .forecast-item,
body.is-authenticated .attention-item,
body.is-authenticated .recommendation-row,
body.is-authenticated .product-warehouse-row,
body.is-authenticated .warehouse-card,
body.is-authenticated .warehouse-bar,
body.is-authenticated .product-card-kpis div {
  color: rgba(248, 250, 252, 0.9) !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(8, 13, 28, 0.92)) !important;
  border: 1px solid rgba(167, 139, 250, 0.14) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22) !important;
}

body.is-authenticated .product-catalog-card:hover,
body.is-authenticated .demand-card:hover,
body.is-authenticated .forecast-item:hover,
body.is-authenticated .attention-item:hover,
body.is-authenticated .recommendation-row:hover,
body.is-authenticated .product-warehouse-row:hover {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.92), rgba(8, 13, 28, 0.95)) !important;
  border-color: rgba(167, 139, 250, 0.32) !important;
  transform: translateY(-1px);
}

body.is-authenticated .product-card-main strong,
body.is-authenticated .demand-card-head strong,
body.is-authenticated .forecast-item strong,
body.is-authenticated .attention-item strong,
body.is-authenticated .recommendation-row-head b,
body.is-authenticated .recommendation-row strong,
body.is-authenticated .product-warehouse-row strong,
body.is-authenticated .stock-empty strong {
  color: rgba(255, 255, 255, 0.96) !important;
}

body.is-authenticated .product-card-main small,
body.is-authenticated .demand-card-head span,
body.is-authenticated .product-card-kpis span {
  color: rgba(203, 213, 225, 0.66) !important;
}

body.is-authenticated .product-card-kpis {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.is-authenticated .product-card-kpis div {
  min-height: 62px !important;
  padding: 12px !important;
  border-radius: 16px !important;
}

body.is-authenticated .product-card-kpis strong {
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: 16px !important;
}

body.is-authenticated .product-card-kpis div:nth-child(4) strong,
body.is-authenticated .product-card-kpis div:nth-child(5) strong {
  color: #86efac !important;
}

body.is-authenticated .warehouse-data-table,
body.is-authenticated .stock-table,
body.is-authenticated .report-summary-table,
body.is-authenticated .warehouse-table table,
body.is-authenticated table {
  color: rgba(226, 232, 240, 0.84) !important;
  background: rgba(7, 11, 24, 0.82) !important;
}

body.is-authenticated .warehouse-data-table thead,
body.is-authenticated .stock-table thead,
body.is-authenticated .report-summary-table thead,
body.is-authenticated table thead {
  background: rgba(124, 77, 255, 0.1) !important;
}

body.is-authenticated .warehouse-data-table th,
body.is-authenticated .warehouse-data-table td,
body.is-authenticated .stock-table th,
body.is-authenticated .stock-table td,
body.is-authenticated .report-summary-table th,
body.is-authenticated .report-summary-table td,
body.is-authenticated table th,
body.is-authenticated table td {
  color: rgba(226, 232, 240, 0.84) !important;
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.075) !important;
}

body.is-authenticated .warehouse-data-table tbody tr,
body.is-authenticated .stock-table tbody tr,
body.is-authenticated .report-summary-table tbody tr,
body.is-authenticated table tbody tr {
  background: rgba(15, 23, 42, 0.5) !important;
}

body.is-authenticated .warehouse-data-table tbody tr:nth-child(even),
body.is-authenticated .stock-table tbody tr:nth-child(even),
body.is-authenticated .report-summary-table tbody tr:nth-child(even),
body.is-authenticated table tbody tr:nth-child(even) {
  background: rgba(17, 24, 39, 0.62) !important;
}

body.is-authenticated .warehouse-data-table tbody tr:hover,
body.is-authenticated .stock-table tbody tr:hover,
body.is-authenticated .report-summary-table tbody tr:hover,
body.is-authenticated table tbody tr:hover {
  background: rgba(124, 77, 255, 0.12) !important;
}

body.is-authenticated .forecast-item em,
body.is-authenticated .status-badge,
body.is-authenticated .risk-badge,
body.is-authenticated .liquidity-badge {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.is-authenticated .forecast-item.is-warn em,
body.is-authenticated .status-badge.is-warning {
  color: #fde68a !important;
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}

body.is-authenticated .forecast-item.is-danger em,
body.is-authenticated .attention-item.is-danger,
body.is-authenticated .status-badge.is-danger,
body.is-authenticated .risk-badge {
  color: #fecaca !important;
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

body.is-authenticated .forecast-item.is-neutral em,
body.is-authenticated .status-badge.is-muted {
  color: rgba(226, 232, 240, 0.72) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.is-authenticated .forecast-item.is-good em,
body.is-authenticated .forecast-item:not(.is-warn):not(.is-danger):not(.is-neutral) em,
body.is-authenticated .status-badge.is-success {
  color: #bbf7d0 !important;
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.26) !important;
}

body.is-authenticated .product-detail-metric strong {
  color: rgba(255, 255, 255, 0.96) !important;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  body.is-authenticated .product-catalog-toolbar {
    grid-template-columns: 1fr !important;
  }

  body.is-authenticated .product-card-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body.is-authenticated .panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

body.is-authenticated .supply-import-strip,
body.is-authenticated .supply-history-panel,
body.is-authenticated .product-supply-history {
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 77, 255, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(15, 20, 38, 0.96), rgba(9, 13, 26, 0.98)) !important;
  border: 1px solid rgba(139, 92, 246, 0.25) !important;
  color: #f8fafc !important;
}

body.is-authenticated .supply-import-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

body.is-authenticated .product-detail-actions {
  width: fit-content;
  margin-top: 18px;
}

/* Seller OS Studio Beta */
.studio-workspace {
  display: grid;
  gap: 18px;
}

.studio-topbar-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--studio-accent, #8b5cf6) 36%, transparent);
  border-radius: 12px;
  color: #f8f7ff;
  background: color-mix(in srgb, var(--studio-accent, #8b5cf6) 13%, rgba(18, 18, 38, 0.9));
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.studio-topbar-link b {
  padding: 3px 5px;
  border-radius: 6px;
  color: #fff;
  background: var(--studio-accent, #8b5cf6);
  font-size: 8px;
  letter-spacing: .08em;
}

.studio-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--studio-accent, #8b5cf6) 34%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(34, 29, 66, 0.98), rgba(14, 15, 34, 0.98));
}

.studio-hero h2 {
  margin: 12px 0 6px;
  font-size: clamp(24px, 3vw, 38px);
}

.studio-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #aaa6c3;
  font-size: 12px;
  font-weight: 750;
}

.studio-beta-badge {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--studio-accent, #8b5cf6) 48%, transparent);
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--studio-accent, #8b5cf6) 24%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--studio-accent, #8b5cf6) 22%, transparent);
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.studio-panel {
  padding: 24px;
}

.studio-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.studio-theme-card {
  min-height: 116px;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 18px;
  color: #f8f7ff;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.studio-theme-card:hover,
.studio-theme-card.is-active {
  transform: translateY(-3px);
  border-color: var(--studio-accent, #8b5cf6);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--studio-accent, #8b5cf6) 24%, transparent);
}

.studio-theme-card i {
  width: 100%;
  height: 40px;
  display: block;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--a), var(--b));
}

.studio-theme-card strong,
.studio-theme-card span {
  display: block;
}

.studio-theme-card span {
  margin-top: 4px;
  color: #aaa6c3;
  font-size: 11px;
}

.studio-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.studio-toggle-grid label {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 750;
}

.studio-toggle-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--studio-accent, #8b5cf6);
}

.studio-size-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 139, 250, 0.14);
}

.studio-size-grid label {
  display: grid;
  gap: 6px;
  color: #aaa6c3;
  font-size: 10px;
  font-weight: 800;
}

.studio-size-grid select {
  min-height: 38px;
}

.studio-setting-stack,
.studio-profile-row {
  display: grid;
  gap: 12px;
}

.studio-setting-stack label {
  display: grid;
  gap: 7px;
  color: #aaa6c3;
  font-size: 11px;
  font-weight: 800;
}

.studio-setting-stack select,
.studio-profile-row select {
  min-height: 46px;
}

.studio-profile-row {
  grid-template-columns: minmax(150px, 1fr) auto auto auto;
}

.studio-dnd-preview {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.studio-dnd-preview small {
  color: #c4b5fd;
}

body[data-studio-theme="neon-purple"] { --studio-accent:#8b5cf6; --studio-accent-dark:#5b21b6; --chart-accent:#8b5cf6; }
body[data-studio-theme="midnight-black"] { --studio-accent:#e5e7eb; --studio-accent-dark:#6b7280; --chart-accent:#f9fafb; }
body[data-studio-theme="emerald-green"] { --studio-accent:#10b981; --studio-accent-dark:#047857; --chart-accent:#10b981; }
body[data-studio-theme="ocean-blue"] { --studio-accent:#38bdf8; --studio-accent-dark:#1d4ed8; --chart-accent:#38bdf8; }
body[data-studio-theme="sunset-orange"] { --studio-accent:#fb923c; --studio-accent-dark:#c2410c; --chart-accent:#fb923c; }
body[data-studio-theme="arctic-white"] { --studio-accent:#6366f1; --studio-accent-dark:#4338ca; --chart-accent:#6366f1; color-scheme:light; }

body[data-studio-theme] .secondary-action,
body[data-studio-theme] .seller-primary-action,
body[data-studio-theme] .period-btn.is-active,
body[data-studio-theme] .product-filter-btn.is-active,
body[data-studio-theme] .side-nav-link.is-active,
body[data-studio-theme] .notification-unread-count {
  border-color: color-mix(in srgb, var(--studio-accent) 56%, transparent) !important;
  background: linear-gradient(135deg, var(--studio-accent), var(--studio-accent-dark)) !important;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--studio-accent) 28%, transparent) !important;
}

body[data-studio-theme] .metric-icon,
body[data-studio-theme] .panel-icon,
body[data-studio-theme] .eyebrow,
body[data-studio-theme] .seller-pill,
body[data-studio-theme] .product-detail-metric.is-accent strong {
  color: var(--studio-accent) !important;
}

body[data-studio-theme] .panel,
body[data-studio-theme] .metric {
  border-color: color-mix(in srgb, var(--studio-accent) 20%, #24243c) !important;
}

body[data-studio-theme] .product-chart-line,
body[data-studio-theme] .home-chart-line {
  stroke: var(--studio-accent) !important;
}

body[data-studio-theme] .product-line-chart .is-violet,
body[data-studio-theme] .product-chart-legend .is-violet,
body[data-studio-theme] .chart-bubble-dot.is-violet {
  color: var(--studio-accent) !important;
  stroke: var(--studio-accent) !important;
  background: var(--studio-accent) !important;
}

body[data-studio-theme="midnight-black"].is-authenticated {
  background: #050507 !important;
}

body[data-studio-theme="midnight-black"] .sidebar {
  background: linear-gradient(180deg, #09090b, #030303) !important;
}

body[data-studio-theme="arctic-white"].is-authenticated {
  color: #172033 !important;
  background: radial-gradient(circle at 80% 0, #e0e7ff, transparent 30%), #f3f6fc !important;
}

body[data-studio-theme="arctic-white"] .workspace,
body[data-studio-theme="arctic-white"] .tab-panel {
  color: #172033 !important;
}

body[data-studio-theme="arctic-white"] .panel,
body[data-studio-theme="arctic-white"] .metric,
body[data-studio-theme="arctic-white"] .topbar,
body[data-studio-theme="arctic-white"] .studio-theme-card,
body[data-studio-theme="arctic-white"] .studio-toggle-grid label {
  color: #172033 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: #dbe3f2 !important;
  box-shadow: 0 18px 50px rgba(50, 64, 100, 0.1) !important;
}

body[data-studio-theme="arctic-white"] .report-date,
body[data-studio-theme="arctic-white"] .studio-theme-card span,
body[data-studio-theme="arctic-white"] .studio-setting-stack label {
  color: #667085 !important;
}

body[data-studio-density="compact"] .workspace {
  padding-top: 14px !important;
}

body[data-studio-density="compact"] .topbar,
body[data-studio-density="compact"] .panel,
body[data-studio-density="compact"] .metric {
  padding: 14px !important;
}

body[data-studio-density="compact"] .stock-page-section:not([hidden]),
body[data-studio-density="compact"] .control-center-grid,
body[data-studio-density="compact"] .home-analytics-grid {
  gap: 10px !important;
}

.home-kpi-grid > .metric[data-studio-size="large"] {
  grid-column: span 2;
}

.seller-os-grid > .panel[data-studio-size="large"],
.home-analytics-grid > .panel[data-studio-size="large"] {
  grid-column: 1 / -1;
}

.seller-os-grid > .panel[data-studio-size="small"],
.home-analytics-grid > .panel[data-studio-size="small"] {
  min-height: 180px;
}

body[data-studio-motion="minimal"] *,
body[data-studio-motion="minimal"] *::before,
body[data-studio-motion="minimal"] *::after {
  animation-duration: 1ms !important;
  transition-duration: 1ms !important;
}

body[data-studio-motion="maximum"] .stock-page-section:not([hidden]) .panel,
body[data-studio-motion="maximum"] .stock-page-section:not([hidden]) .metric {
  animation: studio-card-in 520ms cubic-bezier(.2,.8,.2,1) both;
}

body[data-studio-motion="maximum"] .panel:hover,
body[data-studio-motion="maximum"] .metric:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 55px color-mix(in srgb, var(--studio-accent, #8b5cf6) 18%, transparent) !important;
}

@keyframes studio-card-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1050px) {
  .studio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .studio-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .studio-theme-grid { grid-template-columns: 1fr 1fr; }
  .studio-toggle-grid { grid-template-columns: 1fr; }
  .studio-size-grid { grid-template-columns: 1fr 1fr; }
  .studio-profile-row { grid-template-columns: 1fr; }
}

.supply-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 8, 22, 0.68);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.supply-modal-backdrop.is-open {
  opacity: 1;
}

.supply-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 91;
  width: min(1120px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  transform: translate(-50%, -48%) scale(0.98);
  opacity: 0;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 77, 255, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(15, 20, 38, 0.98), rgba(6, 10, 24, 0.98));
  color: #f8fafc;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 55px rgba(124, 77, 255, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.supply-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.supply-modal-head,
.supply-modal-footer,
.supply-preview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.supply-modal-head {
  margin-bottom: 20px;
}

.supply-modal-head h2 {
  margin: 4px 0 0;
  color: #fff;
}

.supply-modal-actions {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.supply-upload-box {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 22px;
  border: 1px dashed rgba(167, 139, 250, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #c4b5fd;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.supply-upload-box:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.9);
  background: rgba(124, 77, 255, 0.12);
}

.supply-preview {
  margin-top: 18px;
}

.manual-supply-form,
.manual-product-list,
.manual-expense-list {
  display: grid;
  gap: 14px;
}

.manual-supply-section {
  padding: 18px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.manual-supply-section-head,
.manual-product-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.manual-supply-section-head small {
  color: #a78bfa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-supply-section-head h3 {
  margin: 3px 0 0;
  color: #fff;
}

.manual-supply-section-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.manual-supply-grid,
.manual-product-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.manual-supply-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.manual-supply-form label > span {
  color: #aeb6ca;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-supply-form input,
.manual-supply-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  outline: none;
  background: rgba(5, 8, 22, 0.72);
  color: #f8fafc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.manual-supply-form input:focus,
.manual-supply-form select:focus {
  border-color: rgba(167, 139, 250, 0.8);
  background: rgba(124, 77, 255, 0.09);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}

.manual-wide {
  grid-column: span 2;
}

.manual-product-row {
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 17px;
  background: rgba(5, 8, 22, 0.42);
}

.manual-product-row-head strong {
  color: #fff;
}

.manual-product-cost {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.055);
}

.manual-product-cost > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manual-product-cost small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.manual-product-cost strong {
  color: #f8fafc;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.manual-remove {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(239, 68, 68, 0.26);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-weight: 850;
  cursor: pointer;
}

.manual-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.manual-expense-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr 0.7fr 0.7fr auto;
  gap: 10px;
  align-items: end;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 15px;
  background: rgba(5, 8, 22, 0.36);
}

.manual-empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  color: #94a3b8;
  text-align: center;
}

.manual-supply-result {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(124, 77, 255, 0.08));
}

.manual-supply-result > div {
  display: grid;
  gap: 4px;
}

.manual-supply-result small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.manual-supply-result strong {
  color: #fff;
  font-size: 16px;
}

.manual-allocation-note {
  margin: -3px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 12px;
  background: rgba(124, 77, 255, 0.055);
  color: #b7c0d4;
  font-size: 12px;
  font-weight: 750;
}

.supply-loading,
.supply-history-empty {
  padding: 22px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: #cbd5e1;
}

.supply-preview-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.supply-preview-summary > div,
.supply-history-row {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.supply-preview-summary small,
.supply-history-row span,
.supply-history-row small,
.supply-table small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.supply-preview-summary strong,
.supply-history-row strong {
  color: #fff;
}

.supply-preview-errors {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.supply-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(5, 8, 22, 0.52);
}

.supply-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.supply-table th,
.supply-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  vertical-align: middle;
  text-align: left;
}

.supply-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(13, 18, 35, 0.96);
  color: #a5b4fc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.supply-table tr:hover td {
  background: rgba(124, 77, 255, 0.08);
}

.supply-table tr.has-error td {
  background: rgba(239, 68, 68, 0.07);
}

.supply-status {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #c4b5fd;
  background: rgba(124, 77, 255, 0.14);
}

.supply-status.matched {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.supply-status.possible {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.supply-status.new {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}

.supply-thumb,
.supply-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.supply-thumb-placeholder {
  display: grid;
  place-items: center;
  background: rgba(124, 77, 255, 0.18);
  color: #c4b5fd;
  font-weight: 900;
}

.supply-modal-footer {
  margin-top: 18px;
  justify-content: flex-end;
}

.supply-history-list {
  display: grid;
  gap: 10px;
}

.supply-history-list.compact {
  margin-top: 16px;
}

.supply-history-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 90px 130px 130px minmax(150px, 1fr);
  gap: 12px;
  align-items: center;
}

.supply-history-row em {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(124, 77, 255, 0.14);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .supply-modal-actions,
  .supply-preview-summary,
  .supply-history-row,
  .manual-supply-grid,
  .manual-product-fields,
  .manual-expense-row,
  .manual-product-cost,
  .manual-supply-result {
    grid-template-columns: 1fr;
  }

  .manual-wide {
    grid-column: auto;
  }

  .manual-supply-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-authenticated .supply-import-strip {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final auth overrides after legacy and supply styles. */
.auth-card .auth-login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.auth-card .auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.auth-card .auth-remember input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: #8b5cf6;
}
.auth-card .auth-remember span {
  display: inline;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
}
.auth-card .auth-text-action {
  width: auto;
  min-height: auto;
  margin: 0;
  box-shadow: none;
}

/* Highest-priority landing motion layout. */
body:not(.is-authenticated) .stockpilot-hero-shell {
  grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.1fr) !important;
  gap: clamp(44px, 6vw, 100px) !important;
}
body:not(.is-authenticated) .stockpilot-hero {
  max-width: 680px !important;
  padding: clamp(24px, 3vw, 48px) !important;
  border: 1px solid rgba(167,139,250,.12) !important;
  border-radius: 34px !important;
  background: radial-gradient(circle at 0% 0%, rgba(124,77,255,.16), transparent 38%), linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)) !important;
}
body:not(.is-authenticated) .stockpilot-hero h1 {
  max-width: 620px !important;
  font-size: clamp(48px, 5vw, 72px) !important;
  line-height: .98 !important;
  letter-spacing: -.04em !important;
}
body:not(.is-authenticated) .stockpilot-demo-preview .stockpilot-mockup {
  transform: rotateY(-3deg) rotateX(1deg) !important;
  transition: transform 480ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease, box-shadow 480ms ease !important;
}
body:not(.is-authenticated) .stockpilot-demo-preview:hover .stockpilot-mockup,
body:not(.is-authenticated) .stockpilot-demo-preview:focus-visible .stockpilot-mockup {
  transform: translateY(-10px) rotateY(0) rotateX(0) scale(1.015) !important;
  border-color: rgba(196,181,253,.48) !important;
  box-shadow: 0 55px 140px rgba(0,0,0,.56), 0 0 110px rgba(124,77,255,.28) !important;
}
@media (max-width: 1120px) {
  body:not(.is-authenticated) .stockpilot-hero-shell { grid-template-columns: 1fr !important; }
  body:not(.is-authenticated) .stockpilot-hero { max-width: none !important; }
}
/* Account theme guard: intentionally last. */
body.is-authenticated[data-studio-theme] .sidebar-account-card {
  color:var(--text-main,var(--text-primary))!important;
  border-color:color-mix(in srgb,var(--border,var(--border-color)) 82%,transparent)!important;
  background:color-mix(in srgb,var(--bg-card) 78%,transparent)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
}
body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  color:var(--text-muted)!important;border-color:transparent!important;background:transparent!important;box-shadow:none!important;
}
body.is-authenticated[data-studio-theme] .account-center-nav nav button:is(:hover,.is-active) {
  color:var(--text-main,var(--text-primary))!important;border-color:var(--border,var(--border-color))!important;
  background:color-mix(in srgb,var(--accent,var(--accent-primary)) 11%,var(--bg-card))!important;box-shadow:none!important;
}
body.is-authenticated[data-studio-theme] .account-avatar-grid button,
body.is-authenticated[data-studio-theme] .account-avatar-grid button:is(:hover,.is-active) {
  color:var(--text-muted)!important;border:0!important;background:transparent!important;box-shadow:none!important;
}
body.is-authenticated[data-studio-theme] :is(.account-store-item,.security-action-list button) {
  color:var(--text-main,var(--text-primary))!important;border-color:var(--border,var(--border-color))!important;background:var(--bg-card)!important;box-shadow:none!important;
}
body.is-authenticated[data-studio-theme] .security-action-list .security-logout {
  color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 28%,var(--border,var(--border-color)))!important;
  background:color-mix(in srgb,var(--danger) 7%,var(--bg-card))!important;
}

/* Account theme v3: no forced purple and no generic white buttons. */
html body.is-authenticated .sidebar-account-card,
html body.is-authenticated[data-studio-theme] .sidebar-account-card {
  color:var(--text-primary)!important;
  border:1px solid var(--border-color)!important;
  background:var(--bg-card)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.22)!important;
}
html body.is-authenticated .sidebar-account-card:hover,
html body.is-authenticated[data-studio-theme] .sidebar-account-card:hover {
  border-color:color-mix(in srgb,var(--accent-primary) 45%,var(--border-color))!important;
  background:var(--bg-card-hover)!important;
  box-shadow:0 12px 32px rgba(0,0,0,.28)!important;
}
html body.is-authenticated .account-center {
  color:var(--text-primary)!important;
  border-color:var(--border-color)!important;
  background:var(--bg-primary)!important;
  box-shadow:0 40px 120px rgba(0,0,0,.62),0 0 0 1px color-mix(in srgb,var(--accent-primary) 8%,transparent)!important;
}
html body.is-authenticated .account-center-shell-head {
  border-color:var(--border-color)!important;
  background:linear-gradient(90deg,color-mix(in srgb,var(--accent-primary) 8%,transparent),transparent 40%),var(--bg-secondary)!important;
}
html body.is-authenticated .account-center-nav {
  border-color:var(--border-color)!important;
  background:var(--bg-secondary)!important;
}
html body.is-authenticated .account-center-content {
  background:radial-gradient(circle at 92% 0,color-mix(in srgb,var(--accent-primary) 8%,transparent),transparent 27%),var(--bg-primary)!important;
}
html body.is-authenticated .account-center-section .panel {
  color:var(--text-primary)!important;
  border-color:var(--border-color)!important;
  background:var(--bg-card)!important;
}
html body.is-authenticated .account-profile-hero {
  background:linear-gradient(145deg,color-mix(in srgb,var(--accent-primary) 10%,var(--bg-card)),var(--bg-card))!important;
}
html body.is-authenticated .account-center-user :is(strong,span),
html body.is-authenticated .account-center-head h2,
html body.is-authenticated .account-profile-hero h3,
html body.is-authenticated :is(.account-form-card,.avatar-picker-card) .panel-header h2 {
  color:var(--text-primary)!important;
}
html body.is-authenticated .account-center-user :is(small,span),
html body.is-authenticated .account-profile-hero p:not(.eyebrow),
html body.is-authenticated .account-form-card label,
html body.is-authenticated .account-picker-note {
  color:var(--text-muted)!important;
}
html body.is-authenticated .account-profile-identity .eyebrow {
  color:var(--accent-primary)!important;
}
html body.is-authenticated .account-avatar {
  color:var(--button-text)!important;
  border-color:color-mix(in srgb,var(--accent-primary) 42%,var(--border-color))!important;
  background:linear-gradient(145deg,var(--accent-primary),var(--accent-secondary))!important;
  box-shadow:0 10px 26px color-mix(in srgb,var(--accent-primary) 24%,transparent)!important;
}
html body.is-authenticated .account-center-close {
  color:var(--text-muted)!important;
  border-color:var(--border-color)!important;
  background:var(--bg-card)!important;
  box-shadow:none!important;
}
html body.is-authenticated .account-center-close:hover {
  color:var(--text-primary)!important;
  border-color:color-mix(in srgb,var(--accent-primary) 40%,var(--border-color))!important;
  background:var(--bg-card-hover)!important;
}
html body.is-authenticated .account-center-nav nav button,
html body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  color:var(--text-muted)!important;
  border:1px solid transparent!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
html body.is-authenticated .account-center-nav nav button:hover,
html body.is-authenticated .account-center-nav nav button.is-active,
html body.is-authenticated[data-studio-theme] .account-center-nav nav button:hover,
html body.is-authenticated[data-studio-theme] .account-center-nav nav button.is-active {
  color:var(--text-primary)!important;
  border-color:color-mix(in srgb,var(--accent-primary) 24%,var(--border-color))!important;
  background:color-mix(in srgb,var(--accent-primary) 10%,var(--bg-card))!important;
  box-shadow:none!important;
  filter:none!important;
}
html body.is-authenticated .account-center-nav nav button b {
  color:var(--accent-primary)!important;
  background:color-mix(in srgb,var(--accent-primary) 10%,transparent)!important;
}
html body.is-authenticated .account-plan {
  color:var(--accent-primary)!important;
  border-color:color-mix(in srgb,var(--accent-primary) 25%,var(--border-color))!important;
  background:color-mix(in srgb,var(--accent-primary) 10%,transparent)!important;
}
html body.is-authenticated .account-store-badge {
  color:var(--text-muted)!important;
  border-color:var(--border-color)!important;
  background:var(--bg-card-hover)!important;
}
html body.is-authenticated .account-form-card input {
  color:var(--input-text)!important;
  border-color:var(--input-border)!important;
  background:var(--input-bg)!important;
}
html body.is-authenticated .account-form-card input:focus {
  border-color:var(--accent-primary)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-primary) 12%,transparent)!important;
}
html body.is-authenticated .account-meta-row span {
  border-color:var(--border-color)!important;
  background:var(--bg-card-hover)!important;
}
html body.is-authenticated .account-meta-row small { color:var(--text-muted)!important; }
html body.is-authenticated .account-meta-row strong { color:var(--text-secondary)!important; }
html body.is-authenticated #accountSaveProfile {
  color:var(--button-text)!important;
  border-color:var(--accent-primary)!important;
  background:var(--button-bg)!important;
  box-shadow:none!important;
}
html body.is-authenticated #accountSaveProfile:hover {
  filter:brightness(1.08)!important;
  box-shadow:var(--accent-glow)!important;
}
html body.is-authenticated .account-avatar-grid button,
html body.is-authenticated[data-studio-theme] .account-avatar-grid button {
  color:var(--text-muted)!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
html body.is-authenticated .account-avatar-option {
  color:var(--accent-primary)!important;
  border-color:var(--border-color)!important;
  background:color-mix(in srgb,var(--accent-primary) 8%,var(--bg-card-hover))!important;
  box-shadow:none!important;
}
html body.is-authenticated .account-avatar-grid button:hover .account-avatar-option {
  color:var(--accent-primary)!important;
  border-color:color-mix(in srgb,var(--accent-primary) 48%,var(--border-color))!important;
  background:color-mix(in srgb,var(--accent-primary) 14%,var(--bg-card-hover))!important;
  box-shadow:0 8px 22px rgba(0,0,0,.25)!important;
}
html body.is-authenticated .account-avatar-grid button.is-active .account-avatar-option {
  color:var(--button-text)!important;
  border-color:var(--accent-primary)!important;
  outline-color:color-mix(in srgb,var(--accent-primary) 15%,transparent)!important;
  background:linear-gradient(145deg,var(--accent-primary),var(--accent-secondary))!important;
  box-shadow:0 8px 24px color-mix(in srgb,var(--accent-primary) 25%,transparent)!important;
}

/* Account panel v2: calm SaaS layout */
.account-center {
  width:min(900px,calc(100vw - 28px))!important;
  height:min(720px,calc(100vh - 28px))!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:64px 46px minmax(0,1fr)!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:20px!important;
  overflow:hidden!important;
  background:#090a11!important;
  box-shadow:0 40px 120px rgba(0,0,0,.72),0 0 0 1px rgba(139,92,246,.05)!important;
}
.account-center-shell-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  border-bottom:1px solid rgba(255,255,255,.07);
  background:linear-gradient(90deg,rgba(139,92,246,.08),transparent 38%),#0c0d15;
}
.account-center-user {
  display:flex!important;
  align-items:center;
  gap:10px!important;
  padding:0!important;
}
.account-center-user div {
  display:grid!important;
  grid-template-columns:auto auto;
  gap:1px 8px!important;
  align-items:center;
}
.account-center-user small {
  grid-column:1/-1;
  color:#797b8f!important;
  font-size:8px!important;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.account-center-user strong {
  color:#f5f3ff!important;
  font-size:12px!important;
}
.account-center-user span {
  color:#77798b!important;
  font-size:9px!important;
}
.account-center-close {
  width:32px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:10px!important;
  color:#9c9eae!important;
  background:rgba(255,255,255,.035)!important;
  box-shadow:none!important;
  font-size:17px!important;
}
.account-center-close:hover {
  color:#fff!important;
  border-color:rgba(139,92,246,.42)!important;
  background:rgba(139,92,246,.12)!important;
  transform:none!important;
}
.account-center-nav {
  display:block!important;
  padding:6px 14px!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.07)!important;
  background:#0a0b12!important;
  overflow-x:auto;
}
.account-center-nav nav {
  display:flex!important;
  width:max-content;
  gap:4px!important;
}
body.is-authenticated .account-center-nav nav button,
body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  min-height:32px!important;
  padding:0 12px!important;
  border:0!important;
  border-radius:9px!important;
  color:#77798b!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:9px!important;
  font-weight:800!important;
}
body.is-authenticated .account-center-nav nav button:hover,
body.is-authenticated .account-center-nav nav button.is-active,
body.is-authenticated[data-studio-theme] .account-center-nav nav button:hover,
body.is-authenticated[data-studio-theme] .account-center-nav nav button.is-active {
  color:#f5f3ff!important;
  border:0!important;
  background:rgba(139,92,246,.13)!important;
  box-shadow:none!important;
  transform:none!important;
}
.account-center-nav nav button b {
  margin-left:5px;
  padding:2px 4px!important;
  color:#bda8ff!important;
  background:rgba(139,92,246,.12)!important;
}
.account-center-content {
  padding:0 18px 20px!important;
  overflow-y:auto;
  background:radial-gradient(circle at 92% 0,rgba(124,58,237,.08),transparent 27%),#090a11!important;
}
.account-center-head {
  position:static!important;
  padding:16px 0 12px!important;
  background:transparent!important;
  backdrop-filter:none!important;
}
.account-center-head .eyebrow {
  color:#77798b!important;
  font-size:8px!important;
}
.account-center-head h2 {
  margin-top:3px!important;
  color:#f5f3ff!important;
  font-size:18px!important;
  letter-spacing:-.02em;
}
.account-center-section {
  gap:10px!important;
}
.account-center-section .panel {
  padding:14px!important;
  border:1px solid rgba(255,255,255,.075)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.025)!important;
  box-shadow:none!important;
}
.account-profile-layout {
  display:grid;
  grid-template-columns:minmax(220px,.72fr) minmax(340px,1.28fr);
  gap:10px;
}
.account-profile-hero {
  min-height:100%!important;
  display:flex!important;
  align-items:flex-start!important;
  flex-direction:column;
  justify-content:center;
  gap:12px!important;
  background:radial-gradient(circle at 20% 0,rgba(139,92,246,.17),transparent 44%),rgba(255,255,255,.025)!important;
}
.account-profile-identity .eyebrow {
  margin:0 0 5px!important;
  color:#9a7cf8!important;
  font-size:8px!important;
}
.account-profile-hero h3 {
  margin:0 0 3px!important;
  color:#fff!important;
  font-size:20px!important;
  letter-spacing:-.03em;
}
.account-profile-hero p:not(.eyebrow) {
  margin:0 0 10px!important;
  color:#77798b!important;
  font-size:9px!important;
}
.account-profile-badges {
  gap:5px!important;
}
.account-plan,.account-store-badge {
  min-height:20px!important;
  padding:0 7px!important;
  border-color:rgba(139,92,246,.18)!important;
  color:#aa91fa!important;
  background:rgba(139,92,246,.09)!important;
  font-size:7px!important;
}
.account-store-badge {
  color:#898b9c!important;
  border-color:rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.025)!important;
}
.account-form-card {
  gap:9px!important;
}
.account-form-card .panel-header h2,
.avatar-picker-card .panel-header h2 {
  color:#f5f3ff!important;
  font-size:13px!important;
}
.account-form-card label {
  gap:4px!important;
  color:#77798b!important;
  font-size:8px!important;
}
body.is-authenticated .account-form-card input {
  min-height:36px!important;
  padding:0 10px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:9px!important;
  color:#e9e7f1!important;
  background:#0c0d14!important;
  box-shadow:none!important;
  font-size:9px!important;
}
body.is-authenticated .account-form-card input:focus {
  border-color:rgba(139,92,246,.5)!important;
  box-shadow:0 0 0 3px rgba(139,92,246,.08)!important;
}
.account-meta-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.account-meta-row span {
  display:grid;
  gap:3px;
  padding:8px 9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  background:rgba(255,255,255,.018);
}
.account-meta-row small {
  color:#707284;
  font-size:7px;
  font-weight:800;
  text-transform:uppercase;
}
.account-meta-row strong {
  color:#d8d6e1;
  font-size:9px;
}
body.is-authenticated .account-form-card .secondary-action {
  width:fit-content!important;
  min-height:34px!important;
  padding:0 12px!important;
  border:1px solid rgba(139,92,246,.38)!important;
  border-radius:9px!important;
  color:#eee9ff!important;
  background:rgba(124,58,237,.22)!important;
  box-shadow:none!important;
  font-size:9px!important;
}
body.is-authenticated .account-form-card .secondary-action:hover {
  background:rgba(124,58,237,.32)!important;
  transform:none!important;
}
.avatar-picker-card .panel-header {
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  margin-bottom:12px!important;
}
.account-picker-note {
  color:#656777;
  font-size:8px;
}
.account-avatar-grid {
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  justify-content:stretch!important;
  gap:7px!important;
}
body.is-authenticated .account-avatar-grid button,
body.is-authenticated[data-studio-theme] .account-avatar-grid button,
body.is-authenticated .account-avatar-grid button:is(:hover,.is-active),
body.is-authenticated[data-studio-theme] .account-avatar-grid button:is(:hover,.is-active) {
  min-width:0!important;
  min-height:64px!important;
  display:grid!important;
  grid-template-rows:44px auto!important;
  justify-items:center!important;
  align-content:start!important;
  gap:5px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  color:#6f7181!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}
.account-avatar-option {
  width:44px!important;
  height:44px!important;
  border:1px solid rgba(255,255,255,.09)!important;
  color:#b9a8f8!important;
  background:linear-gradient(145deg,rgba(139,92,246,.18),rgba(255,255,255,.025))!important;
  box-shadow:none!important;
}
.account-avatar-option svg {
  width:20px!important;
  height:20px!important;
  stroke-width:1.65!important;
}
.account-avatar-grid button:hover .account-avatar-option {
  transform:translateY(-1px)!important;
  border-color:rgba(139,92,246,.45)!important;
  background:linear-gradient(145deg,rgba(139,92,246,.27),rgba(255,255,255,.035))!important;
  box-shadow:0 8px 22px rgba(0,0,0,.25)!important;
}
.account-avatar-grid button.is-active .account-avatar-option {
  border:1px solid #9b7df5!important;
  outline:3px solid rgba(139,92,246,.12)!important;
  outline-offset:2px!important;
  color:#fff!important;
  background:linear-gradient(145deg,#7c3aed,#4c1d95)!important;
  box-shadow:0 8px 22px rgba(91,33,182,.28)!important;
}
.account-avatar-grid button small {
  max-width:58px;
  overflow:hidden;
  color:currentColor!important;
  font-size:6px!important;
  font-weight:750!important;
  line-height:1.1;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.account-avatar {
  border:1px solid rgba(139,92,246,.26)!important;
  color:#e8e0ff!important;
  background:linear-gradient(145deg,rgba(124,58,237,.82),rgba(76,29,149,.9))!important;
  box-shadow:0 8px 22px rgba(76,29,149,.25)!important;
}
.account-avatar.is-xl {
  width:58px!important;
  height:58px!important;
  box-shadow:0 12px 30px rgba(76,29,149,.3)!important;
}
@media (max-width:900px) {
  .account-center {
    grid-template-rows:58px 44px minmax(0,1fr)!important;
  }
  .account-profile-layout {
    grid-template-columns:1fr;
  }
  .account-profile-hero {
    align-items:center!important;
    flex-direction:row;
    justify-content:flex-start;
  }
  .account-avatar-grid {
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
}
@media (max-width:560px) {
  .account-center-user span {
    display:none;
  }
  .account-center-content {
    padding:0 10px 14px!important;
  }
  .account-avatar-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .account-picker-note {
    display:none;
  }
}
/* Large account workspace and Apple-like sticker avatars. */
html body.is-authenticated .account-center {
  width:min(1240px,calc(100vw - 36px))!important;
  height:min(880px,calc(100vh - 30px))!important;
  grid-template-rows:76px 54px minmax(0,1fr)!important;
  border-radius:24px!important;
}
html body.is-authenticated .account-center-shell-head { padding:0 24px!important; }
html body.is-authenticated .account-center-nav { padding:8px 20px!important; }
html body.is-authenticated .account-center-nav nav { gap:6px!important; }
html body.is-authenticated .account-center-nav nav button,
html body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  min-height:36px!important;padding:0 15px!important;border-radius:10px!important;font-size:10px!important;
}
html body.is-authenticated .account-center-content { padding:0 24px 26px!important; }
html body.is-authenticated .account-center-head { padding:20px 0 15px!important; }
html body.is-authenticated .account-center-head h2 { font-size:22px!important; }
html body.is-authenticated .account-center-section { gap:14px!important; }
html body.is-authenticated .account-center-section .panel { padding:20px!important;border-radius:18px!important; }
html body.is-authenticated .account-profile-layout {
  grid-template-columns:minmax(280px,.7fr) minmax(520px,1.3fr)!important;gap:14px!important;
}
html body.is-authenticated .account-profile-hero { gap:18px!important; }
html body.is-authenticated .account-profile-hero h3 { font-size:25px!important; }
html body.is-authenticated .account-profile-hero p:not(.eyebrow) { font-size:11px!important; }
html body.is-authenticated .account-form-card { gap:12px!important; }
html body.is-authenticated .account-form-card .panel-header h2,
html body.is-authenticated .avatar-picker-card .panel-header h2 { font-size:16px!important; }
html body.is-authenticated .account-form-card label { font-size:9px!important; }
html body.is-authenticated .account-form-card input { min-height:42px!important;font-size:11px!important; }
html body.is-authenticated .account-meta-row span { padding:10px 11px!important; }
html body.is-authenticated #accountSaveProfile { min-height:38px!important;padding:0 15px!important;font-size:10px!important; }
html body.is-authenticated .avatar-picker-card .panel-header { margin-bottom:18px!important; }
html body.is-authenticated .account-avatar-grid {
  grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:18px 12px!important;
}
html body.is-authenticated .account-avatar-grid button,
html body.is-authenticated[data-studio-theme] .account-avatar-grid button {
  min-height:112px!important;grid-template-rows:82px auto!important;gap:9px!important;overflow:visible!important;
}
html body.is-authenticated .account-avatar-grid button small {
  max-width:110px!important;color:var(--text-secondary)!important;font-size:9px!important;font-weight:800!important;
}
html body.is-authenticated .account-avatar-option {
  width:78px!important;height:78px!important;overflow:visible!important;
  border:3px solid rgba(255,255,255,.82)!important;border-radius:27px!important;color:#fff!important;
  background:linear-gradient(145deg,var(--sticker-a,#8b5cf6),var(--sticker-b,#6d28d9))!important;
  box-shadow:0 9px 0 rgba(255,255,255,.1),0 18px 32px rgba(0,0,0,.28)!important;
  transform:rotate(var(--sticker-rotate,-2deg))!important;
}
html body.is-authenticated .account-avatar-grid button:nth-child(even) .account-avatar-option { --sticker-rotate:2deg; }
html body.is-authenticated .account-avatar-grid button:hover .account-avatar-option {
  transform:translateY(-4px) rotate(0) scale(1.04)!important;border-color:#fff!important;
  box-shadow:0 10px 0 rgba(255,255,255,.14),0 22px 38px rgba(0,0,0,.34)!important;
}
html body.is-authenticated .account-avatar-grid button.is-active .account-avatar-option {
  border-color:#fff!important;outline:3px solid var(--accent-primary)!important;outline-offset:4px!important;
  background:linear-gradient(145deg,var(--sticker-a,#8b5cf6),var(--sticker-b,#6d28d9))!important;
  box-shadow:0 10px 0 color-mix(in srgb,var(--accent-primary) 18%,transparent),0 22px 42px rgba(0,0,0,.32)!important;
}
html body.is-authenticated .account-sticker-emoji {
  display:block;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;
  font-size:43px;line-height:1;filter:drop-shadow(0 5px 5px rgba(0,0,0,.2));transform:translateY(-1px);
}
html body.is-authenticated .account-avatar {
  overflow:visible!important;border:2px solid rgba(255,255,255,.8)!important;border-radius:18px!important;color:#fff!important;
  background:linear-gradient(145deg,var(--sticker-a,#8b5cf6),var(--sticker-b,#6d28d9))!important;
  box-shadow:0 7px 0 rgba(255,255,255,.1),0 12px 28px rgba(0,0,0,.28)!important;transform:rotate(-3deg);
}
html body.is-authenticated .account-avatar .account-sticker-emoji { font-size:23px; }
html body.is-authenticated .account-avatar.is-large { width:50px!important;height:50px!important; }
html body.is-authenticated .account-avatar.is-large .account-sticker-emoji { font-size:29px; }
html body.is-authenticated .account-avatar.is-xl { width:82px!important;height:82px!important;border-radius:27px!important; }
html body.is-authenticated .account-avatar.is-xl .account-sticker-emoji { font-size:47px; }
:is([data-avatar="robot"],[data-account-avatar="robot"]) { --sticker-a:#74c0fc;--sticker-b:#4263eb; }
:is([data-avatar="rocket"],[data-account-avatar="rocket"]) { --sticker-a:#ff8787;--sticker-b:#f03e3e; }
:is([data-avatar="growth"],[data-account-avatar="growth"]) { --sticker-a:#69db7c;--sticker-b:#2f9e44; }
:is([data-avatar="analyst"],[data-account-avatar="analyst"]) { --sticker-a:#ffd43b;--sticker-b:#f08c00; }
:is([data-avatar="owl"],[data-account-avatar="owl"]) { --sticker-a:#b197fc;--sticker-b:#7048e8; }
:is([data-avatar="fox"],[data-account-avatar="fox"]) { --sticker-a:#ffa94d;--sticker-b:#e8590c; }
:is([data-avatar="wolf"],[data-account-avatar="wolf"]) { --sticker-a:#adb5bd;--sticker-b:#495057; }
:is([data-avatar="captain"],[data-account-avatar="captain"]) { --sticker-a:#4dabf7;--sticker-b:#1864ab; }
:is([data-avatar="data"],[data-account-avatar="data"]) { --sticker-a:#66d9e8;--sticker-b:#1098ad; }
:is([data-avatar="lightning"],[data-account-avatar="lightning"]) { --sticker-a:#ffe066;--sticker-b:#fab005; }
:is([data-avatar="astronaut"],[data-account-avatar="astronaut"]) { --sticker-a:#e599f7;--sticker-b:#9c36b5; }
:is([data-avatar="bear"],[data-account-avatar="bear"]) { --sticker-a:#d0bfff;--sticker-b:#7950f2; }
@media (max-width:1000px) {
  html body.is-authenticated .account-center { width:calc(100vw - 20px)!important;height:calc(100vh - 20px)!important; }
  html body.is-authenticated .account-profile-layout { grid-template-columns:1fr!important; }
  html body.is-authenticated .account-avatar-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
}
/* Account readable typography: keep the large workspace actually readable. */
html body.is-authenticated .account-center {
  font-size:14px!important;
}
html body.is-authenticated .account-center-shell-head {
  min-height:78px!important;
}
html body.is-authenticated .account-center-user {
  gap:14px!important;
}
html body.is-authenticated .account-center-user div {
  gap:4px 12px!important;
}
html body.is-authenticated .account-center-user small {
  font-size:11px!important;
  letter-spacing:.1em!important;
}
html body.is-authenticated .account-center-user strong {
  font-size:16px!important;
  line-height:1.2!important;
}
html body.is-authenticated .account-center-user span {
  font-size:12px!important;
  line-height:1.3!important;
}
html body.is-authenticated .account-center-close {
  width:40px!important;
  height:40px!important;
  min-height:40px!important;
  font-size:22px!important;
}
html body.is-authenticated .account-center-nav {
  padding-top:9px!important;
  padding-bottom:9px!important;
}
html body.is-authenticated .account-center-nav nav button,
html body.is-authenticated[data-studio-theme] .account-center-nav nav button {
  min-height:42px!important;
  padding:0 18px!important;
  font-size:13px!important;
  line-height:1!important;
}
html body.is-authenticated .account-center-nav nav button b {
  padding:3px 6px!important;
  font-size:9px!important;
}
html body.is-authenticated .account-center-head .eyebrow,
html body.is-authenticated .account-profile-identity .eyebrow,
html body.is-authenticated .avatar-picker-card .eyebrow,
html body.is-authenticated .account-form-card .eyebrow,
html body.is-authenticated .account-section-card .eyebrow {
  font-size:11px!important;
  line-height:1.3!important;
  letter-spacing:.1em!important;
}
html body.is-authenticated .account-center-head h2 {
  margin-top:6px!important;
  font-size:28px!important;
  line-height:1.15!important;
}
html body.is-authenticated .account-center-section .panel {
  padding:24px!important;
}
html body.is-authenticated .account-profile-hero h3 {
  margin-bottom:7px!important;
  font-size:30px!important;
  line-height:1.1!important;
}
html body.is-authenticated .account-profile-hero p:not(.eyebrow) {
  margin-bottom:15px!important;
  font-size:14px!important;
  line-height:1.4!important;
}
html body.is-authenticated .account-profile-badges {
  gap:8px!important;
}
html body.is-authenticated :is(.account-plan,.account-store-badge) {
  min-height:28px!important;
  padding:0 10px!important;
  font-size:11px!important;
}
html body.is-authenticated .account-form-card .panel-header h2,
html body.is-authenticated .avatar-picker-card .panel-header h2,
html body.is-authenticated .account-section-card .panel-header h2 {
  margin-top:5px!important;
  font-size:21px!important;
  line-height:1.2!important;
}
html body.is-authenticated .account-form-card {
  gap:15px!important;
}
html body.is-authenticated .account-form-card label {
  gap:7px!important;
  font-size:13px!important;
  line-height:1.2!important;
}
html body.is-authenticated .account-form-card input {
  min-height:52px!important;
  padding:0 14px!important;
  border-radius:12px!important;
  font-size:15px!important;
  font-weight:650!important;
}
html body.is-authenticated .account-meta-row {
  gap:10px!important;
}
html body.is-authenticated .account-meta-row span {
  gap:6px!important;
  padding:13px 14px!important;
  border-radius:12px!important;
}
html body.is-authenticated .account-meta-row small {
  font-size:10px!important;
  line-height:1.2!important;
}
html body.is-authenticated .account-meta-row strong {
  font-size:14px!important;
  line-height:1.25!important;
}
html body.is-authenticated #accountSaveProfile {
  min-height:46px!important;
  padding:0 18px!important;
  border-radius:11px!important;
  font-size:14px!important;
  font-weight:850!important;
}
html body.is-authenticated .account-picker-note {
  font-size:12px!important;
  line-height:1.3!important;
}
html body.is-authenticated .account-avatar-grid button small {
  max-width:140px!important;
  font-size:12px!important;
  line-height:1.25!important;
}
html body.is-authenticated .account-store-item,
html body.is-authenticated .security-action-list button {
  min-height:78px!important;
  padding:15px 17px!important;
}
html body.is-authenticated :is(.account-store-item,.security-action-list button) strong {
  font-size:15px!important;
}
html body.is-authenticated :is(.account-store-item,.security-action-list button) small {
  font-size:12px!important;
  line-height:1.35!important;
}
html body.is-authenticated .account-integration-summary span {
  font-size:12px!important;
}
html body.is-authenticated .account-integration-summary strong {
  font-size:14px!important;
}
@media (max-width:760px) {
  html body.is-authenticated .account-center-head h2 { font-size:24px!important; }
  html body.is-authenticated .account-center-nav nav button,
  html body.is-authenticated[data-studio-theme] .account-center-nav nav button { min-height:38px!important;padding:0 13px!important;font-size:12px!important; }
  html body.is-authenticated .account-center-section .panel { padding:17px!important; }
}

/* Closed account panel must never intercept clicks on the workspace. */
html body .account-center[hidden],
html body .account-center-backdrop[hidden] {
  display:none!important;
  pointer-events:none!important;
}
html body .account-center:not(.is-open),
html body .account-center-backdrop:not(.is-open) {
  pointer-events:none!important;
}
html body .account-center.is-open,
html body .account-center-backdrop.is-open {
  pointer-events:auto!important;
}
/* Closed supply import modal must never intercept clicks on dashboard cards. */
html body .supply-modal[hidden],
html body .supply-modal-backdrop[hidden] {
  display:none!important;
  pointer-events:none!important;
}
html body .supply-modal:not(.is-open),
html body .supply-modal-backdrop:not(.is-open) {
  pointer-events:none!important;
}
html body .supply-modal.is-open,
html body .supply-modal-backdrop.is-open {
  pointer-events:auto!important;
}
/* Fixed Seller OS interface. Custom themes, density and motion profiles are disabled. */
body.is-authenticated {
  color-scheme:dark;
  --bg-main:#070815;
  --bg-primary:#070815;
  --bg-panel:#0d0e20;
  --bg-secondary:#0d0e20;
  --bg-card:#15162c;
  --bg-card-hover:#1d1c3b;
  --text-main:#f7f5ff;
  --text-primary:#f7f5ff;
  --text-secondary:#c7c3d8;
  --text-muted:#918ca8;
  --text-soft:#6f6a82;
  --border:#2d2b4a;
  --border-color:#2d2b4a;
  --accent:#8b5cf6;
  --accent-primary:#8b5cf6;
  --accent-2:#6d28d9;
  --accent-secondary:#6d28d9;
  --accent-glow:0 16px 42px rgba(139,92,246,.28);
  --button-bg:#7c3aed;
  --button-text:#fff;
  --input-bg:#101124;
  --input-text:#f7f5ff;
  --input-border:#393654;
  --sidebar-bg:#080a18;
  --topbar-bg:#101126;
  --success:#22c55e;
  --warning:#f59e0b;
  --danger:#ef4444;
  --info:#60a5fa;
  --chart-1:#8b5cf6;
  --chart-2:#22c55e;
  --chart-3:#f59e0b;
  --chart-4:#60a5fa;
}
/* Dashboard hero: what is happening today */
.today-stream {
  position:relative;
  display:grid!important;
  gap:22px;
  min-width:0;
  padding:28px!important;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 0,rgba(139,92,246,.17),transparent 34%),
    radial-gradient(circle at 88% 110%,rgba(59,130,246,.12),transparent 32%),
    linear-gradient(145deg,rgba(18,18,44,.96),rgba(8,10,24,.96))!important;
  border:1px solid rgba(139,92,246,.26)!important;
  border-radius:24px!important;
  box-shadow:0 28px 80px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.045)!important;
}
.today-stream::before {
  position:absolute;
  inset:0;
  pointer-events:none;
  content:"";
  background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.025) 46%,transparent 70%);
}
.today-stream-head,
.today-stream-footer {
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.today-stream-head .eyebrow {
  margin:0 0 7px;
  color:#a78bfa!important;
  font-size:11px!important;
  font-weight:850;
  letter-spacing:.12em;
}
.today-stream-head h2 {
  margin:0 0 7px!important;
  color:#f8f7ff!important;
  font-size:clamp(25px,2.3vw,36px)!important;
  line-height:1.08;
  letter-spacing:-.04em;
}
.today-stream-head p:not(.eyebrow) {
  margin:0;
  color:rgba(235,232,249,.6)!important;
  font-size:14px!important;
}
.today-stream-nav {
  display:flex;
  gap:8px;
}
.today-stream-nav button {
  width:44px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.1)!important;
  border-radius:14px!important;
  color:#ded8f4!important;
  background:rgba(255,255,255,.045)!important;
  box-shadow:none!important;
  font-size:19px!important;
  transition:transform 180ms ease,border-color 180ms ease,background 180ms ease!important;
}
.today-stream-nav button:hover {
  transform:translateY(-2px)!important;
  border-color:rgba(139,92,246,.5)!important;
  background:rgba(139,92,246,.14)!important;
}
.today-stream-viewport {
  position:relative;
  z-index:1;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  cursor:grab;
  scrollbar-width:none;
  scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;
}
.today-stream-viewport:active { cursor:grabbing; }
.today-stream-viewport::-webkit-scrollbar { display:none; }
.today-stream-track {
  display:grid;
  grid-auto-columns:minmax(280px,calc((100% - 28px)/3));
  grid-auto-flow:column;
  gap:14px;
  width:100%;
  min-width:100%;
  padding:2px 2px 10px;
}
.today-event-card {
  --event-accent:#8b5cf6;
  --event-soft:rgba(139,92,246,.14);
  position:relative;
  min-height:250px;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:20px;
  overflow:hidden;
  scroll-snap-align:start;
  border:1px solid color-mix(in srgb,var(--event-accent) 30%,rgba(255,255,255,.08));
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0,var(--event-soft),transparent 45%),
    linear-gradient(150deg,rgba(255,255,255,.065),rgba(255,255,255,.025));
  box-shadow:0 18px 44px rgba(0,0,0,.22);
  animation:today-card-enter 480ms cubic-bezier(.2,.8,.2,1) both;
  transition:transform 220ms cubic-bezier(.2,.8,.2,1),border-color 220ms ease,box-shadow 220ms ease;
}
.today-event-card:nth-child(2) { animation-delay:60ms; }
.today-event-card:nth-child(3) { animation-delay:120ms; }
.today-event-card:nth-child(4) { animation-delay:180ms; }
.today-event-card:hover {
  transform:translateY(-4px) scale(1.02);
  border-color:color-mix(in srgb,var(--event-accent) 64%,rgba(255,255,255,.15));
  box-shadow:0 24px 58px rgba(0,0,0,.3),0 0 34px color-mix(in srgb,var(--event-accent) 14%,transparent);
}
.today-event-card.is-critical { --event-accent:#fb7185;--event-soft:rgba(244,63,94,.17); }
.today-event-card.is-attention { --event-accent:#f59e0b;--event-soft:rgba(245,158,11,.16); }
.today-event-card.is-opportunity { --event-accent:#34d399;--event-soft:rgba(16,185,129,.16); }
.today-event-card.is-finance { --event-accent:#60a5fa;--event-soft:rgba(59,130,246,.16); }
.today-event-card.is-warehouse { --event-accent:#22d3ee;--event-soft:rgba(34,211,238,.15); }
.today-event-card.is-ai { --event-accent:#a78bfa;--event-soft:rgba(139,92,246,.19); }
.today-event-card.is-info { --event-accent:#94a3b8;--event-soft:rgba(148,163,184,.12); }
.today-event-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.today-event-icon {
  min-width:40px;
  height:40px;
  display:grid;
  place-items:center;
  padding:0 8px;
  border:1px solid color-mix(in srgb,var(--event-accent) 38%,transparent);
  border-radius:13px;
  color:var(--event-accent);
  background:var(--event-soft);
  font-size:14px;
  font-weight:950;
}
.today-event-top em {
  color:var(--event-accent);
  font-size:10px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.today-event-copy {
  display:grid;
  gap:7px;
}
.today-event-copy h3 {
  margin:0!important;
  color:#f8f7ff!important;
  font-size:18px!important;
  line-height:1.2;
  letter-spacing:-.025em;
}
.today-event-copy p {
  display:-webkit-box;
  min-height:44px;
  margin:0!important;
  overflow:hidden;
  color:rgba(235,232,249,.62)!important;
  font-size:12px!important;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.today-event-card > strong {
  margin-top:auto;
  color:var(--event-accent)!important;
  font-size:clamp(20px,2vw,29px)!important;
  line-height:1;
  letter-spacing:-.035em;
}
.today-event-card > button {
  width:100%!important;
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 12px!important;
  border:1px solid color-mix(in srgb,var(--event-accent) 28%,rgba(255,255,255,.08))!important;
  border-radius:12px!important;
  color:#eeeafd!important;
  background:color-mix(in srgb,var(--event-accent) 10%,rgba(255,255,255,.025))!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:850!important;
}
.today-event-card > button:hover {
  border-color:color-mix(in srgb,var(--event-accent) 58%,rgba(255,255,255,.1))!important;
  background:color-mix(in srgb,var(--event-accent) 18%,rgba(255,255,255,.035))!important;
  box-shadow:none!important;
  transform:none!important;
}
.today-event-card > button span {
  color:var(--event-accent);
  font-size:16px;
}
.today-stream-footer {
  min-height:18px;
}
.today-stream-dots {
  display:flex;
  gap:6px;
  align-items:center;
}
.today-stream-dots button {
  width:7px!important;
  height:7px!important;
  min-height:7px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
  box-shadow:none!important;
  transition:width 220ms ease,background 220ms ease!important;
}
.today-stream-dots button.is-active {
  width:28px!important;
  background:#8b5cf6!important;
}
.today-stream-footer > span {
  color:rgba(235,232,249,.42);
  font-size:11px;
  font-weight:800;
}
@keyframes today-card-enter {
  from { opacity:0;transform:translateX(18px) translateY(7px); }
  to { opacity:1;transform:translateX(0) translateY(0); }
}
@media (max-width:1180px) {
  .today-stream-track { grid-auto-columns:minmax(290px,calc((100% - 14px)/2)); }
}
@media (max-width:720px) {
  .today-stream { gap:17px;padding:20px!important;border-radius:20px!important; }
  .today-stream-head { align-items:flex-start; }
  .today-stream-head p:not(.eyebrow) { font-size:12px!important; }
  .today-stream-nav button { width:38px!important;height:38px!important;min-height:38px!important; }
  .today-stream-track { grid-auto-columns:calc(100vw - 72px);gap:11px; }
  .today-event-card { min-height:232px;padding:17px;border-radius:18px; }
}

/* Responsive stability pass: final rules intentionally override legacy layout layers. */
body.is-authenticated .analytics-grid .expense-structure-card {
  min-height:0!important;
  height:auto!important;
}
body.is-authenticated .expense-structure.is-distribution .chart-distribution {
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  align-content:start!important;
}
html,
body {
  max-width:100%;
  overflow-x:hidden!important;
}
body.is-authenticated :is(.workspace,.tab-panel,.stock-page-section,.panel,.metric,.topbar,.topbar-actions,.panel-header,.product-catalog-card,.account-center-content) {
  min-width:0;
}
body.is-authenticated :is(img,svg,canvas,video) {
  max-width:100%;
}
body.is-authenticated :is(button,input,select,textarea) {
  touch-action:manipulation;
}
body.is-authenticated :is(.table-wrap,.warehouse-table,.report-table-wrap,.receipt-table-wrap,.product-warehouse-table) {
  max-width:100%;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

@media (max-width:1100px) and (min-width:721px) {
  body.is-authenticated .app-shell {
    grid-template-columns:86px minmax(0,1fr)!important;
  }
  body.is-authenticated .sidebar {
    width:86px!important;
    padding:14px 9px!important;
  }
  body.is-authenticated .brand-block {
    display:grid!important;
    justify-items:center;
    padding:4px 0 14px!important;
  }
  body.is-authenticated .brand-block :is(.eyebrow,h1,.brand-subtitle),
  body.is-authenticated .sidebar :is(.sidebar-help,.sidebar-copy,.sidebar-account-copy,.sidebar-account-chevron) {
    display:none!important;
  }
  body.is-authenticated .side-nav {
    gap:7px!important;
  }
  body.is-authenticated .side-nav-link {
    width:66px!important;
    min-height:54px!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    font-size:0!important;
  }
  body.is-authenticated .side-nav-link::before {
    margin:0!important;
  }
  body.is-authenticated .sidebar-account-card {
    width:56px!important;
    min-height:56px!important;
    justify-content:center!important;
    padding:5px!important;
    margin-inline:auto!important;
  }
  body.is-authenticated .workspace {
    padding:14px!important;
  }
  body.is-authenticated .topbar {
    grid-template-columns:minmax(150px,1fr) minmax(0,2fr)!important;
  }
  body.is-authenticated .topbar-actions {
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
  }
  body.is-authenticated .api-status-strip {
    display:none!important;
  }
  body.is-authenticated :is(.home-kpi-grid,.stock-summary,.finance-os-grid) {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.is-authenticated .account-center {
    width:calc(100vw - 32px)!important;
    height:calc(100vh - 32px)!important;
  }
}

/* Telegram profile integration */
html body.is-authenticated .telegram-profile-card {
  display:grid;
  gap:18px;
  padding:22px!important;
  border:1px solid rgba(80,181,255,.24)!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(43,164,232,.14),transparent 28%),
    linear-gradient(145deg,rgba(20,23,40,.96),rgba(12,14,25,.98))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.035),0 18px 48px rgba(0,0,0,.24)!important;
}
.telegram-profile-head,
.telegram-profile-title,
.telegram-profile-actions,
.telegram-delivery-row {
  display:flex;
  align-items:center;
}
.telegram-profile-head {
  justify-content:space-between;
  gap:18px;
}
.telegram-profile-title {
  gap:14px;
}
.telegram-profile-title h2 {
  margin:2px 0 4px!important;
  color:#f7f4ff!important;
  font-size:19px!important;
}
.telegram-profile-title p:last-child {
  margin:0;
  color:rgba(220,217,235,.62);
  font-size:11px;
}
.telegram-profile-icon {
  display:grid;
  flex:0 0 48px;
  width:48px;
  height:48px;
  place-items:center;
  border:1px solid rgba(114,205,255,.42);
  border-radius:15px;
  color:#fff;
  font-size:22px;
  font-weight:900;
  background:linear-gradient(145deg,#32b5ef,#168bd5);
  box-shadow:0 12px 30px rgba(32,164,224,.25),inset 0 1px rgba(255,255,255,.35);
  transform:rotate(-18deg);
}
.telegram-status-pill {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  color:rgba(223,219,238,.68);
  font-size:10px;
  font-weight:800;
  background:rgba(255,255,255,.04);
}
.telegram-status-pill::before {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#7c849c;
  content:"";
}
.telegram-status-pill.is-connected {
  color:#8ff1bd;
  border-color:rgba(55,213,132,.3);
  background:rgba(34,197,94,.09);
}
.telegram-status-pill.is-connected::before {
  background:#35dd83;
  box-shadow:0 0 12px rgba(53,221,131,.65);
}
.telegram-profile-actions {
  flex-wrap:wrap;
  gap:8px;
}
html body.is-authenticated .telegram-profile-actions button,
html body.is-authenticated #telegramSaveSettings {
  min-height:40px!important;
  padding:0 15px!important;
  border-radius:11px!important;
  font-size:10px!important;
}
html body.is-authenticated .telegram-profile-actions #telegramConnectBtn,
html body.is-authenticated #telegramSaveSettings {
  color:#fff!important;
  border-color:rgba(102,205,255,.38)!important;
  background:linear-gradient(135deg,#239ed8,#2378dd)!important;
  box-shadow:0 10px 28px rgba(35,139,221,.2)!important;
}
html body.is-authenticated .telegram-profile-actions .telegram-disconnect {
  color:#ff9bad!important;
  border-color:rgba(255,83,117,.25)!important;
}
.telegram-settings {
  display:grid;
  gap:14px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.075);
}
.telegram-settings-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.telegram-settings-grid label {
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-height:64px;
  padding:11px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  cursor:pointer;
}
.telegram-settings-grid input {
  width:16px!important;
  height:16px!important;
  margin:2px 0 0!important;
  accent-color:#229ed9;
}
.telegram-settings-grid span {
  display:grid;
  gap:3px;
}
.telegram-settings-grid strong,
.telegram-delivery-row > label > span {
  color:#f0edf9;
  font-size:10px;
  font-weight:800;
}
.telegram-settings-grid small {
  color:rgba(220,217,235,.48);
  font-size:9px;
  line-height:1.35;
}
.telegram-delivery-row {
  flex-wrap:wrap;
  gap:9px;
}
.telegram-delivery-row > label {
  display:grid;
  gap:6px;
}
html body.is-authenticated .telegram-delivery-row :is(input,select) {
  min-width:150px;
  min-height:40px!important;
  padding:0 11px!important;
  border:1px solid rgba(255,255,255,.1)!important;
  border-radius:10px!important;
  color:#f4f0ff!important;
  background:#0e1120!important;
}
.telegram-action-status {
  min-height:14px;
  margin:0;
  color:#7fcdf4;
  font-size:10px;
  font-weight:700;
}
.telegram-action-status.is-error {
  color:#ff879b;
}
@media (max-width:900px) {
  .telegram-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .telegram-profile-head { align-items:flex-start; }
  .telegram-status-pill { white-space:nowrap; }
  .telegram-settings-grid { grid-template-columns:1fr; }
  .telegram-delivery-row { display:grid;grid-template-columns:1fr; }
  .telegram-delivery-row > label,
  .telegram-delivery-row :is(input,select),
  #telegramSaveSettings { width:100%!important; }
}

@media (max-width:720px) {
  body.is-authenticated {
    padding-bottom:76px!important;
  }
  body.is-authenticated .app-shell {
    display:block!important;
    min-height:100dvh!important;
  }
  body.is-authenticated .sidebar {
    position:fixed!important;
    inset:auto 0 0 0!important;
    z-index:1000!important;
    width:100%!important;
    height:76px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
    border:1px solid rgba(255,255,255,.1)!important;
    border-width:1px 0 0!important;
    border-radius:18px 18px 0 0!important;
    background:rgba(7,8,21,.96)!important;
    backdrop-filter:blur(18px)!important;
    box-shadow:0 -14px 45px rgba(0,0,0,.42)!important;
  }
  body.is-authenticated .sidebar :is(.brand-block,.sidebar-help,.sidebar-copy,.sidebar>.primary-action,.shipment-list) {
    display:none!important;
  }
  body.is-authenticated .side-nav {
    min-width:0!important;
    flex:1 1 auto!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    margin:0!important;
    padding:0 2px!important;
    overflow-x:auto!important;
    scrollbar-width:none;
  }
  body.is-authenticated .side-nav::-webkit-scrollbar {
    display:none;
  }
  body.is-authenticated .side-nav-link {
    flex:0 0 58px!important;
    min-height:56px!important;
    display:grid!important;
    place-items:center!important;
    gap:2px!important;
    padding:4px!important;
    border-radius:14px!important;
    font-size:9px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }
  body.is-authenticated .side-nav-link::before {
    width:27px!important;
    height:27px!important;
    margin:0!important;
    font-size:13px!important;
  }
  body.is-authenticated .sidebar-account-card {
    flex:0 0 52px!important;
    width:52px!important;
    min-height:52px!important;
    display:grid!important;
    place-items:center!important;
    padding:4px!important;
    margin:0!important;
    border-radius:15px!important;
  }
  body.is-authenticated .sidebar-account-card :is(.sidebar-account-copy,.sidebar-account-chevron) {
    display:none!important;
  }
  body.is-authenticated .workspace {
    width:100%!important;
    padding:8px 8px 18px!important;
  }
  body.is-authenticated .topbar {
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    min-height:58px!important;
    padding:9px 10px!important;
    margin-bottom:8px!important;
    border-radius:15px!important;
  }
  body.is-authenticated .topbar-title .eyebrow {
    display:none!important;
  }
  body.is-authenticated .topbar-title h2 {
    overflow:hidden;
    font-size:16px!important;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body.is-authenticated .topbar-actions {
    width:auto!important;
    display:flex!important;
    gap:6px!important;
  }
  body.is-authenticated .topbar-actions :is(.api-status-strip,.profile-switcher,#stockUpdatedAt) {
    display:none!important;
  }
  body.is-authenticated .notification-bell {
    width:42px!important;
    height:42px!important;
    min-height:42px!important;
  }
  body.is-authenticated #syncWbStockBtn {
    width:auto!important;
    min-height:42px!important;
    padding:0 12px!important;
    font-size:0!important;
  }
  body.is-authenticated #syncWbStockBtn::after {
    content:"Обновить";
    font-size:11px;
  }
  body.is-authenticated :is(.panel,.stock-page-section,.today-stream) {
    border-radius:16px!important;
  }
  body.is-authenticated :is(.panel,.stock-page-section:not(.summary-grid):not(.seller-alert-strip):not(.today-stream)) {
    padding:14px!important;
  }
  body.is-authenticated .panel-header {
    align-items:flex-start!important;
    gap:10px!important;
  }
  body.is-authenticated .panel-header h2 {
    font-size:18px!important;
    line-height:1.2!important;
  }
  body.is-authenticated :is(.home-kpi-grid,.summary-grid,.stock-summary,.sales-summary,.finance-top-grid,.finance-os-grid,.seller-alert-strip) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.is-authenticated .metric {
    min-height:104px!important;
    padding:12px!important;
    border-radius:15px!important;
  }
  body.is-authenticated .metric-icon {
    width:34px!important;
    height:34px!important;
  }
  body.is-authenticated .metric strong {
    font-size:clamp(20px,7vw,28px)!important;
    line-height:1.05!important;
  }
  body.is-authenticated .metric :is(span:not(.metric-icon),small) {
    font-size:9px!important;
  }
  body.is-authenticated .seller-alert {
    min-height:62px!important;
    padding:10px!important;
  }
  body.is-authenticated .today-stream {
    padding:14px!important;
  }
  body.is-authenticated .today-stream-head h2 {
    font-size:22px!important;
  }
  body.is-authenticated .today-stream-nav {
    display:none!important;
  }
  body.is-authenticated .today-stream-track {
    grid-auto-columns:calc(100vw - 52px)!important;
  }
  body.is-authenticated .today-event-card {
    min-height:218px!important;
    padding:15px!important;
  }
  body.is-authenticated :is(.control-center-grid,.home-analytics-grid,.stock-dashboard-grid,.stock-warehouse-dashboard,.warehouse-overview-grid,.finance-operating-grid,.seller-ai-board,.product-detail-grid,.account-profile-layout) {
    grid-template-columns:1fr!important;
  }
  body.is-authenticated .product-catalog-card {
    grid-template-columns:1fr!important;
    padding:13px!important;
  }
  body.is-authenticated .product-card-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.is-authenticated .product-card-kpis div {
    min-height:56px!important;
    padding:9px!important;
  }
  body.is-authenticated :is(.stock-controls,.product-catalog-toolbar,.form-grid,.top-grid) {
    grid-template-columns:1fr!important;
  }
  body.is-authenticated :is(.stock-table,table) {
    min-width:760px!important;
  }
  body.is-authenticated :is(.stock-table th,.stock-table td,table th,table td) {
    padding:9px 10px!important;
    font-size:11px!important;
  }
  body.is-authenticated .warehouse-map-wrap {
    min-height:260px!important;
    aspect-ratio:4/3!important;
  }
  body.is-authenticated .notification-dropdown {
    position:fixed!important;
    inset:66px 8px auto 8px!important;
    width:auto!important;
    max-height:calc(100dvh - 155px)!important;
  }
  body.is-authenticated :is(.account-center,.supply-modal,.manual-supply-modal) {
    width:calc(100vw - 12px)!important;
    height:calc(100dvh - 20px)!important;
    max-height:calc(100dvh - 20px)!important;
    border-radius:18px!important;
  }
  body.is-authenticated .account-center {
    grid-template-rows:62px 50px minmax(0,1fr)!important;
  }
  body.is-authenticated .account-center-shell-head {
    min-height:62px!important;
    padding:0 12px!important;
  }
  body.is-authenticated .account-center-content {
    padding:0 10px 16px!important;
  }
  body.is-authenticated .account-avatar-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media (max-width:420px) {
  body.is-authenticated :is(.home-kpi-grid,.summary-grid,.stock-summary,.sales-summary,.finance-top-grid,.finance-os-grid) {
    grid-template-columns:1fr!important;
  }
  body.is-authenticated .seller-alert-strip {
    grid-template-columns:1fr 1fr!important;
  }
  body.is-authenticated #syncWbStockBtn {
    width:42px!important;
    padding:0!important;
  }
  body.is-authenticated #syncWbStockBtn::after {
    content:"↻";
    font-size:18px;
  }
}

@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* Global dark surface cleanup: remove remaining legacy light-theme fields. */
body.is-authenticated :is(
  .analytics-insight,
  .finance-source-strip,
  .final-insight-list p,
  .scenario-results div,
  .mapping-grid label,
  .report-layout label:not(.upload-box),
  .attention-item,
  .forecast-item,
  .report-registry-item,
  .warehouse-drawer-item,
  .recommendation-row,
  .control-insight-item,
  .home-distribution-row,
  .product-card-kpis div,
  .demand-card-stats div,
  .finance-flow-list > *
) {
  color:var(--text-secondary)!important;
  border-color:rgba(167,139,250,.16)!important;
  background:
    radial-gradient(circle at 100% 0,rgba(124,77,255,.09),transparent 38%),
    rgba(255,255,255,.038)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.is-authenticated .analytics-insight {
  color:#cfc5ff!important;
  border-color:rgba(139,92,246,.24)!important;
  background:rgba(139,92,246,.09)!important;
}
body.is-authenticated .finance-source-strip {
  color:#aeb9d8!important;
  border-color:rgba(96,165,250,.18)!important;
  background:rgba(96,165,250,.065)!important;
}
body.is-authenticated :is(.final-insight-list p,.scenario-results div) {
  color:var(--text-primary)!important;
  background:rgba(8,10,26,.72)!important;
}
body.is-authenticated .scenario-results span {
  color:var(--text-muted)!important;
}
body.is-authenticated .scenario-results strong {
  color:#f5f2ff!important;
}
body.is-authenticated :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea
) {
  color:#f4f1ff!important;
  border-color:rgba(167,139,250,.2)!important;
  background:#090a1b!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.is-authenticated :is(input,textarea)::placeholder {
  color:rgba(199,195,216,.46)!important;
}
body.is-authenticated :is(input,select,textarea):focus {
  border-color:rgba(139,92,246,.72)!important;
  box-shadow:0 0 0 3px rgba(139,92,246,.16)!important;
}
body.is-authenticated :is(input,select,textarea):disabled,
body.is-authenticated :is(input,select,textarea)[readonly] {
  color:rgba(244,241,255,.68)!important;
  background:rgba(8,10,26,.62)!important;
}
body.is-authenticated input:-webkit-autofill,
body.is-authenticated input:-webkit-autofill:hover,
body.is-authenticated input:-webkit-autofill:focus {
  -webkit-text-fill-color:#f4f1ff!important;
  box-shadow:0 0 0 1000px #090a1b inset!important;
  transition:background-color 9999s ease-out;
}
body.is-authenticated .status-pill {
  color:#cfc9e3!important;
  border:1px solid rgba(167,139,250,.18)!important;
  background:rgba(255,255,255,.055)!important;
}
body.is-authenticated .status-pill.is-high {
  color:#86efac!important;
  border-color:rgba(34,197,94,.25)!important;
  background:rgba(34,197,94,.12)!important;
}
body.is-authenticated .status-pill.is-medium {
  color:#fcd34d!important;
  border-color:rgba(245,158,11,.25)!important;
  background:rgba(245,158,11,.12)!important;
}
body.is-authenticated .status-pill.is-low {
  color:#fda4af!important;
  border-color:rgba(244,63,94,.25)!important;
  background:rgba(244,63,94,.12)!important;
}

/* Virtual manager morning briefing. */
body.is-authenticated .manager-briefing.today-stream {
  position:relative;
  display:block!important;
  min-height:0!important;
  padding:28px!important;
  overflow:hidden;
  border:1px solid rgba(139,92,246,.28)!important;
  border-radius:26px!important;
  background:
    radial-gradient(circle at 8% 0,rgba(124,77,255,.2),transparent 34%),
    radial-gradient(circle at 92% 100%,rgba(59,130,246,.1),transparent 32%),
    linear-gradient(145deg,rgba(20,19,48,.96),rgba(8,10,27,.98))!important;
  box-shadow:0 28px 80px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
body.is-authenticated .manager-briefing.today-stream::before {
  position:absolute;
  inset:0;
  pointer-events:none;
  content:"";
  background:linear-gradient(110deg,transparent 20%,rgba(167,139,250,.055) 50%,transparent 78%);
  transform:translateX(-100%);
  animation:manager-briefing-sheen 9s ease-in-out infinite;
}
.manager-briefing-content {
  position:relative;
  z-index:1;
  display:grid;
  gap:20px;
}
.manager-briefing-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.manager-identity {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.manager-orb {
  position:relative;
  flex:0 0 48px;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border:1px solid rgba(196,181,253,.42);
  border-radius:17px;
  color:#fff;
  background:linear-gradient(145deg,#9c6bff,#5b21b6);
  box-shadow:0 0 34px rgba(139,92,246,.4),inset 0 1px 0 rgba(255,255,255,.32);
}
.manager-orb b {
  font-size:13px;
  font-weight:950;
  letter-spacing:-.03em;
}
.manager-orb i {
  position:absolute;
  right:-2px;
  bottom:-2px;
  width:12px;
  height:12px;
  border:2px solid #13132c;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 12px rgba(34,197,94,.72);
}
.manager-identity p {
  margin:0 0 4px!important;
  color:rgba(211,203,235,.58)!important;
  font-size:10px!important;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.manager-identity p span {
  color:#8b5cf6;
}
.manager-identity h2 {
  margin:0!important;
  color:#faf8ff!important;
  font-size:clamp(23px,2.2vw,34px)!important;
  line-height:1.08;
  letter-spacing:-.035em;
}
.manager-identity h2 span {
  display:inline-block;
  animation:manager-wave 2.8s ease-in-out infinite;
  transform-origin:70% 80%;
}
.manager-status {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border:1px solid rgba(34,197,94,.18);
  border-radius:999px;
  color:#a7f3d0;
  background:rgba(34,197,94,.075);
  font-size:10px;
  font-weight:850;
}
.manager-status i {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 12px rgba(34,197,94,.7);
}
.manager-intro {
  max-width:920px;
  margin:0!important;
  color:rgba(235,232,249,.7)!important;
  font-size:14px!important;
  line-height:1.55;
  animation:manager-copy-in 420ms ease both;
}
.manager-briefing-grid {
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);
  gap:16px;
  align-items:stretch;
}
.manager-findings {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.manager-finding {
  --finding:#a78bfa;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:11px;
  align-items:start;
  min-height:154px;
  padding:14px;
  border:1px solid color-mix(in srgb,var(--finding) 20%,rgba(255,255,255,.07));
  border-radius:16px;
  background:color-mix(in srgb,var(--finding) 6%,rgba(255,255,255,.025));
  animation:manager-copy-in 440ms ease both;
  animation-delay:var(--delay,0ms);
}
.manager-finding.is-danger { --finding:#fb7185; }
.manager-finding.is-attention { --finding:#f59e0b; }
.manager-finding.is-success { --finding:#34d399; }
.manager-finding.is-warehouse { --finding:#22d3ee; }
.manager-finding.is-info { --finding:#94a3b8; }
.manager-finding > span {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--finding) 35%,transparent);
  border-radius:13px;
  color:var(--finding);
  background:color-mix(in srgb,var(--finding) 12%,transparent);
  font-size:13px;
  font-weight:950;
}
.manager-finding div {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
  min-height:100%;
}
.manager-finding em {
  margin-bottom:5px;
  color:var(--finding);
  font-size:8px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.manager-finding strong {
  display:block;
  color:#f5f2ff!important;
  font-size:13px;
  line-height:1.25;
}
.manager-finding p {
  margin:4px 0 0!important;
  color:rgba(229,225,242,.68)!important;
  font-size:10px!important;
  line-height:1.35;
}
.manager-finding small {
  display:block;
  margin:5px 0 10px;
  color:rgba(211,207,228,.46);
  font-size:9px;
  line-height:1.35;
}
.manager-finding button {
  width:auto!important;
  min-height:30px!important;
  margin-top:auto;
  padding:0 10px!important;
  border:1px solid color-mix(in srgb,var(--finding) 26%,rgba(255,255,255,.08))!important;
  border-radius:9px!important;
  color:#f4f0ff!important;
  background:color-mix(in srgb,var(--finding) 9%,rgba(255,255,255,.025))!important;
  box-shadow:none!important;
  font-size:9px!important;
  font-weight:850!important;
}
.manager-finding button b {
  margin-left:5px;
  color:var(--finding);
}
.manager-finding button:hover {
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--finding) 52%,transparent)!important;
}
.manager-recommendation {
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:18px;
  overflow:hidden;
  border:1px solid rgba(167,139,250,.24);
  border-radius:19px;
  background:
    radial-gradient(circle at 100% 0,rgba(139,92,246,.19),transparent 46%),
    rgba(255,255,255,.035);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
  animation:manager-copy-in 520ms ease 120ms both;
}
.manager-recommendation-label {
  display:flex;
  align-items:center;
  gap:7px;
  color:#bda8ff;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.manager-recommendation-label span {
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:9px;
  color:#fff;
  background:linear-gradient(145deg,#9c6bff,#7c3aed);
  box-shadow:0 0 22px rgba(139,92,246,.35);
}
.manager-recommendation h3 {
  margin:14px 0 7px!important;
  color:#fff!important;
  font-size:18px!important;
  line-height:1.2;
  letter-spacing:-.025em;
}
.manager-recommendation p {
  margin:0 0 10px!important;
  color:rgba(225,220,240,.62)!important;
  font-size:11px!important;
  line-height:1.5;
}
.manager-recommendation-effect {
  display:block;
  margin:0 0 18px;
  color:#82efb1!important;
  font-size:11px!important;
  line-height:1.45;
}
.manager-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:auto;
}
.manager-actions button {
  min-height:38px!important;
  padding:0 13px!important;
  border-radius:11px!important;
  font-size:10px!important;
  font-weight:850!important;
}
.manager-action-primary {
  color:#fff!important;
  border:1px solid rgba(196,181,253,.25)!important;
  background:linear-gradient(135deg,#7c3aed,#9c6bff)!important;
  box-shadow:0 10px 28px rgba(124,58,237,.24)!important;
}
.manager-action-secondary {
  color:#ded7f4!important;
  border:1px solid rgba(255,255,255,.1)!important;
  background:rgba(255,255,255,.045)!important;
  box-shadow:none!important;
}
.manager-action-secondary span {
  margin-left:6px;
  color:#a78bfa;
}
.manager-actions button:hover {
  transform:translateY(-1px)!important;
  border-color:rgba(196,181,253,.48)!important;
}
.manager-modal {
  position:fixed;
  z-index:1300;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  visibility:hidden;
  opacity:0;
  transition:opacity .18s ease,visibility .18s ease;
}
.manager-modal.is-open {
  visibility:visible;
  opacity:1;
}
.manager-modal-backdrop {
  position:absolute;
  inset:0;
  background:rgba(3,4,12,.78);
  backdrop-filter:blur(12px);
}
.manager-modal-dialog {
  position:relative;
  width:min(1320px,calc(100vw - 72px));
  max-height:min(840px,90vh);
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  overflow:hidden;
  border:1px solid rgba(139,92,246,.3);
  border-radius:22px;
  background:linear-gradient(145deg,#15152c,#090b18);
  box-shadow:0 34px 100px rgba(0,0,0,.62),inset 0 1px rgba(255,255,255,.06);
  transform:translateY(12px) scale(.985);
  transition:transform .2s ease;
}
.manager-modal.is-open .manager-modal-dialog {
  transform:translateY(0) scale(1);
}
.manager-modal-dialog header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:24px 28px 20px;
  border-bottom:1px solid rgba(255,255,255,.075);
}
.manager-modal-dialog header p {
  margin:0 0 4px!important;
  color:#9b83ed!important;
  font-size:9px!important;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.manager-modal-dialog header h2 {
  margin:0!important;
  color:#fff!important;
  font-size:26px!important;
}
.manager-modal-dialog header span {
  display:block;
  margin-top:7px;
  color:#aaa4bf;
  font-size:12px;
  line-height:1.45;
}
.manager-modal-dialog header button {
  width:36px!important;
  height:36px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.1)!important;
  border-radius:11px!important;
  color:#fff!important;
  background:rgba(255,255,255,.045)!important;
}
.manager-modal-list {
  display:grid;
  align-content:start;
  gap:10px;
  padding:12px 18px 18px;
  overflow:auto;
}
.manager-modal-table-head {
  display:grid;
  grid-template-columns:minmax(280px,1.2fr) minmax(170px,.7fr) minmax(320px,1.4fr) 230px;
  gap:18px;
  padding:14px 30px 10px;
  color:#928ca9;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.manager-modal-row {
  display:grid;
  grid-template-columns:minmax(280px,1.2fr) minmax(170px,.7fr) minmax(320px,1.4fr) 230px;
  align-items:center;
  gap:18px;
  min-height:92px;
  padding:16px 18px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:17px;
  background:rgba(255,255,255,.025);
}
.manager-modal-row.is-growth {
  border-color:rgba(52,211,153,.2);
}
.manager-modal-row.is-demand-drop {
  border-color:rgba(245,158,11,.22);
}
.manager-modal-row.is-negative-margin {
  border-color:rgba(251,113,133,.24);
}
.manager-modal-row.is-high-margin {
  border-color:rgba(96,165,250,.22);
}
.manager-modal-product {
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  align-items:center;
  gap:13px;
}
.manager-modal-photo,
.manager-modal-photo img {
  width:64px!important;
  height:64px!important;
  border-radius:15px!important;
  object-fit:cover;
}
.manager-modal-row strong {
  display:block;
  color:#f7f4ff;
  font-size:13px;
  line-height:1.35;
}
.manager-modal-product small {
  display:block;
  margin-top:6px;
  color:#89839d;
  font-size:10px;
}
.manager-modal-signal strong {
  color:#c8ffe0;
  font-size:12px;
}
.manager-modal-signal b {
  display:block;
  margin-top:7px;
  color:#63e69d;
  font-size:20px;
  line-height:1;
}
.manager-modal-row.is-demand-drop .manager-modal-signal strong,
.manager-modal-row.is-demand-drop .manager-modal-signal b {
  color:#fbbf24;
}
.manager-modal-row.is-negative-margin .manager-modal-signal strong,
.manager-modal-row.is-negative-margin .manager-modal-signal b {
  color:#fb7185;
}
.manager-modal-row.is-high-margin .manager-modal-signal strong,
.manager-modal-row.is-high-margin .manager-modal-signal b {
  color:#60a5fa;
}
.manager-modal-explanation {
  margin:0!important;
  color:#c5bddb!important;
  font-size:12px!important;
  line-height:1.55!important;
}
.manager-modal-row button {
  min-height:38px!important;
  padding:0 14px!important;
  border:1px solid rgba(167,139,250,.25)!important;
  border-radius:10px!important;
  color:#fff!important;
  background:rgba(124,58,237,.18)!important;
  font-size:10px!important;
  font-weight:850!important;
}
.manager-modal-row-actions {
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.manager-modal-row-actions button:last-child {
  border-color:rgba(52,211,153,.24)!important;
  background:rgba(16,185,129,.1)!important;
}
.manager-modal-empty {
  padding:32px;
  color:rgba(224,218,240,.62);
  text-align:center;
  font-size:11px;
}
@keyframes manager-copy-in {
  from { opacity:0;transform:translateY(8px); }
  to { opacity:1;transform:translateY(0); }
}
@keyframes manager-wave {
  0%,60%,100% { transform:rotate(0); }
  68% { transform:rotate(12deg); }
  76% { transform:rotate(-7deg); }
  84% { transform:rotate(8deg); }
}
@keyframes manager-briefing-sheen {
  0%,68% { transform:translateX(-100%); }
  82%,100% { transform:translateX(100%); }
}
@media (max-width:1050px) {
  .manager-briefing-grid {
    grid-template-columns:1fr;
  }
  .manager-modal-dialog {
    width:calc(100vw - 28px);
  }
  .manager-modal-table-head {
    display:none;
  }
  .manager-modal-row {
    grid-template-columns:minmax(220px,1fr) minmax(150px,.7fr);
  }
  .manager-modal-explanation,
  .manager-modal-row-actions {
    grid-column:1/-1;
  }
  .manager-modal-row-actions {
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:720px) {
  body.is-authenticated .manager-briefing.today-stream {
    padding:18px!important;
    border-radius:20px!important;
  }
  .manager-briefing-head {
    align-items:flex-start;
  }
  .manager-status {
    display:none;
  }
  .manager-orb {
    flex-basis:42px;
    width:42px;
    height:42px;
    border-radius:14px;
  }
  .manager-identity h2 {
    font-size:21px!important;
  }
  .manager-intro {
    font-size:12px!important;
  }
  .manager-findings {
    grid-template-columns:1fr;
  }
  .manager-finding {
    min-height:142px;
  }
  .manager-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  .manager-actions button {
    width:100%!important;
  }
  .manager-modal {
    padding:10px;
  }
  .manager-modal-row {
    grid-template-columns:1fr;
    gap:12px;
    padding:14px;
  }
  .manager-modal-product {
    grid-template-columns:56px minmax(0,1fr);
  }
  .manager-modal-photo,
  .manager-modal-photo img {
    width:56px!important;
    height:56px!important;
  }
  .manager-modal-signal,
  .manager-modal-explanation,
  .manager-modal-row-actions {
    grid-column:1/-1;
  }
  .manager-modal-row button {
    width:100%!important;
  }
}

@media (max-width:1050px) {
  .product-intelligence-grid {
    grid-template-columns:1fr;
  }
  .product-price-intelligence {
    grid-row:auto;
  }
}

@media (max-width:720px) {
  .product-skeleton-grid {
    grid-template-columns:1fr 1fr;
  }
  .product-detail-state {
    display:grid!important;
  }
  .product-factor-list {
    grid-template-columns:1fr;
  }
  .product-intelligence-summary,
  .product-price-intelligence,
  .product-promo-intelligence,
  .product-season-intelligence,
  .product-event-intelligence {
    padding:16px!important;
  }
  .product-price-chart svg {
    height:180px;
  }
  .product-promo-history > div,
  .product-season-groups > div {
    display:grid;
  }
}
