:root {
    --brand-navy: #032c58;
    --brand-sky: #39ade3;
    --brand-gold: #e29233;
    --ink: var(--brand-navy);
    --muted: #5d7488;
    --line: #d9e8f1;
    --canvas: #f4f9fc;
    --blue: #032c58;
    --blue-dark: var(--brand-navy);
    --blue-soft: #e8f5fb;
    --blue-border: #c8e6f5;
    --gold-soft: #fff3e4;
    --brand-gradient: linear-gradient(140deg, #032c58 25%, #0a4c78 70%, #1688bd);
    --bs-body-font-family: 'Inter Variable', sans-serif;
    --bs-body-font-size: .9rem;
    --bs-body-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
    --bs-link-color: var(--blue);
    --bs-focus-ring-color: #39ade366;
}

[lang="fa-AF"], [lang="ps-AF"], [lang="uz-Arab-AF"] { --bs-body-font-family: 'Vazirmatn Variable', Tahoma, sans-serif; }
body { background: var(--canvas); }
a { text-decoration: none; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.55rem, 2.1vw, 2.2rem); font-weight: 750; letter-spacing: -.035em; margin-bottom: .4rem; }
[dir="rtl"] h1 { letter-spacing: 0; }
h2 { font-size: 1.03rem; font-weight: 750; margin-bottom: 0; }
[dir="rtl"] .directional { display: inline-block; transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.btn {
    --bs-btn-padding-y: .65rem;
    --bs-btn-padding-x: .95rem;
    --bs-btn-font-size: .85rem;
    --bs-btn-font-weight: 650;
    --bs-btn-border-radius: .65rem;
}

.btn-sm { --bs-btn-padding-y: .42rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .78rem; }
.btn-primary {
    --bs-btn-bg: var(--blue);
    --bs-btn-border-color: var(--blue);
    --bs-btn-hover-bg: var(--blue-dark);
    --bs-btn-hover-border-color: var(--blue-dark);
    --bs-btn-active-bg: var(--blue-dark);
    --bs-btn-active-border-color: var(--blue-dark);
    --bs-btn-disabled-bg: var(--blue);
    --bs-btn-disabled-border-color: var(--blue);
    --bs-btn-focus-shadow-rgb: 85, 191, 234;
}

.btn-panel-light {
    --bs-btn-color: var(--blue-dark);
    --bs-btn-bg: var(--canvas);
    --bs-btn-border-color: var(--blue-border);
    --bs-btn-hover-color: var(--blue-dark);
    --bs-btn-hover-bg: var(--blue-soft);
    --bs-btn-hover-border-color: var(--blue-border);
    --bs-btn-active-color: var(--blue-dark);
    --bs-btn-active-bg: var(--blue-soft);
    --bs-btn-active-border-color: var(--blue-border);
}

.panel-shell { min-height: 100dvh; }
.panel-sidebar {
    --bs-offcanvas-width: 248px;
    background: #fff !important;
    border-inline-end: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .panel-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
    .panel-sidebar { height: 100dvh; position: sticky; top: 0; overflow-y: auto; }
}

.brand-line { display: flex; justify-content: space-between; align-items: center; padding: 1.6rem 1.15rem; }
.brand { display: inline-flex; gap: .68rem; align-items: center; color: var(--ink); line-height: 1.28; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.04rem; font-weight: 800; }
.brand small { font-size: .72rem; color: var(--muted); margin-top: .23rem; }
.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #fff, #f4f8fb 60%, #fff5e8);
    border: 1px solid var(--line);
    border-radius: 13px;
}
.brand-icon img { display: block; }

.sidebar-nav { padding: .1rem .82rem 1rem; }
.nav-caption { color: var(--muted); font-size: .72rem; font-weight: 650; padding: .85rem .7rem .45rem; }
.nav-caption:not(:first-child) { margin-top: .52rem; }
.sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    gap: .75rem;
    min-height: 43px;
    padding: .57rem .72rem;
    margin-bottom: .25rem;
    border: 0;
    border-inline-start: 3px solid transparent;
    border-radius: .6rem;
    color: #415571;
    background: transparent;
    font-size: .84rem;
    text-align: start;
    font-weight: 600;
}

.sidebar-link .bi { font-size: 1rem; }
.sidebar-link:hover { background: var(--blue-soft); color: var(--blue-dark); }
.sidebar-link.current { font-weight: 750; background: var(--brand-navy); color: #fff; border-inline-start-color: var(--brand-gold); }
.sidebar-link.current .bi { color: var(--brand-sky); }
.sidebar-footer { padding: .85rem; margin-top: auto; border-top: 1px solid var(--line); }
.sidebar-logout:hover { background: #fff0f0; color: #a92638; }
.panel-body { min-width: 0; }
.panel-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    min-height: 72px;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: .75rem clamp(1rem, 2.8vw, 2.65rem);
}

.header-path { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-size: .82rem; }
.header-path a, .header-path .bi { color: var(--muted); }
.header-path .bi { font-size: .65rem; }
.header-path span { font-weight: 700; }
.header-date { align-items: center; gap: .48rem; color: var(--muted); font-size: .8rem; }
.header-account { display: flex; align-items: center; gap: .55rem; color: var(--ink); }
.header-account strong { font-size: .82rem; max-width: 145px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.header-account small { color: var(--muted); font-size: .68rem; max-width: 145px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-avatar { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; color: var(--blue-dark); background: var(--blue-soft); border-radius: 50%; }
.panel-content { padding: clamp(1rem, 2.8vw, 2.65rem); max-width: 1660px; margin-inline: auto; }

.dashboard-banner, .login-aside {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--brand-gradient);
    border: 1px solid #1b4769;
    border-radius: 1.2rem;
    color: #fff;
}

.dashboard-banner { padding: clamp(1.3rem, 4vw, 2.9rem); margin-bottom: 1.25rem; }
.banner-copy { position: relative; max-width: 42rem; }
.court-art {
    position: absolute;
    z-index: -1;
    inset-inline-end: -2.8rem;
    top: 50%;
    width: 23rem;
    height: 13rem;
    border: 2px solid #39ade352;
    border-radius: .65rem;
    transform: translateY(-50%) rotate(-13deg);
    color: #39ade352;
    pointer-events: none;
}
[dir="rtl"] .court-art { transform: translateY(-50%) rotate(13deg); }
.court-art::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 2px solid; }
.court-art::after { content: ''; position: absolute; width: 25%; aspect-ratio: 1; border: 2px solid; border-radius: 50%; inset-inline-start: 37.5%; top: 50%; transform: translateY(-50%); }
.court-art div { position: absolute; inset: 24% 0; border-inline: 1.7rem solid #39ade322; }
.court-art div::before, .court-art div::after { content: ''; position: absolute; width: 18%; height: 100%; border: 2px solid; }
.court-art div::before { inset-inline-start: -1.7rem; border-radius: .2rem; }
.court-art div::after { inset-inline-end: -1.7rem; border-radius: .2rem; }

.metric-card, .surface { background: #fff; border: 1px solid var(--line); border-radius: .95rem; box-shadow: 0 2px 7px #1b3d6305; }
.metric-card { display: grid; padding: 1.05rem 1.1rem; min-height: 133px; color: #fff; border-color: transparent; transition: transform .15s, filter .15s, box-shadow .15s; }
.metric-card:hover { transform: translateY(-3px); color: #fff; filter: brightness(1.06); box-shadow: 0 10px 24px #032c5835; }
.metric-card-blue { --metric-accent: #032c58; background: #032c58; }
.metric-card-sky { --metric-accent: #1688bd; background: #1688bd; }
.metric-card-navy { --metric-accent: #032c58; background: #032c58; }
.metric-card-gold { --metric-accent: #c47620; background: #c47620; }
.metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.metric-icon, .section-icon, .quick-icon { display: grid; place-items: center; flex: 0 0 auto; border-radius: .72rem; background: var(--blue-soft); color: var(--blue-dark); }
.metric-icon { width: 38px; height: 38px; font-size: .95rem; }
.metric-card .metric-icon { color: #fff; background: #ffffff26; }
.metric-arrow { color: #ffffffb8; font-size: .85rem; }
.metric-number { font-size: 1.55rem; font-weight: 800; line-height: 1.16; margin-bottom: .2rem; }
.metric-label { color: #ffffffdf; font-size: .79rem; font-weight: 600; }
.surface-heading { min-height: 64px; padding: 1.15rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); }
.empty-state { min-height: 195px; display: grid; align-content: center; justify-items: center; color: var(--muted); text-align: center; padding: 1.3rem; }
.section-icon { width: 48px; height: 48px; font-size: 1.17rem; }
.quick-links { padding: .55rem .8rem; }
.quick-links a { display: flex; align-items: center; gap: .7rem; padding: .58rem; color: var(--ink); font-weight: 600; border-radius: .6rem; font-size: .83rem; }
.quick-links a:hover { background: var(--canvas); color: var(--blue-dark); }
.quick-icon { width: 33px; height: 33px; border-radius: .55rem; }
.quick-links a > .bi { font-size: .75rem; color: var(--muted); }
.page-heading { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-bottom: 1.6rem; }
.page-heading h1 { font-size: clamp(1.42rem, 2vw, 1.85rem); }
.settings-card { max-width: 760px; }
.settings-form { padding: 1.3rem; }
.date-preview { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: 1.25rem 0; padding: .9rem; background: var(--blue-soft); border-radius: .6rem; color: var(--blue-dark); }

.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); }
.search-box { position: relative; flex: 1 1 220px; max-width: 330px; }
.search-box .bi { position: absolute; inset-inline-start: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .form-control { padding-inline-start: 2.1rem; }
.catalog-filters { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.catalog-filter { min-width: 124px; flex: 1 1 124px; }
.filter-reset { flex: 0 0 auto; }
.form-label { font-weight: 650; font-size: .82rem; }
.field-label-icon { color: var(--blue); margin-inline-end: .42rem; font-size: .9rem; }
.password-field { position: relative; }
.password-field .form-control { padding-inline-end: 2.75rem; }
.password-toggle { position: absolute; inset-inline-end: .5rem; top: 50%; display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; transform: translateY(-50%); border: 0; border-radius: .4rem; background: transparent; color: var(--muted); }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--blue-dark); background: var(--blue-soft); outline: none; }
.catalog-appointments .catalog-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; width: 100%; }
.catalog-appointments .catalog-filter { min-width: 0; }
.catalog-appointments .catalog-filter > *, .catalog-appointments .select2-container { width: 100% !important; }
.form-control, .form-select { min-height: 41px; border: 1px solid #d6e1ef; font-size: .85rem; border-radius: .55rem; }
.form-control[dir="ltr"], .form-control[dir="rtl"] { text-align: start; }
.form-control::placeholder { color: #657a94; }
.form-control:focus, .form-select:focus { border-color: #5aa4c9; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-error { color: #ad233c; font-size: .78rem; margin-top: .32rem; }
.form-error:empty { display: none; }
.record-image-preview { display: block; width: 100%; max-width: 420px; max-height: 190px; object-fit: contain; object-position: start; padding: .45rem; border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel-surface-muted); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.form-check-input { width: 1.04rem; height: 1.04rem; }
.select2-container--default .select2-selection--single { min-height: 41px; border: 1px solid #d6e1ef; border-radius: .55rem; background: #fff; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ink); line-height: 39px; padding-inline: .75rem 1.75rem; font-size: .84rem; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 6px; right: auto; left: auto; inset-inline-end: .4rem; }
.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow { right: auto; left: .4rem; }
.select2-dropdown { border: 1px solid #c9daef; border-radius: .55rem; box-shadow: 0 7px 17px #1d3e6120; font-size: .84rem; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--blue); }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #d6e1ef; border-radius: .4rem; }
.select2-container--default.select2-container--disabled .select2-selection--single { background: #f2f5fa; }
select.is-invalid + .select2 .select2-selection { border-color: #dc3545; }
.modal .select2-container--open { z-index: 1060; }

.panel-table { --bs-table-border-color: #ccdde7; }
.panel-table { width: 100%; }
.panel-table > :not(caption) > * > * {
    padding: .72rem .9rem;
    border: var(--bs-border-width) solid var(--bs-table-border-color);
    color: var(--ink);
    vertical-align: middle;
}
.panel-table thead th { background: var(--canvas); font-size: .76rem; color: var(--muted); font-weight: 750; white-space: nowrap; vertical-align: middle; }
[dir="rtl"] .panel-table thead th { text-align: right !important; }
[dir="rtl"] .panel-table tbody td { text-align: right; }
.panel-table tbody td { font-size: .84rem; }
.panel-table tbody tr:nth-child(even) > * { background: #f8fbfd; }
.panel-table tbody tr:hover > * { background: var(--blue-soft); }
.catalog-table-wrap { min-height: 170px; }
.catalog-table-wrap table { min-width: 590px; }
[dir="rtl"] .panel-table th.dt-orderable-asc,
[dir="rtl"] .panel-table th.dt-orderable-desc,
[dir="rtl"] .panel-table th.dt-ordering-asc,
[dir="rtl"] .panel-table th.dt-ordering-desc { padding-right: .9rem; padding-left: 1.65rem; }
[dir="rtl"] .panel-table th .dt-column-order { right: auto !important; left: .5rem; }
.status-tag { display: inline-flex; align-items: center; gap: .35rem; color: #506077; font-size: .72rem; font-weight: 750; background: #eef1f6; padding: .25rem .52rem; border-radius: 999px; white-space: nowrap; }
.status-tag::before { content: ''; width: .38rem; height: .38rem; background: currentColor; border-radius: 50%; }
.status-tag.active { color: #167251; background: #e8f7ee; }
.status-tag.pending { color: #8b5d13; background: #fff2d8; }
.status-tag.inactive { color: #a33a42; background: #fce9ea; }
.table-actions { display: flex; justify-content: flex-end; gap: .28rem; }
.table-action { border: 1px solid var(--line); border-radius: .45rem; background: var(--canvas); color: var(--blue-dark); display: grid; place-items: center; width: 32px; height: 32px; }
.table-action:hover { background: var(--blue-soft); border-color: var(--blue-border); }
.table-action-danger:hover { background: #fff0f0; border-color: #ffcece; color: #ad233c; }
div.dt-container > div.dt-layout-row { margin: .75rem 1rem; }
div.dt-container > div.dt-layout-table { margin: 0; }
.dt-layout-end { min-width: max-content; }
.dt-layout-start:has(.dt-info) { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.dt-info, .dt-length { color: var(--muted); font-size: .78rem; }
.dt-length select { min-height: 31px; margin-inline-end: .35rem; }
.dt-length .select2 { width: 4.25rem !important; margin-inline: .35rem; vertical-align: middle; }
.dt-length .select2-selection--single { min-height: 31px; }
.dt-length .select2-selection--single .select2-selection__rendered { line-height: 29px; }
.dt-length .select2-selection--single .select2-selection__arrow { top: 1px; }
.pagination { --bs-pagination-color: var(--blue-dark); --bs-pagination-active-bg: var(--blue); --bs-pagination-active-border-color: var(--blue); font-size: .8rem; }
.modal-content { border: 1px solid var(--line); border-radius: .95rem; box-shadow: 0 14px 40px #0e2d4e35; }
.modal-header, .modal-body, .modal-footer { padding: 1.15rem 1.35rem; }
.modal-footer { justify-content: flex-start; }
[dir="ltr"] .modal-footer { flex-direction: row-reverse; }
.report-stat { min-height: 118px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .8rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; }
.report-stat-blue { color: #fff; background: #032c58; border-color: #032c58; }
.report-stat-sky { color: #fff; background: #1688bd; border-color: #1688bd; }
.report-stat-finance { color: #fff; background: #a85f00; border-color: #a85f00; }
.report-stat-icon { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: .7rem; color: #fff; background: #ffffff26; font-size: 1.15rem; }
.report-stat-label { color: #ffffffdf; font-size: .77rem; font-weight: 650; }
.report-stat strong { font-size: 1.25rem; line-height: 1.2; }
.report-stat strong small { color: #ffffffdf; font-size: .72rem; font-weight: 600; }
.dashboard-chart { padding: 1.1rem; }
.dashboard-chart .surface-heading { padding: 0 0 .6rem; }
.chart-currency { padding: .22rem .5rem; border-radius: 999px; background: var(--gold-soft); color: #8d5c16; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.chart-note, .chart-footnote { color: var(--muted); font-size: .73rem; line-height: 1.6; }
.dashboard-chart-canvas { position: relative; height: 260px; }
.dashboard-chart-canvas-compact { height: 200px; }
.booking-channels { margin-top: .45rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.booking-channels h3 { margin: 0 0 .35rem; color: var(--muted); font-size: .76rem; font-weight: 700; }
.dashboard-chart-canvas-doughnut { height: 145px; }
:root {
    --azar-primary: var(--blue);
    --azar-primary-hover: var(--blue-dark);
    --azar-primary-light: var(--blue-soft);
    --azar-border: var(--blue-border);
    --azar-radius: .8rem;
    --azar-radius-sm: .55rem;
    --azar-font: "Inter Variable", sans-serif;
    --azar-font-fa: "Vazirmatn Variable", sans-serif;
}
.date-picker, .azar-datepicker-wrapper { width: 100%; }
.azar-datepicker-container { z-index: 1080 !important; }
.azar-datepicker-input.form-control { width: 100%; min-height: calc(1.5em + .95rem + 2px); padding-block: .475rem; }
.azar-datepicker-wrapper.azar-rtl .azar-datepicker-input.form-control { padding-inline: .75rem 2.4rem; }
.azar-datepicker-container[dir="rtl"] { text-align: right; }
.azar-datepicker-input:focus { border-color: var(--brand-sky); box-shadow: 0 0 0 .2rem rgb(63 167 222 / 18%); }
.permission-matrix { border-radius: .65rem; }
.permission-matrix th:not(:first-child), .permission-matrix td { text-align: center; }
.permission-matrix tbody th { font-size: .79rem; white-space: nowrap; }

.login-shell { display: grid; min-height: 100dvh; padding: clamp(.75rem, 2vw, 1.35rem); background: #fff; }
.login-main { display: grid; grid-template-rows: auto 1fr; min-height: 100%; padding: .8rem clamp(.7rem, 3vw, 2.5rem); }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.login-languages { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .2rem; }
.login-languages form { margin: 0; }
.login-language { border: 0; border-radius: .5rem; padding: .38rem .48rem; background: transparent; color: var(--muted); font: inherit; font-size: .75rem; font-weight: 650; }
.login-language:hover, .login-language.active { background: var(--blue-soft); color: var(--blue-dark); }
.login-language[lang="fa-AF"], .login-language[lang="ps-AF"], .login-language[lang="uz-Arab-AF"] { font-family: 'Vazirmatn Variable', Tahoma, sans-serif; }
.login-form-wrap { align-self: center; justify-self: center; width: min(100%, 390px); padding-block: 2.25rem; }
.login-aside { display: none; }
@media (min-width: 880px) {
    .login-shell { grid-template-columns: 1fr .91fr; }
    .login-aside { display: grid; padding: clamp(1.5rem, 4vw, 3.6rem); min-height: 540px; }
    .login-aside .court-art { width: min(91%, 35rem); height: auto; aspect-ratio: 1.63; inset-inline-end: 1%; }
    .login-emblem {
        place-self: center;
        display: grid;
        place-items: center;
        width: clamp(9rem, 17vw, 14rem);
        aspect-ratio: 1;
        border: 1px solid #ffffffa6;
        border-radius: 24%;
        background: linear-gradient(140deg, #fff, #eaf6fb 65%, #fff0d7);
        box-shadow: 0 22px 48px #02142555;
    }
    .login-emblem img { width: 87%; height: auto; }
}
@media (max-width: 767px) {
    .header-path a, .header-path .bi { display: none; }
    .dashboard-banner .court-art { opacity: .45; inset-inline-end: -10rem; }
    .catalog-toolbar, .surface-heading { padding: .85rem; }
    .catalog-filters { width: 100%; }
    .search-box { max-width: none; }
}
@media (max-width: 480px) {
    .catalog-filter { min-width: 104px; flex-basis: 104px; }
    .panel-content { padding-inline: .75rem; }
}
