/*
 * Mehraz Taraz — interface layer
 * Loaded last, after the admin template and mehraz-theme.css.
 * Palette: ink (brand navy) on warm ledger paper, brand lime used only as a mark.
 */

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
    --ink-950: #0e1527;
    --ink-900: #151f38;
    --ink-800: #1f2b4a;
    --ink-700: #32446b;
    --ink-600: #4b5a7d;
    --ink-500: #6a7591;
    --ink-400: #959cae;
    --ink-300: #c5c9d3;
    --ink-200: #e0e2e8;
    --ink-100: #eff0f3;

    --paper: #f8f9fb;
    --paper-deep: #eef0f4;
    --paper-soft: #fbfcfd;
    --surface: #ffffff;
    --line: #e5e8ee;
    --line-soft: #eff1f5;
    --line-strong: #d3d8e1;

    --leaf: #72c90f;
    --leaf-deep: #3c7a0a;
    --leaf-wash: #eef6e2;
    --amber: #8f5a07;
    --amber-mark: #dd9d2b;
    --amber-wash: #fbf1de;
    --rust: #ad3a25;
    --rust-wash: #fbebe6;
    --sea: #2a5d8c;
    --sea-wash: #e8eff7;

    --r-sm: 6px;
    --r: 8px;
    --r-md: 10px;
    --r-lg: 14px;

    --shadow-1: 0 1px 2px rgba(21, 31, 56, .05);
    --shadow-pop: 0 20px 44px -20px rgba(21, 31, 56, .34), 0 2px 6px rgba(21, 31, 56, .06);
    --ring: 0 0 0 3px rgba(50, 68, 107, .16);
    --db-gap: 1.25rem;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Legacy tokens consumed by mehraz-theme.css */
    --mt-primary: var(--ink-900);
    --mt-primary-light: var(--ink-700);
    --mt-primary-dark: var(--ink-950);
    --mt-accent: var(--leaf);
    --mt-accent-hover: #66b80c;
    --mt-accent-soft: var(--leaf-wash);
    --mt-bg: var(--paper);
    --mt-bg-alt: var(--paper-soft);
    --mt-surface: var(--surface);
    --mt-surface-elevated: var(--surface);
    --mt-text: var(--ink-900);
    --mt-text-secondary: var(--ink-600);
    --mt-text-muted: var(--ink-500);
    --mt-text-light: var(--ink-400);
    --mt-border: var(--line);
    --mt-border-strong: var(--line-strong);
    --mt-shadow-xs: none;
    --mt-shadow-sm: var(--shadow-1);
    --mt-shadow-md: 0 8px 24px -14px rgba(21, 31, 56, .22);
    --mt-shadow-lg: var(--shadow-pop);
    --mt-shadow-accent: none;
    --mt-radius-sm: var(--r);
    --mt-radius: var(--r-md);
    --mt-radius-lg: var(--r-md);
    --mt-radius-xl: var(--r-lg);
    --mt-duration: .16s;
    --mt-ease: var(--ease);

    --bs-primary: var(--ink-900);
    --bs-primary-rgb: 21, 31, 56;
    --bs-success: var(--leaf-deep);
    --bs-success-rgb: 60, 122, 10;
    --bs-warning: var(--amber-mark);
    --bs-warning-rgb: 221, 157, 43;
    --bs-danger: var(--rust);
    --bs-danger-rgb: 173, 58, 37;
    --bs-info: var(--sea);
    --bs-info-rgb: 42, 93, 140;
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink-900);
    --bs-border-color: var(--line);
    --bs-primary-soft: var(--ink-100);
    --bs-success-soft: var(--leaf-wash);
    --bs-warning-soft: var(--amber-wash);
    --bs-danger-soft: var(--rust-wash);
    --bs-info-soft: var(--sea-wash);
}

html[data-skin][dir] {
    --theme-primary: #151f38;
    --theme-primary-rgb: 21, 31, 56;
    --theme-secondary: #6a7591;
    --theme-secondary-rgb: 106, 117, 145;
    --theme-success: #3c7a0a;
    --theme-success-rgb: 60, 122, 10;
    --theme-info: #2a5d8c;
    --theme-info-rgb: 42, 93, 140;
    --theme-warning: #dd9d2b;
    --theme-warning-rgb: 221, 157, 43;
    --theme-danger: #ad3a25;
    --theme-danger-rgb: 173, 58, 37;
    --theme-dark: #151f38;
    --theme-dark-rgb: 21, 31, 56;

    --theme-primary-bg-subtle: #eff0f3;
    --theme-success-bg-subtle: #eef6e2;
    --theme-info-bg-subtle: #e8eff7;
    --theme-warning-bg-subtle: #fbf1de;
    --theme-danger-bg-subtle: #fbebe6;
    --theme-secondary-bg-subtle: #f1f3f6;
    --theme-primary-text-emphasis: #151f38;
    --theme-success-text-emphasis: #3c7a0a;
    --theme-info-text-emphasis: #2a5d8c;
    --theme-warning-text-emphasis: #8f5a07;
    --theme-danger-text-emphasis: #ad3a25;

    --theme-body-bg: var(--paper);
    --theme-body-color: var(--ink-900);
    --theme-secondary-bg: #fff;
    --theme-border-color: var(--line);
    --theme-border-radius: 10px;
    --theme-font-weight-medium: 500;
    --theme-font-weight-semibold: 600;
    --theme-font-weight-bold: 700;

    --theme-chart-primary: #151f38;
    --theme-chart-primary-rgb: 21, 31, 56;
}

html[data-skin][data-menu-color] {
    --theme-sidenav-bg: var(--paper-soft);
    --theme-sidenav-border-color: var(--line);
    --theme-sidenav-item-color: var(--ink-600);
    --theme-sidenav-item-hover-color: var(--ink-900);
    --theme-sidenav-item-hover-bg: var(--paper-deep);
    --theme-sidenav-item-active-color: var(--ink-900);
    --theme-sidenav-item-active-bg: var(--surface);
}

html[data-skin][data-topbar-color] {
    --theme-topbar-bg: var(--paper);
    --theme-topbar-item-color: var(--ink-500);
    --theme-topbar-item-hover-color: var(--ink-900);
}

/* ── Base ───────────────────────────────────────────────────────── */
html,
body {
    background: var(--paper);
}

body {
    color: var(--ink-900);
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(114, 201, 15, .28);
    color: var(--ink-950);
}

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

a:hover {
    color: var(--ink-900);
}

.content-page {
    background: var(--paper);
}

.content-page::before {
    display: none;
}

.content-page > .container-fluid {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

/* Use the full width on wide screens (the template caps it at 1400px). */
.content-page > .container-fluid,
.app-topbar > .container-fluid,
.content-page > .footer > .container-fluid {
    max-width: none !important;
    margin-inline: 0 !important;
}

.content-page > .container-fluid > * {
    /* Content shows immediately; an opacity-0 entrance can stall on slow phones. */
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

h1, h2, h3, h4, h5, h6,
.content-page h4, .content-page h5, .content-page h6 {
    color: var(--ink-900);
}

.text-muted,
.content-page .text-muted {
    color: var(--ink-500) !important;
}

.text-dark,
.content-page .text-dark {
    color: var(--ink-900) !important;
}

.text-primary {
    color: var(--ink-700) !important;
}

.text-success { color: var(--leaf-deep) !important; }
.text-danger { color: var(--rust) !important; }
.text-warning { color: var(--amber) !important; }
.text-info { color: var(--sea) !important; }

/* Tailwind-style utility used by several views; Bootstrap has no equivalent. */
.min-w-0 {
    min-width: 0 !important;
}

/* Shared tooltip from custom.min.css */
[title]::after {
    background: var(--ink-900);
    border-radius: var(--r-sm);
    font-size: 12px;
    padding: 5px 9px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--ink-200);
    border: 3px solid var(--paper);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.app-topbar {
    background: rgba(248, 249, 251, .92) !important;
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
}

.app-topbar .topbar-link {
    color: var(--ink-500);
    border-radius: var(--r);
    transition: color .15s, background-color .15s;
}

.app-topbar .topbar-link:hover,
.app-topbar .topbar-link[aria-expanded="true"] {
    color: var(--ink-900);
    background: var(--paper-deep);
}

.app-topbar .topbar-link-icon {
    font-size: 1.2rem;
}

.app-topbar .sidenav-toggle-button,
.app-topbar .sidenav-toggle-button.bg-white {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink-700) !important;
    border-radius: var(--r) !important;
    padding: .55rem .65rem !important;
    box-shadow: none !important;
}

.app-topbar .sidenav-toggle-button:hover {
    background: var(--ink-900) !important;
    border-color: var(--ink-900) !important;
    color: #fff !important;
    transform: none !important;
}

.app-topbar #megamenu-apps .btn-link {
    color: var(--ink-700);
    font-weight: 600;
    text-decoration: none;
}

.app-topbar .nav-user .topbar-link {
    gap: .6rem;
}

.app-topbar .nav-user img,
.sidenav-user img {
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line);
}

.app-topbar .pro-username {
    color: var(--ink-900) !important;
    font-size: .9rem;
    font-weight: 700;
}

.app-topbar .nav-user .fs-xs {
    color: var(--ink-500);
}

.app-topbar .logo-topbar img {
    height: 34px;
    width: auto;
}

/* The template hides the topbar logo at <=375px — the most common phone widths. */
@media (max-width: 1199.98px) {
    html[data-sidenav-size] .app-topbar .logo-topbar {
        display: inline-block !important;
        line-height: 1;
        padding: 0 .35rem;
    }

    .app-topbar .logo-topbar:not(:has(.logo-dark)) {
        display: none !important;
    }

    .app-topbar .logo-topbar img {
        height: 30px;
    }
}

/* Quick-access mega menu */
.mt-quick {
    display: grid;
    grid-template-columns: 1fr 1fr 240px;
}

.mt-quick__col {
    padding: .5rem;
}

.mt-quick__item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .7rem .75rem;
    border-radius: var(--r);
    color: var(--ink-900);
    text-decoration: none;
    transition: background-color .15s;
}

.mt-quick__item:hover {
    background: var(--paper);
    color: var(--ink-900);
}

.mt-quick__item i {
    font-size: 1.25rem;
    color: var(--ink-500);
    margin-top: 2px;
}

.mt-quick__item:hover i {
    color: var(--ink-900);
}

.mt-quick__title {
    display: block;
    font-weight: 700;
    font-size: .875rem;
    line-height: 1.6;
}

.mt-quick__desc {
    display: block;
    color: var(--ink-500);
    font-size: .78rem;
}

.mt-quick__aside {
    grid-row: span 2;
    background: var(--ink-900);
    color: #fff;
    padding: 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px);
}

.mt-quick__aside h6 {
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
}

.mt-quick__aside p {
    color: rgba(255, 255, 255, .62);
    font-size: .8rem;
    margin: .35rem 0 0;
}

.mt-quick__aside .btn {
    background: var(--leaf);
    color: var(--ink-950);
    border: 0;
    font-weight: 700;
}

.mt-quick__aside .btn:hover {
    background: #83d625;
    color: var(--ink-950);
}

.mt-quick__foot {
    grid-column: 1 / 3;
    border-top: 1px dashed var(--line);
    padding: .8rem 1.25rem;
    font-size: .8rem;
    color: var(--ink-500);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.mt-quick__foot strong {
    color: var(--ink-900);
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidenav-menu {
    background: var(--paper-soft) !important;
    border-inline-end: 1px solid var(--line) !important;
    border-left: 1px solid var(--line) !important;
    box-shadow: none !important;
}

.sidenav-menu > a.logo {
    display: flex !important;
    align-items: center;
    height: var(--theme-topbar-height, 65px) !important;
    padding: 0 1.25rem !important;
    border-bottom: 1px solid var(--line);
    line-height: 1 !important;
}

.sidenav-menu > a.logo .logo,
.sidenav-menu > a.logo .logo-lg,
.sidenav-menu > a.logo .logo-sm {
    padding: 0 !important;
    line-height: 1 !important;
    height: auto !important;
}

.sidenav-menu .logo .logo-lg img {
    height: 40px !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.sidenav-menu #user-profile-settings.sidenav-user,
.sidenav-menu .sidenav-user {
    background: var(--surface) !important;
    background-image: none !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-md) !important;
    margin: 1rem .9rem .5rem !important;
    padding: .7rem .8rem !important;
    backdrop-filter: none !important;
}

.sidenav-menu .sidenav-user-name {
    color: var(--ink-900) !important;
    font-weight: 700;
    display: block;
    line-height: 1.5;
}

.sidenav-menu .sidenav-user .fs-12 {
    color: var(--ink-500);
    font-weight: 500 !important;
}

.sidenav-menu .side-nav-title {
    color: var(--ink-400) !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    padding: 1.1rem 1.4rem .35rem !important;
}

.sidenav-menu .side-nav-link {
    color: var(--ink-600) !important;
    border-radius: var(--r) !important;
    margin: 1px .75rem !important;
    padding: .55rem .7rem !important;
    border: 1px solid transparent;
    font-weight: 500;
    transition: background-color .14s, color .14s, border-color .14s !important;
}

.sidenav-menu .side-nav-link::before {
    display: none !important;
}

.sidenav-menu .side-nav-link .menu-icon {
    color: var(--ink-400) !important;
    transition: color .14s;
}

.sidenav-menu .side-nav-link:hover {
    color: var(--ink-900) !important;
    background: var(--paper-deep) !important;
}

.sidenav-menu .side-nav-link:hover .menu-icon {
    color: var(--ink-700) !important;
}

.sidenav-menu .side-nav-link.active,
.sidenav-menu .side-nav-item.active > .side-nav-link {
    color: var(--ink-900) !important;
    background: var(--surface) !important;
    border-color: var(--line);
    box-shadow: var(--shadow-1);
    font-weight: 700;
}

.sidenav-menu .side-nav-link.active .menu-icon,
.sidenav-menu .side-nav-item.active > .side-nav-link .menu-icon {
    color: var(--ink-900) !important;
}

.sidenav-menu .sub-menu .side-nav-link {
    font-size: .84rem;
    padding-inline-start: 2.6rem !important;
}

.sidenav-menu .side-nav-link .badge {
    font-size: .68rem;
}

/* Primary action inside the menu */
.sidenav-menu .side-nav-item--cta > .side-nav-link {
    background: var(--ink-900) !important;
    color: #fff !important;
    border-color: var(--ink-900);
    margin-top: .35rem !important;
    margin-bottom: .35rem !important;
}

.sidenav-menu .side-nav-item--cta > .side-nav-link .menu-icon {
    color: var(--leaf) !important;
}

.sidenav-menu .side-nav-item--cta > .side-nav-link:hover {
    background: var(--ink-800) !important;
    color: #fff !important;
}

.sidenav-menu .side-nav-item--cta > .side-nav-link .menu-text {
    font-weight: 700;
}

/* Add-profile button */
.sidenav-menu .mt-add-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: .4rem .75rem 0;
    padding: .5rem .7rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r);
    color: var(--ink-600);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .14s, color .14s, background-color .14s;
}

.sidenav-menu .mt-add-profile:hover {
    border-color: var(--ink-700);
    color: var(--ink-900);
    background: var(--surface);
}

/* Logout */
.sidenav-menu .side-nav-link.bg-danger,
.sidenav-menu .side-nav-link.mt-logout {
    background: transparent !important;
    color: var(--rust) !important;
    margin-top: .25rem !important;
}

.sidenav-menu .side-nav-link.bg-danger .menu-icon,
.sidenav-menu .side-nav-link.mt-logout .menu-icon {
    color: var(--rust) !important;
}

.sidenav-menu .side-nav-link.bg-danger:hover,
.sidenav-menu .side-nav-link.mt-logout:hover {
    background: var(--rust-wash) !important;
    color: var(--rust) !important;
}

.sidenav-menu .simplebar-scrollbar::before {
    background: var(--ink-300) !important;
}

.sidenav-menu .button-close-offcanvas {
    color: var(--ink-700);
}

/* ── Page head ──────────────────────────────────────────────────── */
.page-title-head {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 0 1.1rem !important;
    margin-bottom: 1.4rem !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    gap: 1rem;
}

.page-main-title {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--ink-900) !important;
    padding-right: 0 !important;
    line-height: 1.6;
}

.page-main-title::before {
    display: none !important;
}

.page-title-head .breadcrumb {
    font-size: .8rem;
}

.page-title-head .breadcrumb-item,
.page-title-head .breadcrumb-item a {
    color: var(--ink-400);
}

.page-title-head .breadcrumb-item.active {
    color: var(--ink-700);
    font-weight: 600;
}

.page-title-head .breadcrumb-item + .breadcrumb-item::before {
    color: var(--ink-300);
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card,
.content-page .card,
.content-page > .container-fluid .card:not(.auth-box .card) {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-1) !important;
    transform: none !important;
}

.card:hover {
    box-shadow: var(--shadow-1) !important;
}

.card.select-choice-open {
    overflow: visible !important;
}

.content-page .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--line-soft) !important;
    padding: 1rem 1.25rem;
}

.content-page .card-header .card-title,
.content-page .card-title {
    color: var(--ink-900);
    font-weight: 700;
    font-size: 1rem;
}

.content-page .card-footer {
    background: var(--paper-soft) !important;
    border-top: 1px solid var(--line-soft) !important;
}

.card.bg-light,
.content-page .card.bg-light {
    background: var(--paper-soft) !important;
}

.hover-elevate-up,
.hover-elevate-up:hover {
    transform: none !important;
}

.hover-elevate-up:hover {
    border-color: var(--line-strong) !important;
}

/* Variants kept for pages that still reference them */
.mt-card--stat {
    padding: 0;
}

.mt-card--stat .avatar-lg,
.mt-card--stat .icon-box {
    box-shadow: none !important;
}

.mt-card--interactive {
    cursor: pointer;
    transition: border-color .15s !important;
}

.mt-card--interactive:hover {
    border-color: var(--ink-300) !important;
}

.mt-ripple {
    display: none;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    border-radius: var(--r);
    font-weight: 600;
    transition: background-color .14s, border-color .14s, color .14s, box-shadow .14s !important;
}

.btn:hover,
.btn:focus {
    transform: none !important;
}

.btn:focus-visible {
    box-shadow: var(--ring) !important;
}

.btn-primary,
.btn-login {
    background: var(--ink-900) !important;
    border: 1px solid var(--ink-900) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-login:hover {
    background: var(--ink-800) !important;
    border-color: var(--ink-800) !important;
    color: #fff !important;
}

.btn-success {
    background: var(--leaf) !important;
    border: 1px solid var(--leaf) !important;
    color: var(--ink-950) !important;
}

.btn-success:hover,
.btn-success:focus {
    background: #66b80c !important;
    border-color: #66b80c !important;
    color: var(--ink-950) !important;
    box-shadow: none !important;
}

.btn-warning {
    background: var(--amber-mark) !important;
    border: 1px solid var(--amber-mark) !important;
    color: var(--ink-950) !important;
}

.btn-danger {
    background: var(--rust) !important;
    border: 1px solid var(--rust) !important;
    color: #fff !important;
}

.btn-danger:hover {
    background: #962f1d !important;
    border-color: #962f1d !important;
}

.btn-info {
    background: var(--sea) !important;
    border: 1px solid var(--sea) !important;
    color: #fff !important;
}

.btn-light,
.btn-secondary {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink-700) !important;
}

.btn-light:hover,
.btn-secondary:hover {
    background: var(--paper) !important;
    border-color: var(--line-strong) !important;
    color: var(--ink-900) !important;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--ink-800) !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    background: var(--ink-900) !important;
    border-color: var(--ink-900) !important;
    color: #fff !important;
}

.btn-outline-success {
    border: 1px solid rgba(60, 122, 10, .35) !important;
    color: var(--leaf-deep) !important;
    background: transparent !important;
}

.btn-outline-success:hover {
    background: var(--leaf-wash) !important;
    color: var(--leaf-deep) !important;
}

.btn-outline-danger {
    border: 1px solid rgba(173, 58, 37, .35) !important;
    color: var(--rust) !important;
    background: transparent !important;
}

.btn-outline-danger:hover {
    background: var(--rust-wash) !important;
    color: var(--rust) !important;
}

.btn-outline-warning {
    border: 1px solid rgba(143, 90, 7, .35) !important;
    color: var(--amber) !important;
    background: transparent !important;
}

.btn-outline-warning:hover {
    background: var(--amber-wash) !important;
    color: var(--amber) !important;
}

.btn-outline-info {
    border: 1px solid rgba(42, 93, 140, .35) !important;
    color: var(--sea) !important;
    background: transparent !important;
}

.btn-outline-info:hover {
    background: var(--sea-wash) !important;
    color: var(--sea) !important;
}

.btn-link {
    color: var(--ink-700);
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-control,
.form-select {
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--r) !important;
    background-color: var(--surface);
    color: var(--ink-900);
    padding: .62rem .8rem;
    box-shadow: none;
    transition: border-color .14s, box-shadow .14s;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--ink-300) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ink-700) !important;
    box-shadow: var(--ring) !important;
}

.form-control::placeholder {
    color: var(--ink-400);
}

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

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(173, 58, 37, .14) !important;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: var(--paper-soft);
    color: var(--ink-500);
}

.form-label,
.col-form-label {
    color: var(--ink-700);
    font-weight: 600;
    font-size: .84rem;
}

.input-group-text {
    background: var(--paper-soft);
    border: 1px solid var(--line-strong);
    color: var(--ink-500);
}

.form-check-input {
    border-color: var(--ink-300);
}

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

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

.choices__inner {
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--r) !important;
    background: var(--surface) !important;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: var(--ink-700) !important;
}

.choices__list--dropdown {
    border: 1px solid var(--line) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-pop) !important;
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    --theme-table-bg: transparent;
    color: var(--ink-900);
}

.table thead th,
.table-custom th,
.table.power-grid-table thead th {
    background: var(--paper-soft) !important;
    color: var(--ink-500) !important;
    font-weight: 600 !important;
    font-size: .78rem !important;
    border-bottom: 1px solid var(--line) !important;
    border-top: 0 !important;
    white-space: nowrap;
}

.table > :not(caption) > * > *,
.table-custom td,
.table.power-grid-table tbody td {
    border-bottom-color: var(--line-soft) !important;
}

.table-hover > tbody > tr:hover > *,
.table.power-grid-table tbody tr:hover {
    background: var(--paper-soft) !important;
    --bs-table-accent-bg: transparent;
}

.table.power-grid-table tbody tr:nth-child(even) {
    background: transparent !important;
}

.table.power-grid-table {
    border: 1px solid var(--line) !important;
    border-radius: var(--r-md) !important;
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
    border-radius: var(--r-sm);
    font-weight: 600;
    letter-spacing: 0;
    padding: .38em .62em;
}

.badge.rounded-pill {
    border-radius: 50rem;
}

.badge.bg-primary,
.badge.text-bg-primary {
    background: var(--ink-100) !important;
    color: var(--ink-800) !important;
    box-shadow: inset 0 0 0 1px rgba(21, 31, 56, .1);
}

.badge.bg-success,
.badge.text-bg-success,
.badge.bg-success-subtle,
.badge.bg-success-soft {
    background: var(--leaf-wash) !important;
    color: var(--leaf-deep) !important;
    box-shadow: inset 0 0 0 1px rgba(60, 122, 10, .16);
}

.badge.bg-warning,
.badge.text-bg-warning,
.badge.bg-warning-subtle {
    background: var(--amber-wash) !important;
    color: var(--amber) !important;
    box-shadow: inset 0 0 0 1px rgba(143, 90, 7, .16);
}

.badge.bg-danger,
.badge.text-bg-danger,
.badge.bg-danger-subtle {
    background: var(--rust-wash) !important;
    color: var(--rust) !important;
    box-shadow: inset 0 0 0 1px rgba(173, 58, 37, .16);
}

.badge.bg-info,
.badge.text-bg-info,
.badge.bg-info-subtle {
    background: var(--sea-wash) !important;
    color: var(--sea) !important;
    box-shadow: inset 0 0 0 1px rgba(42, 93, 140, .16);
}

.badge.bg-secondary,
.badge.bg-light {
    background: var(--paper-deep) !important;
    color: var(--ink-600) !important;
}

.badge.bg-dark {
    background: var(--ink-900) !important;
    color: #fff !important;
}

.topbar-badge {
    animation: none !important;
    background: var(--rust) !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px var(--paper) !important;
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
    border-radius: var(--r-md) !important;
    border: 1px solid transparent !important;
    border-right-width: 1px !important;
    color: var(--ink-900);
}

.alert-warning { background: var(--amber-wash) !important; border-color: rgba(143, 90, 7, .2) !important; }
.alert-success { background: var(--leaf-wash) !important; border-color: rgba(60, 122, 10, .2) !important; }
.alert-danger { background: var(--rust-wash) !important; border-color: rgba(173, 58, 37, .2) !important; }
.alert-info,
.alert-primary { background: var(--sea-wash) !important; border-color: rgba(42, 93, 140, .2) !important; color: var(--ink-900) !important; }
.alert-light,
.alert-secondary { background: var(--paper-soft) !important; border-color: var(--line) !important; }

.bg-primary-subtle { background-color: var(--ink-100) !important; }
.bg-success-subtle { background-color: var(--leaf-wash) !important; }
.bg-warning-subtle { background-color: var(--amber-wash) !important; }
.bg-danger-subtle { background-color: var(--rust-wash) !important; }
.bg-info-subtle { background-color: var(--sea-wash) !important; }

/* ── Dropdowns, modals, nav ─────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--line) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-pop) !important;
    padding: .35rem;
}

.dropdown-item {
    border-radius: var(--r-sm);
    margin: 1px 0;
    width: 100%;
    color: var(--ink-800);
    padding: .5rem .7rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--paper);
    color: var(--ink-900);
}

.dropdown-item.text-danger:hover {
    background: var(--rust-wash);
}

.modal-content,
.wep-modal-content {
    border: 1px solid var(--line) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-pop) !important;
}

.modal-header,
.wep-modal-content .modal-header {
    border-bottom: 1px solid var(--line-soft) !important;
    background: transparent !important;
}

.wep-modal-content .modal-header::after {
    display: none !important;
}

.modal-title {
    font-weight: 800;
    color: var(--ink-900);
}

.modal-footer {
    border-top: 1px solid var(--line-soft) !important;
    background: var(--paper-soft);
}

.modal-backdrop.show,
.wep-modal-backdrop {
    background: rgba(14, 21, 39, .42) !important;
    backdrop-filter: none !important;
}

.nav-tabs {
    border-bottom: 1px solid var(--line) !important;
}

.nav-tabs .nav-link {
    color: var(--ink-500);
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    color: var(--ink-900);
}

.nav-tabs .nav-link.active {
    color: var(--ink-900) !important;
    background: transparent !important;
    border-bottom-color: var(--ink-900) !important;
}

.nav-pills .nav-link.active {
    background: var(--ink-900) !important;
}

.pagination .page-link {
    border-radius: var(--r-sm) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink-700) !important;
    background: var(--surface) !important;
}

.pagination .page-item.active .page-link {
    background: var(--ink-900) !important;
    border-color: var(--ink-900) !important;
    color: #fff !important;
}

.progress {
    background: var(--paper-deep);
    border-radius: 50rem;
}

.swal2-popup {
    border-radius: var(--r-lg) !important;
}

.swal2-confirm {
    background: var(--ink-900) !important;
    border-radius: var(--r) !important;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
    background: transparent !important;
    border-top: 1px solid var(--line) !important;
    color: var(--ink-500) !important;
    font-size: .8rem !important;
}

.footer .link-reset {
    color: var(--ink-500) !important;
}

.footer .link-reset:hover {
    color: var(--ink-900) !important;
}

/* Loading dots inside buttons */
.btn {
    position: relative;
}

.btn-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════
   Auth (login / register)
   ══════════════════════════════════════════════════════════════════ */
body:has(.au) {
    background: var(--surface);
}

.au {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: var(--surface);
    color: var(--ink-900);
}

.au__main {
    display: flex;
    flex-direction: column;
    padding: 2rem clamp(1.25rem, 5vw, 4.5rem);
    min-width: 0;
}

.au__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.au__logo img {
    height: 46px;
    width: auto;
    display: block;
}

.au__top-link {
    font-size: .84rem;
    color: var(--ink-500);
    text-decoration: none;
}

.au__top-link a,
.au__top-link strong {
    color: var(--ink-900);
    font-weight: 700;
    text-decoration: none;
}

.au__top-link a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.au__body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2.5rem 0;
}

.au__form {
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
}

.au__kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink-500);
    margin-bottom: .9rem;
}

.au__kicker::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--leaf);
    border-radius: 2px;
}

.au__title {
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.45;
    margin: 0 0 .4rem;
    color: var(--ink-900);
}

.au__lead {
    color: var(--ink-500);
    font-size: .92rem;
    line-height: 1.9;
    margin: 0 0 1.75rem;
}

.au__lead strong {
    color: var(--ink-900);
    font-weight: 700;
    direction: ltr;
    unicode-bidi: embed;
}

/* Segmented control */
.au-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 1.5rem;
}

.au-seg__btn {
    border: 0;
    background: transparent;
    padding: .55rem .5rem;
    border-radius: 7px;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: color .14s, background-color .14s, box-shadow .14s;
}

.au-seg__btn:hover {
    color: var(--ink-900);
}

.au-seg__btn.is-active {
    background: var(--surface);
    color: var(--ink-900);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(21, 31, 56, .08), 0 0 0 1px var(--line);
}

/* Fields */
.au-field {
    margin-bottom: 1.1rem;
}

.au-field__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
}

.au-field__label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-700);
    margin-bottom: .45rem;
}

.au-field__aside {
    font-size: .78rem;
    color: var(--ink-500);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}

.au-field__aside:hover {
    color: var(--ink-900);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.au-input-wrap {
    position: relative;
}

.au-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 .95rem;
    font: inherit;
    font-size: .95rem;
    color: var(--ink-900);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    outline: none;
    transition: border-color .14s, box-shadow .14s;
}

.au-input:hover {
    border-color: var(--ink-300);
}

.au-input:focus {
    border-color: var(--ink-700);
    box-shadow: var(--ring);
}

.au-input::placeholder {
    color: var(--ink-400);
}

.au-input--ltr {
    direction: ltr;
    text-align: left;
}

.au-input--ltr:placeholder-shown {
    direction: rtl;
    text-align: right;
}

.au-input.is-invalid {
    border-color: var(--rust);
}

.au-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(173, 58, 37, .14);
}

.au-input-wrap--toggle .au-input {
    padding-left: 3rem;
}

.au-input__toggle {
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 40px;
    border: 0;
    background: transparent;
    color: var(--ink-400);
    border-radius: 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.au-input__toggle:hover {
    color: var(--ink-900);
    background: var(--paper);
}

.au-otp {
    height: 60px;
    text-align: center !important;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: .35em;
    direction: ltr;
}

.au-error {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .45rem;
    font-size: .8rem;
    color: var(--rust);
    font-weight: 600;
}

.au-hint {
    font-size: .76rem;
    color: var(--ink-500);
    margin: .45rem 0 0;
}

.au-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 .85rem;
}

.au-check {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .84rem;
    color: var(--ink-700);
    cursor: pointer;
    user-select: none;
}

.au-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--ink-900);
    cursor: pointer;
}

.au-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: .25rem 0 1.4rem;
}

.au-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 48px;
    border-radius: var(--r);
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .14s, border-color .14s, color .14s;
}

.au-btn--primary {
    background: var(--ink-900);
    border: 1px solid var(--ink-900);
    color: #fff;
}

.au-btn--primary:hover {
    background: var(--ink-800);
    color: #fff;
}

.au-btn--primary:focus-visible {
    box-shadow: var(--ring);
    outline: none;
}

.au-btn--ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink-800);
    margin-top: .6rem;
}

.au-btn--ghost:hover {
    background: var(--paper);
    color: var(--ink-900);
}

.au-btn .btn-loading-overlay {
    border-radius: inherit;
    background: inherit;
}

.au-btn .loading-dots span {
    background: currentColor;
}

.au-btn i {
    font-size: 1.1rem;
}

.au-note {
    display: flex;
    gap: .6rem;
    padding: .8rem .9rem;
    border-radius: var(--r);
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink-600);
    font-size: .8rem;
    line-height: 1.9;
    margin-bottom: 1.25rem;
}

.au-note i {
    color: var(--ink-400);
    font-size: 1.05rem;
    margin-top: 2px;
}

.au-note strong {
    color: var(--ink-900);
}

.au-resend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: .6rem;
    min-height: 28px;
}

.au-resend #timer {
    font-size: .78rem;
    color: var(--ink-500);
}

.au-resend button {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    color: var(--ink-900);
    cursor: pointer;
}

.au-resend button:disabled {
    color: var(--ink-300);
    cursor: default;
}

.au-sep {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.75rem 0 1.25rem;
    color: var(--ink-400);
    font-size: .76rem;
}

.au-sep::before,
.au-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.au-alt {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--ink-900);
    transition: border-color .14s, background-color .14s;
}

.au-alt:hover {
    border-color: var(--ink-300);
    background: var(--paper-soft);
    color: var(--ink-900);
}

.au-alt__icon {
    width: 38px;
    height: 38px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--r);
    background: var(--leaf-wash);
    color: var(--leaf-deep);
    font-size: 1.15rem;
}

.au-alt__text {
    flex: 1;
    min-width: 0;
}

.au-alt__text strong {
    display: block;
    font-size: .86rem;
    font-weight: 700;
}

.au-alt__text span {
    display: block;
    font-size: .76rem;
    color: var(--ink-500);
}

.au-alt > .ti-arrow-left {
    color: var(--ink-400);
    transition: transform .14s;
}

.au-alt:hover > .ti-arrow-left {
    transform: translateX(-3px);
    color: var(--ink-900);
}

.au__foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .76rem;
    color: var(--ink-400);
}

.au__foot a {
    color: var(--ink-500);
    text-decoration: none;
}

.au__foot a:hover {
    color: var(--ink-900);
}

/* Register progress */
.au-progress {
    margin-bottom: 1.6rem;
}

.au-progress__bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: .55rem;
}

.au-progress__bars span {
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    transition: background-color .25s;
}

.au-progress__bars span.is-on {
    background: var(--ink-900);
}

.au-progress__label {
    display: flex;
    justify-content: space-between;
    font-size: .76rem;
    color: var(--ink-500);
}

.au-progress__label strong {
    color: var(--ink-900);
    font-weight: 700;
}

.au-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: .55rem;
}

.au-strength .strong-bar {
    height: 3px;
    border-radius: 3px;
    background: var(--line);
    transition: background-color .2s;
}

.au-strength .strong-bar.bar-active-1 { background: var(--rust); }
.au-strength .strong-bar.bar-active-2 { background: var(--amber-mark); }
.au-strength .strong-bar.bar-active-3 { background: #9bbf3a; }
.au-strength .strong-bar.bar-active-4 { background: var(--leaf-deep); }

.au-link-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 0;
    background: none;
    padding: 0;
    margin: 0 0 1rem;
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
}

.au-link-btn:hover {
    color: var(--ink-900);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Brand panel */
.au__aside {
    position: relative;
    overflow: hidden;
    background: var(--ink-950);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 3.5rem);
    isolation: isolate;
}

.au__aside::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(90deg, transparent 72px, rgba(221, 99, 77, .32) 72px 73px, transparent 73px 77px, rgba(221, 99, 77, .32) 77px 78px, transparent 78px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 36px);
}

.au__aside-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .76rem;
    color: rgba(255, 255, 255, .5);
}

.au__aside-top span:first-child {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.au__aside-top span:first-child::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--leaf);
}

.au__statement {
    max-width: 30rem;
    margin: 2.5rem 0;
}

.au__statement h2 {
    color: #fff;
    font-size: clamp(1.9rem, 3.1vw, 2.75rem);
    font-weight: 900;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.au__statement h2 em {
    font-style: normal;
    color: var(--leaf);
}

.au__statement p {
    color: rgba(255, 255, 255, .62);
    font-size: .95rem;
    line-height: 2;
    margin: 0;
    max-width: 26rem;
}

/* Case-file mock shown beside the login form */
.mt-file {
    background: var(--surface);
    color: var(--ink-900);
    border-radius: var(--r-lg);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(21, 31, 56, .06);
    padding: 1.25rem 1.35rem 1.1rem;
    max-width: 380px;
    position: relative;
}

.mt-file__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px dashed var(--line);
    margin-bottom: .9rem;
}

.mt-file__ref {
    font-size: .7rem;
    color: var(--ink-400);
    font-weight: 600;
    margin-bottom: .2rem;
}

.mt-file__title {
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.6;
}

.mt-file__state {
    flex: none;
    font-size: .7rem;
    font-weight: 700;
    color: var(--sea);
    background: var(--sea-wash);
    border-radius: 50rem;
    padding: .25rem .6rem;
    white-space: nowrap;
}

.mt-file__steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mt-file__steps li {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .38rem 1.6rem .38rem 0;
    font-size: .8rem;
    color: var(--ink-400);
}

.mt-file__steps li::before {
    content: '';
    position: absolute;
    right: 3px;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -5.5px;
    border-radius: 50%;
    border: 1.5px solid var(--ink-300);
    background: var(--surface);
    z-index: 1;
}

.mt-file__steps li + li::after {
    content: '';
    position: absolute;
    right: 8px;
    bottom: 50%;
    height: 100%;
    width: 1.5px;
    background: var(--line);
}

.mt-file__steps li.is-done {
    color: var(--ink-700);
}

.mt-file__steps li.is-done::before {
    background: var(--ink-900);
    border-color: var(--ink-900);
}

.mt-file__steps li.is-done + li::after,
.mt-file__steps li.is-now::after {
    background: var(--ink-900);
}

.mt-file__steps li.is-now {
    color: var(--ink-900);
    font-weight: 700;
}

.mt-file__steps li.is-now::before {
    border-color: var(--leaf-deep);
    background: var(--leaf);
    box-shadow: 0 0 0 4px var(--leaf-wash);
}

.mt-file__steps time {
    font-size: .72rem;
    color: var(--ink-400);
    font-weight: 500;
}

.mt-file__foot {
    margin-top: .9rem;
    padding-top: .8rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .74rem;
    color: var(--ink-500);
}

.mt-file__foot i {
    color: var(--leaf-deep);
    font-size: 1rem;
}

/* SMS thread mock shown beside the register form */
.mt-sms {
    max-width: 360px;
    background: #f1f3f6;
    border-radius: 22px;
    padding: 1rem 1rem 1.15rem;
    color: var(--ink-900);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(21, 31, 56, .06);
}

.mt-sms__head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .25rem .85rem;
    margin-bottom: .85rem;
    border-bottom: 1px solid rgba(21, 31, 56, .08);
}

.mt-sms__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink-900);
    color: var(--leaf);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: .95rem;
}

.mt-sms__head strong {
    display: block;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.4;
}

.mt-sms__head small {
    font-size: .7rem;
    color: var(--ink-500);
}

.mt-sms__msg {
    background: var(--surface);
    border-radius: 16px 16px 4px 16px;
    padding: .65rem .85rem .5rem;
    font-size: .8rem;
    line-height: 1.95;
    margin-bottom: .45rem;
    max-width: 92%;
    box-shadow: 0 1px 1px rgba(21, 31, 56, .05);
}

.mt-sms__msg time {
    display: block;
    text-align: left;
    font-size: .66rem;
    color: var(--ink-400);
    line-height: 1.4;
}

.mt-sms__msg--last {
    margin-bottom: 0;
    box-shadow: 0 1px 1px rgba(21, 31, 56, .05), inset 0 0 0 1px rgba(60, 122, 10, .25);
}

.au__facts {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.au__facts li {
    font-size: .78rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, .55);
}

.au__facts strong {
    display: block;
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: .15rem;
}

@media (max-width: 991.98px) {
    .au {
        grid-template-columns: 1fr;
    }

    .au__aside {
        display: none;
    }

    .au__main {
        padding: 1.25rem 1rem 1.5rem;
    }

    .au__body {
        padding: 2rem 0;
        align-items: flex-start;
    }

    .au__logo img {
        height: 38px;
    }
}

@media (max-width: 420px) {
    .au-grid-2 {
        grid-template-columns: 1fr;
    }

    .au__title {
        font-size: 1.55rem;
    }

    .au__top-link span {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════════
   Dashboard
   ══════════════════════════════════════════════════════════════════ */
.db-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.db-head__date {
    font-size: .8rem;
    color: var(--ink-500);
    margin: 0 0 .35rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.db-head__date::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--leaf);
}

.db-head__title {
    font-size: 1.7rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.5;
}

.db-head__sub {
    margin: .2rem 0 0;
    color: var(--ink-500);
    font-size: .9rem;
}

.db-head__actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.db-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 42px;
    padding: 0 1.05rem;
    border-radius: var(--r);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color .14s, border-color .14s, color .14s;
    white-space: nowrap;
    cursor: pointer;
}

.db-btn i {
    font-size: 1.1rem;
}

.db-btn--ink {
    background: var(--ink-900);
    color: #fff;
}

.db-btn--ink:hover {
    background: var(--ink-800);
    color: #fff;
}

.db-btn--ink i {
    color: var(--leaf);
}

.db-btn--line {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink-800);
}

.db-btn--line:hover {
    border-color: var(--ink-300);
    color: var(--ink-900);
}

.db-btn--sm {
    height: 34px;
    padding: 0 .8rem;
    font-size: .8rem;
}

/* Notice */
.db-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.1rem;
    border-radius: var(--r-md);
    background: #fffcf6;
    border: 1px solid rgba(143, 90, 7, .16);
    border-right: 3px solid var(--amber-mark);
    margin-bottom: var(--db-gap);
    flex-wrap: wrap;
}

.db-notice__icon {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--amber);
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px rgba(143, 90, 7, .2);
}

.db-notice__text {
    flex: 1;
    min-width: 220px;
}

.db-notice__text strong {
    display: block;
    font-size: .9rem;
    font-weight: 800;
    color: var(--ink-900);
}

.db-notice__text span {
    font-size: .82rem;
    color: var(--ink-600);
}

.db-notice .db-btn {
    background: var(--ink-900);
    color: #fff;
}

/* Panels */
.db-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-1);
    min-width: 0;
}

.db-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line-soft);
}

.db-panel__title {
    font-size: .95rem;
    font-weight: 800;
    margin: 0;
    color: var(--ink-900);
}

.db-panel__meta {
    font-size: .76rem;
    color: var(--ink-400);
}

.db-panel__link {
    font-size: .8rem;
    font-weight: 700;
    color: var(--ink-700);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.db-panel__link:hover {
    color: var(--ink-900);
}

.db-panel__body {
    padding: 1.25rem;
}

.db-grid {
    display: grid;
    gap: var(--db-gap);
    margin-bottom: var(--db-gap);
}

.db-grid--main {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
}

/* Ledger strip */
.db-ledger {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: var(--db-gap);
}

.db-figure {
    padding: 1.15rem 1.35rem 1.2rem;
    position: relative;
}

.db-figure + .db-figure {
    border-right: 1px solid var(--line-soft);
}

.db-figure__label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-500);
    display: flex;
    align-items: center;
    gap: .45rem;
}

.db-figure__label i {
    font-size: 1rem;
    color: var(--ink-400);
}

.db-figure__value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.3;
    margin: .45rem 0 .2rem;
    color: var(--ink-900);
}

.db-figure__value--total {
    text-decoration: underline double;
    text-decoration-thickness: 1px;
    text-underline-offset: 9px;
    text-decoration-color: var(--ink-300);
}

.db-figure__note {
    font-size: .76rem;
    color: var(--ink-400);
}

.db-figure__note a {
    color: var(--amber);
    font-weight: 700;
    text-decoration: none;
}

.db-figure__note a:hover {
    text-decoration: underline;
}

/* Latest case */
.db-case__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.db-case__ref {
    font-size: .76rem;
    color: var(--ink-400);
    font-weight: 600;
    margin-bottom: .15rem;
}

.db-case__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.6;
}

.db-case__date {
    font-size: .8rem;
    color: var(--ink-500);
    margin-top: .15rem;
}

.db-state {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
    padding: .3rem .7rem;
    border-radius: 50rem;
    white-space: nowrap;
    background: var(--ink-100);
    color: var(--ink-800);
}

.db-state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.db-state--progress { background: var(--sea-wash); color: var(--sea); }
.db-state--review { background: var(--amber-wash); color: var(--amber); }
.db-state--done { background: var(--leaf-wash); color: var(--leaf-deep); }
.db-state--stopped { background: var(--rust-wash); color: var(--rust); }
.db-state--muted { background: var(--paper-deep); color: var(--ink-600); }

.db-track {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 1.6rem 0 1.4rem;
    padding: 0;
}

.db-track li {
    position: relative;
    text-align: center;
    padding-top: 1.6rem;
    font-size: .76rem;
    color: var(--ink-400);
    font-weight: 600;
}

.db-track li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--ink-200);
    z-index: 1;
    box-sizing: border-box;
}

.db-track li::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--ink-200);
}

.db-track li:first-child::after {
    display: none;
}

.db-track li.is-done {
    color: var(--ink-700);
}

.db-track li.is-done::before {
    background: var(--ink-900);
    border-color: var(--ink-900);
}

.db-track li.is-done::after,
.db-track li.is-current::after,
.db-track li.is-stopped::after {
    background: var(--ink-900);
}

.db-track li.is-current {
    color: var(--ink-900);
    font-weight: 800;
}

.db-track li.is-current::before {
    background: var(--leaf);
    border-color: var(--leaf-deep);
    box-shadow: 0 0 0 4px var(--leaf-wash);
}

.db-track li.is-stopped {
    color: var(--rust);
    font-weight: 800;
}

.db-track li.is-stopped::before {
    background: var(--rust);
    border-color: var(--rust);
    box-shadow: 0 0 0 4px var(--rust-wash);
}

.db-case__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--line);
}

.db-empty {
    text-align: center;
    padding: 2rem 1rem;
}

.db-empty__mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px dashed var(--line-strong);
    color: var(--ink-400);
    font-size: 1.4rem;
}

.db-empty h6 {
    font-size: .95rem;
    font-weight: 800;
    margin: 0 0 .3rem;
}

.db-empty p {
    font-size: .82rem;
    color: var(--ink-500);
    margin: 0 auto 1.1rem;
    max-width: 22rem;
    line-height: 1.9;
}

/* Status split */
.db-split__bar {
    display: flex;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--paper-deep);
    gap: 2px;
    margin: .25rem 0 1.25rem;
}

.db-split__bar span {
    display: block;
    height: 100%;
    min-width: 0;
}

.db-split__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.db-split__list li {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center;
    gap: .7rem;
    padding: .6rem 0;
    font-size: .84rem;
    border-bottom: 1px solid var(--line-soft);
}

.db-split__list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.db-split__dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.db-split__name {
    color: var(--ink-700);
    font-weight: 600;
}

.db-split__count {
    font-weight: 800;
    color: var(--ink-900);
}

.db-split__pct {
    font-size: .74rem;
    color: var(--ink-400);
    min-width: 3.2em;
    text-align: left;
}

.db-c-review { background: var(--amber-mark); }
.db-c-progress { background: var(--sea); }
.db-c-done { background: var(--leaf); }
.db-c-stopped { background: var(--rust); }

/* Monthly bars */
.db-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .9rem;
    align-items: end;
    height: 210px;
    padding: 0 .25rem;
    background-image: repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 42px);
    background-position: 0 100%;
    border-bottom: 1px solid var(--line);
}

.db-bars__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: .4rem;
    min-width: 0;
}

.db-bars__val {
    font-size: .76rem;
    font-weight: 800;
    color: var(--ink-700);
}

.db-bars__bar {
    width: min(44px, 70%);
    border-radius: 6px 6px 0 0;
    background: var(--ink-200);
    min-height: 3px;
    transition: height .5s var(--ease);
}

.db-bars__col.is-current .db-bars__bar {
    background: var(--ink-900);
}

.db-bars__labels {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .9rem;
    padding: .6rem .25rem 0;
}

.db-bars__labels span {
    text-align: center;
    font-size: .76rem;
    color: var(--ink-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-bars__labels span.is-current {
    color: var(--ink-900);
    font-weight: 700;
}

/* News list */
.db-news {
    list-style: none;
    margin: 0;
    padding: 0;
}

.db-news li + li {
    border-top: 1px solid var(--line-soft);
}

.db-news button {
    display: block;
    width: 100%;
    text-align: right;
    background: none;
    border: 0;
    padding: .85rem 1.25rem;
    font: inherit;
    cursor: pointer;
    transition: background-color .14s;
}

.db-news button:hover {
    background: var(--paper-soft);
}

.db-news time {
    display: block;
    font-size: .72rem;
    color: var(--ink-400);
    margin-bottom: .15rem;
}

.db-news strong {
    display: block;
    font-size: .86rem;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.8;
}

/* Tickets */
.db-panel .table-responsive {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.db-table th {
    text-align: right;
    font-size: .74rem;
    font-weight: 600;
    color: var(--ink-400);
    padding: .7rem 1.25rem;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.db-table td {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-800);
    vertical-align: middle;
}

.db-table tr:last-child td {
    border-bottom: 0;
}

.db-table tbody tr {
    transition: background-color .14s;
}

.db-table tbody tr:hover {
    background: var(--paper-soft);
}

.db-table__id {
    color: var(--ink-400);
    font-weight: 600;
}

.db-table__title {
    font-weight: 700;
    color: var(--ink-900);
}

.db-table__go {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--r);
    color: var(--ink-500);
    border: 1px solid var(--line);
    text-decoration: none;
}

.db-table__go:hover {
    color: var(--ink-900);
    border-color: var(--ink-300);
}

/* Skeleton */
.db-skel {
    background: linear-gradient(90deg, var(--paper-deep) 0%, var(--paper) 50%, var(--paper-deep) 100%);
    background-size: 200% 100%;
    animation: db-skel 1.4s linear infinite;
    border-radius: 6px;
}

@keyframes db-skel {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (max-width: 991.98px) {
    .db-grid--main {
        grid-template-columns: 1fr;
    }
}

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

    .db-figure:nth-child(3) {
        border-right: 0;
    }

    .db-figure:nth-child(n+3) {
        border-top: 1px solid var(--line-soft);
    }

    .db-figure__value {
        font-size: 1.6rem;
    }

    .db-head {
        gap: 1rem;
        padding-bottom: 1.1rem;
        margin-bottom: 1.1rem;
    }

    .db-head__title {
        font-size: 1.4rem;
    }

    .db-head__sub {
        display: none;
    }

    .db-head__actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: .5rem;
    }

    .db-head__actions .db-btn {
        justify-content: center;
        padding: 0 .6rem;
        height: 46px;
    }

    .db-head__actions .db-btn--ink {
        order: -1;
    }

    .db-head__actions .db-btn:only-child {
        grid-column: 1 / -1;
    }

    .db-head__actions .db-btn {
        min-width: 0;
    }

    .db-btn--sm {
        height: 40px;
    }

    .db-notice {
        padding: .9rem;
        gap: .75rem;
    }

    .db-notice__icon {
        display: none;
    }

    .db-notice .db-btn {
        width: 100%;
        justify-content: center;
    }

    .db-panel__head,
    .db-panel__body {
        padding-inline: 1rem;
    }

    .db-case__actions .db-btn {
        flex: 1;
        justify-content: center;
    }

    .db-track li {
        font-size: .68rem;
    }

    .db-bars {
        gap: .35rem;
        height: 170px;
        padding: 0;
    }

    .db-bars__bar {
        width: 72%;
    }

    .db-bars__labels {
        gap: .35rem;
        padding-inline: 0;
    }

    .db-bars__labels span {
        font-size: .66rem;
        overflow: visible;
        text-overflow: clip;
        letter-spacing: -.01em;
    }

    .db-news button {
        padding-inline: 1rem;
    }

    /* Tickets: stacked rows instead of a squeezed table */
    .db-table thead {
        display: none;
    }

    .db-table,
    .db-table tbody {
        display: block;
    }

    .db-table tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "title title act"
            "state date act";
        align-items: center;
        gap: .45rem .6rem;
        padding: .9rem 1rem;
        border-bottom: 1px solid var(--line-soft);
    }

    .db-table tr:last-child {
        border-bottom: 0;
    }

    .db-table td {
        display: block;
        padding: 0;
        border: 0;
    }

    .db-table__id {
        display: none !important;
    }

    .db-table__title {
        grid-area: title;
        line-height: 1.8;
    }

    .db-table__state {
        grid-area: state;
    }

    .db-table__date {
        grid-area: date;
        font-size: .76rem;
        color: var(--ink-500) !important;
    }

    .db-table__act {
        grid-area: act;
    }

    .db-table__go {
        width: 40px;
        height: 40px;
    }

    .footer {
        padding-bottom: 5.5rem !important;
    }

    .mt-quick {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .content-page > .container-fluid {
        padding-top: 1rem;
        padding-inline: 1rem;
    }

    .page-title-head {
        padding-bottom: .8rem !important;
        margin-bottom: 1rem !important;
    }

    .page-main-title {
        font-size: 1.15rem !important;
    }

    .content-page .card-header,
    .content-page .card-body {
        padding-inline: 1rem;
    }

    /* Requests list: each row becomes a card instead of a sideways-scrolling table */
    .table-responsive:has(#table_base_servicesTable) {
        overflow: visible !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    table#table_base_servicesTable {
        display: block;
        border: 0 !important;
        background: transparent !important;
        margin: 0;
    }

    #table_base_servicesTable thead {
        display: none;
    }

    #table_base_servicesTable tbody {
        display: block;
    }

    #table_base_servicesTable tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .35rem .65rem;
        padding: .9rem 1rem;
        margin-bottom: .6rem;
        background: var(--surface) !important;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
    }

    #table_base_servicesTable tbody td {
        display: block;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        white-space: normal !important;
        text-align: right !important;
        font-size: .78rem;
        color: var(--ink-500);
    }

    #table_base_servicesTable tbody td:not([data-column]):not([colspan]) {
        display: none;
    }

    #table_base_servicesTable tbody tr:has(select) {
        padding: .6rem;
    }

    #table_base_servicesTable tbody tr:has(select) > td[class]:has(select):not([data-column]):not([colspan]) {
        display: block;
        flex: 1 1 100%;
    }

    #table_base_servicesTable tbody tr:has(select) > td:has(select)::before {
        content: "فیلتر وضعیت";
        display: block;
        font-size: .74rem;
        font-weight: 700;
        color: var(--ink-500);
        margin-bottom: .35rem;
    }

    #table_base_servicesTable tbody td[colspan] {
        flex: 1 1 100%;
        text-align: center !important;
    }

    #table_base_servicesTable td[data-column="service_id"] {
        order: 1;
        flex: 1 1 100%;
        font-size: .95rem;
        font-weight: 800;
        color: var(--ink-900);
        line-height: 1.7;
    }

    #table_base_servicesTable td[data-column="status"] { order: 2; }
    #table_base_servicesTable td[data-column="current_step"] { order: 3; }
    #table_base_servicesTable td[data-column="id"] { order: 4; color: var(--ink-400); }
    #table_base_servicesTable td[data-column] > span > div { display: inline; }
    #table_base_servicesTable td[data-column="id"] > span::before { content: "#"; }
    #table_base_servicesTable td[data-column="creator_user"],
    #table_base_servicesTable td[data-column="profile_id"] { order: 5; }
    #table_base_servicesTable td[data-column="created_at"] { order: 6; direction: ltr; }

    #table_base_servicesTable td[data-column="actions"] {
        order: 7;
        flex: 1 1 100%;
        margin-top: .35rem;
        padding-top: .65rem !important;
        border-top: 1px dashed var(--line) !important;
    }

    #table_base_servicesTable td[data-column="actions"] .btn {
        width: 40px;
        height: 40px;
        display: inline-grid;
        place-items: center;
    }

    /* Room for the floating chat button */
    .footer {
        padding-bottom: 5.5rem !important;
    }
}

@media (max-width: 767.98px) {
    /* iOS Safari zooms the page when a focused field is under 16px */
    .au-input,
    .form-control,
    .form-select,
    .choices__input,
    textarea {
        font-size: 16px !important;
    }

    .au-otp {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 359.98px) {
    .db-head__actions .db-btn {
        font-size: .8rem;
        gap: .3rem;
    }

    .db-head__actions .db-btn--line i {
        display: none;
    }

    .db-figure {
        padding-inline: 1rem;
    }

    .db-bars,
    .db-bars__labels {
        gap: .2rem;
    }

    .db-bars__labels span {
        font-size: .6rem;
    }
}

@media (max-width: 575.98px) {
    /* Topbar dropdowns open as an even, full-width sheet under the bar */
    .app-topbar .dropdown-menu.show {
        position: fixed !important;
        inset: calc(var(--theme-topbar-height, 65px) + 6px) 12px auto 12px !important;
        transform: none !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: calc(100dvh - var(--theme-topbar-height, 65px) - 24px);
        overflow-y: auto;
    }

    .app-topbar .dropdown-menu .dropdown-item {
        padding-block: .7rem;
    }
}

/* custom.min.css hides the content of every disabled button (meant for the
   loading state). Keep labels visible on buttons that are simply disabled. */
button[disabled]:not([data-loading]) > :not(.btn-loading-overlay) {
    opacity: 1;
}

/* Keep the Persian font even if the theme skin attribute is lost
   (Livewire wire:navigate replaces the <html> attributes). */
body {
    font-family: "Yekan Bakh NoEn", Tahoma, sans-serif;
}
