/* ==========================================================================
   NextERP — "Printed Timetable" refresh layer (tenant ERP app)
   Additive override sheet. Loads AFTER app.css. One-click reversible:
   window.nxErpSetDesign('legacy') disables this sheet and adds .legacy-design
   to <html>, neutralising every rule below (all scoped under
   html:not(.legacy-design)). POS (.main-wrapper.pos-three) and print are
   excluded. Dark mode hook: [data-bs-theme="dark"] (set by themeInterop).
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@500;600;700&display=swap');

/* ------------------------------------------------------------------ tokens */
@media screen {
    html:not(.legacy-design) {
        --pt-paper: #F6F4EE;
        --pt-surface: #FFFFFF;
        --pt-surface-alt: #FBF9F3;
        --pt-ink: #1A1814;
        --pt-ink-72: rgba(26, 24, 20, .75);
        --pt-ink-52: rgba(26, 24, 20, .60);
        --pt-ink-38: rgba(26, 24, 20, .46);
        --pt-hairline: rgba(26, 24, 20, .16);
        --pt-hairline-strong: rgba(26, 24, 20, .30);
        --pt-accent: #B9351C;
        --pt-accent-ink: #8F2713;
        --pt-ok: #15803D;
        --pt-warn: #B45309;
        --pt-danger: #B42318;
        --pt-info: #0E7490;
        --pt-radius: 4px;

        /* re-point the app's own tokens at the new world */
        --primary-color: var(--pt-accent);
        --ed-primary: var(--pt-accent);
        --ed-shadow: none;
        --ed-shadow-hover: none;
    }

    html:not(.legacy-design)[data-bs-theme="dark"] {
        --pt-paper: #101418;
        --pt-surface: #161B21;
        --pt-surface-alt: #1B2129;
        --pt-ink: #ECEAE4;
        --pt-ink-72: rgba(236, 234, 228, .78);
        --pt-ink-52: rgba(236, 234, 228, .62);
        --pt-ink-38: rgba(236, 234, 228, .46);
        --pt-hairline: rgba(255, 255, 255, .14);
        --pt-hairline-strong: rgba(255, 255, 255, .28);
        --pt-accent: #F0613F;
        --pt-accent-ink: #F0613F;
    }

    /* ------------------------------------------------------------- ground */
    html:not(.legacy-design) body {
        background: var(--pt-paper);
        color: var(--pt-ink);
        font-family: 'Cairo', 'Segoe UI', sans-serif;
    }
    html:not(.legacy-design) ::selection {
        background: rgba(185, 53, 28, .22);
    }

    /* ------------------------------------------------------------- scrollbars */
    html:not(.legacy-design) * {
        scrollbar-width: thin;
        scrollbar-color: var(--pt-ink-38) transparent;
    }
    html:not(.legacy-design) ::-webkit-scrollbar { width: 10px; height: 10px; }
    html:not(.legacy-design) ::-webkit-scrollbar-track { background: transparent; }
    html:not(.legacy-design) ::-webkit-scrollbar-thumb {
        background: var(--pt-ink-38);
        border-radius: 0;
        border: 2px solid var(--pt-paper);
    }
    html:not(.legacy-design) ::-webkit-scrollbar-thumb:hover { background: var(--pt-ink-52); }

    /* --------------------------------------------------------- typography */
    /* Zilla Slab for main page headings only */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .page-header h4,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .page-header h3,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .page-wrapper > .page-header,
    html:not(.legacy-design) h1.pt-display, html:not(.legacy-design) h2.pt-display {
        font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
        font-weight: 600;
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(h5, h6, .card-title, .panel-title) {
        font-family: 'Cairo', sans-serif;
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .text-muted,
    html:not(.legacy-design) .text-secondary { color: var(--pt-ink-52) !important; }

    /* tabular figures on numeric/table/amount cells */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(table, .rz-grid-table, .dataTables_wrapper) {
        font-variant-numeric: tabular-nums;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(.amount, .price, .tabular-nums, td.num, .text-end) {
        font-variant-numeric: tabular-nums;
    }

    /* ------------------------------------------------------------ sidebar */
    html:not(.legacy-design) .sidebar {
        background: var(--pt-surface-alt);
        border-inline-end: 1px solid var(--pt-hairline);
        box-shadow: none;
    }
    [dir="rtl"] html:not(.legacy-design) .sidebar,
    html:not(.legacy-design) body.layout-mode-rtl .sidebar { border-inline-end: 1px solid var(--pt-hairline); }

    html:not(.legacy-design) .sidebar-menu .submenu-hdr {
        font-size: .66rem;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--pt-ink-38);
        font-weight: 600;
    }
    html:not(.legacy-design) .sidebar-menu ul li a {
        color: var(--pt-ink-72);
        border-radius: var(--pt-radius);
    }
    html:not(.legacy-design) .sidebar-menu ul li a:hover {
        background: transparent;
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .sidebar-menu ul li a.active {
        background: transparent;
        color: var(--pt-ink);
        font-weight: 600;
        position: relative;
    }
    html:not(.legacy-design) .sidebar-menu ul li a.active::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 7px;
        height: 7px;
        background: var(--pt-accent);
    }
    html:not(.legacy-design) .sidebar-menu ul li a i { color: inherit; }
    html:not(.legacy-design) .sidebar .submenu li ul li a::before { opacity: .5; }

    /* -------------------------------------------------------------- header */
    html:not(.legacy-design) .header,
    html:not(.legacy-design) .main-header {
        background: var(--pt-surface);
        border-bottom: 1px solid var(--pt-hairline);
        box-shadow: none;
    }
    html:not(.legacy-design) .nav.user-menu .nav-item-box > a,
    html:not(.legacy-design) .nav.user-menu .nav-item > a { color: var(--pt-ink-72); }
    html:not(.legacy-design) .nav.user-menu .nav-item-box > a:hover { color: var(--pt-ink); }

    /* --------------------------------------------------------------- cards */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .card,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .panel {
        background: var(--pt-surface);
        border: 1px solid var(--pt-hairline);
        border-radius: var(--pt-radius);
        box-shadow: none !important;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .card-header,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .card-footer {
        background: var(--pt-surface);
        border-color: var(--pt-hairline);
    }

    /* -------------------------------------------------------------- tables */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .table,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .dataTable,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-table {
        --bs-table-bg: transparent;
        --bs-table-border-color: var(--pt-hairline);
        border-collapse: collapse;
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .table :is(th, td),
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-table :is(th, td),
    html:not(.legacy-design) .main-wrapper:not(.pos-three) table.dataTable :is(th, td) {
        border-top: 1px solid var(--pt-hairline);
        border-bottom: none;
        padding: .55rem .75rem;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .table thead th,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-table thead th,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) table.dataTable thead th {
        background: var(--pt-surface-alt);
        border-bottom: 1px solid var(--pt-hairline-strong);
        color: var(--pt-ink-72);
        font-weight: 600;
        font-size: .78rem;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .table tbody tr:hover,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-table tbody tr:hover {
        background: var(--pt-surface-alt);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-table thead th.rz-grid-header-sortable:hover,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .rz-grid-header { background: var(--pt-surface-alt); }

    /* ------------------------------------------------------------- buttons */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-primary,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) a.btn-primary {
        background: var(--pt-accent);
        border: 1px solid var(--pt-accent);
        color: #fff;
        border-radius: var(--pt-radius);
        box-shadow: none;
        font-weight: 600;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-primary:hover,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-primary:focus,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-primary:active {
        background: var(--pt-accent-ink);
        border-color: var(--pt-accent-ink);
        color: #fff;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-secondary,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-outline-secondary,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-light {
        background: transparent;
        border: 1px solid var(--pt-hairline-strong);
        color: var(--pt-ink);
        border-radius: var(--pt-radius);
        box-shadow: none;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-secondary:hover,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-outline-secondary:hover,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-light:hover {
        background: var(--pt-surface-alt);
        border-color: var(--pt-ink-52);
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(.btn, button):focus-visible {
        outline: 2px solid var(--pt-accent);
        outline-offset: 1px;
    }
    /* semantic quiet buttons */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-outline-primary {
        background: transparent;
        border: 1px solid var(--pt-hairline-strong);
        color: var(--pt-accent);
        border-radius: var(--pt-radius);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .btn-outline-primary:hover {
        background: rgba(185, 53, 28, .08);
        border-color: var(--pt-accent);
        color: var(--pt-accent-ink);
    }
    html:not(.legacy-design)[data-bs-theme="dark"] .main-wrapper:not(.pos-three) .btn-primary { color: #101418; }

    /* --------------------------------------------------------------- links */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) a { color: var(--pt-accent); }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) a:hover { color: var(--pt-accent-ink); }

    /* --------------------------------------------------------------- forms */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(.form-control, .form-select, .rz-textbox, .rz-dropdown) {
        background: var(--pt-surface);
        border: 1px solid var(--pt-hairline-strong);
        border-radius: var(--pt-radius);
        color: var(--pt-ink);
        box-shadow: none;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) :is(.form-control, .form-select, .rz-textbox, .rz-dropdown):focus {
        border-color: var(--pt-accent);
        box-shadow: 0 0 0 2px rgba(185, 53, 28, .18);
        background: var(--pt-surface);
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .input-group-text {
        background: var(--pt-surface-alt);
        border: 1px solid var(--pt-hairline-strong);
        color: var(--pt-ink-52);
        border-radius: var(--pt-radius);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .form-label,
    html:not(.legacy-design) .main-wrapper:not(.pos-three) label { color: var(--pt-ink-72); }

    /* -------------------------------------------------------------- badges */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge {
        border: 1px solid var(--pt-hairline-strong);
        background: transparent;
        color: var(--pt-ink-72);
        border-radius: var(--pt-radius);
        font-weight: 600;
        padding: .28em .55em;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge.bg-primary {
        border-color: var(--pt-accent);
        color: var(--pt-accent);
        background: rgba(185, 53, 28, .07);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge.bg-success { border-color: var(--pt-ok); color: var(--pt-ok); background: rgba(21, 128, 61, .07); }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge.bg-warning { border-color: var(--pt-warn); color: var(--pt-warn); background: rgba(176, 124, 10, .08); }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge.bg-danger { border-color: var(--pt-danger); color: var(--pt-danger); background: rgba(180, 35, 24, .07); }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .badge.bg-info { border-color: var(--pt-info); color: var(--pt-info); background: rgba(14, 116, 144, .07); }

    /* --------------------------------------------- dropdowns / modals / alerts */
    html:not(.legacy-design) .dropdown-menu {
        background: var(--pt-surface);
        border: 1px solid var(--pt-hairline-strong);
        border-radius: var(--pt-radius);
        box-shadow: none;
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .dropdown-item { color: var(--pt-ink-72); border-radius: var(--pt-radius); }
    html:not(.legacy-design) .dropdown-item:hover, html:not(.legacy-design) .dropdown-item:focus {
        background: var(--pt-surface-alt);
        color: var(--pt-ink);
    }
    html:not(.legacy-design) .dropdown-divider, html:not(.legacy-design) hr { border-color: var(--pt-hairline); opacity: 1; }
    html:not(.legacy-design) .modal-content, html:not(.legacy-design) .offcanvas {
        background: var(--pt-surface);
        border: 1px solid var(--pt-hairline-strong);
        border-radius: var(--pt-radius);
        box-shadow: none;
    }
    html:not(.legacy-design) .modal-header, html:not(.legacy-design) .modal-footer { border-color: var(--pt-hairline); }
    html:not(.legacy-design) .alert { border-radius: var(--pt-radius); border: 1px solid var(--pt-hairline-strong); box-shadow: none; }
    html:not(.legacy-design) .alert-success { background: rgba(21, 128, 61, .07); border-color: var(--pt-ok); color: var(--pt-ok); }
    html:not(.legacy-design) .alert-danger { background: rgba(180, 35, 24, .07); border-color: var(--pt-danger); color: var(--pt-danger); }
    html:not(.legacy-design) .alert-warning { background: rgba(176, 124, 10, .08); border-color: var(--pt-warn); color: var(--pt-warn); }
    html:not(.legacy-design) .alert-info { background: rgba(14, 116, 144, .07); border-color: var(--pt-info); color: var(--pt-info); }

    /* ---------------------------------------------------- pagination / tabs */
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .pagination .page-link {
        color: var(--pt-ink-72);
        border-color: var(--pt-hairline);
        border-radius: var(--pt-radius);
        background: var(--pt-surface);
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .pagination .page-item.active .page-link {
        background: var(--pt-accent);
        border-color: var(--pt-accent);
        color: #fff;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .nav-tabs { border-bottom: 1px solid var(--pt-hairline-strong); }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .nav-tabs .nav-link {
        color: var(--pt-ink-52);
        border: none;
        border-bottom: 2px solid transparent;
    }
    html:not(.legacy-design) .main-wrapper:not(.pos-three) .nav-tabs .nav-link.active {
        color: var(--pt-ink);
        background: transparent;
        border-bottom-color: var(--pt-accent);
    }

    /* ------------------------------------------------------------- footer */
    html:not(.legacy-design) .app-version-footer { color: var(--pt-ink-38); border-top: 1px solid var(--pt-hairline); }
}

/* ==========================================================================
   LOGIN — Printed Timetable
   Restyles the login page (Login.razor .login-lux vocabulary) purely via CSS.
   Markup untouched; the page's own <style> block renders later in the
   document, so every selector below is prefixed with
   `html:not(.legacy-design) body` to win the cascade on specificity alone
   (no !important). Reuses the --pt-* tokens defined at the top of this sheet.
   ========================================================================== */

/* page ground: bone paper */
html:not(.legacy-design) body .login-lux {
    background: var(--pt-paper);
}

/* hero panel: flat deep ink, hairline edge, paper text */
html:not(.legacy-design) body .login-lux-hero {
    background: #1A1814;
    border-inline-end: 1px solid rgba(244, 241, 233, .12);
    color: #F6F4EE;
}
/* language toggle pill: hairline border, no blur, square-ish radius */
html:not(.legacy-design) body .login-lux-toggle {
    border: 1px solid rgba(244, 241, 233, .35);
    background: transparent;
    border-radius: var(--pt-radius);
    backdrop-filter: none;
    color: #F6F4EE;
    transition: border-color .15s, background-color .15s, color .15s;
}
html:not(.legacy-design) body .login-lux-toggle:hover {
    border-color: #F0613F;
    color: #F6F4EE;
}
/* brand badge: flat vermilion square */
html:not(.legacy-design) body .login-lux-brand-badge {
    background: #B9351C;
    border-radius: var(--pt-radius);
}
/* tagline: vermilion-on-dark, uppercase letter-spaced */
html:not(.legacy-design) body .login-lux-tagline {
    color: #F0613F;
    text-transform: uppercase;
    letter-spacing: .16em;
}
/* headline: Zilla Slab serif 600 */
html:not(.legacy-design) body .login-lux-headline {
    font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
    font-weight: 600;
    color: #F6F4EE;
}
html:not(.legacy-design) body .login-lux-sub { color: rgba(244, 241, 233, .7); }
/* bullets: 1px hairline rail + vermilion square markers */
html:not(.legacy-design) body .login-lux-bullets {
    border-inline-start: 1px solid rgba(244, 241, 233, .25);
    padding-inline-start: 18px;
}
html:not(.legacy-design) body .login-lux-bullets li {
    color: rgba(244, 241, 233, .9);
}
html:not(.legacy-design) body .login-lux-bullets li::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    background: #F0613F;
    margin-inline-end: 10px;
    vertical-align: middle;
}
html:not(.legacy-design) body .login-lux-foot { color: rgba(244, 241, 233, .5); }

/* form card: white sheet, hairline, no shadow, keeps rise animation */
html:not(.legacy-design) body .login-lux-card {
    background: var(--pt-surface);
    border: 1px solid rgba(26, 24, 20, .16);
    border-radius: var(--pt-radius);
    box-shadow: none;
}
html:not(.legacy-design) body .login-lux-head h3 {
    font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
    font-weight: 600;
    color: #1A1814;
}
html:not(.legacy-design) body .login-lux-head p { color: rgba(26, 24, 20, .60); }

/* labels + icons */
html:not(.legacy-design) body .login-lux-field label { color: rgba(26, 24, 20, .75); }
html:not(.legacy-design) body .login-lux-input-wrap .field-icon,
html:not(.legacy-design) body .login-lux-input-wrap .toggle-password { color: rgba(26, 24, 20, .46); }

/* inputs */
html:not(.legacy-design) body .login-lux-input-wrap .form-control {
    background: #FFFFFF;
    border: 1px solid rgba(26, 24, 20, .30);
    border-radius: var(--pt-radius);
    color: #1A1814;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
html:not(.legacy-design) body .login-lux-input-wrap .form-control:focus {
    border-color: #B9351C;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(185, 53, 28, .12);
    color: #1A1814;
}

/* remember-me + links */
html:not(.legacy-design) body .login-lux-remember { color: rgba(26, 24, 20, .75); }
html:not(.legacy-design) body .login-lux-remember input[type="checkbox"] { accent-color: #B9351C; }
html:not(.legacy-design) body .login-lux-row a,
html:not(.legacy-design) body .login-lux-signup a { color: #B9351C; }
html:not(.legacy-design) body .login-lux-row a:hover,
html:not(.legacy-design) body .login-lux-signup a:hover {
    color: #B9351C;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html:not(.legacy-design) body .login-lux-signup { color: rgba(26, 24, 20, .60); }

/* submit */
html:not(.legacy-design) body .login-lux-submit {
    background: #B9351C;
    border-radius: var(--pt-radius);
    transition: background-color .15s, transform .05s;
}
html:not(.legacy-design) body .login-lux-submit:hover { background: #8F2713; }
/* :active scale(0.99) kept from the page styles */

/* errors / validation: soft danger tint */
html:not(.legacy-design) body .login-lux-error {
    background: rgba(180, 35, 24, .08);
    border: 1px solid rgba(180, 35, 24, .15);
    border-radius: var(--pt-radius);
    color: #B42318;
}
html:not(.legacy-design) body .login-lux-validation.validation-errors,
html:not(.legacy-design) body .login-lux-validation ul {
    background: rgba(180, 35, 24, .08);
    border: 1px solid rgba(180, 35, 24, .15);
    border-radius: var(--pt-radius);
    color: #B42318;
}

/* tenant selection */
html:not(.legacy-design) body .tenant-selection h3 {
    font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
    font-weight: 600;
    color: #1A1814;
}
html:not(.legacy-design) body .tenant-card {
    background: #FFFFFF;
    border: 1px solid rgba(26, 24, 20, .16);
    border-radius: var(--pt-radius);
    color: rgba(26, 24, 20, .75);
    transition: border-color .15s, background-color .15s, color .15s;
}
html:not(.legacy-design) body .tenant-card:hover {
    border-color: #B9351C;
    background: rgba(185, 53, 28, .04);
}

/* mobile logo + mobile foot */
html:not(.legacy-design) body .login-lux-mobile-logo span { color: #1A1814; }
html:not(.legacy-design) body .login-lux-mobile-foot { color: rgba(26, 24, 20, .46); }

/* ------- login dark mode ------- */
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux { background: #101418; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-hero {
    background: #14181D;
    border-inline-end-color: rgba(255, 255, 255, .12);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-card {
    background: #1A1E24;
    border-color: rgba(255, 255, 255, .14);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-head h3,
html:not(.legacy-design)[data-bs-theme="dark"] body .tenant-selection h3 { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-head p { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-field label,
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-remember { color: rgba(236, 234, 227, .78); }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-input-wrap .field-icon,
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-input-wrap .toggle-password { color: rgba(236, 234, 227, .46); }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-input-wrap .form-control {
    background: #14181D;
    border-color: rgba(255, 255, 255, .28);
    color: #ECEAE3;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-input-wrap .form-control:focus {
    background: #14181D;
    color: #ECEAE3;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-submit { background: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-submit:hover { background: #C74330; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-remember input[type="checkbox"] { accent-color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-row a,
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-signup a { color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-row a:hover,
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-signup a:hover { color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-signup { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .tenant-card {
    background: #1A1E24;
    border-color: rgba(255, 255, 255, .14);
    color: rgba(236, 234, 227, .78);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .tenant-card:hover {
    border-color: #F0613F;
    background: rgba(224, 82, 60, .08);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-mobile-logo span { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .login-lux-mobile-foot { color: rgba(236, 234, 227, .46); }

/* ==========================================================================
   ERP HOME (ed-*) — Printed Timetable
   Restyles the dashboard (Home.razor / Home.razor.css ed-* vocabulary) purely
   via CSS. Home.razor.css is Blazor-scoped (compiles to .ed-x[b-hash], spec
   0,2,0); the `html:not(.legacy-design) body` prefix below (0,2,3) outranks
   every scoped original without !important. Reuses --pt-* tokens.
   ========================================================================== */

/* page ground: bone paper behind the dashboard */
html:not(.legacy-design) body .content.erp-dash { background: var(--pt-paper); }

/* hero: flat deep-ink panel (no gradient), paper text, vermilion accents */
html:not(.legacy-design) body .ed-hero {
    background: #1A1814;
    border: 1px solid rgba(244, 241, 233, .12);
    border-radius: var(--pt-radius);
}
html:not(.legacy-design) body .ed-hero::after { display: none; } /* drop decorative circle */
html:not(.legacy-design) body .ed-hero h1 {
    color: #F6F4EE;
    font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
    font-weight: 600;
    letter-spacing: 0;
}
html:not(.legacy-design) body .ed-hero p { color: rgba(244, 241, 233, .72); }
html:not(.legacy-design) body .ed-hero-badge {
    background: transparent;
    border: 1px solid rgba(244, 241, 233, .35);
    border-radius: var(--pt-radius);
    color: #F6F4EE;
}
/* date picker on ink: hairline outline, paper text */
html:not(.legacy-design) body .ed-date-picker .input-group-text,
html:not(.legacy-design) body .ed-date-picker .form-control {
    background: transparent;
    border: 1px solid rgba(244, 241, 233, .35);
    color: #F6F4EE;
    border-radius: var(--pt-radius);
}
html:not(.legacy-design) body .ed-date-picker .form-control:focus {
    border-color: #F0613F;
    box-shadow: 0 0 0 3px rgba(224, 82, 60, .18);
}
html:not(.legacy-design) body .ed-date-picker .form-control::placeholder { color: rgba(244, 241, 233, .55); }

/* quick actions: white hairline tiles, accent hover, no lift/shadow */
html:not(.legacy-design) body .ed-quick-btn {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    color: var(--pt-ink-72);
    box-shadow: none;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
html:not(.legacy-design) body .ed-quick-btn:hover {
    border-color: var(--pt-accent);
    color: var(--pt-accent);
    background: rgba(185, 53, 28, .04);
    transform: none;
    box-shadow: none;
}
html:not(.legacy-design) body .ed-quick-btn i {
    border-radius: var(--pt-radius);
    background: var(--pt-surface-alt);
    color: var(--pt-ink-72);
}
html:not(.legacy-design) body .ed-quick-btn.qa-sales i,
html:not(.legacy-design) body .ed-quick-btn.qa-purchase i,
html:not(.legacy-design) body .ed-quick-btn.qa-pos i,
html:not(.legacy-design) body .ed-quick-btn.qa-reports i,
html:not(.legacy-design) body .ed-quick-btn.qa-customer i,
html:not(.legacy-design) body .ed-quick-btn.qa-product i { color: var(--pt-accent); }

/* KPI cards: white sheets, hairline, tabular figures, no lift/ghost circle */
html:not(.legacy-design) body .ed-kpi {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease;
}
html:not(.legacy-design) body .ed-kpi::before { display: none; }
html:not(.legacy-design) body .ed-kpi:hover { transform: none; box-shadow: none; border-color: var(--pt-hairline-strong); }
html:not(.legacy-design) body .ed-kpi-icon,
html:not(.legacy-design) body .ed-kpi .ed-kpi-icon {
    background: var(--pt-surface-alt);
    color: var(--pt-ink-72);
    border-radius: var(--pt-radius);
}
html:not(.legacy-design) body .ed-kpi-label { color: var(--pt-ink-52); }
html:not(.legacy-design) body .ed-kpi-value {
    color: var(--pt-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
/* dotted leader between value and trailing sub line */
html:not(.legacy-design) body .ed-kpi-sub {
    color: var(--pt-ink-52);
    font-variant-numeric: tabular-nums;
}
html:not(.legacy-design) body .ed-kpi-sub strong { color: var(--pt-ink-72); }
/* KPI delta tags: 1px-border printed marks */
html:not(.legacy-design) body .ed-kpi-tag {
    background: transparent;
    border-radius: var(--pt-radius);
    padding: .2rem .5rem;
}
html:not(.legacy-design) body .ed-kpi-tag.up { border: 1px solid var(--pt-ok); color: var(--pt-ok); }
html:not(.legacy-design) body .ed-kpi-tag.down { border: 1px solid var(--pt-danger); color: var(--pt-danger); }

/* metrics strip: hairline columns, tabular figures */
html:not(.legacy-design) body .ed-metric {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    box-shadow: none;
    transition: border-color .2s ease;
}
html:not(.legacy-design) body .ed-metric:hover { transform: none; border-color: var(--pt-hairline-strong); }
html:not(.legacy-design) body .ed-metric-icon { border-radius: var(--pt-radius); }
html:not(.legacy-design) body .ed-metric-label { color: var(--pt-ink-52); }
html:not(.legacy-design) body .ed-metric-value {
    color: var(--pt-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

/* panels + chart panel: white sheets, hairline, no shadow */
html:not(.legacy-design) body .ed-panel,
html:not(.legacy-design) body .ed-chart-panel,
html:not(.legacy-design) body .ed-tx-panel {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    box-shadow: none;
}
html:not(.legacy-design) body .ed-panel-header,
html:not(.legacy-design) body .ed-chart-header,
html:not(.legacy-design) body .ed-tx-header { border-bottom-color: var(--pt-hairline); color: var(--pt-ink); }
html:not(.legacy-design) body .ed-panel-icon { border-radius: var(--pt-radius); }
html:not(.legacy-design) body .ed-chart-title {
    color: var(--pt-ink);
    font-family: "SaudiRiyalSymbol", 'Zilla Slab', 'Cairo', Georgia, serif !important; /* !important required: app.css forces heading fonts with !important (Riyal glyph stack preserved first) */
    font-weight: 600;
}
html:not(.legacy-design) body .ed-chart-sub { color: var(--pt-ink-52); }
html:not(.legacy-design) body .ed-legend-item { color: var(--pt-ink-52); }
html:not(.legacy-design) body .ed-legend-dot { border-radius: 1px; }
html:not(.legacy-design) body .ed-legend-dot.sales { background: var(--pt-accent); }
html:not(.legacy-design) body .ed-legend-dot.purchase { background: var(--pt-info); }

/* year button + dropdown: hairline outline, accent hover */
html:not(.legacy-design) body .ed-year-btn {
    background: transparent;
    border: 1px solid var(--pt-hairline-strong);
    border-radius: var(--pt-radius);
    color: var(--pt-ink-72);
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
html:not(.legacy-design) body .ed-year-btn:hover {
    background: rgba(185, 53, 28, .06);
    border-color: var(--pt-accent);
    color: var(--pt-accent);
}
html:not(.legacy-design) body .ed-dropdown-menu {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline-strong);
    border-radius: var(--pt-radius);
    box-shadow: none;
}
html:not(.legacy-design) body .ed-dropdown-item {
    color: var(--pt-ink-72);
    transition: background-color .15s, color .15s;
}
html:not(.legacy-design) body .ed-dropdown-item:hover {
    background: var(--pt-surface-alt);
    color: var(--pt-accent);
}

/* item rows: hairline separators */
html:not(.legacy-design) body .ed-item { border-bottom-color: var(--pt-hairline); }
html:not(.legacy-design) body .ed-item-rank {
    background: var(--pt-surface-alt);
    color: var(--pt-ink-52);
    border-radius: var(--pt-radius);
    font-variant-numeric: tabular-nums;
}
html:not(.legacy-design) body .ed-item-thumb { border-color: var(--pt-hairline); border-radius: var(--pt-radius); }
html:not(.legacy-design) body .ed-item-name { color: var(--pt-ink); }
html:not(.legacy-design) body .ed-item-meta { color: var(--pt-ink-52); font-variant-numeric: tabular-nums; }
html:not(.legacy-design) body .ed-stock-bar { background: var(--pt-surface-alt); border-radius: 0; }
html:not(.legacy-design) body .stock-critical .ed-stock-fill,
html:not(.legacy-design) body .stock-warning .ed-stock-fill,
html:not(.legacy-design) body .stock-ok .ed-stock-fill { border-radius: 0; }
html:not(.legacy-design) body .stock-critical .ed-stock-fill { background: var(--pt-danger); }
html:not(.legacy-design) body .stock-warning .ed-stock-fill { background: var(--pt-warn); }
html:not(.legacy-design) body .stock-ok .ed-stock-fill { background: var(--pt-ok); }
/* date chip: hairline printed mark */
html:not(.legacy-design) body .ed-date-chip {
    background: transparent;
    border: 1px solid var(--pt-hairline-strong);
    border-radius: var(--pt-radius);
    color: var(--pt-ink-52);
}
html:not(.legacy-design) body .ed-pct-badge {
    background: transparent;
    border: 1px solid var(--pt-ok);
    border-radius: var(--pt-radius);
    color: var(--pt-ok);
    font-variant-numeric: tabular-nums;
}

/* transactions: tabs, table, printed status marks */
html:not(.legacy-design) body .ed-tx-tabs { border-bottom-color: var(--pt-hairline); }
html:not(.legacy-design) body .ed-tx-tabs .nav-link {
    color: var(--pt-ink-52);
    border-radius: var(--pt-radius);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
html:not(.legacy-design) body .ed-tx-tabs .nav-link:hover {
    color: var(--pt-ink);
    background: var(--pt-surface-alt);
}
html:not(.legacy-design) body .ed-tx-tabs .nav-link.active {
    color: var(--pt-ink);
    background: var(--pt-surface-alt);
    border-color: var(--pt-hairline-strong);
}
html:not(.legacy-design) body .ed-tx-table thead th {
    background: var(--pt-surface-alt);
    color: var(--pt-ink-52);
    border-bottom: 1px solid var(--pt-hairline-strong);
}
html:not(.legacy-design) body .ed-tx-table tbody td { border-color: var(--pt-hairline); color: var(--pt-ink); }
html:not(.legacy-design) body .ed-tx-table tbody tr:hover { background: var(--pt-surface-alt); }
html:not(.legacy-design) body .ed-tx-party { color: var(--pt-ink); }
html:not(.legacy-design) body .ed-tx-voucher { color: var(--pt-ink-52); font-variant-numeric: tabular-nums; }
html:not(.legacy-design) body .ed-tx-amount { color: var(--pt-ink); font-variant-numeric: tabular-nums; }
html:not(.legacy-design) body .ed-tx-due { color: var(--pt-danger); font-variant-numeric: tabular-nums; }
/* paid / partial / unpaid: 1px-border printed marks */
html:not(.legacy-design) body .ed-badge-paid,
html:not(.legacy-design) body .ed-badge-partial,
html:not(.legacy-design) body .ed-badge-unpaid {
    background: transparent;
    border-radius: var(--pt-radius);
    padding: .2rem .5rem;
}
html:not(.legacy-design) body .ed-badge-paid { border: 1px solid var(--pt-ok); color: var(--pt-ok); }
html:not(.legacy-design) body .ed-badge-partial { border: 1px solid var(--pt-warn); color: var(--pt-warn); }
html:not(.legacy-design) body .ed-badge-unpaid { border: 1px solid var(--pt-danger); color: var(--pt-danger); }

/* empty states: quiet */
html:not(.legacy-design) body .ed-empty { color: var(--pt-ink-52); }

/* ------- ERP home dark mode ------- */
html:not(.legacy-design)[data-bs-theme="dark"] body .content.erp-dash { background: #101418; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-hero {
    background: #14181D;
    border-color: rgba(255, 255, 255, .12);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-hero h1 { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-hero p { color: rgba(236, 234, 227, .78); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-hero-badge { color: #ECEAE3; border-color: rgba(244, 241, 233, .35); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-date-picker .input-group-text,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-date-picker .form-control {
    color: #ECEAE3;
    border-color: rgba(244, 241, 233, .35);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-date-picker .form-control::placeholder { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-metric,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-panel,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-chart-panel,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-panel,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-quick-btn,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-dropdown-menu {
    background: #1A1E24;
    border-color: rgba(255, 255, 255, .14);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi-icon,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-metric-icon,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-item-rank {
    background: #232830;
    color: rgba(236, 234, 227, .78);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi:hover { border-color: rgba(255, 255, 255, .28); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-quick-btn:hover,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-year-btn:hover,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-dropdown-item:hover {
    background: rgba(224, 82, 60, .08);
    border-color: #F0613F;
    color: #F0613F;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-quick-btn,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-year-btn,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-dropdown-item { color: rgba(236, 234, 227, .78); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-quick-btn i { color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi-value,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-metric-value,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-chart-title,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-panel-header,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-party,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-amount,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-item-name { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi-label,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-metric-label,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-chart-sub,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-item-meta,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-voucher,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-legend-item,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-empty { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-panel-header,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-chart-header,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-header,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs { border-bottom-color: rgba(255, 255, 255, .14); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-item { border-bottom-color: rgba(255, 255, 255, .12); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-year-btn { border-color: rgba(255, 255, 255, .28); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-table thead th {
    background: #232830;
    color: rgba(236, 234, 227, .62);
    border-bottom-color: rgba(255, 255, 255, .28);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-table tbody td { border-color: rgba(255, 255, 255, .12); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-table tbody tr:hover,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs .nav-link:hover,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs .nav-link.active,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-dropdown-item:hover { background: #232830; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs .nav-link { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs .nav-link.active,
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-tx-tabs .nav-link:hover { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-item-thumb { border-color: rgba(255, 255, 255, .14); }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-stock-bar { background: #232830; }
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-date-chip {
    background: transparent;
    border-color: rgba(255, 255, 255, .28);
    color: rgba(236, 234, 227, .62);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .ed-kpi-tag.up { border-color: #F0613F; }

/* ==========================================================================
   SERVICES (services-*, svc-*) — Printed Timetable — /erp/services/*
   ========================================================================== */

/* page ground + header */
html:not(.legacy-design) body .content.services-page { background: var(--pt-paper); color: var(--pt-ink); }
html:not(.legacy-design) body .content.services-page .page-header {
    border-bottom: 1px solid var(--pt-hairline);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}
html:not(.legacy-design) body .content.services-page .page-header h4 {
    font-family: 'Cairo', sans-serif !important; /* Arabic heading — Zilla Slab has no Arabic; !important beats app.css heading-font force */
    font-weight: 700;
    color: var(--pt-ink);
    margin: 0;
}
html:not(.legacy-design) body .content.services-page .page-header h4 small {
    color: var(--pt-ink-52);
    font-weight: 500;
}

/* status badge: printed mark with dot */
html:not(.legacy-design) body .svc-status-badge {
    background: transparent;
    border-radius: var(--pt-radius);
    font-weight: 600;
    font-size: .76rem;
    line-height: 1.5;
    padding: .22rem .6rem;
}
html:not(.legacy-design) body .svc-status-badge.is-on {
    border: 1px solid rgba(21, 128, 61, .4);
    color: var(--pt-ok);
}
html:not(.legacy-design) body .svc-status-badge.is-on::before { background: var(--pt-ok); }
html:not(.legacy-design) body .svc-status-badge.is-off {
    border: 1px solid var(--pt-hairline-strong);
    color: var(--pt-ink-52);
}
html:not(.legacy-design) body .svc-status-badge.is-off::before { background: var(--pt-ink-52); }

/* tabs: underline strip on a hairline rule */
html:not(.legacy-design) body .services-tabs {
    border-bottom: 1px solid var(--pt-hairline);
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}
html:not(.legacy-design) body .services-tab {
    color: var(--pt-ink-52);
    padding: .75rem 1rem;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}
html:not(.legacy-design) body .services-tab:hover { color: var(--pt-ink); }
html:not(.legacy-design) body .services-tab.active {
    color: var(--pt-ink);
    font-weight: 700;
    border-bottom: 2px solid var(--pt-accent);
}
html:not(.legacy-design) body .services-tab.active i { color: var(--pt-accent); }

/* content groups: white sheets on hairlines */
html:not(.legacy-design) body .content.services-page .services-section,
html:not(.legacy-design) body .content.services-page .services-orders {
    background: var(--pt-surface);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    padding: 1.5rem;
    box-shadow: none;
    margin-top: 1.25rem;
}
html:not(.legacy-design) body .content.services-page .services-section h5 {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: var(--pt-ink);
    margin: 0 0 1rem;
}
html:not(.legacy-design) body .content.services-page .services-toolbar {
    border-bottom: 1px solid var(--pt-hairline);
    padding-bottom: .75rem;
    margin-bottom: 1.25rem;
    align-items: baseline;
}
html:not(.legacy-design) body .content.services-page .services-toolbar h5 {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: var(--pt-ink);
    margin: 0;
}
html:not(.legacy-design) body .content.services-page .services-fields { border: 0; }

/* LTR numeric inputs read as figures */
html:not(.legacy-design) body .content.services-page input.form-control[dir="ltr"] {
    font-variant-numeric: tabular-nums;
    text-align: left;
}

/* purchase summary: receipt panel with dotted leaders */
html:not(.legacy-design) body .services-summary {
    background: var(--pt-surface-alt);
    border: 1px solid var(--pt-hairline);
    border-radius: var(--pt-radius);
    padding: 1rem 1.25rem;
    margin-top: 1.5rem; /* app-refresh loads after, and scoped CSS uses utility-level specificity here */
}
html:not(.legacy-design) body .services-summary-row { padding: .35rem 0; }
html:not(.legacy-design) body .services-summary-row .lbl { color: var(--pt-ink-52); font-size: .85rem; }
html:not(.legacy-design) body .services-summary-row .d-leader {
    border-bottom: 1px dotted var(--pt-ink-38);
    opacity: 1;
}
html:not(.legacy-design) body .services-summary-row .val {
    color: var(--pt-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
html:not(.legacy-design) body .services-summary .form-check-input { accent-color: var(--pt-accent); }
html:not(.legacy-design) body .services-summary .form-check-input:checked {
    background-color: var(--pt-accent);
    border-color: var(--pt-accent);
}

/* availability mark */
html:not(.legacy-design) body .content.services-page .svc-avail {
    border-radius: var(--pt-radius);
    border: 1px solid var(--pt-hairline-strong);
    background: var(--pt-surface-alt);
    color: var(--pt-ink-72);
}
html:not(.legacy-design) body .content.services-page .svc-avail-ok i { color: var(--pt-info); }
html:not(.legacy-design) body .content.services-page .svc-avail-warn i { color: var(--pt-warn); }

/* alerts: printed marks, faint tints */
html:not(.legacy-design) body .content.services-page .alert {
    border-radius: var(--pt-radius);
    border: 1px solid var(--pt-hairline-strong);
}
html:not(.legacy-design) body .content.services-page .alert-success {
    background: rgba(21, 128, 61, .08);
    border-color: rgba(21, 128, 61, .35);
    color: var(--pt-ok);
}
html:not(.legacy-design) body .content.services-page .alert-danger {
    background: rgba(180, 35, 24, .08);
    border-color: rgba(180, 35, 24, .35);
    color: var(--pt-danger);
}
html:not(.legacy-design) body .content.services-page .alert-info {
    background: rgba(14, 116, 144, .07);
    border-color: rgba(14, 116, 144, .3);
    color: var(--pt-info);
}

/* order message: small muted, wraps readably */
html:not(.legacy-design) body .content.services-page .services-order-message {
    color: var(--pt-ink-52);
    font-size: .82rem;
}

/* status badges inside order tables */
html:not(.legacy-design) body .content.services-page .badge.bg-success {
    background: transparent;
    border: 1px solid var(--pt-ok);
    color: var(--pt-ok);
    border-radius: var(--pt-radius);
}
html:not(.legacy-design) body .content.services-page .badge.bg-secondary {
    background: transparent;
    border: 1px solid var(--pt-hairline-strong);
    color: var(--pt-ink-52);
    border-radius: var(--pt-radius);
}

/* ------- SERVICES responsive ------- */
@media (max-width: 767px) {
    html:not(.legacy-design) body .services-tabs { overflow-x: auto; flex-wrap: nowrap; }
    html:not(.legacy-design) body .services-tab { padding: .65rem .8rem; }
    html:not(.legacy-design) body .services-summary-row { flex-wrap: wrap; }
    html:not(.legacy-design) body .content.services-page .services-toolbar { align-items: stretch; }
}

/* ------- SERVICES dark mode ------- */
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page { background: #101418; color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .page-header { border-bottom-color: rgba(255, 255, 255, .14); }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .page-header h4 { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .page-header h4 small { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-section,
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-orders {
    background: #1A1E24;
    border-color: rgba(255, 255, 255, .14);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-section h5,
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-toolbar h5 { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-tabs { border-bottom-color: rgba(255, 255, 255, .14); }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-tab { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-tab:hover { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-tab.active { color: #ECEAE3; border-bottom-color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-tab.active i { color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-toolbar { border-bottom-color: rgba(255, 255, 255, .14); }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-summary {
    background: #1B2129;
    border-color: rgba(255, 255, 255, .14);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .services-summary-row .lbl { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-summary-row .d-leader { border-bottom-color: rgba(236, 234, 227, .46); }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-summary-row .val { color: #ECEAE3; }
html:not(.legacy-design)[data-bs-theme="dark"] body .services-summary .form-check-input:checked { background-color: #F0613F; border-color: #F0613F; }
html:not(.legacy-design)[data-bs-theme="dark"] body .svc-status-badge.is-on { border-color: rgba(74, 180, 110, .45); color: #4AB46E; }
html:not(.legacy-design)[data-bs-theme="dark"] body .svc-status-badge.is-on::before { background: #4AB46E; }
html:not(.legacy-design)[data-bs-theme="dark"] body .svc-status-badge.is-off { border-color: rgba(255, 255, 255, .28); color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .svc-status-badge.is-off::before { background: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .svc-avail {
    background: #1B2129;
    border-color: rgba(255, 255, 255, .2);
    color: rgba(236, 234, 227, .78);
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .svc-avail-ok i { color: #3FA3AC; }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .svc-avail-warn i { color: #D29A1E; }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .alert-success {
    background: rgba(74, 180, 110, .1);
    border-color: rgba(74, 180, 110, .4);
    color: #4AB46E;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .alert-danger {
    background: rgba(224, 82, 60, .1);
    border-color: rgba(224, 82, 60, .4);
    color: #F0613F;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .alert-info {
    background: rgba(63, 163, 172, .1);
    border-color: rgba(63, 163, 172, .4);
    color: #3FA3AC;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .services-order-message { color: rgba(236, 234, 227, .62); }
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .badge.bg-success {
    border-color: #4AB46E;
    color: #4AB46E;
}
html:not(.legacy-design)[data-bs-theme="dark"] body .content.services-page .badge.bg-secondary {
    border-color: rgba(255, 255, 255, .28);
    color: rgba(236, 234, 227, .62);
}
