/* Main Soon portal only. Brand colors + typography; no layout or print changes. */
@font-face {
  font-family: SoonBrandText;
  src: url('./fonts/soon-brand/Vazirmatn-Variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@media screen {
  html.ux480.vp560.soon-brand {
    --brand-blue: #1800ff;
    --brand-violet: #8300ed;
    --brand-magenta: #e900e8;
    --brand-gradient: linear-gradient(135deg, #e900e8 0%, #8300ed 48%, #1800ff 100%);
    --brand-action: #2510e8;
    --brand-action-hover: #1d0bc5;
    --brand-link: #3723cf;
    --brand-tint: #eeeaff;
    --brand-tint-hover: #e4ddff;
    --brand-focus: #7954ed;
    --brand-page: #f5f6fa;
    --brand-card: #ffffff;
    --brand-soft: #f4f3fa;
    --brand-ink: #202139;
    --brand-muted: #64667e;
    --brand-line: #e2e3ed;
    --brand-scroll: #c5c5d9;
    --navy: var(--brand-action);
    --navy2: var(--brand-action-hover);
    --blue: var(--brand-link);
    --orange: var(--brand-violet);
    --primary: var(--brand-action);
    --bg: var(--brand-page);
    --card: var(--brand-card);
    --surface: var(--brand-card);
    --input: var(--brand-card);
    --text: var(--brand-ink);
    --muted: var(--brand-muted);
    --line: var(--brand-line);
    --border: var(--brand-line);
    --soft: var(--brand-soft);
    --surface-soft: var(--brand-soft);
    --surface-muted: var(--brand-soft);
    --vp-ink: var(--brand-ink);
    --vp-muted: var(--brand-muted);
    --vp-line: var(--brand-line);
    --vp-card: var(--brand-card);
    --vp-soft: var(--brand-page);
    --vp-accent: var(--brand-link);
    --vp-ring: var(--brand-focus);
  }
  html.ux480.vp560.soon-brand:is(.dark, [data-theme='dark']),
  html.ux480.vp560.soon-brand:has(body.dark),
  html.ux480.vp560.soon-brand:has(body[data-theme='dark']) {
    --brand-action: #6348f5;
    --brand-action-hover: #735afa;
    --brand-link: #b9aaff;
    --brand-tint: #302750;
    --brand-tint-hover: #3d3264;
    --brand-focus: #b39bff;
    --brand-page: #111222;
    --brand-card: #1b1c30;
    --brand-soft: #24253b;
    --brand-ink: #eeedf7;
    --brand-muted: #b1b0c7;
    --brand-line: #37384e;
    --brand-scroll: #55536f;
  }

  /* The demo's Persian typeface, with real variable weights. */
  html.ux480.soon-brand,
  html.ux480.soon-brand body,
  html.ux480.soon-brand body *,
  html.ux480.soon-brand body #root,
  html.ux480.soon-brand body #root * {
    font-family: SoonBrandText, Tahoma, sans-serif !important;
  }
  html.soon-brand :is(.sidebar-brand strong, .topbar-title strong, .content h1, .content h2, .content h3) {
    font-weight: 700;
  }

  /* Existing accordion and all its interactions remain in place. */
  html.ux480.vp560.soon-brand body .sidebar {
    background: var(--brand-card) !important;
    border-color: var(--brand-line) !important;
    color: var(--brand-ink) !important;
  }
  html.ux480.soon-brand body .sidebar :is(.sidebar-brand, .sidebar-footer) {
    background: var(--brand-card) !important;
    border-color: var(--brand-line) !important;
  }
  html.ux480.soon-brand body .sidebar :is(.sidebar-brand strong, .user-chip strong) {
    color: var(--brand-ink) !important;
  }
  html.ux480.soon-brand body .sidebar :is(.sidebar-brand span, .user-chip small, .ux-search-status, .ux-menu-empty) {
    color: var(--brand-muted) !important;
  }
  html.ux480.soon-brand body :is(.sidebar-brand, .login-brand, .app-loader) .brand-mark {
    background: var(--brand-gradient) !important;
    color: #fff !important;
  }
  html.ux480.soon-brand body .sidebar-brand .brand-mark span { color: #fff !important; }
  html.ux480.soon-brand body .sidebar-brand .v420-build {
    background: var(--brand-soft) !important;
    color: var(--brand-muted) !important;
    border-color: var(--brand-line) !important;
  }
  html.ux480.soon-brand body .sidebar .ux-menu-search {
    background: var(--brand-soft) !important;
    border-color: var(--brand-line) !important;
    color: var(--brand-muted) !important;
  }
  html.ux480.soon-brand body .sidebar .ux-menu-search input {
    background: transparent !important;
    color: var(--brand-ink) !important;
  }
  html.ux480.soon-brand body .sidebar .ux-menu-search input::placeholder { color: var(--brand-muted) !important; }
  html.ux480.soon-brand body .sidebar .ux-menu-search kbd { border-color: var(--brand-line); }
  html.ux480.soon-brand body .sidebar nav { scrollbar-color: var(--brand-scroll) transparent; }
  html.ux480.soon-brand body .sidebar .main-accordion-nav button:not(.ux-current) {
    color: var(--brand-muted) !important;
    background: transparent !important;
  }
  html.ux480.soon-brand body .sidebar .main-accordion-nav button:not(.ux-current):hover,
  html.ux480.soon-brand body .sidebar .main-accordion-nav .open > .ux-parent {
    color: var(--brand-ink) !important;
    background: var(--brand-soft) !important;
  }
  html.ux480.soon-brand body .sidebar .main-accordion-nav .ux-current-group > .ux-parent {
    color: var(--brand-link) !important;
  }
  html.ux480.soon-brand body .sidebar .main-accordion-nav :is(.menu374-sub, .v389-sub) { border-color: var(--brand-line) !important; }
  html.ux480.soon-brand body .sidebar .main-accordion-nav button.ux-current,
  html.ux480.soon-brand body .sidebar .main-accordion-nav button.ux-current:hover {
    background: var(--brand-tint) !important;
    color: var(--brand-link) !important;
  }
  html.ux480.soon-brand body .sidebar .main-accordion-nav .ux-current::before {
    border-color: var(--brand-violet) !important;
    background: var(--brand-violet) !important;
  }
  html.ux480.soon-brand body :is(.user-chip > div, .top-user > div, .logout-btn) {
    background: var(--brand-tint) !important;
    color: var(--brand-link) !important;
  }
  html.ux480.soon-brand body :is(.theme-btn, .menu-btn, .mobile-close) {
    background: var(--brand-card) !important;
    color: var(--brand-ink) !important;
    border-color: var(--brand-line) !important;
  }
  html.ux480.soon-brand body :is(.ux-skip, .system-backup-button) {
    background: var(--brand-tint) !important;
    color: var(--brand-link) !important;
    border-color: var(--brand-line) !important;
  }

  /* Buttons, forms, tables and focus colors across the main panel. */
  html.ux480.soon-brand :is(.btn-primary, .login-btn, button.primary) {
    background: var(--brand-action) !important;
    color: #fff !important;
    border-color: var(--brand-action) !important;
  }
  html.ux480.soon-brand :is(.btn-primary, .login-btn, button.primary):hover {
    background: var(--brand-action-hover) !important;
    border-color: var(--brand-action-hover) !important;
  }
  html.ux480.soon-brand :is(.btn-secondary, .btn-ghost):hover {
    border-color: var(--brand-focus) !important;
    background: var(--brand-soft) !important;
  }
  html.ux480.soon-brand :is(input[type='checkbox'], input[type='radio'], input[type='range'], progress) { accent-color: var(--brand-action); }
  html.ux480.vp560.soon-brand :is(a, button, input, select, textarea, summary):focus-visible { outline-color: var(--brand-focus) !important; }
  html.ux480.vp560.soon-brand :is(.content, dialog, .modal, .login-card) :is(input, select, textarea):focus {
    border-color: var(--brand-focus) !important;
    /* Same focus-shadow dimensions; only its tint changes. */
    box-shadow: 0 0 0 3px #7954ed16 !important;
  }
  html.ux480.soon-brand body .sidebar .ux-menu-search:focus-within {
    border-color: var(--brand-focus);
    box-shadow: 0 0 0 2px #7954ed25;
  }
  html.ux480.soon-brand .content a:not(.btn) { color: var(--brand-link); }
  html.ux480.soon-brand :is(.responsive-table, .table-wrap, .v410-table-wrap, .v400-table-wrap) { scrollbar-color: var(--brand-scroll) transparent; }
  html.ux480.soon-brand dialog::backdrop { background: #15112b80; }
  html.ux480.soon-brand .sidebar-overlay { background: #15112b88 !important; }

  /* Module-local variables otherwise mask the main theme. */
  html.soon-brand .home530 {
    --hd-ink: var(--brand-ink);
    --hd-muted: var(--brand-muted);
    --hd-line: var(--brand-line);
    --hd-bg: var(--brand-card);
    --hd-soft: var(--brand-soft);
  }
  html.soon-brand :is(.warehouse-setup-page, .category-settings-pages, .category-operation-page) {
    --ws-text: var(--brand-ink);
    --ws-muted: var(--brand-muted);
    --ws-border: var(--brand-line);
    --ws-surface: var(--brand-card);
    --ws-soft: var(--brand-soft);
    --ws-accent: var(--brand-action);
  }
  html.soon-brand .home530 button:hover { background: var(--brand-tint); border-color: var(--brand-focus); }
  html.soon-brand .home530 :is(.hd541-eyebrow, .hd541-text-button, .hd541-period button[aria-pressed='true'], .hd541-kpi footer button) { color: var(--brand-link); }
  html.soon-brand .hd541-eyebrow i { background: var(--brand-violet); }
  html.soon-brand .hd541-kpi:first-child header i { background: var(--brand-tint); color: var(--brand-link); }
  html.soon-brand .hd541-bars i { background: var(--brand-action); }
  html.soon-brand .hd541-bars > div:nth-child(2n) i { background: var(--brand-violet); }
  html.soon-brand .hd541-chart :is(path[stroke], circle[stroke]) { stroke: var(--brand-action); }
  html.soon-brand .hd541-chart circle { fill: var(--brand-card); }
  html.soon-brand .hd541-chart stop { stop-color: var(--brand-action); }
  html.soon-brand .hd541-loading span { border-color: var(--brand-line); border-top-color: var(--brand-action); }
  html.soon-brand :is(.seller-admin-settings, .survey-config) button:not(.primary) {
    background: var(--brand-card);
    color: var(--brand-ink);
    border-color: var(--brand-line);
  }
  html.soon-brand .seller-admin-settings :is(form, .card, details),
  html.soon-brand :is(.survey-config-row, .survey-config-actions, .club-wheel-prize) {
    background: var(--brand-card);
    border-color: var(--brand-line);
  }
  html.soon-brand :is(.survey-config summary, .club-prize-extra summary, .seller-admin-settings #store-count) { color: var(--brand-muted); }
  html.soon-brand .survey-config [data-preview-content] { background: var(--brand-soft); }
  html.soon-brand .seller-admin-settings [data-store]:hover,
  html.soon-brand .seller-admin-settings [data-store]:focus-within { background: var(--brand-tint); }
  html.soon-brand :is(.sc-branch-tabs, .sc-account-tabs) :is(button.active, button[aria-pressed='true']) {
    background: var(--brand-action);
    color: #fff;
    border-color: var(--brand-action);
  }
  html.soon-brand .system-backup-dialog [data-create] {
    background: var(--brand-action);
    border-color: var(--brand-action);
  }

  /* Login uses the same brand palette without moving any content. */
  html.ux480.soon-brand .login-shell {
    background: #17142f !important;
    color: #f5f3ff;
  }
  html.ux480.soon-brand .login-brand > span { color: #c2b3ff !important; }
  html.ux480.soon-brand .login-brand :is(h1, h2) { color: #fff; }
  html.ux480.soon-brand .login-brand p { color: #c3bdd8; }
  html.ux480.soon-brand .login-points div { background: #ffffff06; border-color: #ffffff19; }
  html.ux480.soon-brand .login-card { background: var(--brand-card); color: var(--brand-ink); }
  html.ux480.soon-brand .login-card-head > span { color: var(--brand-link); }
  html.ux480.soon-brand .login-card :is(input, select) { background: var(--brand-card); color: var(--brand-ink); border-color: var(--brand-line); }
  html.ux480.soon-brand .login-card :is(label span, small, .login-card-head p) { color: var(--brand-muted) !important; }
  html.ux480.soon-brand .app-loader { background: #17142f; }
  html.soon-brand.startup535 #startup535 { background: var(--brand-page); color: var(--brand-ink); }
  html.soon-brand #startup535 :is(button, a) { background: var(--brand-card); color: var(--brand-link); border-color: var(--brand-line); }
}
