/* ==========================================================================
   TechFlag SuperAdmin console
   Loaded after Bootstrap 5.3 (LTR or RTL build). Uses the tenant app's design
   tokens (frontend/src/styles/_tokens.scss) with a different layout: a light
   two-row top console instead of the tenant app's violet sidebar.
   Written with logical properties so the same rules serve RTL and LTR.
   ========================================================================== */

/* 1. Tokens (copied from the tenant app) ---------------------------------- */
:root {
    color-scheme: light;

    --brand-900: #2E1A78;
    --brand-700: #4527A0;
    --brand-600: #5B34C4;
    --brand-500: #6C46E0;
    --brand-100: #EDE7FB;
    --brand-050: #F6F3FE;
    --brand-fill: var(--brand-700);
    --brand-fill-hover: var(--brand-900);
    --on-brand: #FFFFFF;

    --success: #12A150;
    --success-soft: #E7F6EE;
    --success-ink: #0B7A3B;
    --warning: #E9A23B;
    --warning-soft: #FDF3E4;
    --warning-ink: #8A5300;
    --danger: #E5484D;
    --danger-soft: #FDECEC;
    --danger-ink: #C81E25;
    --info: #2F80ED;
    --info-soft: #E8F1FD;
    --info-ink: #1857B8;
    --success-fill: var(--success-ink);
    --on-success: #FFFFFF;
    --danger-fill: var(--danger-ink);
    --on-danger: #FFFFFF;

    --bg: #F6F7FB;
    --surface: #FFFFFF;
    --surface-2: #F1F2F7;
    --surface-3: #E9EBF2;
    --border: #E6E8F0;
    --border-strong: #D3D7E4;
    --text-1: #131523;
    --text-2: #5A607F;
    --text-3: #676E88;
    --overlay: rgba(19, 21, 35, .45);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow-1: 0 1px 2px rgba(19, 21, 35, .06);
    --shadow-2: 0 4px 16px rgba(19, 21, 35, .08);
    --shadow-3: 0 12px 32px rgba(19, 21, 35, .12);

    --dur-fast: 120ms;
    --dur: 200ms;
    --ease: cubic-bezier(.2, .8, .2, 1);

    --font: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
    --ring: 0 0 0 3px color-mix(in srgb, var(--brand-500) 22%, transparent);
    --shell: 1440px;
    --gutter: 24px;
}

html.theme-dark {
    color-scheme: dark;

    --brand-900: #C8B8FF;
    --brand-700: #B49CFF;
    --brand-600: #7C5CF0;
    --brand-500: #8E72F5;
    --brand-100: #2A2350;
    --brand-050: #1E1A38;
    --brand-fill: #6C46E0;
    --brand-fill-hover: #7C5CF0;

    --success: #3ECF8E;
    --success-soft: #12301F;
    --success-ink: var(--success);
    --warning: #F0B45C;
    --warning-soft: #33260F;
    --warning-ink: var(--warning);
    --danger: #FF6B70;
    --danger-soft: #3A1B1D;
    --danger-ink: var(--danger);
    --info: #6BA5FF;
    --info-soft: #12233D;
    --info-ink: var(--info);
    --success-fill: var(--success);
    --on-success: #06170E;
    --danger-fill: var(--danger);
    --on-danger: #21090A;

    --bg: #0F1117;
    --surface: #171A23;
    --surface-2: #1F2330;
    --surface-3: #262B3A;
    --border: #2A2F3D;
    --border-strong: #3A4152;
    --text-1: #E7E9F0;
    --text-2: #A2A8BD;
    --text-3: #9198B0;
    --overlay: rgba(0, 0, 0, .6);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, .45);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, .55);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --dur-fast: 0ms;
        --dur: 0ms;
    }
}

/* Tone helper: any element with data-tone gets a soft ground + ink colour. */
[data-tone] {
    --tone-soft: var(--surface-3);
    --tone-ink: var(--text-2);
    --tone-fill: var(--text-2);
}

[data-tone="brand"] { --tone-soft: var(--brand-100); --tone-ink: var(--brand-700); --tone-fill: var(--brand-600); }
[data-tone="success"] { --tone-soft: var(--success-soft); --tone-ink: var(--success-ink); --tone-fill: var(--success); }
[data-tone="warning"] { --tone-soft: var(--warning-soft); --tone-ink: var(--warning-ink); --tone-fill: var(--warning); }
[data-tone="danger"] { --tone-soft: var(--danger-soft); --tone-ink: var(--danger-ink); --tone-fill: var(--danger); }
[data-tone="info"] { --tone-soft: var(--info-soft); --tone-ink: var(--info-ink); --tone-fill: var(--info); }

/* 2. Bootstrap mapped onto the tokens ------------------------------------- */
:root,
:root[data-bs-theme] {
    --bs-body-font-family: var(--font);
    --bs-body-font-size: 14px;
    --bs-body-line-height: 1.6;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text-1);
    --bs-emphasis-color: var(--text-1);
    --bs-secondary-color: var(--text-2);
    --bs-tertiary-color: var(--text-3);
    --bs-secondary-bg: var(--surface-2);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-primary: var(--brand-fill);
    --bs-primary-rgb: 69, 39, 160;
    --bs-link-color: var(--brand-700);
    --bs-link-hover-color: var(--brand-900);
    --bs-heading-color: var(--text-1);
    --bs-focus-ring-color: color-mix(in srgb, var(--brand-500) 25%, transparent);
    --bs-dropdown-bg: var(--surface);
    --bs-offcanvas-bg: var(--surface);
    --bs-modal-bg: var(--surface);
}

html.theme-dark,
html.theme-dark[data-bs-theme] {
    --bs-primary-rgb: 108, 70, 224;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
}

a {
    color: var(--brand-700);
}

:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

.form-control,
.form-select {
    min-height: 42px;
    border-radius: 10px;
    border-color: var(--border-strong);
    background-color: var(--surface);
    color: var(--text-1);
    font-size: 14px;
}

.form-control::placeholder {
    color: var(--text-3);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-500);
    box-shadow: var(--ring);
    background-color: var(--surface);
    color: var(--text-1);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

textarea.form-control {
    min-height: 96px;
}

input[type="date"].form-control {
    direction: ltr;
}

.form-check-input:checked {
    background-color: var(--brand-fill);
    border-color: var(--brand-fill);
}

.form-check-input:focus {
    border-color: var(--brand-500);
    box-shadow: var(--ring);
}

.offcanvas,
.offcanvas-lg {
    --bs-offcanvas-bg: var(--surface);
    --bs-offcanvas-color: var(--text-1);
    --bs-offcanvas-border-color: var(--border);
}

.modal {
    --bs-modal-bg: var(--surface);
    --bs-modal-color: var(--text-1);
}

.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-color: var(--text-1);
    --bs-dropdown-border-color: var(--border);
    --bs-dropdown-link-color: var(--text-1);
    --bs-dropdown-link-hover-bg: var(--brand-050);
    --bs-dropdown-link-hover-color: var(--brand-700);
}

.offcanvas-backdrop,
.modal-backdrop {
    --bs-backdrop-bg: #131523;
}

.visually-hidden-focusable:not(:focus) {
    position: absolute !important;
}

/* 3. Shell ----------------------------------------------------------------- */
.sa-skip {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 2000;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-fill);
    color: var(--on-brand);
    font-weight: 700;
    text-decoration: none;
}

.sa-skip:focus {
    top: 12px;
    color: var(--on-brand);
}

.sa-shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.sa-shell--narrow {
    max-width: 1040px;
}

.sa-main {
    padding-block: 20px 56px;
}

.sa-main:focus {
    outline: none;
}

.sa-muted {
    color: var(--text-3);
}

.sa-num {
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}

.sa-link {
    color: var(--brand-700);
    font-weight: 600;
    text-decoration: none;
}

.sa-link:hover {
    color: var(--brand-900);
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    :root {
        --gutter: 16px;
    }
}

/* 4. Console header --------------------------------------------------------- */
.sa-console {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}

/* The brand strip: the console's one loud element. */
.sa-console::before,
.sa--bare::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--brand-fill);
}

.sa--bare::before {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 10;
}

.sa-console__row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
}

.sa-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-700);
    text-decoration: none;
}

.sa-brand:hover {
    color: var(--brand-900);
}

.sa-brand__mark {
    width: 34px;
    height: auto;
    flex: none;
}

.sa-brand__name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text-1);
}

.sa-console-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.sa-console-tag i {
    font-size: 15px;
}

.sa-console__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

@media (max-width: 575.98px) {
    .sa-console .sa-console-tag {
        display: none;
    }

    .sa-console__row,
    .sa-console__tools {
        gap: 6px;
    }

    .sa-brand__name {
        font-size: 17px;
    }

    .sa-user {
        padding: 3px;
    }
}

@media (max-width: 359.98px) {
    .sa-console .sa-brand__name {
        display: none;
    }
}

/* Navigation row */
.sa-nav {
    border-top: 1px solid var(--border);
}

.sa-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sa-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding-inline: 12px;
    border: 0;
    background: none;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.sa-nav__link i {
    font-size: 18px;
}

.sa-nav__link .sa-nav__caret {
    font-size: 16px;
    transition: transform var(--dur) var(--ease);
}

.sa-nav__link[aria-expanded="true"] .sa-nav__caret {
    transform: rotate(180deg);
}

.sa-nav__link:hover,
.sa-nav__link[aria-expanded="true"] {
    color: var(--text-1);
}

.sa-nav__link.is-active {
    color: var(--brand-700);
}

.sa-nav__link.is-active::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-600);
}

/* Shared menus (nav groups, theme, user, export) */
.sa-menu {
    min-width: 240px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-3);
}

.sa-menu--nav {
    min-width: 320px;
}

.sa-menu--wide {
    min-width: 280px;
}

.sa-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 7px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--text-1);
    font-size: 14px;
    text-align: start;
    text-decoration: none;
}

.sa-menu__item:hover,
.sa-menu__item:focus-visible {
    background: var(--brand-050);
    color: var(--brand-700);
}

.sa-menu__item.is-active {
    background: var(--brand-050);
}

.sa-menu__item.is-active .sa-menu__label {
    color: var(--brand-700);
}

.sa-menu__item.is-danger,
.sa-menu__item.is-danger:hover {
    color: var(--danger-ink);
}

.sa-menu__icon {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--tone-soft, var(--surface-2));
    color: var(--tone-ink, var(--text-2));
    font-size: 17px;
}

.sa-menu__item:hover .sa-menu__icon,
.sa-menu__item.is-active .sa-menu__icon {
    background: var(--tone-soft, var(--brand-100));
    color: var(--tone-ink, var(--brand-700));
}

.sa-menu__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sa-menu__label {
    font-weight: 600;
    line-height: 1.35;
}

.sa-menu__hint {
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.4;
}

.sa-menu__check {
    margin-inline-start: auto;
    color: var(--brand-700);
    font-size: 18px;
    opacity: 0;
}

.sa-menu__item[aria-pressed="true"] .sa-menu__check {
    opacity: 1;
}

.sa-menu__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 8px 10px 12px;
    border-bottom: 1px solid var(--border);
}

.sa-menu__head .sa-menu__hint {
    direction: ltr;
    text-align: start;
    unicode-bidi: plaintext;
}

.sa-menu__section {
    margin-top: 6px;
    padding: 10px 10px 4px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
}

label.sa-menu__check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 13.5px;
    opacity: 1;
    cursor: pointer;
}

label.sa-menu__check:hover {
    background: var(--surface-2);
}

label.sa-menu__check .form-check-input {
    margin: 0;
}

.sa-menu form {
    margin: 0;
}

/* Mobile drawer */
.sa-drawer {
    --bs-offcanvas-width: 300px;
}

.sa-drawer .offcanvas-header {
    border-bottom: 1px solid var(--border);
}

.sa-drawer__group {
    margin: 18px 12px 6px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
}

.sa-drawer__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-1);
    font-weight: 600;
    text-decoration: none;
}

.sa-drawer__link i {
    color: var(--text-2);
    font-size: 19px;
}

.sa-drawer__link:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.sa-drawer__link.is-active {
    background: var(--brand-100);
    color: var(--brand-700);
}

.sa-drawer__link.is-active i {
    color: var(--brand-700);
}

/* Menu position: top bar (default) or side menu. Chosen in the header and
   applied before paint as html[data-layout]. Phones always use the drawer. */
.sa-side {
    display: none;
}

.sa-layout-btn__side,
html[data-layout="side"] .sa-layout-btn__top {
    display: none;
}

html[data-layout="side"] .sa-layout-btn__side {
    display: inline;
}

@media (min-width: 992px) {
    html[data-layout="side"] {
        --side-w: 264px;
        --console-h: 66px;
    }

    html[data-layout="side"] .sa-nav {
        display: none !important;
    }

    html[data-layout="side"] .sa-console__row {
        max-width: none;
    }

    html[data-layout="side"] .sa-frame {
        display: grid;
        grid-template-columns: var(--side-w) minmax(0, 1fr);
        align-items: start;
    }

    html[data-layout="side"] .sa-side {
        position: sticky;
        top: var(--console-h);
        display: block;
        height: calc(100vh - var(--console-h));
        overflow-y: auto;
        border-inline-end: 1px solid var(--border);
        background: var(--surface);
    }

    html[data-layout="side"] .sa-side__nav {
        padding: 12px 12px 24px;
    }

    html[data-layout="side"] .sa-side .sa-drawer__group:first-of-type {
        margin-top: 20px;
    }

    html[data-layout="side"] .sa-side .sa-drawer__link.is-active {
        position: relative;
    }

    html[data-layout="side"] .sa-side .sa-drawer__link.is-active::before {
        content: "";
        position: absolute;
        inset-block: 10px;
        inset-inline-start: -12px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: var(--brand-600);
    }

    [dir="rtl"][data-layout="side"] .sa-side .sa-drawer__link.is-active::before {
        border-radius: 3px 0 0 3px;
    }
}

/* 5. Buttons & controls ----------------------------------------------------- */
.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.sa-btn i {
    font-size: 18px;
}

.sa-btn--primary {
    background: var(--brand-fill);
    border-color: var(--brand-fill);
    color: var(--on-brand);
}

.sa-btn--primary:hover,
.sa-btn--primary:focus-visible,
.sa-btn--primary:active {
    background: var(--brand-fill-hover) !important;
    border-color: var(--brand-fill-hover) !important;
    color: var(--on-brand) !important;
}

.sa-btn--ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-1);
}

.sa-btn--ghost:hover,
.sa-btn--ghost:focus-visible,
.sa-btn--ghost.show,
.sa-btn--ghost.is-active {
    background: var(--brand-050) !important;
    border-color: var(--brand-500) !important;
    color: var(--brand-700) !important;
}

.sa-btn--block {
    width: 100%;
    min-height: 46px;
}

.sa-btn[data-tone="danger"] {
    background: var(--danger-fill);
    border-color: var(--danger-fill);
    color: var(--on-danger);
}

.sa-btn[data-tone="success"] {
    background: var(--success-fill);
    border-color: var(--success-fill);
    color: var(--on-success);
}

.sa-btn[data-tone]:hover {
    filter: brightness(1.08);
    color: inherit;
}

.sa-icon-btn {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-2);
    font-size: 20px;
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.sa-icon-btn:hover,
.sa-icon-btn[aria-expanded="true"] {
    background: var(--surface-2);
    color: var(--brand-700);
}

.sa-icon-btn--sm {
    width: 34px;
    height: 34px;
    font-size: 18px;
}

.sa-icon-btn[data-tone] {
    color: var(--text-2);
}

.sa-icon-btn[data-tone]:hover {
    background: var(--tone-soft);
    color: var(--tone-ink);
}

.sa-theme-btn__dark {
    display: none;
}

html.theme-dark .sa-theme-btn__light {
    display: none;
}

html.theme-dark .sa-theme-btn__dark {
    display: inline;
}

.sa-seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
}

.sa-seg__opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.sa-seg__opt i {
    font-size: 17px;
}

.sa-seg__opt:hover {
    color: var(--text-1);
}

.sa-seg__opt.is-active,
.sa-seg__opt.active {
    background: var(--surface);
    color: var(--brand-700);
    box-shadow: var(--shadow-1);
}

.sa-lang .sa-seg__opt {
    min-width: 38px;
    padding: 0 10px;
}

@media (max-width: 767.98px) {
    .sa-seg__text {
        display: none;
    }
}

.sa-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 3px 10px 3px 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-1);
    font-weight: 600;
}

.sa-user:hover,
.sa-user[aria-expanded="true"] {
    border-color: var(--brand-500);
}

.sa-user .bx-chevron-down {
    color: var(--text-3);
}

.sa-avatar {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 14px;
    font-weight: 800;
    object-fit: cover;
}

.sa-avatar--lg {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.sa-avatar--xl {
    width: 64px;
    height: 64px;
    font-size: 26px;
}

.sa-avatar--tile {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
}

.sa-pill {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--brand-600);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
}

.sa-seg__opt .sa-pill {
    background: var(--surface-3);
    color: var(--text-2);
}

.sa-seg__opt.active .sa-pill,
.sa-seg__opt.is-active .sa-pill {
    background: var(--brand-100);
    color: var(--brand-700);
}

.sa-count {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sa-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--tone-soft, var(--surface-3));
    color: var(--tone-ink, var(--text-2));
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.sa-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sa-tag {
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12.5px;
    direction: ltr;
}

/* 6. Page header, breadcrumbs, tabs, chips, alerts ------------------------- */
.sa-crumbs__list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    list-style: none;
}

.sa-crumbs__item {
    display: inline-flex;
    align-items: center;
}

.sa-crumbs__item + .sa-crumbs__item::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-inline: 6px 8px;
    border-block-start: 1.5px solid var(--text-3);
    border-inline-end: 1.5px solid var(--text-3);
    transform: rotate(45deg);
}

[dir="rtl"] .sa-crumbs__item + .sa-crumbs__item::before {
    transform: rotate(-45deg);
}

.sa-crumbs__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 6px;
    color: var(--text-2);
    font-size: 13px;
    text-decoration: none;
}

.sa-crumbs__link i {
    font-size: 16px;
}

.sa-crumbs__link:hover {
    color: var(--brand-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sa-crumbs__link.is-current {
    color: var(--text-1);
    font-weight: 700;
}

.sa-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 18px 0 16px;
}

.sa-page-head__title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sa-page-head__title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.sa-back {
    border: 1px solid var(--border);
    background: var(--surface);
}

[dir="rtl"] .sa-back i {
    transform: scaleX(-1);
}

.sa-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sa-subbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.sa-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
}

.sa-tabs__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.sa-tabs__link:hover {
    color: var(--text-1);
}

.sa-tabs__link.is-active {
    background: var(--surface);
    color: var(--brand-700);
    box-shadow: var(--shadow-1);
}

.sa-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sa-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 4px 3px 12px;
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-pill);
    background: var(--brand-050);
    color: var(--brand-700);
    font-size: 13px;
}

[dir="rtl"] .sa-chip {
    padding: 3px 12px 3px 4px;
}

.sa-chip__label {
    font-weight: 700;
}

.sa-chip__remove {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--brand-700);
    font-size: 16px;
    text-decoration: none;
}

.sa-chip__remove:hover {
    background: var(--brand-100);
    color: var(--brand-900);
}

.sa-alerts {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.sa-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid color-mix(in srgb, var(--tone-fill) 30%, transparent);
    border-radius: var(--radius-md);
    background: var(--tone-soft);
    color: var(--text-1);
}

.sa-alerts .sa-alert {
    margin: 0;
}

.sa-alert > i {
    margin-top: 2px;
    color: var(--tone-ink);
    font-size: 20px;
}

.sa-alert ul {
    margin: 0;
    padding-inline-start: 18px;
}

/* 7. Panels ------------------------------------------------------------------ */
.sa-panel {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-1);
}

.sa-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.sa-panel__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.sa-panel__hint {
    margin: 2px 0 0;
    color: var(--text-3);
    font-size: 12.5px;
}

.sa-panel__body {
    padding: 20px;
}

.sa-panel__foot {
    padding: 10px 20px 14px;
    text-align: end;
}

.sa-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 20px;
    text-align: center;
}

.sa-empty__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--brand-050);
    color: var(--brand-600);
    font-size: 30px;
}

.sa-empty__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.sa-empty__text {
    margin: 0 0 8px;
    color: var(--text-2);
}

.sa-empty--inline {
    display: block;
    margin: 0;
    padding: 32px 20px;
    color: var(--text-3);
}

/* 8. List page: DataTables skin + card view ------------------------------- */
.sa-list {
    overflow: hidden;
}

.sa-list .dt-container > .row,
.sa-list .dt-layout-row {
    margin: 0;
    padding: 12px 16px;
    align-items: center;
}

.sa-list .dt-container > .row:first-child {
    border-bottom: 1px solid var(--border);
}

.sa-list .dt-container > .row:last-child {
    border-top: 1px solid var(--border);
}

.sa-list .dt-layout-table {
    padding: 0 !important;
}

.sa-list .dt-layout-table > div {
    padding: 0;
    overflow-x: auto;
}

.sa-list div.dt-container div.dt-search input,
.sa-list .dt-search input {
    width: 280px;
    max-width: 100%;
    min-height: 38px;
    margin-inline-start: 0;
    border-color: var(--border);
    background-color: var(--surface-2);
}

.sa-list .dt-search input:focus {
    background-color: var(--surface);
}

.sa-list .dt-search label,
.sa-list .dt-length label,
.sa-list .dt-info {
    color: var(--text-2);
    font-size: 13px;
}

.sa-list .dt-length select {
    min-height: 36px;
    width: auto;
    margin-inline-end: 8px;
}

.sa-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-1);
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--brand-050);
    margin: 0 !important;
    font-size: 13.5px;
}

.sa-table > thead > tr > th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    text-align: start;
}

.sa-table > tbody > tr > td {
    padding: 11px 14px;
    border-color: var(--border);
    vertical-align: middle;
    text-align: start;
}

.sa-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.sa-table > tbody > tr:hover > td {
    background: var(--brand-050);
}

.sa-list table.dataTable th.dt-type-numeric,
.sa-list table.dataTable td.dt-type-numeric,
.sa-list table.dataTable th.dt-type-date,
.sa-list table.dataTable td.dt-type-date {
    text-align: start !important;
}

.sa-list table.dataTable th.dt-type-numeric div.dt-column-header,
.sa-list table.dataTable th.dt-type-date div.dt-column-header {
    flex-direction: row;
}

.sa-cell-primary {
    font-weight: 700;
}

.sa-col-actions {
    width: 1%;
    white-space: nowrap;
}

.sa-table td.sa-col-actions {
    padding-block: 6px;
}

.sa-list .dt-column-order {
    opacity: .55;
}

.sa-list th.dt-ordering-asc .dt-column-order,
.sa-list th.dt-ordering-desc .dt-column-order {
    color: var(--brand-700);
    opacity: 1;
}

.sa-list .pagination {
    --bs-pagination-color: var(--text-2);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-hover-color: var(--brand-700);
    --bs-pagination-hover-bg: var(--brand-050);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-focus-box-shadow: var(--ring);
    --bs-pagination-active-bg: var(--brand-fill);
    --bs-pagination-active-border-color: var(--brand-fill);
    --bs-pagination-active-color: var(--on-brand);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-color: var(--text-3);
    --bs-pagination-disabled-border-color: transparent;
    gap: 2px;
    margin: 0;
}

.sa-list .page-link {
    min-width: 34px;
    border-radius: var(--radius-sm) !important;
    text-align: center;
}

.sa-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.sa-actions form {
    margin: 0;
}

.sa-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px;
    background: var(--bg);
}

.sa-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.sa-card:hover {
    border-color: var(--border-strong);
}

.sa-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sa-card__heading {
    flex: 1;
    min-width: 0;
}

.sa-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sa-card__title a {
    color: var(--text-1);
    text-decoration: none;
}

.sa-card__title a:hover {
    color: var(--brand-700);
    text-decoration: underline;
}

.sa-card__subtitle {
    display: -webkit-box;
    margin: 2px 0 0;
    overflow: hidden;
    color: var(--text-2);
    font-size: 12.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
}

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

.sa-card__meta dt {
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
}

.sa-card__meta dd {
    margin: 0;
    font-size: 13.5px;
    overflow-wrap: anywhere;
}

.sa-card__foot {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.sa-list[data-view="cards"] .dt-layout-table {
    display: none !important;
}

.dt-button-info {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2100;
    width: min(360px, 90vw);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-3);
    color: var(--text-1);
    text-align: center;
    transform: translate(-50%, -50%);
}

.dt-button-info h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
}

.dt-button-info > div {
    color: var(--text-2);
}

/* 9. Filter panel ------------------------------------------------------------ */
.sa-filter {
    --bs-offcanvas-width: 400px;
}

.sa-filter .offcanvas-header {
    border-bottom: 1px solid var(--border);
}

.sa-filter__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.sa-filter__title i {
    color: var(--brand-700);
}

.sa-filter__form {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.sa-filter__form .offcanvas-body {
    flex: 1;
}

.sa-filter__foot {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.sa-filter__foot .sa-btn {
    flex: 1;
}

.sa-field {
    margin-bottom: 16px;
}

.sa-field__label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.sa-field__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sa-field__sub {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.sa-field__sub > span {
    color: var(--text-3);
    font-size: 11.5px;
}

/* 10. Forms (create / edit) -------------------------------------------------- */
.sa-form {
    padding: 24px;
}

.sa-form .container {
    max-width: none;
    padding: 0;
}

.tf-section-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
}

.tf-fields + .tf-section-title,
.tf-section-title.mt-4 {
    margin-top: 28px !important;
}

.tf-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.tf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.tf-field--full {
    grid-column: 1 / -1;
}

.tf-label {
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.tf-perm-group {
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.tf-perm-group-title {
    padding: 0 6px;
    color: var(--brand-700);
    font-size: 13.5px;
    font-weight: 700;
}

.tf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.tf-check:hover {
    background: var(--surface-2);
}

.tf-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-600);
}

.sa-form__actions {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 24px -24px -24px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(6px);
}

.table_create .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-1);
}

@media (max-width: 767.98px) {
    .tf-fields {
        grid-template-columns: 1fr;
    }

    .sa-form {
        padding: 16px;
    }

    .sa-form__actions {
        margin: 20px -16px -16px;
        padding: 12px 16px;
    }
}

/* Detail lists (profile, show pages) */
.sa-details {
    margin: 0;
}

.sa-details > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.sa-details > div:last-child {
    border-bottom: 0;
}

.sa-form .sa-details > div {
    padding-inline: 0;
}

.sa-details dt {
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
}

.sa-details dd {
    margin: 0;
    font-weight: 500;
    text-align: end;
    overflow-wrap: anywhere;
}

.sa-profile {
    margin-top: 18px;
}

.sa-profile__head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.sa-profile__name {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
}

.sa-profile__email {
    margin: 2px 0 8px;
    color: var(--text-2);
    text-align: start;
    unicode-bidi: plaintext;
}

.sa-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Confirmation modal */
.sa-confirm .modal-content {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-3);
}

.sa-confirm .modal-body {
    padding: 28px 24px 8px;
    text-align: center;
}

.sa-confirm__icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--tone-soft);
    color: var(--tone-ink);
    font-size: 26px;
}

.sa-confirm__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.sa-confirm__body {
    margin: 0;
    color: var(--text-2);
}

.sa-confirm .modal-footer {
    justify-content: center;
    gap: 8px;
    padding: 16px 24px 24px;
    border: 0;
}

.sa-confirm .modal-footer .sa-btn {
    min-width: 120px;
}

/* 11. Dashboard -------------------------------------------------------------- */
.sa-hello {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 20px;
}

.sa-hello__date {
    margin: 0;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
}

.sa-hello__title {
    margin: 2px 0 4px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.015em;
}

.sa-hello__intro {
    margin: 0;
    color: var(--text-2);
}

.sa-hello__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sa-attention {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
    border-radius: var(--radius-lg);
    background: var(--warning-soft);
}

.sa-attention__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--warning-ink);
    font-size: 22px;
}

.sa-attention__text {
    flex: 1;
    min-width: 220px;
}

.sa-attention__text h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.sa-attention__text p {
    margin: 0;
    color: var(--text-2);
    font-size: 13.5px;
}

.sa-attention__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* One panel split into segments; the 1px grid gap draws the dividers. */
.sa-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--border);
}

.sa-kpi {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}

.sa-kpi:hover {
    background: var(--surface-2);
    color: inherit;
}

.sa-kpi__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sa-kpi__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--tone-soft);
    color: var(--tone-ink);
    font-size: 20px;
}

.sa-kpi__label {
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
}

.sa-kpi__value {
    align-self: flex-start;
    color: var(--text-1);
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.sa-kpi__hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 12.5px;
}

.sa-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--tone-soft);
    color: var(--tone-ink);
    font-size: 12px;
    font-weight: 700;
}

.sa-minis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.sa-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-2);
    text-decoration: none;
}

.sa-mini:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
}

.sa-mini i {
    font-size: 19px;
}

.sa-mini__label {
    flex: 1;
    font-weight: 600;
}

.sa-mini__value {
    color: var(--text-1);
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.sa-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.sa-dash-grid > .sa-panel {
    height: 100%;
    margin: 0;
}

.sa-dash-grid + .sa-dash-grid {
    margin-top: 16px;
}

.sa-dash-grid__wide {
    grid-column: span 2;
}

.sa-dash-grid--even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sa-chart {
    min-height: 290px;
}

.sa-chart .apexcharts-tooltip {
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    color: var(--text-1) !important;
    box-shadow: var(--shadow-2) !important;
}

.sa-chart .apexcharts-tooltip-title {
    border-color: var(--border) !important;
    background: var(--surface-2) !important;
    font-family: var(--font) !important;
}

.sa-rows {
    margin: 0;
    padding: 6px;
    list-style: none;
}

.sa-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-1);
    text-decoration: none;
}

.sa-row:hover {
    background: var(--brand-050);
    color: var(--text-1);
}

.sa-row__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.sa-row__title {
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-row__sub {
    overflow: hidden;
    color: var(--text-3);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-row__side {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.sa-row__plan {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sa-row__package {
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
}

.sa-row__days,
.sa-row__date {
    color: var(--text-3);
    font-size: 12px;
}

.sa-meter {
    display: block;
    width: 128px;
    height: 6px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
}

.sa-meter__bar {
    display: block;
    width: var(--value, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--tone-fill);
}

@media (max-width: 1199.98px) {
    .sa-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .sa-dash-grid,
    .sa-dash-grid--even {
        grid-template-columns: minmax(0, 1fr);
    }

    .sa-dash-grid__wide {
        grid-column: auto;
    }
}

@media (max-width: 575.98px) {
    .sa-kpis {
        grid-template-columns: minmax(0, 1fr);
    }

    .sa-hello__title {
        font-size: 23px;
    }

    .sa-page-head__title h1 {
        font-size: 21px;
    }

    .sa-meter {
        width: 88px;
    }
}

/* 12. Sign in ---------------------------------------------------------------- */
.sa-auth {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 100vh;
    padding: 72px 16px 32px;
    background:
        radial-gradient(circle at 50% -20%, color-mix(in srgb, var(--brand-500) 14%, transparent), transparent 60%),
        var(--bg);
}

.sa-auth__tools {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    display: flex;
    gap: 8px;
}

.sa-auth__card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-2);
}

.sa-auth__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--brand-700);
}

.sa-auth__brand .sa-brand__mark {
    width: 40px;
}

.sa-auth__title {
    margin: 18px 0 6px;
    font-size: 22px;
    font-weight: 800;
}

.sa-auth__hint {
    margin: 0 0 20px;
    color: var(--text-2);
}

.sa-auth__form .sa-btn--block {
    margin-top: 8px;
}

.sa-password {
    position: relative;
}

.sa-password .form-control {
    padding-inline-end: 48px;
}

.sa-password .sa-icon-btn {
    position: absolute;
    top: 50%;
    inset-inline-end: 4px;
    transform: translateY(-50%);
}

.sa-auth__foot {
    margin: 0;
    color: var(--text-3);
    font-size: 12.5px;
}

@media (max-width: 575.98px) {
    .sa-auth__card {
        padding: 24px 20px;
    }
}

/* 13. Print ------------------------------------------------------------------ */
@media print {
    .sa-console,
    .sa-toolbar,
    .sa-subbar,
    .sa-crumbs,
    .sa-actions,
    .sa-col-actions {
        display: none !important;
    }

    body {
        background: #FFFFFF;
    }
}
