/* SIGAR unified design system: shared by Management, Visitor and Customer apps. */
:root {
    --sigar-primary: #6b1f2e;
    --sigar-primary-hover: #581824;
    --sigar-primary-active: #48131d;
    --sigar-primary-soft: #f5e9ec;
    --sigar-charcoal: #2b2f3a;
    --sigar-navy: #202630;
    --sigar-gray: #687280;
    --sigar-light-gray: #e5e7eb;
    --sigar-warm-white: #f8fafc;
    --sigar-background: #f8fafc;
    --sigar-surface: #ffffff;
    --sigar-surface-secondary: #f3f4f6;
    --sigar-text: #2b2f3a;
    --sigar-text-muted: #687280;
    --sigar-border: #e5e7eb;
    --sigar-input: #ffffff;
    --sigar-sidebar: #202630;
    --sigar-sidebar-text: #f8fafc;
    --sigar-sidebar-muted: #c7cbd2;
    --sigar-success: #287a55;
    --sigar-success-soft: #e7f5ed;
    --sigar-warning: #a96216;
    --sigar-warning-soft: #fff3df;
    --sigar-danger: #b43d45;
    --sigar-danger-soft: #fdebec;
    --sigar-info: #426f92;
    --sigar-info-soft: #eaf2f8;
    --sigar-shadow-sm: 0 3px 12px rgb(32 38 48 / .06);
    --sigar-shadow-md: 0 12px 32px rgb(32 38 48 / .10);
    --sigar-radius-sm: 9px;
    --sigar-radius-md: 14px;
    --sigar-radius-lg: 20px;
    color-scheme: light;
}

:root[data-theme='dark'] {
    --sigar-primary: #a64c60;
    --sigar-primary-hover: #bc6073;
    --sigar-primary-active: #8f3e51;
    --sigar-primary-soft: #492833;
    --sigar-background: #071a28;
    --sigar-surface: #0d2333;
    --sigar-surface-secondary: #112b3d;
    --sigar-text: #f8fafc;
    --sigar-text-muted: #c5cad2;
    --sigar-border: rgb(146 165 181 / .24);
    --sigar-input: #10283a;
    --sigar-sidebar: #081c2a;
    --sigar-sidebar-text: #f8fafc;
    --sigar-sidebar-muted: #c5cad2;
    --sigar-success: #69bd8f;
    --sigar-success-soft: #29483a;
    --sigar-warning: #e2a756;
    --sigar-warning-soft: #4d3d28;
    --sigar-danger: #e47d85;
    --sigar-danger-soft: #512f35;
    --sigar-info: #7fa9c9;
    --sigar-info-soft: #2c4354;
    --sigar-shadow-sm: 0 3px 12px rgb(0 0 0 / .16);
    --sigar-shadow-md: 0 12px 32px rgb(0 0 0 / .24);
    color-scheme: dark;
}

html, body, button, input, select, textarea {
    font-family: Vazirmatn, Tahoma, sans-serif !important;
}

body,
.staff-shell,
.customer-page,
.shop-page {
    color: var(--sigar-text) !important;
    background: var(--sigar-background) !important;
    transition: color .2s ease, background-color .2s ease;
}

h1, h2, h3, h4, h5, h6,
.admin-shell h1, .admin-shell h2, .admin-shell h3,
.visitor-shell h1, .visitor-shell h2, .visitor-shell h3 {
    color: var(--sigar-text) !important;
}

.muted, small, .page-heading, .dashboard-brief-row span {
    color: var(--sigar-text-muted) !important;
}

.staff-shell.authenticated main > .page-heading,
:is(.orders-list-head, .catalog-hero, .catalog-form-head, .customer-list-head, .customer-profile-header, .price-board-header, .overview, .settings-hero) > div > :is(small, p) {
    display: none !important;
}

a { color: var(--sigar-primary); }
a:hover { color: var(--sigar-primary-hover); }

.panel,
.admin-shell .panel,
.visitor-shell .panel,
.visitor-action,
.visitor-customer-card,
.visitor-order-card,
.visitor-product-card,
.visitor-catalog-brand,
.visitor-stats > div,
.dashboard-metric,
.dashboard-panel,
.dashboard-shortcuts,
.dashboard-shortcut-grid a,
.catalog-table-panel,
.catalog-brand-group,
.orders-list-panel,
.orders-list-filter,
.customer-list-shell,
.customer-profile-card,
.customer-access-card,
.settings-card,
.settings-section,
.settings-app-access,
.shop-header,
.brand-group,
.shop-product,
.shop-checkout,
.shop-total,
.cart-summary,
.invoice-sheet {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.panel .panel,
.admin-shell .panel .panel,
.visitor-shell .panel .panel,
.catalog-brand-group > summary,
.visitor-product-group summary,
.visitor-catalog-brand summary,
.table-wrap,
.shop-product:nth-child(even),
.brand-products {
    background: var(--sigar-surface-secondary) !important;
    border-color: var(--sigar-border) !important;
}

button,
.button,
.admin-shell button,
.admin-shell .button,
.visitor-shell button,
.visitor-shell .button,
.customer-page button,
.customer-page .button,
.shop-submit,
#customer-install-button,
.dashboard-primary-action {
    color: #fff !important;
    background: var(--sigar-primary) !important;
    border-color: var(--sigar-primary) !important;
    border-radius: var(--sigar-radius-sm) !important;
    box-shadow: 0 5px 16px rgb(107 31 46 / .18) !important;
}

button:hover,
.button:hover,
.admin-shell button:hover,
.admin-shell .button:hover,
.visitor-shell button:hover,
.visitor-shell .button:hover,
.customer-page button:hover,
.customer-page .button:hover,
.shop-submit:hover,
#customer-install-button:hover,
.dashboard-primary-action:hover {
    color: #fff !important;
    background: var(--sigar-primary-hover) !important;
    border-color: var(--sigar-primary-hover) !important;
}

.button-secondary,
.dashboard-secondary-action,
.orders-list-actions .button,
.orders-list-actions .orders-sold-dropdown > summary,
.visitor-order-actions button {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: none !important;
}

input:not([type='checkbox']):not([type='radio']),
textarea,
select,
.admin-shell :is(input:not([type=checkbox]):not([type=radio]), textarea, select),
.visitor-shell :is(input:not([type=checkbox]):not([type=radio]), textarea, select) {
    color: var(--sigar-text) !important;
    background: var(--sigar-input) !important;
    border-color: var(--sigar-border) !important;
    border-radius: var(--sigar-radius-sm) !important;
}

input::placeholder, textarea::placeholder { color: var(--sigar-text-muted) !important; opacity: .8; }
input:focus, textarea:focus, select:focus {
    border-color: var(--sigar-primary) !important;
    outline: 3px solid rgb(107 31 46 / .16) !important;
    box-shadow: none !important;
}
input[type='checkbox'], input[type='radio'] { accent-color: var(--sigar-primary) !important; }

.table-wrap { background: var(--sigar-surface) !important; border-color: var(--sigar-border) !important; }
table { color: var(--sigar-text) !important; }
table th,
.admin-shell table th {
    color: var(--sigar-text-muted) !important;
    background: var(--sigar-surface-secondary) !important;
    border-color: var(--sigar-border) !important;
}
table td, .admin-shell table td { border-color: var(--sigar-border) !important; }
table tbody tr:hover, .admin-shell table tbody tr:hover { background: var(--sigar-primary-soft) !important; }

.alert {
    color: var(--sigar-danger) !important;
    background: var(--sigar-danger-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-danger) 35%, transparent) !important;
}
.alert.success, .success {
    color: var(--sigar-success) !important;
    background: var(--sigar-success-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-success) 35%, transparent) !important;
}

.orders-status,
.visitor-badge,
.badge,
[class*='status-'] {
    border-color: transparent !important;
}
.orders-status-submitted { color: var(--sigar-warning) !important; background: var(--sigar-warning-soft) !important; }
.orders-status-finalized, .visitor-badge:not(.inactive) { color: var(--sigar-success) !important; background: var(--sigar-success-soft) !important; }
.orders-status-cancelled, .visitor-badge.inactive { color: var(--sigar-danger) !important; background: var(--sigar-danger-soft) !important; }

.pagination, nav[aria-label='Pagination Navigation'] { color: var(--sigar-text); }
nav[aria-label='Pagination Navigation'] a,
nav[aria-label='Pagination Navigation'] span {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

.sigar-theme-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 7px 11px !important;
    color: var(--sigar-sidebar-text) !important;
    background: rgb(255 255 255 / .08) !important;
    border: 1px solid rgb(255 255 255 / .20) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: .78rem;
    white-space: nowrap;
}
.sigar-theme-toggle:hover { background: rgb(255 255 255 / .15) !important; }
.sigar-theme-toggle [data-theme-icon] { font-size: 1.05rem; line-height: 1; }
.customer-page > .sigar-theme-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    z-index: 80;
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

dialog, .modal, [role='dialog'] {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-md) !important;
}
dialog::backdrop { background: rgb(32 38 48 / .55); }

.empty-state, [class*='empty'], .loading, .skeleton {
    color: var(--sigar-text-muted) !important;
    border-color: var(--sigar-border) !important;
}
.skeleton { background: linear-gradient(90deg, var(--sigar-surface-secondary), var(--sigar-border), var(--sigar-surface-secondary)); }

.admin-shell,
.visitor-shell,
.customer-page {
    --ink: var(--sigar-text);
    --muted: var(--sigar-text-muted);
    --line: var(--sigar-border);
    --bg: var(--sigar-background);
    --card: var(--sigar-surface);
    --accent: var(--sigar-primary);
    --accent-dark: var(--sigar-primary-hover);
    --accent-soft: var(--sigar-primary-soft);
    --sidebar: var(--sigar-sidebar);
    --gold: var(--sigar-primary);
}

.admin-shell .topbar,
.visitor-shell .topbar,
.customer-header {
    color: var(--sigar-sidebar-text) !important;
    background: var(--sigar-sidebar) !important;
}

.admin-shell .brand::before,
.admin-shell .topbar nav > a[aria-current='page'],
.admin-shell .topbar .nav-group > summary[aria-current='page'],
.visitor-shell .topbar nav a[aria-current='page'] {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.admin-shell .topbar .nav-submenu a[aria-current='page'] {
    color: #fff !important;
    background: rgb(255 255 255 / .12) !important;
    border-color: var(--sigar-primary) !important;
}

.catalog-form-head,
.overview,
.orders-list-head,
.catalog-hero,
.customer-list-head,
.customer-profile-header,
.visitor-shell .overview,
.visitor-shell .visitor-action,
.visitor-shell .visitor-order-step[aria-current='step'],
.price-board-header {
    color: var(--sigar-sidebar-text) !important;
    background: var(--sigar-sidebar) !important;
    border-color: rgb(255 255 255 / .10) !important;
}

.catalog-form-head h1,
.overview h1,
.orders-list-head h1,
.catalog-hero h1,
.customer-list-head h1,
.customer-profile-header h1,
.price-board-header h1 {
    color: var(--sigar-sidebar-text) !important;
}

.catalog-form-head small,
.overview small,
.orders-list-head small,
.catalog-hero small,
.customer-list-head small,
.customer-profile-header small,
.price-board-header small,
.price-board-header p {
    color: var(--sigar-sidebar-muted) !important;
}

.customer-install-banner,
.orders-sold-popup-list > span,
.catalog-brand-group > summary:hover,
.catalog-brand-group[open] > summary,
.catalog-default-percent {
    color: var(--sigar-text) !important;
    background: var(--sigar-primary-soft) !important;
    border-color: var(--sigar-border) !important;
}

.orders-sold-dropdown > div,
.persian-date-popover {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

.price-board-group-title,
.dashboard-region-bar i,
.dashboard-sales-day > span {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

:is(.admin-shell, .visitor-shell, .customer-page) :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--sigar-primary) 35%, transparent) !important;
    outline-offset: 2px;
}

/* Reference-aligned visual layer. Structure and behavior remain unchanged. */
:root {
    --sigar-shell-bg: #eef3f7;
    --sigar-sidebar-bg: #6b1f2e;
    --sigar-sidebar-ink: #f8fafc;
    --sigar-sidebar-muted-ink: #f0d8de;
    --sigar-card-highlight: #fbfcfd;
    --sigar-row-hover: #f7eaed;
    --sigar-field-placeholder: #98a1ad;
    --sigar-soft-shadow: 0 8px 24px rgb(38 53 68 / .07);
}

:root[data-theme='dark'] {
    --sigar-shell-bg: #071a28;
    --sigar-sidebar-bg: #511724;
    --sigar-sidebar-ink: #f8fafc;
    --sigar-sidebar-muted-ink: #e9cbd2;
    --sigar-card-highlight: #102a3c;
    --sigar-row-hover: #2d2633;
    --sigar-field-placeholder: #8fa0ae;
    --sigar-soft-shadow: 0 12px 30px rgb(0 0 0 / .20);
}

html,
body,
.staff-shell,
.customer-page,
.shop-page,
.staff-shell > main,
.customer-page > main {
    color: var(--sigar-text) !important;
    background: var(--sigar-shell-bg) !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.admin-shell .topbar .nav-user {
    display: none !important;
}

.staff-shell > main {
    background-image: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--sigar-primary) 5%, transparent), transparent 28%) !important;
}

.admin-shell .topbar,
.visitor-shell .topbar {
    color: var(--sigar-sidebar-ink) !important;
    background: var(--sigar-sidebar-bg) !important;
    border-color: rgb(255 255 255 / .13) !important;
    box-shadow: 8px 0 28px rgb(43 15 22 / .18) !important;
}

.admin-shell .brand,
.visitor-shell .brand,
.admin-shell .topbar nav :is(a, summary),
.visitor-shell .topbar nav :is(a, summary),
.admin-shell .topbar .nav-user,
.visitor-shell .topbar .nav-user,
.admin-shell .topbar .nav-caption,
.visitor-shell .topbar .nav-caption {
    color: var(--sigar-sidebar-ink) !important;
}

.admin-shell .brand span,
.visitor-shell .brand span,
.admin-shell .topbar .nav-caption,
.visitor-shell .topbar .nav-caption {
    color: var(--sigar-sidebar-muted-ink) !important;
}

.admin-shell .brand,
.visitor-shell .brand,
.admin-shell .topbar .nav-app-access,
.visitor-shell .topbar .nav-app-access {
    border-color: rgb(255 255 255 / .15) !important;
}

.admin-shell .topbar nav :is(a, summary):hover,
.visitor-shell .topbar nav :is(a, summary):hover {
    color: #fff !important;
    background: rgb(255 255 255 / .11) !important;
}

.admin-shell .topbar nav > a[aria-current='page'],
.admin-shell .topbar .nav-group > summary[aria-current='page'],
.visitor-shell .topbar nav a[aria-current='page'] {
    color: #fff !important;
    background: rgb(255 255 255 / .17) !important;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 8px 18px rgb(43 15 22 / .16) !important;
}

.admin-shell .topbar .nav-group[open] > summary:not([aria-current='page']) {
    color: #fff !important;
    background: rgb(255 255 255 / .10) !important;
}

.admin-shell .topbar .nav-submenu {
    border-color: rgb(255 255 255 / .18) !important;
}

.admin-shell .topbar .nav-submenu a,
.visitor-shell .topbar .nav-submenu a {
    color: var(--sigar-sidebar-muted-ink) !important;
}

.admin-shell .topbar .nav-submenu a[aria-current='page'] {
    color: #fff !important;
    background: rgb(255 255 255 / .16) !important;
    border-color: rgb(255 255 255 / .24) !important;
}

.sigar-theme-toggle,
.admin-shell .topbar form button,
.visitor-shell .topbar form button {
    color: var(--sigar-sidebar-ink) !important;
    background: var(--sigar-surface-secondary) !important;
    border-color: var(--sigar-border) !important;
}

.admin-dashboard,
.catalog-page,
.price-board-page,
.customer-list-shell,
.orders-list-panel {
    color: var(--sigar-text) !important;
}

.dashboard-welcome,
.orders-list-head,
.catalog-hero,
.catalog-form-head,
.customer-list-head,
.customer-profile-header,
.price-board-header,
.overview {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    box-shadow: var(--sigar-soft-shadow) !important;
}

:is(.dashboard-welcome, .orders-list-head, .catalog-hero, .catalog-form-head, .customer-list-head, .customer-profile-header, .price-board-header, .overview) :is(h1, h2, h3) {
    color: var(--sigar-text) !important;
}

:is(.dashboard-welcome, .orders-list-head, .catalog-hero, .catalog-form-head, .customer-list-head, .customer-profile-header, .price-board-header, .overview) :is(p, small) {
    color: var(--sigar-text-muted) !important;
}

.dashboard-metrics,
.dashboard-brief-grid,
.dashboard-shortcut-grid,
.dashboard-columns,
.visitor-stats {
    align-items: stretch;
}

.dashboard-metric,
.dashboard-panel,
.dashboard-shortcuts,
.dashboard-shortcut-grid a,
.visitor-action,
.visitor-customer-card,
.visitor-order-card,
.visitor-product-card,
.visitor-catalog-brand,
.visitor-stats > div,
.panel,
.catalog-table-panel,
.catalog-brand-group,
.orders-list-filter,
.orders-list-panel,
.customer-profile-card,
.customer-access-card,
.settings-card,
.settings-section,
.settings-app-access,
.brand-group,
.shop-header,
.shop-product,
.shop-checkout,
.shop-total,
.cart-summary,
.price-board-group {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    box-shadow: var(--sigar-soft-shadow) !important;
}

.dashboard-metric {
    border-top: 1px solid var(--sigar-border) !important;
    border-radius: 15px !important;
}

.dashboard-metric::before,
.dashboard-metric-icon,
.dashboard-shortcut-grid a > span,
.visitor-action > span {
    color: #fff !important;
    background: linear-gradient(145deg, #8a2c40, var(--sigar-primary)) !important;
    box-shadow: 0 7px 16px rgb(107 31 46 / .22) !important;
}

.dashboard-metric strong,
.dashboard-panel-title h2,
.dashboard-shortcut-grid strong,
.visitor-stats strong {
    color: var(--sigar-text) !important;
}

.dashboard-metric > span:not(.dashboard-metric-icon),
.dashboard-metric small,
.dashboard-brief-row span,
.dashboard-panel-title small {
    color: var(--sigar-text-muted) !important;
}

.dashboard-metric:hover,
.dashboard-shortcut-grid a:hover,
.visitor-action:hover,
.catalog-brand-group > summary:hover,
.brand-group > summary:hover {
    color: var(--sigar-text) !important;
    background: var(--sigar-card-highlight) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 28%, var(--sigar-border)) !important;
}

.admin-shell .catalog-page .catalog-brand-icon {
    color: var(--sigar-primary) !important;
    background: var(--sigar-primary-soft) !important;
    border: 1px solid color-mix(in srgb, var(--sigar-primary) 30%, var(--sigar-border)) !important;
}

.admin-shell .catalog-page .catalog-brand-group > summary small {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    font-weight: 750 !important;
}

.admin-shell .catalog-page .catalog-brand-group > summary strong,
.admin-shell .catalog-page .catalog-brand-edit {
    color: var(--sigar-text) !important;
}

.dashboard-panel-title a,
.dashboard-welcome small,
.orders-list-head a:not(.button),
.price-board-product > span,
.visitor-checkout strong,
.shop-price,
.shop-payable {
    color: var(--sigar-primary) !important;
}

.dashboard-brief-row,
.dashboard-order,
.visitor-shop-row,
.visitor-cart-row,
.customer-info-list div,
.price-board-product {
    color: var(--sigar-text) !important;
    border-color: var(--sigar-border) !important;
}

.dashboard-brief-row:hover,
.dashboard-order:hover,
.price-board-product:hover,
table tbody tr:hover {
    background: var(--sigar-row-hover) !important;
}

.dashboard-stock-alert {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 5px 9px !important;
    color: #8b2439 !important;
    background: #f8e5e9 !important;
    border: 1px solid #ecc4cd !important;
    border-radius: 8px;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}

:root[data-theme='dark'] .dashboard-stock-alert {
    color: #ffd9e1 !important;
    background: #542633 !important;
    border-color: #804052 !important;
}

.dashboard-best-seller {
    position: relative;
    z-index: 0;
    overflow: hidden;
    isolation: isolate;
}

.dashboard-best-seller::before {
    position: absolute;
    z-index: -1;
    inset: 4px auto 4px 0;
    width: var(--seller-share);
    max-width: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--sigar-primary) 18%, transparent), color-mix(in srgb, var(--sigar-primary) 5%, transparent));
    content: '';
}

.dashboard-best-seller > span {
    color: var(--sigar-primary) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.topbar nav > .sigar-theme-toggle {
    width: 100%;
    margin-top: auto !important;
    color: var(--sigar-sidebar-ink) !important;
    background: var(--sigar-surface-secondary) !important;
    border-color: var(--sigar-border) !important;
}

.topbar nav > .sigar-theme-toggle + form {
    margin-top: 8px !important;
}

.staff-shell:has(#visitor-order-form) :is(.page-heading, .visitor-section-heading) {
    display: none !important;
}

.staff-shell:has(#visitor-order-form) .visitor-step-heading > span {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.staff-shell:has(#visitor-order-form) .visitor-product-group summary::after {
    color: var(--sigar-primary) !important;
}

.staff-shell:has(#visitor-order-form) .quantity-control {
    gap: 4px;
    padding: 3px;
    color: var(--sigar-text) !important;
    background: var(--sigar-primary-soft) !important;
    border: 1px solid color-mix(in srgb, var(--sigar-primary) 24%, var(--sigar-border)) !important;
}

.staff-shell:has(#visitor-order-form) .quantity-control button {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.staff-shell:has(#visitor-order-form) .quantity-control button:hover {
    background: var(--sigar-primary-hover) !important;
}

.staff-shell:has(#visitor-order-form) .visitor-quantity-input {
    width: 72px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    appearance: textfield;
}

.staff-shell:has(#visitor-order-form) .visitor-quantity-input::-webkit-inner-spin-button,
.staff-shell:has(#visitor-order-form) .visitor-quantity-input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

/* Visitor PWA: unified SIGAR visual language across every visitor page. */
.visitor-shell {
    font-family: Vazirmatn, Tahoma, sans-serif !important;
    color: var(--sigar-text) !important;
    background: var(--sigar-shell-bg) !important;
}

.visitor-shell main {
    color: var(--sigar-text) !important;
    background: var(--sigar-shell-bg) !important;
    background-image: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--sigar-primary) 5%, transparent), transparent 30%) !important;
}

.visitor-shell :is(h1, h2, h3, strong, label) {
    color: var(--sigar-text) !important;
}

.visitor-shell :is(p, small, .muted) {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell .visitor-topline {
    color: var(--sigar-text-muted) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.visitor-shell .visitor-topline strong {
    color: var(--sigar-text) !important;
}

.visitor-shell .topbar .nav-user,
.visitor-shell .visitor-topline strong {
    display: none !important;
}

.visitor-shell .topbar nav > a[aria-current='page'],
.visitor-shell .topbar nav > a[aria-current='page']:hover {
    color: #fff !important;
    background: linear-gradient(135deg, var(--sigar-primary), var(--sigar-primary-hover)) !important;
    border-color: var(--sigar-primary) !important;
}

.visitor-shell .visitor-welcome {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--sigar-soft-shadow) !important;
}

.visitor-shell .visitor-welcome::after {
    background: linear-gradient(90deg, color-mix(in srgb, var(--sigar-primary) 14%, transparent), transparent) !important;
    opacity: .65;
}

.visitor-shell .visitor-welcome > span {
    color: #fff !important;
    background: linear-gradient(145deg, #8a2c40, var(--sigar-primary)) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 55%, var(--sigar-border)) !important;
    box-shadow: 0 8px 18px rgb(107 31 46 / .20) !important;
}

.visitor-shell .visitor-welcome h1 {
    color: var(--sigar-text) !important;
}

.visitor-shell .visitor-welcome p {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell .visitor-action,
.visitor-shell .visitor-action.primary,
.visitor-shell .visitor-action.primary:first-child,
.visitor-shell .visitor-action.primary:nth-child(2) {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    border-radius: 15px !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.visitor-shell .visitor-action:hover,
.visitor-shell .visitor-action.primary:hover {
    color: var(--sigar-text) !important;
    background: var(--sigar-card-highlight) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 30%, var(--sigar-border)) !important;
    box-shadow: var(--sigar-shadow-md) !important;
    transform: translateY(-1px);
}

.visitor-shell .visitor-action > span,
.visitor-shell .visitor-action.primary > span {
    color: #fff !important;
    background: linear-gradient(145deg, #8a2c40, var(--sigar-primary)) !important;
    border: 0 !important;
    box-shadow: 0 7px 16px rgb(107 31 46 / .22) !important;
}

.visitor-shell .visitor-action :is(strong, small),
.visitor-shell .visitor-action.primary :is(strong, small) {
    color: inherit !important;
}

.visitor-shell .visitor-action small,
.visitor-shell .visitor-action.primary small {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell .visitor-stats > div {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border: 1px solid var(--sigar-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.visitor-shell .visitor-stats strong {
    color: var(--sigar-text) !important;
}

.visitor-shell .visitor-stats :is(small, span) {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell :is(.visitor-section, .visitor-customer-card, .visitor-order-card, .visitor-product-card, .visitor-catalog-brand, .visitor-product-group, .visitor-order-step, .visitor-route-card, .visitor-profile-card, .visitor-checkout, .visitor-follow-up) {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.visitor-shell :is(.visitor-customer-card, .visitor-order-card, .visitor-product-card, .visitor-route-card):hover {
    color: var(--sigar-text) !important;
    background: var(--sigar-card-highlight) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 28%, var(--sigar-border)) !important;
}

.visitor-shell .visitor-section-heading {
    border-color: var(--sigar-border) !important;
}

.visitor-shell .visitor-section-heading :is(h1, h2, h3) {
    color: var(--sigar-text) !important;
}

.visitor-shell :is(.visitor-section-heading a, .visitor-back, .visitor-product-card > div span) {
    color: var(--sigar-primary) !important;
}

.visitor-shell .visitor-list-link {
    color: var(--sigar-text) !important;
    background: transparent !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell .visitor-list-link:hover {
    color: var(--sigar-text) !important;
    background: var(--sigar-row-hover) !important;
}

.visitor-shell .visitor-badge {
    color: var(--sigar-success) !important;
    background: var(--sigar-success-soft) !important;
    border-color: transparent !important;
}

.visitor-shell .visitor-badge.inactive {
    color: var(--sigar-danger) !important;
    background: var(--sigar-danger-soft) !important;
}

.visitor-shell :is(.visitor-product-group summary, .visitor-catalog-brand summary, .visitor-follow-up summary) {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface-secondary) !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell :is(.visitor-product-group[open] summary, .visitor-catalog-brand[open] summary, .visitor-follow-up[open] summary) {
    color: var(--sigar-primary) !important;
    background: var(--sigar-primary-soft) !important;
}

.visitor-shell :is(.visitor-product-group summary, .visitor-catalog-brand summary)::after {
    color: var(--sigar-primary) !important;
}

.visitor-shell .visitor-shop-row,
.visitor-shell .visitor-details p {
    color: var(--sigar-text) !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell .visitor-shop-row small,
.visitor-shell .visitor-customer-card small,
.visitor-shell .visitor-order-card small {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell :is(input, select, textarea) {
    color: var(--sigar-text) !important;
    background: var(--sigar-input) !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell :is(input, select, textarea):focus {
    border-color: var(--sigar-primary) !important;
    outline: 3px solid color-mix(in srgb, var(--sigar-primary) 16%, transparent) !important;
}

.visitor-shell .visitor-search {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell .visitor-add-product,
.visitor-shell .visitor-route-call,
.visitor-shell .visitor-route-results .visitor-route-order,
.visitor-shell .visitor-submit {
    color: #fff !important;
    background: var(--sigar-primary) !important;
    border-color: var(--sigar-primary) !important;
}

.visitor-shell :is(.visitor-add-product, .visitor-route-call, .visitor-route-results .visitor-route-order, .visitor-submit):hover {
    color: #fff !important;
    background: var(--sigar-primary-hover) !important;
    border-color: var(--sigar-primary-hover) !important;
}

.visitor-shell .visitor-route-stats span {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: var(--sigar-shadow-sm) !important;
}

.visitor-shell .visitor-route-progress {
    background: var(--sigar-surface-secondary) !important;
}

.visitor-shell .visitor-route-progress span {
    background: var(--sigar-primary) !important;
}

.visitor-shell .visitor-route-regions a {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

.visitor-shell .visitor-route-regions a:hover {
    color: var(--sigar-primary) !important;
    background: var(--sigar-primary-soft) !important;
}

.visitor-shell .visitor-route-regions a small {
    color: var(--sigar-text-muted) !important;
}

.visitor-shell .visitor-avatar,
.visitor-shell .visitor-brand-initial,
.visitor-shell .visitor-step-heading > span {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.visitor-shell .visitor-order-actions :is(a, button) {
    color: var(--sigar-primary) !important;
    background: var(--sigar-primary-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 25%, var(--sigar-border)) !important;
}

.visitor-shell .visitor-order-actions :is(a, button):hover {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.visitor-shell .quantity-control {
    color: var(--sigar-text) !important;
    background: var(--sigar-primary-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 25%, var(--sigar-border)) !important;
}

.visitor-shell .quantity-control button {
    color: var(--sigar-primary) !important;
    background: transparent !important;
}

.visitor-shell .quantity-control button:hover {
    color: #fff !important;
    background: var(--sigar-primary) !important;
}

.visitor-shell .visitor-menu-toggle {
    color: #fff !important;
    background: var(--sigar-primary) !important;
    border-color: var(--sigar-primary) !important;
}

@media (max-width: 700px) {
    .visitor-shell .topbar nav,
    .visitor-shell .topbar nav.visitor-nav-open {
        color: var(--sigar-sidebar-ink) !important;
        background: var(--sigar-sidebar-bg) !important;
        border-color: var(--sigar-border) !important;
        box-shadow: var(--sigar-shadow-md) !important;
    }
}

.orders-list-filter,
.orders-list-actions,
.table-wrap,
.orders-list-table,
.catalog-table,
.customer-list-table {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

.orders-list-filter form {
    background: transparent !important;
}

table,
table :is(th, td),
.orders-list-table :is(th, td),
.catalog-table :is(th, td),
.customer-list-table :is(th, td) {
    color: var(--sigar-text) !important;
    border-color: var(--sigar-border) !important;
}

table thead th,
.orders-list-table thead th,
.catalog-table thead th,
.customer-list-table thead th {
    color: var(--sigar-text-muted) !important;
    background: var(--sigar-surface-secondary) !important;
}

table tfoot td,
.orders-list-table tfoot td {
    color: var(--sigar-text) !important;
    background: var(--sigar-primary-soft) !important;
}

input:not([type='checkbox']):not([type='radio']),
select,
textarea,
.admin-shell :is(input:not([type='checkbox']):not([type='radio']), select, textarea),
.visitor-shell :is(input:not([type='checkbox']):not([type='radio']), select, textarea),
.customer-page :is(input:not([type='checkbox']):not([type='radio']), select, textarea) {
    color: var(--sigar-text) !important;
    background: var(--sigar-input) !important;
    border-color: var(--sigar-border) !important;
    box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--sigar-field-placeholder) !important;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--sigar-primary) !important;
    outline: 3px solid color-mix(in srgb, var(--sigar-primary) 16%, transparent) !important;
}

.price-board-page { gap: 16px !important; }
.price-board-header { border-radius: 16px !important; }
.price-board-grid { column-gap: 10px !important; }
.price-board-group { border-radius: 12px !important; }
.price-board-group-title {
    color: #fff !important;
    background: linear-gradient(135deg, #7b293b, var(--sigar-primary)) !important;
}
.price-board-group-title h2 { color: #fff !important; }
.price-board-group-title span { color: #fff !important; background: rgb(255 255 255 / .14) !important; }
.price-board-product strong { color: var(--sigar-text) !important; }
.price-board-product small { color: var(--sigar-text-muted) !important; }

.badge,
.orders-status,
.visitor-badge,
[class*='status-'] {
    box-shadow: none !important;
}

.customer-filters .customer-filter-active,
.customer-state.is-on {
    color: var(--sigar-success) !important;
    background: var(--sigar-success-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-success) 30%, var(--sigar-border)) !important;
}

.customer-filters .customer-filter-inactive,
.customer-state:not(.is-on) {
    color: var(--sigar-danger) !important;
    background: var(--sigar-danger-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-danger) 30%, var(--sigar-border)) !important;
}

.customer-group,
.customer-filter-group {
    font-weight: 800 !important;
}

.customer-group-a,
.customer-filter-group-a {
    color: var(--sigar-success) !important;
    background: var(--sigar-success-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-success) 30%, var(--sigar-border)) !important;
}

.customer-group-b,
.customer-filter-group-b {
    color: var(--sigar-warning) !important;
    background: var(--sigar-warning-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-warning) 30%, var(--sigar-border)) !important;
}

.customer-group-c,
.customer-filter-group-c {
    color: var(--sigar-primary) !important;
    background: var(--sigar-primary-soft) !important;
    border-color: color-mix(in srgb, var(--sigar-primary) 30%, var(--sigar-border)) !important;
}

.alert,
.customer-install-banner,
.persian-date-popover,
.orders-sold-dropdown > div,
dialog,
.modal,
[role='dialog'] {
    color: var(--sigar-text) !important;
    background: var(--sigar-surface) !important;
    border-color: var(--sigar-border) !important;
}

hr,
.divider {
    border-color: var(--sigar-border) !important;
}

@media (max-width: 700px) {
    .admin-shell .topbar,
    .visitor-shell .topbar {
        background: var(--sigar-sidebar-bg) !important;
    }

    .dashboard-welcome,
    .orders-list-head,
    .catalog-hero,
    .catalog-form-head,
    .customer-list-head,
    .customer-profile-header,
    .price-board-header {
        border-radius: 14px !important;
    }

    .dashboard-metric,
    .dashboard-panel,
    .panel,
    .price-board-group {
        border-radius: 12px !important;
    }
}

@media (max-width: 700px) {
    .sigar-theme-toggle [data-theme-label] { display: none; }
    .sigar-theme-toggle { min-width: 38px !important; padding-inline: 8px !important; }
}

@media print {
    :root, :root[data-theme='dark'] { color-scheme: light; }
    body, .staff-shell, .customer-page, .invoice-page { color: #111 !important; background: #fff !important; }
    .sigar-theme-toggle { display: none !important; }
}

/* Burgundy sidebar final overrides. */
.admin-shell .topbar nav :is(a, summary):hover,
.visitor-shell .topbar nav :is(a, summary):hover,
.admin-shell .topbar .nav-group[open] > summary:not([aria-current='page']) {
    color: #fff !important;
    background: rgb(255 255 255 / .11) !important;
}

.admin-shell .topbar nav > a[aria-current='page'],
.admin-shell .topbar .nav-group > summary[aria-current='page'],
.admin-shell .topbar .nav-submenu a[aria-current='page'],
.visitor-shell .topbar nav a[aria-current='page'],
.visitor-shell .topbar nav a[aria-current='page']:hover {
    color: #fff !important;
    background: rgb(255 255 255 / .25) !important;
    border-color: rgb(255 255 255 / .22) !important;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18), 0 8px 18px rgb(43 15 22 / .16) !important;
}

.sigar-theme-toggle,
.topbar nav > .sigar-theme-toggle,
.admin-shell .topbar form button,
.visitor-shell .topbar form button {
    color: var(--sigar-sidebar-ink) !important;
    background: rgb(255 255 255 / .10) !important;
    border-color: rgb(255 255 255 / .16) !important;
}

.visitor-shell .topbar .nav-user,
.visitor-shell .visitor-topline strong {
    display: none !important;
}

/* Visitor welcome without test account name. */
.visitor-shell .visitor-welcome h1 {
    font-size: 0 !important;
}

.visitor-shell .visitor-welcome h1::before {
    content: "\0633\0644\0627\0645";
    font-size: clamp(1.45rem, 3vw, 2rem);
}
.sidebar-toggle{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:40px;margin:0;background:#ffffff12;border-color:#ffffff2b;color:#fff;box-shadow:none}
.sidebar-toggle:hover,.nav-install-qr-button:hover{background:#ffffff24}
.topbar .nav-install-qr-button{display:flex;width:100%;justify-content:flex-start;margin:8px 0 0;padding:9px 13px;background:var(--sigar-primary);color:#fff;border:1px solid #ffffff26;box-shadow:none}
.install-qr-dialog{width:min(92vw,460px);border:0;border-radius:22px;padding:28px;text-align:center;color:var(--sigar-text);box-shadow:0 24px 80px rgb(43 15 22 / .35)}
.install-qr-dialog::backdrop{background:rgb(43 15 22 / .72);backdrop-filter:blur(4px)}
.install-qr-dialog img{display:block;width:min(100%,320px);height:auto;margin:18px auto;border:10px solid #fff;border-radius:18px;box-shadow:var(--sigar-shadow-md)}
.install-qr-dialog .dialog-close{position:absolute;top:10px;left:12px;width:38px;height:38px;min-height:38px;margin:0;padding:0;border-radius:50%;background:var(--sigar-primary-soft);color:var(--sigar-primary);box-shadow:none;font-size:1.25rem}
@media (min-width:761px){
    .staff-shell.sidebar-collapsed .topbar{width:76px;padding-inline:10px;overflow:hidden}
    .staff-shell.sidebar-collapsed .topbar .brand bdi,.staff-shell.sidebar-collapsed .topbar .brand span,.staff-shell.sidebar-collapsed .topbar nav{display:none}
    .staff-shell.sidebar-collapsed .topbar .brand{padding:0;justify-content:center}
    .staff-shell.sidebar-collapsed main{margin-right:76px}
}
@media (max-width:760px){
    .staff-shell.authenticated .topbar{display:flex}
    .staff-shell.authenticated.sidebar-collapsed .topbar nav{display:none!important}
    .staff-shell.authenticated.sidebar-collapsed .topbar .brand{display:none}
    .staff-shell.authenticated:not(.sidebar-collapsed) .topbar nav{display:flex!important}
}
.customer-activation-page{min-height:100vh;padding:24px;background:radial-gradient(circle at top right,var(--sigar-primary-soft) 0,var(--sigar-background) 42%,#eef3f7 100%)}
.activation-card{width:min(100%,520px);margin:4vh auto 0;text-align:center;border-top:5px solid var(--sigar-primary)}
.activation-brand{display:flex;flex-direction:column;align-items:center;margin-bottom:22px;color:var(--sigar-text)}
.activation-brand:before{content:'◇';display:grid;place-items:center;width:62px;height:62px;margin-bottom:10px;border-radius:18px;background:var(--sigar-primary);color:#fff;font-size:1.65rem}
.activation-brand strong{font-size:1.6rem}.activation-brand span{font-size:.78rem;letter-spacing:.18em;color:var(--sigar-primary)}
.activation-scanner{position:relative;overflow:hidden;margin:18px auto;border-radius:20px;background:var(--sigar-charcoal);aspect-ratio:1;max-width:360px}
.activation-scanner video{width:100%;height:100%;object-fit:cover}
.activation-scanner span{position:absolute;inset:13%;border:3px solid var(--sigar-primary);border-radius:18px;box-shadow:0 0 0 999px rgb(43 47 58 / .45)}
.activation-manual{margin-top:22px;padding-top:16px;border-top:1px solid #dce5ea;text-align:right}
.activation-manual summary{cursor:pointer;color:#596b78}.activation-manual button{width:100%}
.customer-welcome{position:fixed;inset:0;z-index:10000;background:var(--sigar-primary);color:#fff;overflow:hidden;isolation:isolate}
.customer-welcome[hidden]{display:none!important}.welcome-open{overflow:hidden}
.welcome-screen{display:flex;width:100%;height:100%;padding:clamp(36px,10vw,90px) 28px;flex-direction:column;align-items:center;justify-content:center;text-align:center;touch-action:pan-y;background:linear-gradient(155deg,#6b1f2e 0%,#581824 65%,#2b2f3a 150%);transition:transform .28s ease,opacity .28s ease}
.welcome-screen img{width:112px;height:112px;margin-bottom:18px;border-radius:25px;box-shadow:0 18px 48px #0004}.welcome-screen>span{color:#f0d8de;font-weight:900;letter-spacing:.2em}.welcome-screen h1{margin:16px 0 10px;color:#fff!important;font-size:clamp(1.8rem,8vw,2.7rem)}
.welcome-screen p{max-width:32rem;color:#f8fafc;font-size:1rem}.welcome-swipe-hint{margin:24px 0 12px;padding:10px 18px;border:1px solid #ffffff4a;border-radius:99px;color:#fff;background:#ffffff10;animation:welcomeHint 1.4s ease-in-out infinite}
.welcome-screen button{min-width:190px;background:#fff;color:var(--sigar-primary);box-shadow:0 12px 30px #0003}.welcome-screen button:hover{background:var(--sigar-primary-soft);color:var(--sigar-primary-hover)}
.welcome-exit-left{transform:translateX(-110%);opacity:0}.welcome-exit-right{transform:translateX(110%);opacity:0}
@keyframes welcomeHint{50%{transform:translateX(8px)}}

.staff-shell.guest .topbar{color:var(--sigar-sidebar-ink)!important;background:var(--sigar-sidebar-bg)!important;box-shadow:0 8px 28px rgb(43 15 22 / .16)!important}
.staff-shell.guest .brand,.staff-shell.guest .brand span{color:var(--sigar-sidebar-ink)!important}
.staff-shell.guest .brand:before{background:#fff!important;color:var(--sigar-primary)!important}
.admin-shell .topbar .nav-icon{font-size:.88rem!important;line-height:1!important}
.admin-shell .dashboard-metric-icon,.admin-shell .dashboard-shortcut-grid a>span{font-size:.78rem!important;line-height:1!important}
.customer-invoice-heading{margin:4px 0 12px;color:var(--sigar-text)!important;font-size:1.05rem}
.customer-current-invoice{border-top:4px solid var(--sigar-primary)!important;background:linear-gradient(135deg,var(--sigar-surface),var(--sigar-primary-soft))!important}
.customer-invoice-archive>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-weight:800;color:var(--sigar-primary)}
.customer-invoice-archive>summary span{display:grid;min-width:30px;height:30px;padding:0 8px;border-radius:20px;place-items:center;color:#fff;background:var(--sigar-primary)}
.customer-previous-invoice{display:grid;grid-template-columns:1fr auto;gap:8px 12px;padding:14px 0;border-top:1px solid var(--sigar-border)}
.customer-previous-invoice:first-of-type{margin-top:14px}.customer-previous-invoice .button{grid-column:1/-1;margin:0;justify-self:start}
