/* Panel dark mode — only applies when html.theme-dark. Light mode is unchanged. */

html.theme-dark {
    color-scheme: dark;
    --body-bg: #0b1220;
    --card-bg: #141c2b;
    --surface-muted: #1a2436;
    --surface-elevated: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #b6c4d6;
    --border-color: #2a364a;
    --navy: #e2e8f0;
    --navy-light: #cbd5e1;
    --primary-light: rgba(242, 101, 34, 0.18);
    --kitchen-pending-light: rgba(37, 99, 235, 0.22);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --bs-body-bg: #0b1220;
    --bs-body-color: #f1f5f9;
    --bs-secondary-color: #cbd5e1;
    --bs-border-color: #2a364a;
    --bs-tertiary-bg: #1a2436;
    --bs-emphasis-color: #f8fafc;
    --bg-secondary: #1a2436;
}

html.theme-dark body,
html.theme-dark body.panel-app {
    color: var(--text-primary);
    background: var(--body-bg);
    background-image:
        radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--primary) 12%, transparent) 0%, transparent 42%),
        radial-gradient(ellipse at 0% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 40%);
}

html.theme-dark .main-wrapper,
html.theme-dark .main-content {
    background: transparent;
    color: var(--text-primary);
}

html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5,
html.theme-dark h6,
html.theme-dark .page-title,
html.theme-dark .reports-page-title,
html.theme-dark .orders-page-title,
html.theme-dark .login-title,
html.theme-dark .card-header-custom,
html.theme-dark .text-dark,
html.theme-dark a.text-dark,
html.theme-dark .form-label,
html.theme-dark .fw-semibold,
html.theme-dark .fw-bold,
html.theme-dark .fw-medium {
    color: var(--text-primary);
}

html.theme-dark .text-muted,
html.theme-dark .form-text,
html.theme-dark small,
html.theme-dark .small {
    color: var(--text-muted) !important;
}

html.theme-dark .text-body,
html.theme-dark .text-body-secondary {
    color: var(--text-secondary) !important;
}

html.theme-dark .top-header {
    background: #121a28;
    border-bottom-color: var(--border-color);
}

html.theme-dark .header-notif-btn,
html.theme-dark .header-theme-btn,
html.theme-dark .sidebar-toggle-btn,
html.theme-dark .sidebar-collapse-btn-header {
    background: var(--surface-muted) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

html.theme-dark .header-notif-pop {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

html.theme-dark .header-theme-icon-moon { display: none; }
html.theme-dark .header-theme-icon-sun { display: inline-block; }

/* Surfaces / cards */
html.theme-dark .panel-card,
html.theme-dark .card,
html.theme-dark .modal-content,
html.theme-dark .dropdown-menu,
html.theme-dark .offcanvas,
html.theme-dark .list-group-item,
html.theme-dark .accordion-item,
html.theme-dark .settings-shell,
html.theme-dark .popover,
html.theme-dark .toast {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .card-header,
html.theme-dark .card-footer,
html.theme-dark .modal-header,
html.theme-dark .modal-footer,
html.theme-dark .card-header-custom,
html.theme-dark .card-body-custom {
    background: transparent !important;
    color: var(--text-primary);
    border-color: var(--border-color) !important;
}

html.theme-dark .bg-white,
html.theme-dark .bg-light,
html.theme-dark .bg-body,
html.theme-dark .bg-body-tertiary,
html.theme-dark .bg-body-secondary {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .border,
html.theme-dark .border-top,
html.theme-dark .border-bottom,
html.theme-dark .border-start,
html.theme-dark .border-end {
    border-color: var(--border-color) !important;
}

/* Forms */
html.theme-dark .form-control,
html.theme-dark .form-select:not(.order-status-select):not(.day-order-status),
html.theme-dark .form-control:disabled,
html.theme-dark .form-select:disabled:not(.order-status-select):not(.day-order-status),
html.theme-dark textarea,
html.theme-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
html.theme-dark select:not(.order-status-select):not(.day-order-status) {
    background-color: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .form-control::placeholder,
html.theme-dark textarea::placeholder,
html.theme-dark input::placeholder {
    color: #7c8aa0 !important;
}

html.theme-dark .form-control:focus,
html.theme-dark .form-select:not(.order-status-select):not(.day-order-status):focus {
    background-color: var(--surface-muted) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .form-check-input {
    background-color: var(--surface-muted);
    border-color: #475569;
}

html.theme-dark .form-range::-webkit-slider-runnable-track {
    background: #334155;
}

html.theme-dark .btn-light,
html.theme-dark .btn-outline-secondary,
html.theme-dark .btn-outline-dark {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .btn-light:hover,
html.theme-dark .btn-outline-secondary:hover {
    background: var(--surface-elevated) !important;
    color: #fff !important;
}

html.theme-dark .nav-tabs,
html.theme-dark .nav-tabs .nav-link {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-dark .nav-tabs .nav-link.active {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-dark .dropdown-item {
    color: var(--text-primary);
}

html.theme-dark .dropdown-item:hover,
html.theme-dark .dropdown-item:focus,
html.theme-dark .list-group-item-action:hover {
    background: #223049;
    color: #fff;
}

html.theme-dark .pagination .page-link,
html.theme-dark .data-grid-pagination .page-link {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .data-grid-pagination-wrap {
    background: var(--surface-muted) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary);
}

/* Tables */
html.theme-dark .table,
html.theme-dark .table > :not(caption) > * > * {
    color: var(--text-primary);
    --bs-table-bg: var(--card-bg);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: #1a2436;
    --bs-table-hover-bg: #223049;
    border-color: var(--border-color);
}

html.theme-dark .table-responsive:has(> .table-panel),
html.theme-dark .table-responsive:has(> table.table-panel),
html.theme-dark .pm-table-card,
html.theme-dark .panel-card:has(.table-panel) > .table-responsive,
html.theme-dark .panel-card:has(> .table-responsive > .table-panel),
html.theme-dark .panel-card:has(> .table-responsive > table.table-panel),
html.theme-dark .restaurant-all-orders .pm-table-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table.table-panel,
html.theme-dark table.pm-table {
    background: transparent !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table.table-panel thead th,
html.theme-dark table.pm-table thead th,
html.theme-dark .restaurant-all-orders .pm-table th {
    background: linear-gradient(180deg, #1e293b 0%, #162033 100%) !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.theme-dark .table.table-panel tbody td,
html.theme-dark table.pm-table tbody td,
html.theme-dark .restaurant-all-orders .pm-table tbody td,
html.theme-dark .restaurant-all-orders .pm-table tbody tr:nth-child(odd) td,
html.theme-dark .restaurant-all-orders .pm-table tbody tr:nth-child(even) td {
    background: #141c2b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

html.theme-dark .restaurant-all-orders .pm-table tbody tr:nth-child(even) td {
    background: #121a28 !important;
}

html.theme-dark .table.table-panel tbody tr:hover td,
html.theme-dark table.pm-table tbody tr:hover td,
html.theme-dark .restaurant-all-orders .pm-table tbody tr.pm-row:hover td {
    background: #1e293b !important;
}

html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-clip,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-strong,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-sub,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-money,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-prep {
    color: #f1f5f9 !important;
}

html.theme-dark .restaurant-all-orders .pm-table th,
html.theme-dark .restaurant-all-orders .pm-table td,
html.theme-dark .restaurant-all-orders .pm-table tr > :first-child,
html.theme-dark .restaurant-all-orders .pm-table tr > :last-child,
html.theme-dark .restaurant-all-orders .pm-table thead tr > * {
    border-color: #334155 !important;
}

html.theme-dark .grid-search-wrap,
html.theme-dark .panel-card > .grid-search-wrap,
html.theme-dark .card-body-custom.p-0 > .grid-search-wrap {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .grid-search-input {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .grid-search-icon {
    color: #94a3b8;
}

/* Orders pages */
html.theme-dark .orders-toolbar,
html.theme-dark .orders-overview,
html.theme-dark .all-orders-filters,
html.theme-dark .orders-source-panel,
html.theme-dark .panel-card.orders-source-panel.source-qr {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: none;
}

html.theme-dark .pm-filters,
html.theme-dark .pm-filter-toggle {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .pm-field {
    color: var(--text-muted) !important;
}

html.theme-dark .pm-field input,
html.theme-dark .pm-field select {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .orders-kpi,
html.theme-dark .orders-overview .order-source-card,
html.theme-dark .orders-overview .order-source-card.has-orders,
html.theme-dark .orders-overview .order-source-card.source-qr,
html.theme-dark .orders-browse-page a.order-source-card,
html.theme-dark .order-source-card {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .orders-kpi .label,
html.theme-dark .source-card-meta,
html.theme-dark .orders-filter-summary,
html.theme-dark .orders-filter-period {
    color: var(--text-muted) !important;
}

html.theme-dark .orders-kpi strong,
html.theme-dark .source-card-name,
html.theme-dark .source-card-amount {
    color: var(--text-primary) !important;
}

html.theme-dark .orders-kpi.is-discount strong { color: #c4b5fd !important; }
html.theme-dark .orders-kpi.is-paid strong { color: #4ade80 !important; }
html.theme-dark .orders-kpi.is-expense strong { color: #f87171 !important; }
html.theme-dark .orders-kpi.is-total strong { color: #fb923c !important; }
html.theme-dark .orders-kpi.is-count .orders-kpi-icon { background: rgba(79, 70, 229, 0.22); color: #a5b4fc; }
html.theme-dark .orders-kpi.is-total .orders-kpi-icon { background: rgba(234, 88, 12, 0.22); color: #fdba74; }
html.theme-dark .orders-kpi.is-discount .orders-kpi-icon { background: rgba(124, 58, 237, 0.22); color: #c4b5fd; }
html.theme-dark .orders-kpi.is-paid .orders-kpi-icon { background: rgba(22, 163, 74, 0.22); color: #86efac; }
html.theme-dark .orders-kpi.is-expense .orders-kpi-icon { background: rgba(220, 38, 38, 0.22); color: #fca5a5; }

html.theme-dark .orders-toolbar-head,
html.theme-dark .orders-filter-bar,
html.theme-dark .orders-filter-footer,
html.theme-dark .order-exclude-filter {
    border-color: var(--border-color) !important;
}

html.theme-dark .order-exclude-filter .exclude-title strong {
    color: var(--text-primary) !important;
}

html.theme-dark .order-exclude-filter .exclude-title small {
    color: var(--text-muted) !important;
}

html.theme-dark .order-exclude-filter label {
    background: var(--surface-muted) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .order-exclude-filter label:hover {
    background: var(--surface-elevated) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .order-exclude-filter label:has(input:checked) {
    background: rgba(242, 101, 34, 0.16) !important;
    border-color: #f59e0b !important;
    color: #fdba74 !important;
}

html.theme-dark .integration-soon-badge {
    background: #1e293b;
    color: #94a3b8;
}

/* Settings / pickers */
html.theme-dark .qr-theme-card,
html.theme-dark .settings-tables-panel,
html.theme-dark .receipt-studio-preview {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .receipt-studio-preview-head {
    color: var(--text-primary);
}

html.theme-dark .receipt-studio-stage {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 46%),
        linear-gradient(180deg, #1A2940 0%, #111827 100%) !important;
    color: #fff !important;
}

html.theme-dark .receipt-paper,
html.theme-dark .receipt-print,
html.theme-dark .receipt-preview-mount,
html.theme-dark .receipt-preview-shell {
    background: #fffef8 !important;
    color: #111 !important;
}

html.theme-dark .receipt-paper *,
html.theme-dark .receipt-print *,
html.theme-dark .receipt-preview-mount *,
html.theme-dark .receipt-preview-shell * {
    color: #111 !important;
}

html.theme-dark .pos-cat-btn,
html.theme-dark .pos-product-card,
html.theme-dark .table-pos-product,
html.theme-dark .pos-cart,
html.theme-dark .table-pos-cart,
html.theme-dark .market-pos-cart,
html.theme-dark .quick-access-card,
html.theme-dark .reports-card,
html.theme-dark .cash-register-card,
html.theme-dark .dashboard-card,
html.theme-dark .stat-card,
html.theme-dark .kpi-card,
html.theme-dark .current-accounts-summary-title,
html.theme-dark .report-summary-kpi {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) {
    background: #0f1724;
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-hero,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-zone-block,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-stat-card {
    background: #141c2b;
    border-color: var(--border-color);
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-title,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-zone-label,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-zone-name {
    color: var(--text-primary);
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-subtitle,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-zone-count {
    color: var(--text-muted);
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-manage-btn {
    background: #1a2436;
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-dark .courier-area .table-panel tr,
html.theme-dark .dispatch-app .table-panel tr {
    background: #141c2b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html.theme-dark .settings-page,
html.theme-dark .settings-groups,
html.theme-dark .settings-nav-toggle {
    color: var(--text-primary);
}

html.theme-dark .breadcrumb,
html.theme-dark .breadcrumb-item,
html.theme-dark .breadcrumb-item a {
    color: var(--text-secondary);
}

html.theme-dark input.form-control-color {
    background: var(--surface-muted);
    border-color: var(--border-color);
}

html.theme-dark .restaurant-all-orders .pm-status-cell .order-status-select option {
    color: #111 !important;
    background: #fff !important;
}

html.theme-dark .table.table-panel tbody td,
html.theme-dark .table.table-panel tbody td *:not(.order-status-select):not(.order-status-badge):not(.order-status-pill):not(.day-order-status):not(.pm-status):not(.badge):not(.pm-brand):not(.order-source-badge):not(.order-type-icon):not(i),
html.theme-dark table.pm-table tbody td,
html.theme-dark table.pm-table tbody td *:not(.order-status-select):not(.order-status-badge):not(.order-status-pill):not(.day-order-status):not(.pm-status):not(.badge):not(.pm-brand):not(.order-source-badge):not(.order-type-icon):not(i) {
    color: #e8eef4 !important;
}

html.theme-dark .table.table-panel tbody td .text-muted,
html.theme-dark table.pm-table tbody td .text-muted,
html.theme-dark .table.table-panel tbody td .small,
html.theme-dark table.pm-table tbody td .small {
    color: #94a3b8 !important;
}

html.theme-dark .table.table-panel tbody td .text-danger,
html.theme-dark table.pm-table tbody td .text-danger {
    color: #f87171 !important;
}

html.theme-dark .table.table-panel tbody td .text-success,
html.theme-dark table.pm-table tbody td .text-success {
    color: #4ade80 !important;
}

html.theme-dark .table.table-panel tbody td .order-status-select,
html.theme-dark .table.table-panel tbody td .order-status-badge,
html.theme-dark .table.table-panel tbody td .order-status-pill,
html.theme-dark .table.table-panel tbody td .day-order-status,
html.theme-dark .table.table-panel tbody td .pm-status,
html.theme-dark .table.table-panel tbody td .badge,
html.theme-dark .table.table-panel tbody td .pm-brand,
html.theme-dark .table.table-panel tbody td .order-source-badge,
html.theme-dark .table.table-panel tbody td .order-type-icon,
html.theme-dark table.pm-table tbody td .order-status-select,
html.theme-dark table.pm-table tbody td .order-status-badge,
html.theme-dark table.pm-table tbody td .day-order-status,
html.theme-dark table.pm-table tbody td .pm-status,
html.theme-dark table.pm-table tbody td .badge,
html.theme-dark table.pm-table tbody td .pm-brand,
html.theme-dark table.pm-table tbody td .order-source-badge {
    color: #fff !important;
}

/* ── POS / masa / hızlı satış / popup ── */
html.theme-dark .table-pos-page,
html.theme-dark .market-pos-page,
html.theme-dark .quick-sale-page,
html.theme-dark .phone-order-page {
    background: transparent !important;
    color: var(--text-primary);
}

html.theme-dark .pos-weigh-total {
    background: #1A2332 !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .pos-weigh-total span {
    color: var(--text-secondary) !important;
}

html.theme-dark .pos-weigh-input {
    background: #111827 !important;
    color: #fff !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .marketplace-config-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .market-pos-page {
    --market-surface: #0b1220;
    --market-accent-soft: rgba(16, 185, 129, 0.16);
}

html.theme-dark .table-pos-header,
html.theme-dark .market-pos-products,
html.theme-dark .market-pos-cart,
html.theme-dark .table-pos-cart,
html.theme-dark .phone-order-cart,
html.theme-dark .phone-order-form,
html.theme-dark .phone-order-panel,
html.theme-dark .quick-sale-receipt-badge {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table-pos-header-left,
html.theme-dark .market-pos-cart-title,
html.theme-dark .market-pos-tile-name,
html.theme-dark .table-pos-product-row .name,
html.theme-dark .pos-variation-name,
html.theme-dark .payment-modal-title,
html.theme-dark .payment-item-name,
html.theme-dark .phone-order-panel-title {
    color: var(--text-primary) !important;
}

html.theme-dark .table-pos-back-btn,
html.theme-dark .table-pos-action-btn,
html.theme-dark .pos-view-toggle,
html.theme-dark .pos-view-toggle button,
html.theme-dark .table-pos-search input,
html.theme-dark .market-pos-search input,
html.theme-dark .market-pos-category,
html.theme-dark .table-pos-category {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table-pos-back-btn:hover,
html.theme-dark .table-pos-action-btn:hover:not(:disabled) {
    background: rgba(242, 101, 34, 0.16) !important;
    color: #fdba74 !important;
    border-color: #f59e0b !important;
}

html.theme-dark .table-pos-action-primary {
    background: rgba(220, 38, 38, 0.16) !important;
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

html.theme-dark .table-pos-categories,
html.theme-dark .market-pos-page .table-pos-categories {
    background: #1a2436 !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table-pos-page:not(.market-pos-page) .table-pos-category {
    color: #e2e8f0 !important;
}

html.theme-dark .table-pos-category.active,
html.theme-dark .market-pos-category.active,
html.theme-dark .table-pos-page.quick-sale-page .table-pos-category.active,
html.theme-dark .market-pos-page .table-pos-category.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary-dark) !important;
}

html.theme-dark .market-pos-page .table-pos-category.active {
    background: #059669 !important;
    border-color: #047857 !important;
}

html.theme-dark .table-pos-products,
html.theme-dark .table-pos-page.pos-picker-mode .table-pos-products-drawer,
html.theme-dark .table-pos-page.pos-picker-mode .table-pos-products-drawer .table-pos-products {
    background: #121a28 !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

html.theme-dark .table-pos-product-row,
html.theme-dark .market-pos-tile,
html.theme-dark .pos-content-chip,
html.theme-dark .pos-variation-row,
html.theme-dark .pos-numpad-key,
html.theme-dark .pos-menu-pane,
html.theme-dark .pos-menu-step-card,
html.theme-dark .pos-menu-price-preview {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

html.theme-dark .table-pos-product-row {
    background: linear-gradient(180deg, #1a2436 0%, #141c2b 100%) !important;
}

html.theme-dark .table-pos-product-row:active,
html.theme-dark .table-pos-product-row:hover,
html.theme-dark .market-pos-tile:hover {
    background: #1e293b !important;
    border-color: #f59e0b !important;
}

html.theme-dark .table-pos-product-row .thumb {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

html.theme-dark .table-pos-product-row .price,
html.theme-dark .table-pos-product-row .info,
html.theme-dark .market-pos-tile-price,
html.theme-dark .market-pos-cart-count,
html.theme-dark .market-pos-toolbar-hint,
html.theme-dark .line-menu-summary {
    color: var(--text-secondary) !important;
}

html.theme-dark .pos-view-toggle button.is-active {
    background: #334155 !important;
    color: #fff !important;
}

html.theme-dark .table-pos-summary,
html.theme-dark .table-pos-cart-footer,
html.theme-dark .table-pos-payment-history,
html.theme-dark .market-pos-cart-head,
html.theme-dark .market-pos-checkout {
    background: #121a28 !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table-pos-summary-box {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .table-pos-summary-box .label,
html.theme-dark .table-pos-cart-table thead th,
html.theme-dark .table-pos-cart-empty,
html.theme-dark .table-pos-payment-history-toggle,
html.theme-dark .table-pos-payment-history-meta {
    color: var(--text-muted) !important;
}

html.theme-dark .table-pos-summary-box.total strong { color: #fb923c !important; }
html.theme-dark .table-pos-summary-box.discount strong { color: #c4b5fd !important; }
html.theme-dark .table-pos-summary-box.paid strong { color: #4ade80 !important; }
html.theme-dark .table-pos-summary-box.remaining strong { color: #f87171 !important; }

html.theme-dark .table-pos-cart-table thead th,
html.theme-dark .table-pos-cart-table tbody td {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .table-pos-cart-table tbody td * {
    color: inherit;
}

html.theme-dark .table-pos-cart-table .qty {
    color: var(--text-muted) !important;
}

html.theme-dark .table-pos-selection-bar,
html.theme-dark .table-payment-selection-bar {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #065f46 !important;
    color: #6ee7b7 !important;
}

html.theme-dark .table-pos-payment-history-item,
html.theme-dark .payment-item-card,
html.theme-dark .payment-collect-card,
html.theme-dark .payment-discount-preview,
html.theme-dark .payment-mode-tabs,
html.theme-dark .payment-main-tabs,
html.theme-dark .payment-cash-quick button,
html.theme-dark .payment-modal-close {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .payment-modal,
html.theme-dark .table-pos-payment-modal,
html.theme-dark .pos-add-product-modal,
html.theme-dark .table-pos-remove-modal,
html.theme-dark .table-pos-move-modal,
html.theme-dark .payment-collect-modal,
html.theme-dark .phone-checkout-modal,
html.theme-dark .swal2-popup {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

html.theme-dark .payment-modal-header,
html.theme-dark .payment-modal-footer,
html.theme-dark .pos-add-product-footer {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .pos-menu-pane-qty {
    background: linear-gradient(180deg, #1e293b 0%, #141c2b 42%) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .pos-menu-pane-options,
html.theme-dark .pos-menu-layout {
    background: var(--card-bg) !important;
}

html.theme-dark .pos-menu-pane-label,
html.theme-dark .pos-menu-step-card-title,
html.theme-dark .pos-menu-price-total,
html.theme-dark .pos-menu-price-breakdown span,
html.theme-dark .remove-item-modal-hint {
    color: var(--text-muted) !important;
}

html.theme-dark .pos-menu-price-total strong,
html.theme-dark .pos-qty-display {
    color: var(--text-primary) !important;
}

html.theme-dark .pos-variation-row.is-selected {
    background: rgba(242, 101, 34, 0.12) !important;
    border-color: #f59e0b !important;
}

html.theme-dark .pos-content-chip:has(input:checked) {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: #059669 !important;
    color: #6ee7b7 !important;
}

html.theme-dark .pos-numpad-key:active,
html.theme-dark .pos-numpad-key.is-muted {
    background: #1e293b !important;
    color: var(--text-secondary) !important;
}

html.theme-dark .market-pos-print-bar {
    background: var(--card-bg) !important;
    border-color: #065f46 !important;
    color: var(--text-primary) !important;
}

html.theme-dark .market-pos-print-bar-text {
    color: #6ee7b7 !important;
}

html.theme-dark .table-pos-cart-table tbody tr.is-line-cancelled,
html.theme-dark .table-pos-cart-table tbody tr.is-line-cancelled td {
    background: #111827 !important;
    color: #64748b !important;
}

html.theme-dark .table-pos-cart-table tbody tr.is-payable:hover,
html.theme-dark .table-pos-cart-table tr.is-line-selected {
    background: rgba(16, 185, 129, 0.1) !important;
}

html.theme-dark .select2-dropdown,
html.theme-dark .select2-container--default .select2-selection--single,
html.theme-dark .select2-container--default .select2-search--dropdown .select2-search__field,
html.theme-dark .flatpickr-calendar,
html.theme-dark .offcanvas,
html.theme-dark .dropdown-menu,
html.theme-dark .popover,
html.theme-dark .toast,
html.theme-dark .list-group-item {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .swal2-title,
html.theme-dark .swal2-html-container,
html.theme-dark .swal2-content {
    color: var(--text-primary) !important;
}

html.theme-dark .table-pos-mobile-bar,
html.theme-dark .pos-variation-qty-btn,
html.theme-dark .payment-summary-card,
html.theme-dark .phone-order-customer-results,
html.theme-dark .phone-order-search-btn {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .payment-summary-card.is-paid {
    background: linear-gradient(145deg, #052e1a, #064e3b) !important;
    border-color: #065f46 !important;
}

html.theme-dark .payment-summary-card.is-remaining {
    background: linear-gradient(145deg, #3b1a08, #431407) !important;
    border-color: #9a3412 !important;
}

html.theme-dark .payment-cash-quick button[data-cash-quick="all"] {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #fff !important;
}

html.theme-dark .table-pos-pay-btn,
html.theme-dark .table-pos-add-products-btn {
    color: #fff !important;
}

/* Site-wide leftover light surfaces (light CSS files unchanged) */
html.theme-dark .cash-register-page,
html.theme-dark .cash-handover-page {
    --cash-report-border: #2a364a;
    --cash-report-stripe: #1a2436;
}

html.theme-dark .main-content [class*="-card"]:not(.receipt-paper):not(.pm-brand):not(.qr-theme-card):not(.payment-type-card):not(.payment-item-card):not(i),
html.theme-dark .main-content [class*="-bar"]:not(.progress-bar):not(.market-pos-header):not(i),
html.theme-dark .main-content [class*="-header"]:not(.market-pos-header):not(.table-pos-drawer-header):not(i),
html.theme-dark .main-content [class*="-toolbar"]:not(i),
html.theme-dark .main-content [class*="-panel"]:not(.login-form-panel):not(.order-status-panel):not(i),
html.theme-dark .main-content [class*="-shell"]:not(.receipt-preview-shell):not(.receipt-paper):not(i),
html.theme-dark .main-content [class*="-kpi"]:not(i),
html.theme-dark .main-content [class*="-hub"]:not(i),
html.theme-dark .main-content [class*="-banner"]:not(.settings-banner-thumb):not(i),
html.theme-dark .main-content [class*="-chip"]:not(.pm-switch-ui):not(i),
html.theme-dark .main-content [class*="-summary"]:not(i),
html.theme-dark .main-content [class*="filter-bar"]:not(i),
html.theme-dark .main-content [class*="-filters"]:not(i),
html.theme-dark .main-content [class*="-period"]:not(i),
html.theme-dark .main-content [class*="-empty"]:not(i),
html.theme-dark .main-content [class*="-preview"]:not(.receipt-studio-preview):not(.receipt-studio-preview-head):not(.receipt-paper):not(.receipt-preview-mount):not(.receipt-preview-shell):not(.tables-skin-preview):not(i),
html.theme-dark .main-content [class*="-accordion"]:not(i),
html.theme-dark .main-content [class*="-section"]:not(.nav-section):not(i),
html.theme-dark .main-content [class*="-board"]:not(i),
html.theme-dark .main-content [class*="-note"]:not(i),
html.theme-dark .main-content [class*="-search"]:not(input):not(textarea):not(i),
html.theme-dark .main-content [class*="-results"]:not(i),
html.theme-dark .cash-register-filter-bar,
html.theme-dark .cash-register-period-bar,
html.theme-dark .cash-report-card,
html.theme-dark .cash-report-card-header,
html.theme-dark .cash-toolbar-btn,
html.theme-dark .cash-detail-stat,
html.theme-dark .cash-handover-stat-card,
html.theme-dark .reports-kpi,
html.theme-dark .reports-hub-item,
html.theme-dark .reports-quick-icon-summary,
html.theme-dark .settings-mini-card,
html.theme-dark .settings-qr-card,
html.theme-dark .settings-nav,
html.theme-dark .settings-pages,
html.theme-dark .settings-module-item,
html.theme-dark .settings-mobile-toolbar,
html.theme-dark .day-order-stat,
html.theme-dark .day-order-detail-info,
html.theme-dark .customer-form-card,
html.theme-dark .customer-address-item,
html.theme-dark .customer-search-results,
html.theme-dark .customers-search-form,
html.theme-dark .logistics-courier-card,
html.theme-dark .logistics-feature-card,
html.theme-dark .logistics-step-card,
html.theme-dark .permission-section-card,
html.theme-dark .permission-tile,
html.theme-dark .product-pick-card,
html.theme-dark .qr-pending-order-card,
html.theme-dark .ny-order-header,
html.theme-dark .ny-order-right,
html.theme-dark .ny-order-products,
html.theme-dark .ny-order-categories,
html.theme-dark .tables-floor-filters,
html.theme-dark .tables-stat-card,
html.theme-dark .input-group-text,
html.theme-dark .page-link,
html.theme-dark .alert {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: none;
}

html.theme-dark .main-content [class*="-tile"]:not(.tables-floor-tile):not(.tables-floor-tile-wrap):not(.permission-tile-icon):not(.branch-tile-icon):not(.quick-access-tile):not(.quick-access-tile-icon):not(.quick-access-tile-label) {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .main-content table:not(.receipt-items):not(.receipt-table) > :not(caption) > tr > th,
html.theme-dark .main-content table:not(.receipt-items):not(.receipt-table) > :not(caption) > tr > td {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .main-content table:not(.receipt-items):not(.receipt-table) tbody tr:nth-child(even) > th,
html.theme-dark .main-content table:not(.receipt-items):not(.receipt-table) tbody tr:nth-child(even) > td {
    background-color: var(--surface-muted) !important;
}

html.theme-dark .cash-report-table thead th,
html.theme-dark .reports-data-table thead th,
html.theme-dark .payment-matrix-table thead th,
html.theme-dark .ny-order-cart-table thead th {
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

html.theme-dark .cash-report-total-row,
html.theme-dark .cash-report-total-row td,
html.theme-dark .day-orders-total-row,
html.theme-dark .day-orders-total-row td,
html.theme-dark .table-payment-total-row td,
html.theme-dark .reports-table-tfoot .reports-total-row td {
    background: #1a2436 !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .cash-report-row-link:hover,
html.theme-dark .cash-report-row-link:hover td,
html.theme-dark .cash-detail-row-link:hover,
html.theme-dark .reports-data-row:hover,
html.theme-dark .reports-data-row:hover td {
    background: #243044 !important;
}

html.theme-dark .cash-toolbar-btn:hover,
html.theme-dark .btn-light:hover {
    background: var(--surface-elevated) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .cash-filter-label,
html.theme-dark .cash-register-title,
html.theme-dark .cash-report-card-header,
html.theme-dark .text-dark {
    color: var(--text-primary) !important;
}

html.theme-dark .cash-filter-sublabel,
html.theme-dark .cash-register-period-bar,
html.theme-dark .cash-filter-separator {
    color: var(--text-secondary) !important;
}

/* Keep semantic colors / paper / occupancy */
html.theme-dark .receipt-paper,
html.theme-dark .receipt-print,
html.theme-dark .receipt-preview-mount,
html.theme-dark #handoverPrintArea {
    background: #fff !important;
    color: #111 !important;
}

html.theme-dark .main-content table:not(.receipt-items):not(.receipt-table) td.cash-report-balance-cell {
    background: #22c55e !important;
    color: #fff !important;
}

html.theme-dark .market-pos-header,
html.theme-dark .table-pos-drawer-header {
    background: linear-gradient(135deg, #0f766e 0%, #059669 55%, #10b981 100%) !important;
    color: #fff !important;
}

html.theme-dark .table-pos-page:not(.market-pos-page) .table-pos-drawer-header {
    background: #0f172a !important;
}

html.theme-dark .brand-logo-box {
    background: #fff !important;
}

html.theme-dark .btn-primary,
html.theme-dark .btn-success,
html.theme-dark .btn-danger,
html.theme-dark .btn-warning,
html.theme-dark .table-pos-pay-btn,
html.theme-dark .table-pos-add-products-btn,
html.theme-dark .order-status-badge,
html.theme-dark .order-status-pill,
html.theme-dark .day-order-status,
html.theme-dark .pm-status,
html.theme-dark .pm-brand,
html.theme-dark .badge,
html.theme-dark .order-source-badge {
    color: #fff !important;
}

html.theme-dark .alert-success {
    background: #052e16 !important;
    color: #86efac !important;
    border-color: #166534 !important;
}

html.theme-dark .alert-danger {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

html.theme-dark .alert-info {
    background: #082f49 !important;
    color: #7dd3fc !important;
    border-color: #075985 !important;
}

html.theme-dark .alert-warning {
    background: #431407 !important;
    color: #fdba74 !important;
    border-color: #9a3412 !important;
}

html.theme-dark .pagination .page-link {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .pagination .page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

html.theme-dark .dashboard-year-summary {
    background: var(--surface-muted) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .dashboard-year-summary-label {
    color: var(--text-muted) !important;
}

html.theme-dark .dashboard-net-positive {
    color: #4ade80 !important;
}

html.theme-dark .dashboard-net-negative {
    color: #f87171 !important;
}

html.theme-dark .settings-shell,
html.theme-dark .settings-nav {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .settings-nav-head {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .settings-groups,
html.theme-dark .settings-pages {
    background: var(--surface-muted) !important;
    color: var(--text-secondary) !important;
}

html.theme-dark .settings-group {
    color: var(--text-muted) !important;
    background: transparent !important;
}

html.theme-dark .settings-group:hover {
    color: var(--text-primary) !important;
    background: #1e293b !important;
}

html.theme-dark .settings-group.active {
    color: #fdba74 !important;
    background: rgba(242, 101, 34, 0.18) !important;
    box-shadow: inset 0 -2px 0 var(--primary) !important;
}

html.theme-dark .settings-group.active i {
    color: var(--primary) !important;
}

html.theme-dark .settings-page-link {
    color: var(--text-muted) !important;
    background: transparent !important;
}

html.theme-dark .settings-page-link:hover {
    color: var(--text-primary) !important;
    background: var(--card-bg) !important;
}

html.theme-dark .settings-page-link.active {
    color: #fdba74 !important;
    background: var(--card-bg) !important;
    box-shadow: none !important;
}

html.theme-dark .settings-nav-link {
    color: var(--text-muted) !important;
}

html.theme-dark .settings-nav-link:hover,
html.theme-dark .settings-nav-link.active {
    background: rgba(242, 101, 34, 0.16) !important;
    color: #fdba74 !important;
}

html.theme-dark .settings-nav-group-title {
    color: var(--text-muted) !important;
}

html.theme-dark .settings-nav-group-title:hover {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .settings-nav-group[open] .settings-nav-group-title {
    background: rgba(242, 101, 34, 0.16) !important;
    color: #fdba74 !important;
}

html.theme-dark .settings-nav-group .settings-nav-list {
    border-left-color: var(--border-color) !important;
}

html.theme-dark .settings-nav-toggle {
    background: var(--surface-muted) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .quick-access-title {
    color: var(--text-primary) !important;
}

html.theme-dark .quick-access-tile,
html.theme-dark .quick-access-tile:hover,
html.theme-dark .quick-access-tile:active,
html.theme-dark .quick-access-tile-icon,
html.theme-dark .quick-access-tile-icon i,
html.theme-dark .quick-access-tile-label {
    color: #fff !important;
}

html.theme-dark .quick-access-tile-icon,
html.theme-dark .quick-access-tile-icon i,
html.theme-dark .quick-access-tile i,
html.theme-dark .quick-access-tile i.bi,
html.theme-dark .quick-access-tile-label {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

html.theme-dark .quick-access-tile.qa-navy {
    background: linear-gradient(145deg, #3d4f6a 0%, #2a3b55 100%) !important;
}

html.theme-dark .quick-access-tile.qa-navy-soft {
    background: linear-gradient(145deg, #4a5f80 0%, #334155 100%) !important;
}

html.theme-dark .main-content .order-status-select,
html.theme-dark .main-content .order-status-select.form-select,
html.theme-dark .main-content .order-status-badge,
html.theme-dark .main-content .order-status-pill,
html.theme-dark .main-content .day-order-status,
html.theme-dark .main-content .pm-status {
    color: #fff !important;
    border-color: transparent !important;
    color-scheme: light;
}

html.theme-dark .main-content .order-status-select.waiting,
html.theme-dark .main-content .order-status-badge.waiting,
html.theme-dark .main-content .order-status-pill.waiting,
html.theme-dark .main-content .day-order-status.waiting,
html.theme-dark .main-content .pm-status.is-Pending {
    background: var(--status-waiting, #FF8A00) !important;
    background-color: var(--status-waiting, #FF8A00) !important;
}

html.theme-dark .main-content .order-status-select.preparing,
html.theme-dark .main-content .order-status-badge.preparing,
html.theme-dark .main-content .order-status-pill.preparing,
html.theme-dark .main-content .day-order-status.preparing {
    background: var(--status-preparing, #FF5A1F) !important;
    background-color: var(--status-preparing, #FF5A1F) !important;
}

html.theme-dark .main-content .order-status-select.ready,
html.theme-dark .main-content .order-status-badge.ready,
html.theme-dark .main-content .order-status-pill.ready,
html.theme-dark .main-content .day-order-status.ready,
html.theme-dark .main-content .pm-status.is-PickedUp {
    background: var(--status-ready, #7C3AED) !important;
    background-color: var(--status-ready, #7C3AED) !important;
}

html.theme-dark .main-content .order-status-select.ontheway,
html.theme-dark .main-content .order-status-badge.ontheway,
html.theme-dark .main-content .order-status-pill.ontheway,
html.theme-dark .main-content .day-order-status.ontheway,
html.theme-dark .main-content .pm-status.is-OnTheWay {
    background: var(--status-ontheway, #2563EB) !important;
    background-color: var(--status-ontheway, #2563EB) !important;
}

html.theme-dark .main-content .order-status-select.completed,
html.theme-dark .main-content .order-status-badge.completed,
html.theme-dark .main-content .order-status-pill.completed,
html.theme-dark .main-content .day-order-status.completed,
html.theme-dark .main-content .pm-status.is-Delivered {
    background: var(--status-completed, #16A34A) !important;
    background-color: var(--status-completed, #16A34A) !important;
}

html.theme-dark .main-content .order-status-select.cancelled,
html.theme-dark .main-content .order-status-badge.cancelled,
html.theme-dark .main-content .order-status-pill.cancelled,
html.theme-dark .main-content .day-order-status.cancelled,
html.theme-dark .main-content .pm-status.is-Cancelled {
    background: var(--status-cancelled, #EF4444) !important;
    background-color: var(--status-cancelled, #EF4444) !important;
}

html.theme-dark .main-content .pm-status.is-InPool {
    background: #334155 !important;
    background-color: #334155 !important;
}

html.theme-dark .main-content .pm-status.is-Assigned {
    background: #0F766E !important;
    background-color: #0F766E !important;
}

html.theme-dark .main-content .order-status-panel.is-status-waiting { --status-panel-bg: var(--status-waiting, #FF8A00); }
html.theme-dark .main-content .order-status-panel.is-status-preparing { --status-panel-bg: var(--status-preparing, #FF5A1F); }
html.theme-dark .main-content .order-status-panel.is-status-ready { --status-panel-bg: var(--status-ready, #7C3AED); }
html.theme-dark .main-content .order-status-panel.is-status-ontheway { --status-panel-bg: var(--status-ontheway, #2563EB); }
html.theme-dark .main-content .order-status-panel.is-status-completed { --status-panel-bg: var(--status-completed, #16A34A); }
html.theme-dark .main-content .order-status-panel.is-status-cancelled { --status-panel-bg: var(--status-cancelled, #EF4444); }
html.theme-dark .main-content .order-status-panel {
    background: var(--status-panel-bg, #64748b) !important;
    color: #fff !important;
}

html.theme-dark .main-content .table.table-panel .order-status-panel {
    background: transparent !important;
}

html.theme-dark .payment-type-option input:checked + .payment-type-card,
html.theme-dark .payment-fit-methods .payment-type-option input:checked + .payment-type-card,
html.theme-dark .phone-order-payment-grid .payment-type-option input:checked + .payment-type-card,
html.theme-dark .ny-order-payment-grid .payment-type-option input:checked + .payment-type-card {
    background: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.28) !important;
}

html.theme-dark .payment-type-option input:checked + .payment-type-card i {
    color: #fff !important;
}

html.theme-dark .payment-mode-tab.active,
html.theme-dark .payment-main-tab.active {
    background: rgba(242, 101, 34, 0.2) !important;
    color: #fdba74 !important;
    box-shadow: none !important;
}

html.theme-dark .payment-item-card.is-selected,
html.theme-dark .payment-discount-mode-option.is-selected,
html.theme-dark .pos-variation-row.is-selected,
html.theme-dark .pos-variation-radio-option.is-selected,
html.theme-dark .pos-kitchen-send-option.is-selected,
html.theme-dark .pos-content-chip:has(input:checked) {
    background: rgba(242, 101, 34, 0.18) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fdba74 !important;
    box-shadow: 0 0 0 2px rgba(242, 101, 34, 0.22) !important;
}

html.theme-dark .receipt-studio-stage {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 46%),
        linear-gradient(180deg, #1A2940 0%, #111827 100%) !important;
}

html.theme-dark .receipt-paper,
html.theme-dark .receipt-paper *,
html.theme-dark .receipt-print,
html.theme-dark .receipt-print *,
html.theme-dark .receipt-preview-mount,
html.theme-dark .receipt-preview-mount *,
html.theme-dark .receipt-preview-shell,
html.theme-dark .receipt-preview-shell *,
html.theme-dark #handoverPrintArea,
html.theme-dark #handoverPrintArea * {
    color: #111 !important;
}

html.theme-dark .receipt-paper,
html.theme-dark .receipt-print,
html.theme-dark .receipt-preview-mount,
html.theme-dark .receipt-preview-shell,
html.theme-dark #handoverPrintArea {
    background: #fffef8 !important;
}

html.theme-dark .caller-id-card,
html.theme-dark .caller-id-stack .caller-id-card {
    background: #1e293b !important;
    border-color: rgba(74, 222, 128, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html.theme-dark .caller-id-card-titles,
html.theme-dark .caller-id-card-titles strong,
html.theme-dark .caller-id-name,
html.theme-dark .caller-id-stack .caller-id-name,
html.theme-dark .caller-id-stack strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

html.theme-dark .caller-id-phone {
    color: #fdba74 !important;
}

html.theme-dark .caller-id-line,
html.theme-dark .caller-id-close {
    color: #94a3b8 !important;
}

html.theme-dark .caller-id-icon {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}

/* Dark floor tiles — keep status hues, drop pastel */
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile.is-empty {
    background: linear-gradient(145deg, #134e4a 0%, #115e59 55%, #0f766e 100%) !important;
    border-color: #2dd4bf !important;
    color: #ccfbf1 !important;
    --tile-accent: #5eead4;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile.is-occupied {
    background: linear-gradient(145deg, #4c0519 0%, #9f1239 55%, #be123c 100%) !important;
    border-color: #fb7185 !important;
    color: #ffe4e6 !important;
    --tile-accent: #fb7185;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile.is-pending-kitchen {
    background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%) !important;
    border-color: #60a5fa !important;
    color: #dbeafe !important;
    --tile-accent: #93c5fd;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile.is-waiter-call,
html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile.is-pending-qr {
    background: linear-gradient(145deg, #451a03 0%, #b45309 55%, #d97706 100%) !important;
    border-color: #fbbf24 !important;
    color: #fef3c7 !important;
    --tile-accent: #fbbf24;
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile::after {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), transparent 48%);
}

html.theme-dark .tables-floor-page:not(.tables-skin-night) .tables-floor-tile .tile-badge {
    background: rgba(15, 23, 42, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: inherit !important;
}

html.theme-dark .tables-floor-filters .zone-filter-btn {
    color: #cbd5e1 !important;
    background: transparent !important;
}

html.theme-dark .tables-floor-filters .zone-filter-btn:hover {
    background: #1e293b !important;
    color: #fff !important;
}

html.theme-dark .tables-floor-filters .zone-filter-btn.active {
    background: var(--brand, #F26522) !important;
    color: #fff !important;
    border-color: var(--brand, #F26522) !important;
}

/* Dark mode selections — orange, site-wide */
html.theme-dark .form-check-input:checked {
    background-color: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
}

html.theme-dark .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(242, 101, 34, 0.28) !important;
}

html.theme-dark .qr-theme-card.is-selected,
html.theme-dark .tables-skin-picker .qr-theme-card.is-selected,
html.theme-dark .is-selected:not(.receipt-paper):not(.pm-brand),
html.theme-dark [class*="-option"].is-selected,
html.theme-dark [class*="-card"].is-selected:not(.receipt-paper),
html.theme-dark label:has(> input:checked),
html.theme-dark label:has(> input[type="radio"]:checked),
html.theme-dark label:has(> input[type="checkbox"]:checked),
html.theme-dark .btn-check:checked + .btn,
html.theme-dark .btn-check:checked + label,
html.theme-dark .list-group-item.active,
html.theme-dark .dropdown-item.active,
html.theme-dark .nav-pills .nav-link.active,
html.theme-dark .nav-tabs .nav-link.active,
html.theme-dark .page-item.active .page-link,
html.theme-dark .pagination .page-item.active .page-link,
html.theme-dark .settings-page-link.active,
html.theme-dark .settings-nav-link.active,
html.theme-dark .settings-group.active,
html.theme-dark .zone-filter-btn.active,
html.theme-dark .category-item.active,
html.theme-dark .pos-cat-btn.active,
html.theme-dark .delivery-district-chip:has(input:checked),
html.theme-dark .delivery-mahalle-row.is-selected,
html.theme-dark .settings-printer-role-chip.is-selected,
html.theme-dark .phone-address-option input:checked + .phone-address-card {
    background: rgba(242, 101, 34, 0.2) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fdba74 !important;
    box-shadow: 0 0 0 2px rgba(242, 101, 34, 0.28) !important;
}

html.theme-dark .qr-theme-card.is-selected .qr-theme-card-title,
html.theme-dark .qr-theme-card.is-selected .qr-theme-card-desc,
html.theme-dark .settings-page-link.active,
html.theme-dark .settings-nav-link.active,
html.theme-dark .settings-group.active {
    color: #fdba74 !important;
}

html.theme-dark .settings-page-link.active {
    background: rgba(242, 101, 34, 0.18) !important;
}

html.theme-dark .btn-check:checked + .btn,
html.theme-dark .page-item.active .page-link {
    background: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fff !important;
}

html.theme-dark .payment-type-card,
html.theme-dark .payment-fit-methods .payment-type-card,
html.theme-dark .payment-collect-modal .payment-type-card,
html.theme-dark .payment-collect-modal:not(.phone-checkout-modal) .payment-fit-methods .payment-type-card,
html.theme-dark .phone-order-payment-grid .payment-type-card,
html.theme-dark .ny-order-payment-grid .payment-type-card,
html.theme-dark .table-payment-type-grid .payment-type-card,
html.theme-dark .payment-item-card:not(.is-selected),
html.theme-dark .payment-discount-mode-option:not(.is-selected),
html.theme-dark .payment-mode-tab:not(.active),
html.theme-dark .payment-main-tab:not(.active),
html.theme-dark .phone-address-card,
html.theme-dark .pos-variation-radio-option:not(.is-selected),
html.theme-dark .pos-kitchen-send-option:not(.is-selected),
html.theme-dark .pos-content-chip,
html.theme-dark .payment-cash-quick button,
html.theme-dark .pos-numpad-key {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

html.theme-dark .payment-type-card i,
html.theme-dark .payment-type-card span,
html.theme-dark .payment-fit-methods .payment-type-card i,
html.theme-dark .payment-collect-modal .payment-type-card i,
html.theme-dark .phone-address-card i,
html.theme-dark .pos-content-chip {
    color: #cbd5e1 !important;
}

html.theme-dark .payment-type-option input:checked + .payment-type-card,
html.theme-dark .payment-fit-methods .payment-type-option input:checked + .payment-type-card,
html.theme-dark .payment-collect-modal .payment-type-option input:checked + .payment-type-card,
html.theme-dark .payment-collect-modal:not(.phone-checkout-modal) .payment-fit-methods .payment-type-option input:checked + .payment-type-card,
html.theme-dark .phone-order-payment-grid .payment-type-option input:checked + .payment-type-card,
html.theme-dark .ny-order-payment-grid .payment-type-option input:checked + .payment-type-card,
html.theme-dark .table-payment-type-grid .payment-type-option input:checked + .payment-type-card {
    background: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.28) !important;
}

html.theme-dark .payment-type-option input:checked + .payment-type-card i,
html.theme-dark .payment-type-option input:checked + .payment-type-card span,
html.theme-dark .payment-collect-modal .payment-type-option input:checked + .payment-type-card i {
    color: #fff !important;
}

html.theme-dark .payment-cash-quick button[data-cash-quick="all"] {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #fff !important;
}

/* Forms: switches, user/staff tiles, permissions */
html.theme-dark .staff-active-switch,
html.theme-dark .customer-active-switch,
html.theme-dark .form-check.form-switch.staff-active-switch,
html.theme-dark .form-check.form-switch.customer-active-switch,
html.theme-dark .staff-branch-all-toggle,
html.theme-dark .settings-toggle-row,
html.theme-dark .settings-module-item {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html.theme-dark .form-check-label,
html.theme-dark .staff-active-switch .form-check-label,
html.theme-dark .customer-active-switch .form-check-label,
html.theme-dark .form-text,
html.theme-dark .staff-form-section-hint {
    color: #cbd5e1 !important;
}

html.theme-dark .form-check-input,
html.theme-dark .form-switch .form-check-input,
html.theme-dark .staff-active-switch .form-check-input,
html.theme-dark .customer-active-switch .form-check-input {
    background-color: #334155 !important;
    border-color: #64748b !important;
}

html.theme-dark .form-check-input:checked,
html.theme-dark .form-switch .form-check-input:checked,
html.theme-dark .staff-active-switch .form-check-input:checked,
html.theme-dark .customer-active-switch .form-check-input:checked {
    background-color: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
}

html.theme-dark .settings-switch-slider {
    background: #475569 !important;
}

html.theme-dark .settings-switch input[type="checkbox"]:checked + .settings-switch-slider,
html.theme-dark .settings-switch input[type="checkbox"]:checked ~ .settings-switch-slider {
    background: var(--brand, #F26522) !important;
}

html.theme-dark .branch-tile,
html.theme-dark .permission-tile,
html.theme-dark .permission-tiles--nested .permission-tile,
html.theme-dark .permission-accordion-item,
html.theme-dark .permission-accordion-body,
html.theme-dark .permission-accordion-toggle {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html.theme-dark .branch-tile-name,
html.theme-dark .permission-tile-label,
html.theme-dark .permission-accordion-page-label {
    color: #f1f5f9 !important;
}

html.theme-dark .branch-tile-meta,
html.theme-dark .permission-accordion-ops-hint {
    color: #94a3b8 !important;
}

html.theme-dark .branch-tile-icon,
html.theme-dark .permission-tile-icon {
    background: #0f172a !important;
    color: #fdba74 !important;
}

html.theme-dark .permission-tile-check {
    background: transparent !important;
    border-color: #64748b !important;
}

html.theme-dark .branch-tile.is-checked,
html.theme-dark .permission-tile.is-checked,
html.theme-dark .permission-accordion-page.is-checked,
html.theme-dark .permission-accordion-item.is-page-enabled {
    background: rgba(242, 101, 34, 0.18) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fdba74 !important;
    box-shadow: 0 0 0 1px rgba(242, 101, 34, 0.28) !important;
}

html.theme-dark .branch-tile.is-checked .branch-tile-name,
html.theme-dark .permission-tile.is-checked .permission-tile-label,
html.theme-dark .permission-accordion-page.is-checked .permission-accordion-page-label {
    color: #fdba74 !important;
}

html.theme-dark .branch-tile.is-checked .branch-tile-icon,
html.theme-dark .permission-tile.is-checked .permission-tile-icon {
    background: rgba(242, 101, 34, 0.22) !important;
    color: #fff !important;
}

html.theme-dark .branch-tile.is-checked .permission-tile-check,
html.theme-dark .permission-tile.is-checked .permission-tile-check {
    background: var(--brand, #F26522) !important;
    border-color: var(--brand, #F26522) !important;
    color: #fff !important;
}

html.theme-dark .permission-tile.permission-tile--locked {
    background: #162032 !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* Notifications + titles: light CSS uses navy (#1A2940 / #111) which disappears on dark surfaces */
html.theme-dark .header-notif-pop {
    background: #1a2436 !important;
    border-color: #3d4d66 !important;
    color: #f8fafc !important;
}

html.theme-dark .header-notif-head,
html.theme-dark .modal-title,
html.theme-dark #headerNoticeWho,
html.theme-dark .card-header-custom,
html.theme-dark .card-header-custom > span,
html.theme-dark .card-header-custom strong,
html.theme-dark .top-header .page-title,
html.theme-dark .customers-page-title,
html.theme-dark .tables-page-title,
html.theme-dark .cash-register-title,
html.theme-dark .quick-access-title,
html.theme-dark .ny-order-title,
html.theme-dark .settings-form .card-header-custom {
    color: #f8fafc !important;
}

html.theme-dark .header-notif-head {
    background: #121a28 !important;
    border-bottom-color: #3d4d66 !important;
}

html.theme-dark .header-notif-compose {
    border-bottom-color: #3d4d66 !important;
    background: #162033 !important;
}

html.theme-dark .header-notif-empty {
    color: #cbd5e1 !important;
}

html.theme-dark .header-notif-item,
html.theme-dark .header-notif-scroll .restaurant-notif-item,
html.theme-dark .restaurant-notif-item {
    background: #1e2a3d !important;
    border-bottom-color: #3d4d66 !important;
    color: #f1f5f9 !important;
}

html.theme-dark .header-notif-item-text,
html.theme-dark .header-notif-item-text strong,
html.theme-dark .header-notif-item-text span,
html.theme-dark .restaurant-notif-item-text,
html.theme-dark .restaurant-notif-item-text strong {
    color: #f8fafc !important;
}

html.theme-dark .header-notif-item-text .text-muted,
html.theme-dark .header-notif-item-text .small,
html.theme-dark .restaurant-notif-item-text .text-muted,
html.theme-dark .restaurant-notif-item-text .small {
    color: #cbd5e1 !important;
}

html.theme-dark .restaurant-notif-bar {
    background: #2a2110 !important;
    border-color: #d97706 !important;
    color: #fff7ed !important;
}

html.theme-dark .restaurant-notif-bar-summary,
html.theme-dark .restaurant-notif-bar-head,
html.theme-dark .restaurant-notif-bar-icon {
    color: #ffedd5 !important;
}

html.theme-dark .notice-state.is-new {
    background: #F26522 !important;
    color: #fff !important;
}

html.theme-dark .notice-state.is-seen {
    background: #15803D !important;
    color: #fff !important;
}

html.theme-dark .header-notif-btn {
    color: #f8fafc !important;
}

html.theme-dark .header-notif-badge,
html.theme-dark .nav-notif-badge {
    color: #fff !important;
}

html.theme-dark .table.table-panel tbody td .text-muted,
html.theme-dark table.pm-table tbody td .text-muted,
html.theme-dark .table.table-panel tbody td .small,
html.theme-dark table.pm-table tbody td .small,
html.theme-dark .all-orders-table.table-panel tbody td .text-muted,
html.theme-dark .day-orders-table.table-panel tbody td .text-muted,
html.theme-dark .orders-browse-page .table-panel tbody td .text-muted {
    color: #cbd5e1 !important;
}
