/* DentalFlow v3.1 — Polished Dental Clinic Design System */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Symbols+2&display=swap');

:root {
    --df-primary: #0ea5e9;
    --df-primary-hover: #0284c7;
    --df-primary-subtle: #e0f2fe;
    --df-primary-dark: #0369a1;
    --df-accent: #06b6d4;
    --df-success: #10b981;
    --df-success-subtle: #ecfdf5;
    --df-warning: #f59e0b;
    --df-warning-subtle: #fffbeb;
    --df-danger: #ef4444;
    --df-danger-subtle: #fef2f2;
    --df-info: #6366f1;

    --df-bg: #ffffff;
    --df-bg-subtle: #eef2f7;
    --df-bg-muted: #e2e8f0;
    --df-surface: #ffffff;
    --df-topbar-bg: rgba(255, 255, 255, 0.92);
    --df-topbar-border: rgba(15, 23, 42, 0.07);
    --df-border: #dde4ed;
    --df-border-subtle: #eef2f7;
    --df-text: #0f172a;
    --df-text-muted: #64748b;
    --df-text-subtle: #94a3b8;

    --df-sidebar-width: 280px;
    --df-topbar-height: 60px;
    --df-radius: 14px;
    --df-radius-sm: 10px;
    --df-radius-xs: 8px;
    --df-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --df-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    --df-shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --df-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --df-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --df-hover-lift: -1px;
    --df-hover-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    --df-hover-shadow-primary: 0 4px 14px rgba(14, 165, 233, 0.28);
    --df-hover-shadow-danger: 0 4px 14px rgba(239, 68, 68, 0.22);
    --df-font: 'Tajawal', system-ui, sans-serif;
    --df-page-max: 1440px;
    --df-settings-control-h: 2.75rem;
    --df-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
    --df-bg: #0c1222;
    --df-bg-subtle: #111827;
    --df-bg-muted: #1e293b;
    --df-surface: #151d2e;
    --df-topbar-bg: rgba(12, 18, 34, 0.88);
    --df-topbar-border: rgba(255, 255, 255, 0.06);
    --df-border: #243044;
    --df-border-subtle: #1a2438;
    --df-text: #f1f5f9;
    --df-text-muted: #94a3b8;
    --df-text-subtle: #64748b;
    --df-primary-subtle: rgba(14, 165, 233, 0.12);
    --df-success-subtle: rgba(16, 185, 129, 0.12);
    --df-warning-subtle: rgba(245, 158, 11, 0.12);
    --df-danger-subtle: rgba(239, 68, 68, 0.12);
    --df-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --df-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --df-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --df-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-variant-numeric: lining-nums tabular-nums;
}

.df-num,
.stat-value,
.stat-trend,
.df-dash-kpi__value,
.df-dash-kpi__sub,
.sa-chip__n,
.tab-count,
.fc-toolbar-title,
.fc-timegrid-slot-label-cushion,
.fc-daygrid-day-number,
.sa-week-head__num,
.sa-range-card__num,
.sa-more-badge,
.df-fp .flatpickr-day {
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #wrapper {
    direction: rtl;
}

html[dir="rtl"] .df-topbar {
    direction: rtl;
}

html[dir="rtl"] .df-page,
html[dir="rtl"] .df-card,
html[dir="rtl"] .df-table {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .df-page-header {
    direction: rtl;
}

html[dir="rtl"] .sidebar-nav .nav-link {
    text-align: right;
}

html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"],
html[dir="rtl"] input[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .modal-header .btn-close {
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* ═══ Global icon centering (app-wide) ═══ */
.bi {
    line-height: 1;
    flex-shrink: 0;
}

.brand-icon,
.stat-icon,
.df-empty-icon,
.notif-icon,
.df-snackbar__icon,
.df-confirm__icon,
.df-settings-nav__icon,
.df-settings-panel__icon,
.df-settings-danger__icon,
.df-settings-section__hero-icon,
.df-settings-top-tab__icon,
.df-dash-kpi__icon,
.df-login-brand__icon,
.sa-filter-btn,
.sa-date-field__trigger,
.sa-view-switch__btn,
[class$="__icon"],
[class*="__icon"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-icon > .bi,
.stat-icon > .bi,
.df-empty-icon > .bi,
.notif-icon > .bi,
.df-snackbar__icon > .bi,
.df-confirm__icon > .bi,
.df-settings-nav__icon > .bi,
.df-settings-panel__icon > .bi,
.df-settings-danger__icon > .bi,
.df-settings-section__hero-icon > .bi,
.df-settings-top-tab__icon > .bi,
.df-dash-kpi__icon > .bi,
.df-login-brand__icon > .bi,
.sa-filter-btn > .bi,
.sa-date-field__trigger > .bi,
.sa-view-switch__btn > .bi,
[class$="__icon"] > .bi,
[class*="__icon"] > .bi,
[class$="__trigger"] > .bi {
    display: block;
    line-height: 1;
}

.sa-clear-btn,
.sa-header__add,
.sa-chip,
.df-badge {
    display: inline-flex;
    align-items: center;
}

.sa-search i,
.df-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
}

body {
    font-family: var(--df-font);
    min-height: 100vh;
    background: var(--df-bg-subtle);
    color: var(--df-text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

#wrapper {
    min-height: 100vh;
    display: flex;
}

#sidebar {
    width: var(--df-sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    background: var(--df-surface);
    border-left: 1px solid var(--df-border);
    border-right: none;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.04);
    transition: transform var(--df-transition);
}

[dir="ltr"] #sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--df-border);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

#page-content-wrapper {
    margin-right: var(--df-sidebar-width);
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    width: 100%;
    background: var(--df-bg-subtle);
}

[dir="ltr"] #page-content-wrapper {
    margin-right: 0;
    margin-left: var(--df-sidebar-width);
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--df-border);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--df-primary), var(--df-accent));
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-clinic-name {
    font-size: 0.6875rem;
    color: var(--df-text-subtle);
    margin-top: 0.125rem;
}

.sidebar-nav {
    padding: 0.75rem 0.625rem;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
}

.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--df-text-subtle);
    padding: 1rem 0.875rem 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--df-border-subtle);
}

.sidebar-nav .nav-link {
    color: var(--df-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5625rem 0.875rem;
    border-radius: var(--df-radius-xs);
    transition: all var(--df-transition);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    font-size: 1.0625rem;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.75;
}

.sidebar-nav .nav-link:hover {
    background: var(--df-bg-subtle);
    color: var(--df-text);
}

.sidebar-nav .nav-link:hover i {
    opacity: 1;
    color: var(--df-primary);
}

.sidebar-nav .nav-link.active {
    background: var(--df-primary-subtle);
    color: var(--df-primary-dark);
    font-weight: 600;
}

.sidebar-nav .nav-link.active i { opacity: 1; color: var(--df-primary); }

.sidebar-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--df-border);
    background: var(--df-bg-subtle);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.show { display: block; }

.df-topbar {
    height: var(--df-topbar-height);
    background: var(--df-topbar-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--df-topbar-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03), 0 6px 20px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .df-topbar {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.df-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: auto;
}

.df-page-context {
    display: none;
    font-size: 0.75rem;
    color: var(--df-text-muted);
    padding: 0.375rem 0.875rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
    border: none;
    margin-inline-end: 0.25rem;
    white-space: nowrap;
}

[data-theme="dark"] .df-page-context {
    background: rgba(255, 255, 255, 0.06);
}

.df-page-context strong { color: var(--df-text); font-weight: 600; }

@media (min-width: 768px) {
    .df-page-context { display: block; }
}

.df-search-trigger {
    flex: 1;
    max-width: 420px;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--df-text-muted);
    cursor: pointer;
    transition: all var(--df-transition);
    font-size: 0.8125rem;
}

.df-search-trigger:hover {
    border-color: rgba(14, 165, 233, 0.3);
    background: var(--df-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    color: var(--df-text);
}

.df-topbar .df-search-trigger {
    background: rgba(15, 23, 42, 0.04);
    border-color: transparent;
}

.df-topbar .df-search-trigger:hover {
    background: var(--df-surface);
    border-color: rgba(14, 165, 233, 0.25);
}

[data-theme="dark"] .df-topbar .df-search-trigger {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .df-topbar .df-search-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.df-search-trigger kbd {
    margin-inline-start: auto;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background: var(--df-bg-muted);
    border: 1px solid var(--df-border);
    color: var(--df-text-subtle);
    font-family: inherit;
}

.df-topbar-btn {
    width: 38px; height: 38px;
    border-radius: 999px;
    border: 1px solid var(--df-border-subtle);
    background: rgba(255, 255, 255, 0.6);
    color: var(--df-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--df-transition);
    position: relative;
    flex-shrink: 0;
}

[data-theme="dark"] .df-topbar-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.df-topbar-btn:hover {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--df-primary-dark);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.df-topbar-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: none;
}

.df-topbar-btn .badge-dot {
    position: absolute;
    top: 7px;
    inset-inline-end: 7px;
    width: 7px; height: 7px;
    background: var(--df-danger);
    border-radius: 50%;
    border: 1.5px solid var(--df-surface);
}

.df-page {
    padding: 1.75rem 1.5rem 2.5rem;
    flex: 1;
    width: 100%;
    max-width: var(--df-page-max);
    margin-inline: auto;
}

.df-page-header {
    margin-bottom: 1.5rem;
    padding: 0;
    border-bottom: none;
}

.df-page-title {
    font-size: 1.625rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--df-text);
}

.df-page-subtitle {
    color: var(--df-text-muted);
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.df-page-actions .btn-primary {
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.df-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.df-section { margin-bottom: 1.75rem; }

.df-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.df-section-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.df-section-title i { color: var(--df-primary); font-size: 1.125rem; }
.df-section-desc { font-size: 0.8125rem; color: var(--df-text-muted); margin: 0.25rem 0 0; }

.df-card {
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    box-shadow: var(--df-shadow-sm);
}

.df-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--df-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 52px;
}

.df-card-header h5, .df-card-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9375rem;
}

.df-card-body { padding: 1.25rem; }

.df-card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    border-radius: 0 0 var(--df-radius) var(--df-radius);
}

/* ── Modern Pagination ── */
.df-table-footer {
    min-height: 3.25rem;
}

.df-pagination-info {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--df-text-muted);
    white-space: nowrap;
}

.df-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem;
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: 999px;
    box-shadow: var(--df-shadow-sm);
}

.df-pagination__pages {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

.df-pagination__nav,
.df-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.125rem;
    height: 2.125rem;
    padding: 0 0.5rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--df-text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition:
        background var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-pagination__nav {
    background: var(--df-bg-subtle);
    color: var(--df-text);
}

.df-pagination__nav:hover:not(:disabled):not(.is-disabled) {
    background: var(--df-primary-subtle);
    color: var(--df-primary);
    transform: translateY(-1px);
}

.df-pagination__page:hover:not(.is-active) {
    background: var(--df-bg-subtle);
    color: var(--df-text);
}

.df-pagination__page.is-active {
    background: linear-gradient(135deg, var(--df-primary) 0%, var(--df-primary-dark, #0284c7) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
    cursor: default;
}

.df-pagination__nav.is-disabled,
.df-pagination__nav:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.df-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 2.125rem;
    color: var(--df-text-subtle);
    font-size: 0.875rem;
    font-weight: 700;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .df-table-footer {
        flex-direction: column-reverse;
        align-items: stretch !important;
        text-align: center;
    }

    .df-pagination {
        justify-content: center;
        width: 100%;
    }
}

.stat-card {
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    background: var(--df-surface);
    box-shadow: var(--df-shadow-sm);
    height: 100%;
}

.stat-card .card-body { padding: 1.125rem 1.25rem; }

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.875rem;
}

.stat-icon {
    width: 42px; height: 42px;
    border-radius: var(--df-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: break-word;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--df-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-trend {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.stat-trend.up { color: var(--df-success); background: var(--df-success-subtle); }
.stat-trend.down { color: var(--df-danger); background: var(--df-danger-subtle); }

.stat-card.compact .card-body { padding: 1rem; }
.stat-card.compact .stat-value { font-size: 1.25rem; }
.stat-card.compact .stat-icon { width: 36px; height: 36px; font-size: 1rem; }

.df-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.df-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.df-table th {
    background: var(--df-bg-subtle);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--df-text-muted);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--df-border);
    white-space: nowrap;
    text-align: start;
}

.df-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--df-border-subtle);
    vertical-align: middle;
}

.df-table tbody tr:hover { background: var(--df-bg-subtle); }
.df-table tbody tr:last-child td { border-bottom: none; }

.df-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-scheduled { background: #dbeafe; color: #1d4ed8; }
.badge-confirmed { background: #d1fae5; color: #047857; }
.badge-arrived { background: #fef3c7; color: #b45309; }
.badge-in_progress { background: #e0e7ff; color: #4338ca; }
.badge-paused { background: #fce7f3; color: #be185d; }
.badge-completed { background: #f1f5f9; color: #475569; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-no_show { background: #fecaca; color: #991b1b; }
.badge-rescheduled { background: #ffedd5; color: #c2410c; }
.badge-vip { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #92400e; }
.badge-blocked { background: #fee2e2; color: #b91c1c; }
.badge-active { background: #d1fae5; color: #047857; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

.btn {
    font-family: var(--df-font);
    font-size: 0.875rem;
    border-radius: var(--df-radius-xs);
    padding: 0.5rem 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.btn > .bi {
    line-height: 1;
}

.btn:focus-visible {
    outline: 2px solid var(--df-primary);
    outline-offset: 2px;
    box-shadow: none;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--df-primary);
    border-color: var(--df-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--df-primary-hover);
    border-color: var(--df-primary-hover);
    box-shadow: var(--df-hover-shadow-primary);
    transform: translateY(var(--df-hover-lift));
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

.btn-ghost {
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    color: var(--df-text-muted);
    font-weight: 500;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--df-bg-subtle);
    border-color: var(--df-border);
    color: var(--df-text);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.btn-ghost:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

.btn-danger {
    background: var(--df-danger);
    border-color: var(--df-danger);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: var(--df-hover-shadow-danger);
    transform: translateY(var(--df-hover-lift));
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

.btn-warning {
    background: var(--df-warning);
    border-color: var(--df-warning);
    color: #fff;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
    border-color: #d97706;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
    transform: translateY(var(--df-hover-lift));
}

.btn-outline-danger {
    color: var(--df-danger);
    border-color: rgba(239, 68, 68, 0.45);
    background: transparent;
}

.btn-outline-danger:hover:not(:disabled) {
    background: var(--df-danger-subtle);
    border-color: var(--df-danger);
    color: var(--df-danger);
    transform: translateY(var(--df-hover-lift));
}

.btn-outline-secondary {
    color: var(--df-text-muted);
    border-color: var(--df-border);
    background: transparent;
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--df-bg-subtle);
    border-color: var(--df-border);
    color: var(--df-text);
    transform: translateY(var(--df-hover-lift));
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.625rem;
}

.btn-group .btn:hover:not(:disabled),
.btn-group .btn:focus-visible {
    z-index: 2;
}

.btn-group-sm .btn {
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.625rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
    color: var(--df-text);
    font-weight: 500;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all var(--df-transition);
}

.quick-action-btn:hover {
    border-color: rgba(14, 165, 233, 0.35);
    background: var(--df-primary-subtle);
    color: var(--df-primary-dark);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.quick-action-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.quick-action-btn i { font-size: 1.125rem; color: var(--df-primary); width: 20px; text-align: center; }

.df-timeline { position: relative; padding-inline-start: 1.75rem; }
.df-timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 0.4375rem;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--df-border);
}

.timeline-item { position: relative; padding-bottom: 1.25rem; }

.timeline-item::before {
    content: '';
    position: absolute;
    inset-inline-start: -1.375rem;
    top: 0.5rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--df-primary);
    border: 2px solid var(--df-surface);
    box-shadow: 0 0 0 2px var(--df-primary);
}

.timeline-item.type-treatment::before { background: var(--df-success); box-shadow: 0 0 0 2px var(--df-success); }
.timeline-item.type-payment::before { background: #059669; box-shadow: 0 0 0 2px #059669; }
.timeline-item.type-session::before { background: var(--df-info); box-shadow: 0 0 0 2px var(--df-info); }
.timeline-item.type-prescription::before { background: #8b5cf6; box-shadow: 0 0 0 2px #8b5cf6; }

.timeline-card {
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-xs);
    padding: 0.875rem 1rem;
}

.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1rem 1rem;
}

.command-palette-overlay.show { display: flex; }

.command-palette {
    width: 100%;
    max-width: 520px;
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    box-shadow: var(--df-shadow-lg);
    overflow: hidden;
}

.command-palette-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--df-border);
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    background: transparent;
    color: var(--df-text);
    outline: none;
    font-family: var(--df-font);
}

.command-palette-results { max-height: 340px; overflow-y: auto; padding: 0.375rem; }

.command-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--df-radius-xs);
    cursor: pointer;
    color: var(--df-text);
    text-decoration: none;
}

.command-item:hover, .command-item.active { background: var(--df-primary-subtle); }

.df-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--df-transition);
}

.df-drawer-overlay.show { opacity: 1; visibility: visible; }

.df-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--df-surface);
    box-shadow: var(--df-shadow-lg);
    z-index: 1051;
    transform: translateX(100%);
    transition: transform var(--df-transition);
    display: flex;
    flex-direction: column;
}

[dir="ltr"] .df-drawer {
    inset-inline-end: auto;
    inset-inline-start: 0;
    transform: translateX(-100%);
}

.df-drawer-overlay.show .df-drawer { transform: translateX(0); }

.df-drawer-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.df-drawer-body { flex: 1; overflow-y: auto; }

.df-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--df-text-muted);
}

.df-empty-icon {
    width: 56px; height: 56px;
    margin: 0 auto 0.875rem;
    background: var(--df-bg-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: var(--df-text-subtle);
}

.df-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    margin-bottom: 1rem;
}

.patient-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: #fff;
    flex-shrink: 0;
}

.patient-avatar.lg { width: 72px; height: 72px; font-size: 1.375rem; }
.patient-avatar.xl { width: 88px; height: 88px; font-size: 1.625rem; }

.crm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.875rem 1.25rem;
}

.crm-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--df-text-subtle);
    margin-bottom: 0.125rem;
}

.crm-field .value { font-weight: 500; font-size: 0.875rem; }

.alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--df-danger-subtle);
    color: var(--df-danger);
}

.tooth-btn {
    width: 34px; height: 42px;
    border: 2px solid var(--df-border);
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.tooth-btn:hover { transform: scale(1.08); }
.tooth-btn.selected { box-shadow: 0 0 0 3px var(--df-primary); }

.tooth-healthy { background: #fff; color: #475569; }
.tooth-decay { background: #ef4444; color: #fff; }
.tooth-filling { background: #10b981; color: #fff; }
.tooth-root_canal { background: #0ea5e9; color: #fff; }
.tooth-crown { background: #f59e0b; color: #fff; }
.tooth-implant { background: #8b5cf6; color: #fff; }
.tooth-extraction { background: #64748b; color: #fff; }

.session-card {
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    background: var(--df-surface);
    overflow: hidden;
    height: 100%;
}

.session-card-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--df-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--df-bg-subtle);
}

.session-progress {
    height: 5px;
    background: var(--df-bg-muted);
    border-radius: 999px;
    overflow: hidden;
}

.session-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--df-primary), var(--df-accent));
    border-radius: 999px;
}

.day-timeline { max-height: 420px; overflow-y: auto; }

.day-timeline-hour {
    display: flex;
    gap: 0.875rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--df-border-subtle);
    align-items: flex-start;
}

.day-timeline-hour .hour-label {
    width: 52px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--df-text-subtle);
    flex-shrink: 0;
    padding-top: 0.375rem;
}

.day-timeline-event {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: var(--df-radius-xs);
    border-right: 3px solid var(--df-primary);
    border-left: none;
    background: var(--df-primary-subtle);
    font-size: 0.8125rem;
    line-height: 1.45;
}

[dir="ltr"] .day-timeline-event {
    border-right: none;
    border-left: 3px solid var(--df-primary);
}

.chair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.625rem;
}

.chair-item {
    padding: 0.875rem 0.75rem;
    border-radius: var(--df-radius-xs);
    border: 1px solid var(--df-border);
    text-align: center;
}

.chair-item.occupied { background: var(--df-warning-subtle); border-color: rgba(245, 158, 11, 0.4); }
.chair-item.available { background: var(--df-success-subtle); border-color: rgba(16, 185, 129, 0.35); }
.chair-item .chair-name { font-weight: 600; font-size: 0.8125rem; }
.chair-item .chair-status { font-size: 0.6875rem; color: var(--df-text-muted); margin-top: 0.25rem; }

.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--df-border-subtle);
    cursor: pointer;
}

.notif-item:hover { background: var(--df-bg-subtle); }
.notif-item.unread { background: var(--df-primary-subtle); }

.notif-icon {
    width: 34px; height: 34px;
    border-radius: var(--df-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-control, .form-select {
    border-radius: var(--df-radius-xs);
    border-color: var(--df-border);
    padding: 0.5625rem 0.875rem;
    font-size: 0.875rem;
    font-family: var(--df-font);
    background: var(--df-surface);
    color: var(--df-text);
}

.form-control:focus, .form-select:focus {
    border-color: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* Dropdown arrow — all selects site-wide */
.form-select,
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: var(--df-select-arrow);
    background-repeat: no-repeat;
    background-size: 0.75rem;
    background-position: left 0.75rem center;
    padding-inline-end: 2.125rem;
    cursor: pointer;
}

html[dir="ltr"] .form-select,
html[dir="ltr"] select.form-select {
    background-position: right 0.75rem center;
}

.form-select-sm {
    padding-inline-end: 1.875rem;
    background-size: 0.6875rem;
    background-position: left 0.625rem center;
}

html[dir="ltr"] .form-select-sm {
    background-position: right 0.625rem center;
}

.df-input-icon-wrap .form-select {
    padding-inline-start: 2.5rem;
    padding-inline-end: 2.125rem;
}

.form-select:hover {
    border-color: rgba(14, 165, 233, 0.35);
}

.form-select:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--df-text-muted);
    margin-bottom: 0.3125rem;
}

.modal-content {
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    box-shadow: var(--df-shadow-lg);
    overflow: hidden;
}

.modal.fade .modal-dialog {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.modal.show .modal-dialog {
    transform: none;
}

.modal.fade .modal-dialog {
    transform: scale(0.94) translateY(10px);
}

.modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
}

.modal-body {
    padding: 0.75rem 1.5rem 1.25rem;
}

.modal-footer {
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
}

.pagination .page-link {
    border-radius: var(--df-radius-xs);
    border-color: var(--df-border);
    color: var(--df-text-muted);
    font-size: 0.8125rem;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.pagination .page-link:hover:not(.active) {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--df-primary-dark);
    transform: translateY(var(--df-hover-lift));
}

.pagination .page-item.active .page-link {
    background: var(--df-primary);
    border-color: var(--df-primary);
}

.fc {
    font-family: var(--df-font);
    --fc-border-color: var(--df-border-subtle);
    --fc-today-bg-color: rgba(14, 165, 233, 0.08);
    --fc-neutral-bg-color: var(--df-bg-subtle);
    --fc-page-bg-color: var(--df-surface);
    direction: rtl;
}

.fc .fc-toolbar {
    flex-direction: row-reverse;
    gap: 0.75rem;
    margin-bottom: 1rem !important;
    flex-wrap: wrap;
}

.fc .fc-toolbar-title {
    font-size: 1.0625rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fc .fc-toolbar-chunk { display: flex; align-items: center; gap: 0.375rem; }
.fc .fc-button-group { flex-direction: row-reverse; }

.fc .fc-button {
    border-radius: var(--df-radius-xs) !important;
    font-family: var(--df-font) !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    padding: 0.4375rem 0.875rem !important;
    border: 1px solid var(--df-border) !important;
    box-shadow: none !important;
    transition: all var(--df-transition) !important;
}

.fc .fc-button-primary {
    background: var(--df-surface) !important;
    color: var(--df-text-muted) !important;
    border-color: var(--df-border) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--df-primary) !important;
    border-color: var(--df-primary) !important;
    color: #fff !important;
}

.fc .fc-button-primary:hover:not(:disabled) {
    background: var(--df-primary-subtle) !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
    color: var(--df-primary-dark) !important;
}

.fc .fc-timegrid-slot-label,
.fc .fc-col-header-cell-cushion {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
}

.fc .fc-timegrid-now-indicator-line {
    border-color: var(--df-danger);
}

.fc-event {
    cursor: pointer;
    border-radius: 8px !important;
    border: none !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 4px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: transform var(--df-transition-fast), box-shadow var(--df-transition);
}

.fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.fc-daygrid-event,
.fc-timegrid-event .fc-event-main {
    padding: 0.25rem 0.375rem;
}

.toast-container,
#toastContainer,
.df-snackbar-stack {
    position: fixed !important;
    bottom: 1.25rem !important;
    inset-inline-start: 1.25rem !important;
    inset-inline-end: auto !important;
    top: auto !important;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
}

[dir="ltr"] .toast-container,
[dir="ltr"] #toastContainer,
[dir="ltr"] .df-snackbar-stack {
    inset-inline-start: auto !important;
    inset-inline-end: 1.25rem !important;
}

/* ── Modern Snackbar ── */
.df-snackbar {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.875rem 1rem;
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-sm);
    box-shadow: var(--df-shadow-lg);
    position: relative;
    overflow: hidden;
    animation: dfSnackbarIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(12px);
}

.df-snackbar--hide {
    animation: dfSnackbarOut 0.28s ease forwards;
}

@keyframes dfSnackbarIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dfSnackbarOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10px) scale(0.97); }
}

.df-snackbar__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.df-snackbar--success .df-snackbar__icon { background: var(--df-success-subtle); color: var(--df-success); }
.df-snackbar--danger .df-snackbar__icon { background: var(--df-danger-subtle); color: var(--df-danger); }
.df-snackbar--warning .df-snackbar__icon { background: var(--df-warning-subtle); color: var(--df-warning); }
.df-snackbar--info .df-snackbar__icon,
.df-snackbar--primary .df-snackbar__icon { background: var(--df-primary-subtle); color: var(--df-primary); }

.df-snackbar__content { flex: 1; min-width: 0; padding-top: 0.125rem; }

.df-snackbar__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--df-text-subtle);
    margin-bottom: 0.125rem;
}

.df-snackbar__message {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--df-text);
    line-height: 1.45;
}

.df-snackbar__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--df-text-subtle);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--df-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--df-transition), color var(--df-transition);
    margin: -0.125rem;
}

.df-snackbar__close:hover {
    background: var(--df-bg-subtle);
    color: var(--df-text);
}

.df-snackbar__progress {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 100%;
    transform-origin: inline-start;
    animation: dfSnackbarProgress linear forwards;
    border-radius: 0 0 var(--df-radius-sm) var(--df-radius-sm);
}

.df-snackbar--success .df-snackbar__progress { background: var(--df-success); }
.df-snackbar--danger .df-snackbar__progress { background: var(--df-danger); }
.df-snackbar--warning .df-snackbar__progress { background: var(--df-warning); }
.df-snackbar--info .df-snackbar__progress,
.df-snackbar--primary .df-snackbar__progress { background: var(--df-primary); }

@keyframes dfSnackbarProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ── Confirm Dialog ── */
.df-confirm-dialog { max-width: 400px; }

.df-confirm {
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    border-radius: var(--df-radius) !important;
    box-shadow: var(--df-shadow-lg) !important;
}

.df-confirm__icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.625rem;
    margin: 0 auto 1rem;
    animation: dfConfirmPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dfConfirmPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.df-confirm__icon--danger { background: var(--df-danger-subtle); color: var(--df-danger); }
.df-confirm__icon--warning { background: var(--df-warning-subtle); color: var(--df-warning); }
.df-confirm__icon--primary { background: var(--df-primary-subtle); color: var(--df-primary); }

.df-confirm__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--df-text);
}

.df-confirm__message {
    font-size: 0.9375rem;
    color: var(--df-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.df-confirm__actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.df-confirm__actions .btn {
    min-width: 7rem;
    padding: 0.5625rem 1.25rem;
    font-weight: 600;
    border-radius: var(--df-radius-xs);
}

[data-theme="dark"] .df-snackbar {
    background: var(--df-surface);
    border-color: var(--df-border);
}

[data-theme="dark"] .df-confirm { background: var(--df-surface); }

.pagination .page-link i {
    display: inline-block;
}
html[dir="rtl"] .pagination .page-link .bi-chevron-left::before { content: "\f285"; }
html[dir="rtl"] .pagination .page-link .bi-chevron-right::before { content: "\f284"; }

.df-footer {
    padding: 0.875rem 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--df-text-subtle);
    background: var(--df-surface);
    border-top: 1px solid var(--df-border);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skeleton {
    background: linear-gradient(90deg, var(--df-bg-muted) 25%, var(--df-bg-subtle) 50%, var(--df-bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--df-radius-xs);
}

.skeleton-text { height: 0.875rem; margin-bottom: 0.5rem; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 991.98px) {
    html[dir="rtl"] #sidebar { transform: translateX(100%); box-shadow: var(--df-shadow-lg); }
    [dir="ltr"] #sidebar { transform: translateX(-100%); }
    #sidebar.show { transform: translateX(0); }
    #page-content-wrapper { margin-right: 0 !important; margin-left: 0 !important; }
    .df-search-trigger span { display: none; }
}

@media (max-width: 575.98px) {
    .df-page { padding: 1rem 0.875rem 1.5rem; }
    .df-page-title { font-size: 1.25rem; }
    .stat-value { font-size: 1.125rem; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
}

[data-theme="dark"] .bg-white { background: var(--df-surface) !important; }
[data-theme="dark"] .text-muted { color: var(--df-text-muted) !important; }
[data-theme="dark"] .modal-content { background: var(--df-surface); color: var(--df-text); }
[data-theme="dark"] .btn-close { filter: invert(1); }
[data-theme="dark"] .tooth-healthy { background: var(--df-bg-muted); color: var(--df-text); }

/* Patient profile tabs */
.df-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.25rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-sm);
    margin-bottom: 1.25rem;
}

.df-profile-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--df-text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: var(--df-radius-xs);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all var(--df-transition);
}

.df-profile-tabs .nav-link:hover {
    background: var(--df-surface);
    color: var(--df-text);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.df-profile-tabs .nav-link:active {
    transform: translateY(0) scale(0.98);
}

.df-profile-tabs .nav-link.active {
    background: var(--df-surface);
    color: var(--df-primary-dark);
    box-shadow: var(--df-shadow-sm);
}

.df-profile-tabs .nav-link .tab-count {
    font-size: 0.6875rem;
    padding: 0.125rem 0.4375rem;
    border-radius: 999px;
    background: var(--df-bg-muted);
    color: var(--df-text-muted);
}

.df-profile-tabs .nav-link.active .tab-count {
    background: var(--df-primary-subtle);
    color: var(--df-primary-dark);
}

.df-session-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.df-session-filters .btn {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.75rem;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-session-filters .btn:hover:not(.active):not(:disabled) {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--df-primary-dark);
    transform: translateY(var(--df-hover-lift));
}

.df-session-filters .btn.active {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.profile-summary-stat {
    text-align: center;
    padding: 0.875rem;
    background: var(--df-bg-subtle);
    border-radius: var(--df-radius-xs);
}

.profile-summary-stat .val {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-summary-stat .lbl {
    font-size: 0.6875rem;
    color: var(--df-text-muted);
    margin-top: 0.25rem;
}

.df-pay-summary {
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-sm);
    padding: 0.875rem;
}

.df-course-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.df-progress-track {
    flex: 1;
    position: relative;
    height: 8px;
    background: var(--df-bg-muted);
    border-radius: 99px;
    overflow: hidden;
}

.df-progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: var(--df-primary);
    border-radius: 99px;
    transition: width 0.3s ease;
}

.df-progress-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--df-text);
    min-width: 2.5rem;
    text-align: left;
}

.df-course-card .df-session-log-table {
    margin-top: 1rem;
}

.df-course-card .df-session-log-table td {
    font-size: 0.8125rem;
}

.df-profile-main {
    width: 100%;
}

.df-account-summary-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.df-account-stat {
    flex: 1 1 0;
    min-width: 110px;
    text-align: center;
    padding: 0.5rem 1rem;
    border-inline-start: 1px solid var(--df-border);
}

.df-account-stat:first-child {
    border-inline-start: none;
}

.df-account-stat-wide {
    flex: 1.4 1 180px;
    text-align: start;
}

.df-account-stat-val {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.df-account-stat-val-sm {
    font-size: 0.875rem;
    color: var(--df-text);
}

.df-account-stat-lbl {
    font-size: 0.6875rem;
    color: var(--df-text-muted);
    margin-top: 0.25rem;
}

@media (max-width: 576px) {
    .df-account-stat {
        flex: 1 1 45%;
        border-inline-start: none;
        border-bottom: 1px solid var(--df-border-subtle);
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
    }
    .df-account-stat-wide {
        flex: 1 1 100%;
        text-align: center;
    }
}

.df-service-row.expanded {
    background: var(--df-primary-subtle);
}

.df-service-expand {
    display: none;
}

.df-service-expand.show {
    display: table-row;
}

.df-service-expand td {
    background: var(--df-bg-subtle);
    padding: 0 !important;
    border-bottom: 1px solid var(--df-border);
}

.df-service-detail-panel {
    padding: 1rem 1.25rem;
}

.btn-svc-details.active {
    color: var(--df-primary);
    background: var(--df-primary-subtle);
}

.df-services-table .df-course-progress {
    margin: 0;
}

.df-table-actions {
    width: 1%;
    white-space: nowrap;
    padding-inline-start: 0.75rem !important;
    padding-inline-end: 1rem !important;
}

.df-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.df-row-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-xs);
    overflow: hidden;
    background: var(--df-bg);
}

.df-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
    transition:
        background var(--df-transition),
        color var(--df-transition);
}

.df-row-actions .btn + .btn {
    border-inline-start: 1px solid var(--df-border-subtle);
}

.df-row-actions .btn i {
    font-size: 1.125rem;
    line-height: 1;
}

.df-row-actions .btn-svc-details:hover:not(:disabled),
.df-row-actions .btn-pay-details:hover:not(:disabled) {
    background: var(--df-primary-subtle);
    color: var(--df-primary);
}

.df-row-actions .btn-print-invoice:hover:not(:disabled),
.df-row-actions .btn-pay-print:hover:not(:disabled) {
    background: var(--df-bg-subtle);
    color: var(--df-text);
}

.df-pay-details-hero {
    text-align: center;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--df-radius-sm);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.df-pay-details-hero__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
    margin-bottom: 0.25rem;
}

.df-pay-details-hero__amount {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--df-success);
    line-height: 1.2;
}

.df-action-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    padding: 0;
    line-height: 1;
    border-radius: var(--df-radius-xs);
    flex-shrink: 0;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-action-group .btn i {
    font-size: 1.125rem;
    line-height: 1;
    transition: color var(--df-transition);
}

.df-action-group .btn-svc-details:hover:not(:disabled) {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--df-primary);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.df-action-group .btn-svc-pay:hover:not(:disabled) {
    background: var(--df-success-subtle);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--df-success);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.df-action-group .btn-svc-pay:hover:not(:disabled) .text-success {
    color: var(--df-success) !important;
}

.df-action-group .btn-log-session:hover:not(:disabled) {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--df-primary);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.df-action-group .btn-ses-edit:hover:not(:disabled) {
    background: var(--df-bg-subtle);
    border-color: var(--df-border);
    color: var(--df-text);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.btn-group-sm .btn:has(.bi-trash):hover:not(:disabled),
.btn-group-sm a.btn:has(.bi-trash):hover {
    background: var(--df-danger-subtle);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--df-danger);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.btn-group-sm .btn:has(.bi-pencil):hover:not(:disabled) {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--df-primary);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.btn-group-sm .btn:has(.bi-eye):hover:not(:disabled),
.btn-group-sm a.btn:has(.bi-eye):hover {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--df-primary);
    box-shadow: var(--df-shadow-sm);
    transform: translateY(var(--df-hover-lift));
}

.btn-group-sm > .btn.btn-ghost:hover:not(:disabled),
.btn-group-sm > a.btn.btn-ghost:hover {
    box-shadow: var(--df-shadow-sm);
}

.btn-close {
    transition: opacity var(--df-transition), transform var(--df-transition-fast);
}

.btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-close:active {
    transform: scale(0.95);
}

.df-action-group .btn:active:not(:disabled),
.btn-group-sm .btn:active:not(:disabled) {
    transform: translateY(0) scale(0.94);
    box-shadow: none;
}

.df-services-table th:last-child,
.df-services-table td.df-table-actions {
    text-align: center;
}

/* ── Service Details Modal ── */
.df-service-modal .modal-body {
    padding-top: 0.5rem;
}

.df-service-modal__hero {
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
}

.df-service-modal__section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--df-text-muted);
    margin-bottom: 0.875rem;
}

.df-session-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 340px;
    overflow-y: auto;
    padding-inline-end: 0.25rem;
}

.df-session-log-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
    transition: border-color var(--df-transition), box-shadow var(--df-transition);
}

.df-session-log-item:hover {
    border-color: var(--df-border);
    box-shadow: var(--df-shadow-sm);
}

.df-session-log-item__num { flex-shrink: 0; padding-top: 0.125rem; }

.df-session-log-item__body { flex: 1; min-width: 0; }

.df-session-log-item__date {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--df-text);
    margin-bottom: 0.25rem;
}

.df-session-log-item__work {
    font-size: 0.8125rem;
    color: var(--df-text-muted);
    line-height: 1.5;
}

.df-session-log-item__paid {
    flex-shrink: 0;
    font-size: 0.875rem;
    white-space: nowrap;
}

.df-service-modal__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--df-text-muted);
}

.df-service-modal__empty i {
    font-size: 2rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.75rem;
}

.df-service-modal__empty p { margin: 0; font-size: 0.875rem; }

.df-detail-field {
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
    padding: 0.875rem 1rem;
    height: 100%;
}

.df-detail-field__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--df-text-subtle);
    margin-bottom: 0.375rem;
}

.df-detail-field__value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--df-text);
    line-height: 1.5;
}

.df-demo-banner {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--df-shadow);
}

/* ── Reports ── */
.df-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.375rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-sm);
}

.df-report-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--df-text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: var(--df-radius-xs);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.df-report-preset.active {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.df-report-toolbar .df-filters {
    margin-bottom: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.df-report-table tfoot .df-report-total-row td {
    background: var(--df-bg-subtle);
    border-top: 2px solid var(--df-border);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.df-report-print-header {
    display: none;
}

@media print {
    #sidebar,
    #topbar,
    .df-page-header,
    .df-report-tabs,
    .df-report-toolbar,
    .df-page-actions,
    .sidebar-backdrop,
    .df-snackbar-stack,
    #toastContainer {
        display: none !important;
    }

    #wrapper,
    #page-content-wrapper,
    .df-page,
    #reportsContent {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .df-report-print-header {
        display: block !important;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #0ea5e9;
    }

    .df-report-print-header h1 {
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0 0 0.25rem;
        color: #0ea5e9;
    }

    .df-report-print-header h2 {
        font-size: 1.125rem;
        font-weight: 700;
        margin: 0 0 0.5rem;
    }

    .df-report-print-header p {
        margin: 0;
        color: #64748b;
        font-size: 0.875rem;
    }

    .df-card {
        border: 1px solid #dde4ed !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .df-table {
        font-size: 0.75rem;
    }

    .df-table th {
        background: #f4f7fb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .stat-card {
        break-inside: avoid;
    }

    canvas {
        max-height: 220px !important;
    }

    @page {
        margin: 1.2cm;
    }
}

/* ── Settings ── */
.df-settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 991px) {
    .df-settings-layout {
        grid-template-columns: 1fr;
    }
}

.df-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    padding: 0.5rem;
    position: sticky;
    top: calc(var(--df-topbar-height) + 1rem);
}

.df-settings-nav__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--df-radius-sm);
    padding: 0.75rem 0.875rem;
    text-align: start;
    cursor: pointer;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-settings-nav__item:hover {
    background: var(--df-bg-subtle);
    border-color: var(--df-border-subtle);
}

.df-settings-nav__item.active {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: var(--df-shadow-sm);
}

.df-settings-nav__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--df-radius-xs);
    background: var(--df-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--df-primary);
    flex-shrink: 0;
    font-size: 1.0625rem;
}

.df-settings-nav__item.active .df-settings-nav__icon {
    background: var(--df-surface);
}

.df-settings-nav__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.df-settings-nav__text strong {
    font-size: 0.875rem;
    color: var(--df-text);
}

.df-settings-nav__text small {
    font-size: 0.6875rem;
    color: var(--df-text-muted);
    line-height: 1.3;
}

.df-settings-nav__arrow {
    color: var(--df-text-subtle);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--df-transition);
}

.df-settings-nav__item.active .df-settings-nav__arrow,
.df-settings-nav__item:hover .df-settings-nav__arrow {
    opacity: 1;
}

.df-settings-panel {
    background: var(--df-surface);
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius);
    overflow: hidden;
}

.df-settings-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--df-border-subtle);
    background: linear-gradient(180deg, var(--df-bg-subtle) 0%, var(--df-surface) 100%);
}

.df-settings-panel__icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--df-radius-sm);
    background: var(--df-primary-subtle);
    color: var(--df-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
}

.df-settings-panel__body {
    padding: 1.5rem;
}

.df-settings-panel__foot {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
}

.df-settings-panel__foot--split {
    justify-content: space-between;
    flex-wrap: wrap;
}

.df-settings-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--df-text-muted);
    margin-bottom: 0.375rem;
}

.df-settings-hint {
    font-size: 0.6875rem;
    color: var(--df-text-subtle);
    margin-top: 0.3125rem;
}

.df-input-icon-wrap {
    position: relative;
}

.df-input-icon-wrap .form-control {
    padding-inline-start: 2.625rem;
}

.df-input-icon {
    position: absolute;
    inset-inline-start: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--df-text-subtle);
    font-size: 1rem;
    pointer-events: none;
}

.df-settings-stat {
    text-align: center;
    padding: 1rem 0.75rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
}

.df-settings-stat__val {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--df-text);
    line-height: 1.2;
}

.df-settings-stat__val small {
    font-size: 0.75rem;
    font-weight: 600;
}

.df-settings-stat__lbl {
    display: block;
    font-size: 0.6875rem;
    color: var(--df-text-muted);
    margin-top: 0.25rem;
    font-weight: 600;
}

.df-settings-kv-list {
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
    overflow: hidden;
}

.df-settings-kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
}

.df-settings-kv:last-child {
    border-bottom: none;
}

.df-settings-kv span {
    color: var(--df-text-muted);
}

.df-settings-danger {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    background: var(--df-danger-subtle);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--df-radius);
}

.df-settings-danger__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: var(--df-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.df-settings-doctor-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--df-radius-sm);
}

.df-theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.df-theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    border: 2px solid var(--df-border);
    border-radius: var(--df-radius);
    background: var(--df-surface);
    cursor: pointer;
    transition:
        border-color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
    text-align: center;
}

.df-theme-option:hover {
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(var(--df-hover-lift));
    box-shadow: var(--df-shadow-sm);
}

.df-theme-option.active {
    border-color: var(--df-primary);
    background: var(--df-primary-subtle);
    box-shadow: var(--df-hover-shadow-primary);
}

.df-theme-option__preview {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.625rem;
}

.df-theme-option__preview--light {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.df-theme-option__preview--dark {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #94a3b8;
}

.df-clinic-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
}

.df-settings-panel--clinic .df-settings-panel__body {
    padding: 1.5rem 1.75rem;
}

.df-input-icon-wrap textarea.form-control {
    padding-inline-start: 2.625rem;
    min-height: 5.5rem;
    resize: vertical;
}

/* Clinic media — logo + gallery */
.df-clinic-media {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
}

.df-clinic-media__logo {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.df-clinic-media__gallery {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--df-border-subtle);
}

.df-clinic-media__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--df-text-muted);
}

.df-clinic-media__hint {
    font-size: 0.6875rem;
    color: var(--df-text-subtle);
}

.df-media-plus {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--df-primary-subtle), rgba(14, 165, 233, 0.08));
    color: var(--df-primary);
    font-size: 1.25rem;
    line-height: 1;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition:
        transform var(--df-transition-fast),
        background var(--df-transition),
        box-shadow var(--df-transition);
}

.df-media-plus--sm {
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

.df-clinic-photos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.df-clinic-photo {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    border-radius: var(--df-radius-sm);
    overflow: hidden;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
}

.df-clinic-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.df-clinic-photo__remove {
    position: absolute;
    top: 0.375rem;
    inset-inline-end: 0.375rem;
    width: 1.625rem;
    height: 1.625rem;
    border: none;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.6875rem;
    opacity: 0;
    transition: opacity var(--df-transition), background var(--df-transition);
}

.df-clinic-photo:hover .df-clinic-photo__remove {
    opacity: 1;
}

.df-clinic-photo__remove:hover {
    background: var(--df-danger);
}

.df-clinic-photo--add {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed rgba(14, 165, 233, 0.28);
    background: var(--df-surface);
    transition:
        border-color var(--df-transition),
        background var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-clinic-photo--add:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: var(--df-primary-subtle);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

.df-clinic-photo--add:hover .df-media-plus {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.df-clinic-logo {
    border-radius: var(--df-radius-sm);
    border: 2px dashed var(--df-border);
    background: var(--df-bg-subtle);
    overflow: hidden;
}

.df-clinic-logo--compact {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.df-clinic-logo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-color: rgba(14, 165, 233, 0.28);
    background: var(--df-surface);
    transition:
        border-color var(--df-transition),
        background var(--df-transition),
        transform var(--df-transition-fast);
}

.df-clinic-logo--empty:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: var(--df-primary-subtle);
    transform: translateY(-2px);
}

.df-clinic-logo--empty:hover .df-media-plus {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.df-clinic-logo--has {
    position: relative;
    border-style: solid;
    border-color: var(--df-border-subtle);
    padding: 0;
}

.df-clinic-logo--has img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 0.25rem;
}

.df-clinic-logo__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity var(--df-transition);
}

.df-clinic-logo--has:hover .df-clinic-logo__overlay {
    opacity: 1;
}

.df-clinic-logo__btn {
    width: 1.625rem;
    height: 1.625rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--df-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.6875rem;
    margin: 0;
    transition: background var(--df-transition), color var(--df-transition);
}

.df-clinic-logo__btn:hover {
    background: #fff;
    color: var(--df-primary);
}

.df-clinic-logo__btn--danger:hover {
    color: var(--df-danger);
}

@media (max-width: 575px) {
    .df-clinic-media {
        gap: 1.25rem;
    }

    .df-clinic-media__gallery {
        padding-top: 1rem;
    }
}

/* ── Settings page (modern) ── */
.df-settings-page {
    max-width: 920px;
    margin-inline: auto;
}

.df-settings-page .df-page-header {
    margin-bottom: 1.25rem;
}

.df-settings-card {
    background: var(--df-surface);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: calc(var(--df-radius) + 4px);
    padding: 1.75rem 2rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .df-settings-card {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.df-settings-section__hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--df-border-subtle);
}

.df-settings-section__hero-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--df-primary-subtle), rgba(14, 165, 233, 0.06));
    color: var(--df-primary);
    font-size: 1.125rem;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.df-settings-section__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--df-text);
}

.df-settings-section__desc {
    font-size: 0.8125rem;
    color: var(--df-text-muted);
}

.df-settings-page .df-settings-field .form-control,
.df-settings-page .df-settings-field .form-select {
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    border-radius: var(--df-radius-sm);
    padding: 0.6875rem 1rem;
    font-size: 0.875rem;
    min-height: var(--df-settings-control-h);
    transition: background var(--df-transition), border-color var(--df-transition), box-shadow var(--df-transition);
}

.df-settings-page .df-settings-field .form-control:hover,
.df-settings-page .df-settings-field .form-select:hover {
    border-color: rgba(14, 165, 233, 0.2);
}

.df-settings-page .df-input-icon-wrap .form-control {
    padding-inline-start: 2.625rem;
}

.df-settings-page .df-input-icon-wrap .form-select {
    padding-inline-start: 2.625rem;
    padding-inline-end: 2.25rem;
}

.df-settings-page .df-input-icon-wrap--select .df-input-icon {
    top: 0;
    transform: none;
    height: var(--df-settings-control-h);
    display: inline-flex;
    align-items: center;
    z-index: 2;
    color: var(--df-primary);
    font-size: 1.0625rem;
}

.df-settings-page .df-input-icon-wrap .df-input-icon {
    color: var(--df-text-subtle);
}

.df-settings-page .df-settings-field .form-control:focus,
.df-settings-page .df-settings-field .form-select:focus {
    background: var(--df-surface);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.df-settings-page .df-settings-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
    margin-bottom: 0.375rem;
}

/* Schedule cards */
.df-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.df-schedule-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--df-radius-sm);
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        box-shadow var(--df-transition),
        opacity var(--df-transition);
}

.df-schedule-card:hover {
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.df-schedule-card.is-closed {
    background: var(--df-bg-subtle);
    opacity: 0.72;
}

.df-schedule-card__day {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
}

.df-schedule-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--df-success, #22c55e);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    transition: background var(--df-transition), box-shadow var(--df-transition);
}

.df-schedule-card.is-closed .df-schedule-card__dot {
    background: var(--df-text-subtle);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.15);
}

.df-schedule-card__times {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.df-schedule-card__sep {
    color: var(--df-text-subtle);
    font-size: 0.75rem;
    opacity: 0.6;
}

.df-time-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.df-time-field__label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--df-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.df-time-input {
    appearance: none;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--df-text);
    min-width: 118px;
    text-align: center;
    transition: background var(--df-transition), border-color var(--df-transition), box-shadow var(--df-transition);
}

.df-time-input:focus {
    outline: none;
    background: var(--df-surface);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.df-time-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Custom open toggle */
.df-schedule-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.df-schedule-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.df-schedule-toggle__track {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: var(--df-border);
    position: relative;
    transition: background var(--df-transition);
    flex-shrink: 0;
}

.df-schedule-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: inset-inline-start var(--df-transition), inset-inline-end var(--df-transition);
}

.df-schedule-toggle input:checked + .df-schedule-toggle__track {
    background: var(--df-success, #22c55e);
}

.df-schedule-toggle input:checked + .df-schedule-toggle__track::after {
    inset-inline-start: auto;
    inset-inline-end: 3px;
}

[dir="ltr"] .df-schedule-toggle input:checked + .df-schedule-toggle__track::after {
    inset-inline-end: auto;
    inset-inline-start: 21px;
}

.df-schedule-toggle__text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
    white-space: nowrap;
}

.df-schedule-toggle input:checked ~ .df-schedule-toggle__text {
    color: var(--df-success, #22c55e);
}

.df-map-preview {
    padding-top: 0.25rem;
}

@media (max-width: 767px) {
    .df-schedule-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .df-schedule-card__times {
        justify-content: flex-start;
    }

    .df-schedule-toggle {
        justify-content: space-between;
        padding-top: 0.25rem;
        border-top: 1px dashed var(--df-border-subtle);
    }
}

.df-settings-top-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.3125rem;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    border-radius: calc(var(--df-radius) + 2px);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .df-settings-top-tabs {
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.df-settings-top-tab {
    flex: 1 1 auto;
    min-width: fit-content;
    border: none;
    background: transparent;
    color: var(--df-text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.6875rem 1.125rem;
    border-radius: var(--df-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition:
        background var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-settings-top-tab__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    color: var(--df-text-muted);
    font-size: 0.9375rem;
    transition: background var(--df-transition), color var(--df-transition);
}

.df-settings-top-tab:hover {
    color: var(--df-text);
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .df-settings-top-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

.df-settings-top-tab.active {
    background: var(--df-surface);
    color: var(--df-primary-dark);
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.08),
        0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .df-settings-top-tab.active {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.df-settings-top-tab.active .df-settings-top-tab__icon {
    background: var(--df-primary-subtle);
    color: var(--df-primary);
}

.df-settings-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 0.5rem;
}

.df-settings-footer .btn-ghost {
    border-radius: 999px;
    font-size: 0.8125rem;
}

@media (max-width: 991px) {
    .df-settings-card {
        padding: 1.25rem;
    }

    .df-settings-top-tab {
        flex: 1 1 calc(50% - 0.375rem);
        font-size: 0.75rem;
        padding: 0.625rem 0.75rem;
    }
}

@media (max-width: 991px) {
    .df-settings-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .df-settings-nav__item {
        min-width: 200px;
        flex-shrink: 0;
    }

    .df-settings-nav__text small {
        display: none;
    }
}

/* ── Dashboard ── */
.df-dash-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.df-dash-kpi {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    background: var(--df-surface);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: calc(var(--df-radius) + 2px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.04);
    transition: transform var(--df-transition-fast), box-shadow var(--df-transition);
    position: relative;
    overflow: hidden;
}

.df-dash-kpi::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--df-kpi-accent, var(--df-primary));
    border-radius: 0 3px 3px 0;
}

[dir="ltr"] .df-dash-kpi::after {
    inset-inline-start: auto;
    inset-inline-end: 0;
    border-radius: 3px 0 0 3px;
}

.df-dash-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 12px 28px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .df-dash-kpi {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.df-dash-kpi--primary { --df-kpi-accent: var(--df-primary); }
.df-dash-kpi--success { --df-kpi-accent: var(--df-success); }
.df-dash-kpi--warning { --df-kpi-accent: var(--df-warning); }
.df-dash-kpi--danger { --df-kpi-accent: var(--df-danger); }
.df-dash-kpi--info { --df-kpi-accent: var(--df-info); }

.df-dash-kpi__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.125rem;
    background: var(--df-primary-subtle);
    color: var(--df-primary);
}

.df-dash-kpi--success .df-dash-kpi__icon { background: var(--df-success-subtle); color: var(--df-success); }
.df-dash-kpi--warning .df-dash-kpi__icon { background: var(--df-warning-subtle); color: var(--df-warning); }
.df-dash-kpi--danger .df-dash-kpi__icon { background: var(--df-danger-subtle); color: var(--df-danger); }
.df-dash-kpi--info .df-dash-kpi__icon { background: rgba(99, 102, 241, 0.12); color: var(--df-info); }

.df-dash-kpi__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.df-dash-kpi__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
}

.df-dash-kpi__value {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--df-text);
    word-break: break-word;
}

.df-dash-kpi__sub {
    font-size: 0.6875rem;
    color: var(--df-text-subtle);
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin-top: 0.125rem;
}

.df-dash-kpi__sub.is-up { color: var(--df-success); }
.df-dash-kpi__sub.is-down { color: var(--df-danger); }

.df-dash-chart-card {
    background: var(--df-surface);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: calc(var(--df-radius) + 2px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[data-theme="dark"] .df-dash-chart-card {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.df-dash-chart-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--df-border-subtle);
}

.df-dash-chart-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--df-text);
}

.df-dash-chart-card__title i {
    color: var(--df-primary);
    font-size: 1rem;
}

.df-dash-chart-card__desc {
    font-size: 0.75rem;
    color: var(--df-text-muted);
    margin: 0.25rem 0 0;
}

.df-dash-chart-card__badge {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--df-primary-dark);
    background: var(--df-primary-subtle);
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.df-dash-chart-card__body {
    position: relative;
    height: 260px;
    padding: 0.75rem 1rem 1rem;
}

.df-dash-chart-card__body--donut {
    height: 300px;
    padding-bottom: 0.5rem;
}

@media (max-width: 991px) {
    .df-dash-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .df-dash-kpis {
        grid-template-columns: 1fr;
    }

    .df-dash-kpi__value {
        font-size: 1.25rem;
    }

    .df-dash-chart-card__body {
        height: 220px;
    }

    .df-dash-chart-card__body--donut {
        height: 260px;
    }
}

/* ── Logout ── */
.df-topbar-btn--logout:hover {
    background: var(--df-danger-subtle);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--df-danger);
}

.df-sidebar-logout {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
}

.df-sidebar-logout:hover {
    color: var(--df-danger) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    background: var(--df-danger-subtle) !important;
}

/* ── Login page ── */
.df-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #0b1220;
    overflow: hidden;
    position: relative;
}

.df-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(14, 165, 233, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(6, 182, 212, 0.25), transparent 50%),
        linear-gradient(145deg, #0b1220 0%, #111827 45%, #0f172a 100%);
}

.df-login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.df-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

.df-login-orb--1 {
    width: 420px;
    height: 420px;
    background: #0ea5e9;
    top: -8%;
    inset-inline-start: -5%;
}

.df-login-orb--2 {
    width: 360px;
    height: 360px;
    background: #6366f1;
    bottom: -10%;
    inset-inline-end: -5%;
}

.df-login-orb--3 {
    width: 240px;
    height: 240px;
    background: #06b6d4;
    top: 45%;
    inset-inline-start: 42%;
}

.df-login-theme {
    position: fixed;
    top: 1.25rem;
    inset-inline-start: 1.25rem;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background var(--df-transition), transform var(--df-transition-fast);
}

.df-login-theme:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.df-login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.df-login-brand {
    color: #fff;
    padding: 1rem 0.5rem;
}

.df-login-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.df-login-brand__icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.45);
}

.df-login-brand__pulse {
    position: absolute;
    inset: -8px;
    border-radius: 24px;
    border: 2px solid rgba(14, 165, 233, 0.4);
    animation: df-login-pulse 2.5s ease-out infinite;
}

@keyframes df-login-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 0; }
}

.df-login-brand__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.df-login-brand__desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 360px;
}

.df-login-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.df-login-features li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.df-login-features i {
    color: #34d399;
    font-size: 1rem;
}

.df-login-panel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.df-login-panel {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border-radius: calc(var(--df-radius) + 6px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    backdrop-filter: blur(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .df-login-panel {
    background: rgba(21, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

.df-login-panel.is-error {
    animation: df-login-shake 0.45s ease;
}

.df-login-panel.is-demo-filled {
    animation: df-login-pop 0.45s ease;
}

@keyframes df-login-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes df-login-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

.df-login-panel__head {
    margin-bottom: 1.5rem;
    text-align: center;
}

.df-login-panel__head h2 {
    font-size: 1.375rem;
    font-weight: 800;
    margin: 0 0 0.375rem;
    letter-spacing: -0.02em;
}

.df-login-panel__head p {
    font-size: 0.8125rem;
    color: var(--df-text-muted);
    margin: 0;
}

.df-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.df-login-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--df-text-muted);
    margin-bottom: 0.375rem;
}

.df-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.df-login-input-wrap > i.bi {
    position: absolute;
    inset-inline-start: 1rem;
    color: var(--df-text-subtle);
    font-size: 1rem;
    pointer-events: none;
    transition: color var(--df-transition);
}

.df-login-input {
    width: 100%;
    border: 1px solid var(--df-border);
    background: var(--df-bg-subtle);
    border-radius: var(--df-radius-sm);
    padding: 0.75rem 2.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--df-text);
    transition: border-color var(--df-transition), box-shadow var(--df-transition), background var(--df-transition);
}

.df-login-input-wrap:not(:has(.df-login-input-action)) .df-login-input {
    padding-inline-start: 2.75rem;
    padding-inline-end: 1rem;
}

.df-login-input-wrap:has(.df-login-input-action) .df-login-input {
    padding-inline-start: 2.75rem;
    padding-inline-end: 2.75rem;
}

.df-login-input:focus {
    outline: none;
    background: var(--df-surface);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.df-login-input:focus + .df-login-input-action,
.df-login-input-wrap:focus-within > i.bi {
    color: var(--df-primary);
}

.df-login-input-action {
    position: absolute;
    inset-inline-end: 0.625rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--df-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--df-transition), color var(--df-transition);
}

.df-login-input-action:hover {
    background: var(--df-primary-subtle);
    color: var(--df-primary);
}

.df-login-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--df-radius-sm);
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
    transition: transform var(--df-transition-fast), box-shadow var(--df-transition), opacity var(--df-transition);
}

.df-login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.5);
}

.df-login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.df-login-btn:disabled {
    opacity: 0.85;
    cursor: wait;
}

.df-login-btn.is-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.df-login-btn__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: df-login-spin 0.7s linear infinite;
}

.df-login-btn.is-loading .df-login-btn__spinner { display: block; }
.df-login-btn.is-loading .df-login-btn__arrow { display: none; }

@keyframes df-login-spin {
    to { transform: rotate(360deg); }
}

.df-login-btn__arrow {
    font-size: 1rem;
    transition: transform var(--df-transition);
}

.df-login-btn:hover:not(:disabled) .df-login-btn__arrow {
    transform: translateX(-4px);
}

[dir="ltr"] .df-login-btn:hover:not(:disabled) .df-login-btn__arrow {
    transform: translateX(4px);
}

.df-login-demo {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--df-radius-sm);
    background: var(--df-bg-subtle);
    border: 1px dashed rgba(14, 165, 233, 0.25);
    text-align: center;
}

.df-login-demo__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--df-text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.df-login-demo__creds {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.df-login-demo__creds code {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--df-primary-dark);
    background: var(--df-primary-subtle);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
}

.df-login-demo__btn {
    border: none;
    background: var(--df-surface);
    color: var(--df-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid rgba(14, 165, 233, 0.25);
    transition: background var(--df-transition), transform var(--df-transition-fast), box-shadow var(--df-transition);
}

.df-login-demo__btn:hover {
    background: var(--df-primary-subtle);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.df-login-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}

@media (max-width: 767px) {
    .df-login-shell {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .df-login-brand {
        text-align: center;
        padding-bottom: 0;
    }

    .df-login-brand__desc,
    .df-login-features {
        display: none;
    }

    .df-login-brand__icon {
        margin-inline: auto;
    }

    .df-login-panel {
        padding: 1.5rem;
    }
}

/* ══════════════════════════════════════════════════════════
   Appointments — Clean Schedule v4
   ══════════════════════════════════════════════════════════ */

.df-appts-page {
    --sa-radius: 14px;
    --sa-radius-sm: 10px;
    --sa-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    --sa-cell-bg: #f6f8fb;
    --sa-cell-hover: #eef6fc;
}

[data-theme="dark"] .df-appts-page {
    --sa-cell-bg: rgba(255, 255, 255, 0.04);
    --sa-cell-hover: rgba(14, 165, 233, 0.08);
}

@keyframes sa-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Header ── */
.sa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sa-header__title {
    font-size: 1.375rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
    flex: 1;
}

.sa-chips-scope {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--df-text-subtle);
    padding: 0 0.125rem;
    margin-top: 0.125rem;
}

.sa-chips-scope i {
    color: var(--df-primary);
    font-size: 0.75rem;
}

/* removed header stats pills */

.sa-header__add {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.125rem;
    border: none;
    border-radius: var(--sa-radius-sm);
    background: var(--df-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.sa-header__add:hover {
    background: var(--df-primary-dark);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

/* ── Toolbar ── */
.sa-toolbar {
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--sa-radius);
    padding: 0.75rem;
    margin-bottom: 0.875rem;
    box-shadow: var(--sa-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    --sa-control-h: 2.625rem;
}

.sa-toolbar__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search */
.sa-search {
    flex: 1;
    min-width: 180px;
    position: relative;
    display: flex;
    align-items: center;
}

.sa-search i {
    position: absolute;
    inset-inline-start: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--df-text-subtle);
    pointer-events: none;
    font-size: 0.875rem;
    line-height: 1;
    z-index: 1;
}

.sa-search__input {
    width: 100%;
    height: var(--sa-control-h);
    border: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    border-radius: 10px;
    padding-block: 0;
    padding-inline-start: 2.5rem;
    padding-inline-end: 0.875rem;
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--df-text);
}

.sa-search__input:focus {
    outline: none;
    border-color: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* View switch */
.sa-view-switch {
    display: flex;
    padding: 3px;
    background: var(--df-bg-subtle);
    border-radius: var(--sa-radius-sm);
    gap: 2px;
    flex-shrink: 0;
    border: 1px solid var(--df-border-subtle);
}

.sa-view-switch__btn {
    border: none;
    background: transparent;
    color: var(--df-text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.4375rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.sa-view-switch__btn i { font-size: 0.8125rem; opacity: 0.75; }
.sa-view-switch__btn:hover:not(.is-active) { color: var(--df-text); background: rgba(255, 255, 255, 0.5); }

.sa-view-switch__btn.is-active {
    background: var(--df-surface);
    color: var(--df-primary);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.sa-view-switch__btn.is-active i { opacity: 1; color: var(--df-primary); }

/* Filter btn */
.sa-filter-btn {
    border: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    color: var(--df-text-muted);
    width: var(--sa-control-h);
    height: var(--sa-control-h);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.875rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sa-filter-btn:hover, .sa-filter-btn.is-open {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.sa-filter-btn > .bi {
    display: block;
    line-height: 1;
}

.sa-filter-btn.has-dot::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--df-danger);
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    box-shadow: 0 0 0 2px var(--df-surface);
}

/* Chips */
.sa-chips {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.375rem 0.125rem 0.125rem;
    border-top: 1px solid var(--df-border-subtle);
}

.sa-chips::-webkit-scrollbar { display: none; }

.sa-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid var(--df-border-subtle);
    background: transparent;
    color: var(--df-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.3125rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.18s;
}

.sa-chip__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c, var(--df-primary));
}

.sa-chip__n {
    font-size: 0.625rem;
    font-weight: 700;
    opacity: 0.6;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 6px;
    padding: 1px 6px;
}

[data-theme="dark"] .sa-chip__n { background: rgba(255, 255, 255, 0.08); }

.sa-chip:hover { border-color: var(--c, var(--df-primary)); color: var(--df-text); }

.sa-chip.is-active {
    background: var(--c, var(--df-primary));
    border-color: var(--c, var(--df-primary));
    color: #fff;
}

.sa-chip.is-active .sa-chip__dot { background: #fff; }
.sa-chip.is-active .sa-chip__n { background: rgba(255, 255, 255, 0.2); color: #fff; opacity: 1; }

/* Filters panel */
.sa-toolbar__filters {
    padding-top: 0.75rem;
    border-top: 1px dashed var(--df-border-subtle);
    animation: sa-slide-up 0.2s ease;
}

.sa-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0.3125rem 0.5rem;
    min-height: calc(var(--sa-control-h) + 0.625rem);
    border-radius: 12px;
    border: 1px solid var(--df-border-subtle);
    background: linear-gradient(180deg, var(--df-surface) 0%, var(--df-bg-subtle) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sa-filter-group.is-active {
    border-color: rgba(14, 165, 233, 0.45);
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.06) 0%, rgba(14, 165, 233, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08);
}

.sa-filter-group__sep {
    width: 1px;
    align-self: stretch;
    min-height: 1.75rem;
    background: var(--df-border-subtle);
    flex-shrink: 0;
}

.sa-toolbar__select {
    width: auto;
    min-width: 7.5rem;
    max-width: 10rem;
    height: var(--sa-control-h);
    border: 1px solid var(--df-border-subtle);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding-block: 0;
    padding-inline: 0.625rem 1.875rem;
    background-color: var(--df-surface);
    background-image: var(--df-select-arrow);
    background-repeat: no-repeat;
    background-size: 0.75rem;
    background-position: left 0.625rem center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    color: var(--df-text);
    box-shadow: none;
    transition: border-color 0.2s, background-color 0.2s;
}

html[dir="rtl"] .sa-toolbar__select {
    background-position: left 0.625rem center;
    padding-inline: 0.625rem 1.875rem;
}

html[dir="ltr"] .sa-toolbar__select {
    background-position: right 0.625rem center;
    padding-inline: 0.625rem 1.875rem;
}

.sa-toolbar__select:hover {
    border-color: rgba(14, 165, 233, 0.35);
    background-color: var(--df-surface);
}

.sa-toolbar__select:focus {
    outline: none;
    border-color: var(--df-primary);
    background-color: var(--df-surface);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.sa-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.sa-date-range__sep {
    color: var(--df-text-subtle);
    font-size: 0.8125rem;
    font-weight: 600;
    user-select: none;
    opacity: 0.5;
}

.sa-date-field {
    position: relative;
    display: flex;
    align-items: center;
}

.sa-date-field__input {
    width: 9.5rem;
    height: var(--sa-control-h);
    border: 1px solid var(--df-border-subtle);
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    padding-block: 0;
    padding-inline: 0.75rem 2.375rem;
    background: var(--df-surface);
    color: var(--df-text);
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: start;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sa-date-field__input::placeholder {
    color: var(--df-text-subtle);
    font-weight: 400;
    opacity: 0.75;
}

.sa-date-field__trigger {
    position: absolute;
    inset-inline-end: 0.3125rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--df-bg-subtle);
    color: var(--df-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.sa-date-field__trigger i {
    font-size: 0.8125rem;
    pointer-events: none;
    display: block;
    line-height: 1;
}

.sa-date-field__trigger:hover {
    background: var(--df-primary);
    color: #fff;
}

.sa-date-field__trigger:active {
    transform: translateY(-50%) scale(0.94);
}

.sa-date-field > input.flatpickr-input:not(.sa-date-field__input) {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

.sa-date-field__input:hover {
    border-color: rgba(14, 165, 233, 0.35);
    background: #fff;
}

.sa-date-field__input:focus {
    outline: none;
    border-color: var(--df-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14), 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Flatpickr — modern calendar popup */
.df-fp.flatpickr-calendar {
    font-family: var(--df-font);
    border: 1px solid var(--df-border-subtle);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    padding: 0.875rem;
    width: 19rem;
    background: var(--df-surface);
}

.df-fp .flatpickr-months.df-fp__months-bar {
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    padding: 0.375rem;
    border-radius: 12px;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
}

.df-fp .flatpickr-months .flatpickr-month {
    flex: 1;
    height: auto;
    overflow: visible;
}

.df-fp .flatpickr-current-month {
    position: static;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--df-text);
    padding: 0;
    left: auto;
    width: 100%;
    height: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.df-fp .df-fp__pickers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.df-fp .df-fp__month-select,
.df-fp .df-fp__year-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--df-border-subtle);
    border-radius: 10px;
    padding: 0.4375rem 0.75rem 0.4375rem 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--df-text);
    background-color: var(--df-surface);
    background-image: var(--df-select-arrow);
    background-repeat: no-repeat;
    background-size: 0.75rem;
    background-position: left 0.625rem center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[dir="ltr"] .df-fp .df-fp__month-select,
html[dir="ltr"] .df-fp .df-fp__year-select {
    padding: 0.4375rem 2rem 0.4375rem 0.75rem;
    background-position: right 0.625rem center;
}

.df-fp .df-fp__month-select {
    flex: 1;
    min-width: 0;
    max-width: 8.5rem;
}

.df-fp .df-fp__year-select {
    width: 5.25rem;
    flex-shrink: 0;
}

.df-fp .df-fp__month-select:hover,
.df-fp .df-fp__year-select:hover {
    border-color: rgba(14, 165, 233, 0.45);
    background-color: var(--df-surface);
}

.df-fp .df-fp__month-select:focus,
.df-fp .df-fp__year-select:focus {
    outline: none;
    border-color: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.df-fp .flatpickr-current-month .numInputWrapper,
.df-fp .flatpickr-current-month input.cur-year {
    display: none;
}

.df-fp .flatpickr-months .flatpickr-prev-month,
.df-fp .flatpickr-months .flatpickr-next-month {
    position: static;
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--df-text-muted);
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.df-fp .flatpickr-months .flatpickr-prev-month:hover,
.df-fp .flatpickr-months .flatpickr-next-month:hover {
    background: var(--df-surface);
    border-color: var(--df-border-subtle);
    color: var(--df-primary);
}

.df-fp .flatpickr-months .flatpickr-prev-month svg,
.df-fp .flatpickr-months .flatpickr-next-month svg {
    width: 0.75rem;
    height: 0.75rem;
}

.df-fp .flatpickr-weekdays {
    margin-top: 0.125rem;
    margin-bottom: 0.25rem;
}

.df-fp .flatpickr-weekday {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--df-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.df-fp .flatpickr-days {
    width: 100%;
}

.df-fp .dayContainer {
    width: 100%;
    min-width: 0;
    gap: 0.125rem;
}

.df-fp .flatpickr-day {
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--df-text);
    max-width: none;
    height: 2.125rem;
    line-height: 2.125rem;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.df-fp .flatpickr-day:hover {
    background: var(--df-bg-subtle);
    border-color: transparent;
}

.df-fp .flatpickr-day.today {
    border-color: rgba(14, 165, 233, 0.45);
    background: rgba(14, 165, 233, 0.08);
    color: var(--df-primary);
    font-weight: 700;
}

.df-fp .flatpickr-day.selected,
.df-fp .flatpickr-day.selected:hover {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.df-fp .flatpickr-day.prevMonthDay,
.df-fp .flatpickr-day.nextMonthDay {
    color: var(--df-text-muted);
    opacity: 0.4;
}

.df-fp__foot {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--df-border-subtle);
}

.df-fp__today {
    width: 100%;
    border: 1px solid var(--df-border-subtle);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    background: var(--df-surface);
    color: var(--df-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.df-fp__today:hover {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.sa-date-range__apply {
    height: var(--sa-control-h);
    padding-block: 0;
    padding-inline: 0.875rem;
    border-radius: 10px !important;
    font-weight: 700;
}

.sa-filter-group .sa-clear-btn {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: var(--df-danger-subtle);
    color: var(--df-danger);
}

.sa-filter-group .sa-clear-btn:hover {
    border-color: var(--df-danger);
    background: rgba(239, 68, 68, 0.14);
    color: var(--df-danger);
}

.sa-clear-btn {
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    color: var(--df-text-muted);
    width: var(--sa-control-h);
    height: var(--sa-control-h);
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sa-clear-btn:hover {
    border-color: var(--df-danger);
    color: var(--df-danger);
    background: var(--df-danger-subtle);
}

.sa-clear-btn > .bi {
    display: block;
    line-height: 1;
    font-size: 0.875rem;
}

/* ══════════ Calendar wrapper ══════════ */

.sa-cal-wrap {
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: var(--sa-radius);
    padding: 1.125rem 1.125rem 1rem;
    box-shadow: var(--sa-shadow);
    animation: sa-slide-up 0.2s ease;
}

/* FC toolbar — title يمين، الأسهم <> أقصى الشمال */
.sa-cal-wrap .fc .fc-toolbar {
    margin-bottom: 1rem !important;
    gap: 0.5rem;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

.sa-cal-wrap .fc .fc-toolbar-chunk:first-child {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.sa-cal-wrap .fc .fc-toolbar-chunk:last-child {
    flex-shrink: 0;
    margin-inline-end: auto;
    margin-inline-start: 0;
}

.sa-cal-wrap .fc .fc-toolbar-title {
    font-size: 1rem !important;
    font-weight: 800;
    color: var(--df-text);
    letter-spacing: -0.02em;
}

.sa-cal-wrap .fc .fc-today-button {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    padding: 0.3125rem 0.75rem !important;
    border-radius: 999px !important;
    background: var(--df-primary-subtle) !important;
    border-color: transparent !important;
    color: var(--df-primary-dark) !important;
}

.sa-cal-wrap .fc .fc-today-button:hover:not(:disabled) {
    background: var(--df-primary) !important;
    color: #fff !important;
}

.sa-cal-wrap .fc .fc-button {
    border-radius: 8px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: 1px solid var(--df-border-subtle) !important;
    background: var(--df-surface) !important;
    color: var(--df-text-muted) !important;
    box-shadow: none !important;
    transition: all 0.18s !important;
}

.sa-cal-wrap .fc .fc-button:hover:not(:disabled) {
    background: var(--df-primary) !important;
    border-color: var(--df-primary) !important;
    color: #fff !important;
}

.sa-cal-wrap .fc .fc-button-active {
    background: var(--df-primary) !important;
    border-color: var(--df-primary) !important;
    color: #fff !important;
}

.sa-cal-wrap .fc .fc-toolbar-chunk:last-child .fc-button-group {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(180deg, var(--df-surface), var(--df-bg-subtle));
    border: 1px solid var(--df-border-subtle);
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .sa-cal-wrap .fc .fc-toolbar-chunk:last-child .fc-button-group {
    background: var(--df-bg-subtle);
    box-shadow: none;
}

.sa-cal-wrap .fc .fc-prev-button,
.sa-cal-wrap .fc .fc-next-button {
    width: 2.375rem;
    height: 2.375rem;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent !important;
    border-radius: 9px !important;
    color: var(--df-text-muted) !important;
    box-shadow: none !important;
    transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s !important;
}

.sa-cal-wrap .fc .fc-prev-button:hover:not(:disabled),
.sa-cal-wrap .fc .fc-next-button:hover:not(:disabled) {
    background: var(--df-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28) !important;
    border: none !important;
    transform: translateY(-1px);
}

.sa-cal-wrap .fc .fc-prev-button:active:not(:disabled),
.sa-cal-wrap .fc .fc-next-button:active:not(:disabled) {
    transform: translateY(0);
}

.sa-cal-wrap .fc .fc-prev-button {
    border-inline-end: 1px solid var(--df-border-subtle) !important;
}

[dir="rtl"] .sa-cal-wrap .fc .fc-prev-button {
    border-inline-end: none !important;
    border-inline-start: 1px solid var(--df-border-subtle) !important;
}

.sa-cal-wrap .fc .fc-prev-button,
.sa-cal-wrap .fc .fc-next-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sa-cal-wrap .fc .fc-prev-button .fc-icon,
.sa-cal-wrap .fc .fc-next-button .fc-icon {
    display: none !important;
}

.sa-cal-wrap .fc .fc-prev-button::before,
.sa-cal-wrap .fc .fc-next-button::before {
    font-family: 'bootstrap-icons';
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    speak: never;
    -webkit-font-smoothing: antialiased;
}

.sa-cal-wrap .fc .fc-prev-button::before { content: '\F284'; }
.sa-cal-wrap .fc .fc-next-button::before { content: '\F285'; }

[dir="rtl"] .sa-cal-wrap .fc .fc-prev-button::before { content: '\F285'; }
[dir="rtl"] .sa-cal-wrap .fc .fc-next-button::before { content: '\F284'; }

.sa-cal-wrap .fc .fc-button-group {
    flex-direction: row !important;
    gap: 0;
}

/* Day header hide in day view */
.sa-cal-wrap .fc-timeGridDay-view .fc-col-header { display: none; }

/* Column headers */
.sa-cal-wrap .fc .fc-col-header-cell {
    background: transparent;
    border: none;
    padding: 0.5rem 0 0.625rem;
}

.sa-cal-wrap .fc .fc-col-header-cell-cushion {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--df-text-muted);
    text-transform: capitalize;
}

.sa-cal-wrap .fc .fc-day-today .fc-col-header-cell-cushion {
    color: var(--df-primary);
    font-weight: 700;
}

/* Time grid */
.sa-cal-wrap .fc .fc-timegrid-slot {
    height: 4.5rem;
    border-color: var(--df-border-subtle);
}

.sa-cal-wrap .fc .fc-timegrid-slot-minor {
    border-style: dotted;
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sa-cal-wrap .fc .fc-timegrid-slot-minor { border-color: rgba(255, 255, 255, 0.04); }

.sa-cal-wrap .fc .fc-timegrid-slot-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--df-text-subtle);
}

.sa-cal-wrap .fc .fc-timegrid-axis { border: none; }

.sa-cal-wrap .fc .fc-timegrid-col.fc-day-today {
    background: rgba(14, 165, 233, 0.012);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-now-indicator-line,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-now-indicator-line,
.sa-cal-wrap.is-week-view .fc .fc-timegrid-now-indicator-arrow,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-now-indicator-arrow {
    display: none !important;
}

.sa-cal-wrap .fc .fc-timegrid-now-indicator-line {
    border-color: var(--df-danger);
    border-width: 2px;
}

.sa-cal-wrap .fc .fc-timegrid-now-indicator-arrow {
    border-color: var(--df-danger);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
}

.sa-cal-wrap .fc-event {
    cursor: pointer;
    box-shadow: none !important;
}

.sa-cal-wrap .fc-event:hover {
    transform: none;
}
.sa-cal-wrap .fc-event.sa-ev,
.sa-cal-wrap .fc-timegrid-event.sa-ev,
.sa-cal-wrap .fc-daygrid-event.sa-ev {
    background: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 11%, #ffffff) !important;
    border: 1px solid color-mix(in srgb, var(--ev-accent, var(--df-primary)) 24%, var(--df-border-subtle)) !important;
    border-inline-start: 3px solid var(--ev-accent, var(--df-primary)) !important;
    color: var(--df-text) !important;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--ev-accent, var(--df-primary)) 6%, transparent) !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

[data-theme="dark"] .sa-cal-wrap .fc-event.sa-ev,
[data-theme="dark"] .sa-cal-wrap .fc-timegrid-event.sa-ev {
    background: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 18%, var(--df-surface)) !important;
    border-color: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 28%, var(--df-border-subtle)) !important;
}

.sa-cal-wrap .fc-event.sa-ev:hover,
.sa-cal-wrap .fc-timegrid-event.sa-ev:hover,
.sa-cal-wrap .fc-daygrid-event.sa-ev:hover {
    background: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 16%, #ffffff) !important;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ev-accent, var(--df-primary)) 10%, transparent) !important;
    transform: none;
    z-index: 5 !important;
}

[data-theme="dark"] .sa-cal-wrap .fc-event.sa-ev:hover,
[data-theme="dark"] .sa-cal-wrap .fc-timegrid-event.sa-ev:hover {
    background: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 24%, var(--df-surface)) !important;
}

.sa-cal-wrap .fc-timegrid-event.sa-ev .fc-event-main,
.sa-cal-wrap .fc-daygrid-event.sa-ev .fc-event-main {
    padding: 0.1875rem 0.375rem;
    display: flex;
    align-items: center;
    min-height: 0;
}

.sa-ev-block__name,
.sa-ev-line__name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--ev-accent, var(--df-primary)) 28%, var(--df-text));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sa-ev-line__name { font-size: 0.625rem; }

/* Month — dots only */
.sa-ev-mark {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ev-accent, var(--df-primary));
    margin: 1px auto;
    opacity: 0.85;
}

.sa-cal-wrap .fc-daygrid-event.sa-ev {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 1px 0;
}

.sa-cal-wrap .fc-daygrid-event.sa-ev .fc-event-main {
    padding: 0;
    justify-content: center;
}

.sa-cal-wrap.is-month-view {
    padding: 1rem;
    background: linear-gradient(180deg, var(--df-surface) 0%, rgba(238, 242, 247, 0.35) 100%);
}

[data-theme="dark"] .sa-cal-wrap.is-month-view {
    background: linear-gradient(180deg, var(--df-surface) 0%, rgba(17, 24, 39, 0.5) 100%);
}

/* Month toolbar — compact header strip */
.sa-cal-wrap.is-month-view .fc .fc-toolbar {
    margin-bottom: 0.875rem !important;
    padding: 0.5rem 0.625rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: 12px;
}

.sa-cal-wrap.is-month-view .fc .fc-toolbar-title {
    font-size: 1.0625rem !important;
    font-weight: 800 !important;
    color: var(--df-text);
    letter-spacing: -0.02em;
}

.sa-cal-wrap.is-month-view .fc .fc-today-button {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    padding: 0.375rem 0.875rem !important;
    border-radius: 999px !important;
    background: var(--df-surface) !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
    color: var(--df-primary) !important;
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.08) !important;
}

.sa-cal-wrap.is-month-view .fc .fc-today-button:hover:not(:disabled) {
    background: var(--df-primary) !important;
    border-color: var(--df-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28) !important;
}

.sa-cal-wrap.is-month-view .fc .fc-toolbar-chunk:last-child .fc-button-group {
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: 10px;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* Month view — modern day grid */
.sa-cal-wrap.is-month-view .fc .fc-scrollgrid {
    border: none !important;
    background: transparent;
}

.sa-cal-wrap.is-month-view .fc .fc-scrollgrid td,
.sa-cal-wrap.is-month-view .fc .fc-scrollgrid th {
    border: none !important;
}

.sa-cal-wrap.is-month-view .fc .fc-col-header {
    margin-bottom: 0.5rem;
}

.sa-cal-wrap.is-month-view .fc .fc-col-header-cell {
    padding: 0 3px 0.375rem;
    background: transparent;
}

.sa-cal-wrap.is-month-view .fc .fc-col-header-cell-cushion {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--df-text-muted);
    letter-spacing: 0.02em;
    padding: 0.4375rem 0.375rem;
    text-align: center;
    border: none !important;
    text-decoration: none !important;
    border-radius: 10px;
    background: var(--df-bg-subtle);
}

.sa-cal-wrap.is-month-view .fc .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion {
    color: var(--df-primary);
    background: rgba(14, 165, 233, 0.12);
    border: none;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-body {
    padding-top: 0.125rem;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day {
    min-height: 5.5rem;
    padding: 3px;
    cursor: pointer;
    background: transparent !important;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-frame {
    display: flex;
    flex-direction: column;
    min-height: 5.25rem;
    height: 100%;
    border-radius: 12px;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
    overflow: hidden;
    position: relative;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-frame.sa-day-load--low {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.04), var(--df-surface));
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-frame.sa-day-load--mid {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.07), var(--df-surface));
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-frame.sa-day-load--high {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.1), var(--df-surface));
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
    border-color: rgba(14, 165, 233, 0.35);
    background: var(--df-surface);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

.sa-cal-wrap.is-month-view .fc .fc-day-other .fc-daygrid-day-frame {
    background: rgba(148, 163, 184, 0.06);
    border-color: transparent;
    box-shadow: none;
    opacity: 0.55;
}

.sa-cal-wrap.is-month-view .fc .fc-day-other:hover .fc-daygrid-day-frame {
    opacity: 0.72;
    transform: none;
    box-shadow: none;
    border-color: var(--df-border-subtle);
}

.sa-cal-wrap.is-month-view .fc .fc-day-today .fc-daygrid-day-frame {
    border-color: rgba(14, 165, 233, 0.3);
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.1);
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-top {
    display: flex;
    justify-content: flex-start;
    padding: 0.4375rem 0.5rem 0;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day-number {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0;
    color: var(--df-text-muted);
    line-height: 1;
    border: none !important;
    text-decoration: none !important;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.06);
}

.sa-cal-wrap.is-month-view .fc .fc-day-other .fc-daygrid-day-number {
    opacity: 0.5;
    background: rgba(148, 163, 184, 0.12);
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: var(--df-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.35);
}

.sa-cal-wrap.is-month-view .fc-daygrid-day-events {
    display: none !important;
}

.sa-month-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex: 1;
    padding: 0.25rem 0.375rem 0.5625rem;
    pointer-events: none;
}

.sa-month-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.04);
    line-height: 1.1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sa-cal-wrap.is-month-view .fc .fc-daygrid-day:hover .sa-month-ring:not(.sa-month-ring--empty) {
    transform: scale(1.05);
}

.sa-month-ring strong {
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--df-text-muted);
}

.sa-month-ring small {
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--df-text-subtle);
    margin-top: 1px;
}

.sa-month-ring--empty {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--df-border-subtle);
    opacity: 0.65;
}

.sa-month-ring--low {
    background: rgba(14, 165, 233, 0.12);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.18);
}

.sa-month-ring--low strong { color: var(--df-primary-dark); }

.sa-month-ring--mid {
    background: rgba(14, 165, 233, 0.18);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.28);
}

.sa-month-ring--mid strong { color: var(--df-primary-dark); }

.sa-month-ring--high {
    background: var(--df-primary);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.38);
}

.sa-month-ring--high strong,
.sa-month-ring--high small { color: #fff; }

/* Week / day time-grid view */
.sa-cal-wrap.is-week-view,
.sa-cal-wrap.is-day-view {
    --sa-slot-h: 4.5rem;
    --sa-grid-line-color: rgba(100, 116, 139, 0.35);
    --sa-grid-hour-line: repeating-linear-gradient(
        to right,
        var(--sa-grid-line-color) 0,
        var(--sa-grid-line-color) 5px,
        transparent 5px,
        transparent 9px
    );
    --sa-grid-line-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='1' x2='18' y2='1' stroke='rgba(100,116,139,0.35)' stroke-width='1' stroke-dasharray='5 4'/%3E%3C/svg%3E");
    padding: 1rem;
    background: linear-gradient(180deg, var(--df-surface) 0%, rgba(238, 242, 247, 0.35) 100%);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view,
[data-theme="dark"] .sa-cal-wrap.is-day-view {
    --sa-grid-line-color: rgba(148, 163, 184, 0.3);
    --sa-grid-hour-line: repeating-linear-gradient(
        to right,
        var(--sa-grid-line-color) 0,
        var(--sa-grid-line-color) 5px,
        transparent 5px,
        transparent 9px
    );
    --sa-grid-line-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='1' x2='18' y2='1' stroke='rgba(148,163,184,0.3)' stroke-width='1' stroke-dasharray='5 4'/%3E%3C/svg%3E");
    background: linear-gradient(180deg, var(--df-surface) 0%, rgba(17, 24, 39, 0.5) 100%);
}

.sa-cal-wrap.is-week-view .fc .fc-toolbar,
.sa-cal-wrap.is-day-view .fc .fc-toolbar {
    margin-bottom: 0.875rem !important;
    padding: 0.5rem 0.625rem;
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    border-radius: 12px;
}

.sa-cal-wrap.is-week-view .fc .fc-toolbar-title,
.sa-cal-wrap.is-day-view .fc .fc-toolbar-title {
    font-size: 1.0625rem !important;
    font-weight: 800 !important;
}

.sa-cal-wrap.is-week-view .fc .fc-scrollgrid,
.sa-cal-wrap.is-day-view .fc .fc-scrollgrid {
    border: none !important;
    background: transparent;
}

.sa-cal-wrap.is-week-view .fc .fc-scrollgrid td,
.sa-cal-wrap.is-week-view .fc .fc-scrollgrid th,
.sa-cal-wrap.is-day-view .fc .fc-scrollgrid td,
.sa-cal-wrap.is-day-view .fc .fc-scrollgrid th {
    border: none !important;
}

.sa-cal-wrap.is-week-view .fc .fc-col-header,
.sa-cal-wrap.is-day-view .fc .fc-col-header {
    margin-bottom: 0.375rem;
}

.sa-cal-wrap.is-week-view .fc .fc-col-header-cell,
.sa-cal-wrap.is-day-view .fc .fc-col-header-cell {
    padding: 0 4px 0.5rem;
    background: transparent;
    border: none !important;
}

.sa-cal-wrap.is-week-view .fc .fc-col-header-cell-cushion,
.sa-cal-wrap.is-day-view .fc .fc-col-header-cell-cushion {
    padding: 0 !important;
    border: none !important;
    text-decoration: none !important;
    color: inherit !important;
    width: 100%;
}

.sa-week-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.5rem 0.375rem;
    border-radius: 12px;
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sa-week-head.is-today {
    background: rgba(14, 165, 233, 0.03);
    border-color: rgba(14, 165, 233, 0.24);
    box-shadow: 0 1px 3px rgba(14, 165, 233, 0.04);
}

.sa-week-head__name {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--df-text-muted);
    line-height: 1.2;
    text-decoration: none;
}

.sa-week-head.is-today .sa-week-head__name {
    color: var(--df-primary);
}

.sa-week-head__num {
    min-width: 2.875rem;
    height: 1.75rem;
    padding: 0 0.4375rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: rgba(15, 23, 42, 0.06);
    color: var(--df-text);
    border: none;
    line-height: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.sa-week-head.is-today .sa-week-head__num {
    background: var(--df-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.35);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-cols {
    padding-top: 0.125rem;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col {
    border: none !important;
    padding: 0 4px;
    background: transparent !important;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col-frame,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col-frame {
    position: relative;
    background-color: #ffffff;
    border: 1px solid var(--df-border-subtle);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col-frame::after,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background-image: var(--sa-grid-line-img);
    background-repeat: repeat;
    background-size: 18px var(--sa-slot-h);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-col-frame,
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-col-frame {
    background-color: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col.fc-day-today .fc-timegrid-col-frame,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col.fc-day-today .fc-timegrid-col-frame {
    border-color: rgba(14, 165, 233, 0.28);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 3px rgba(14, 165, 233, 0.04);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-col.fc-day-today .fc-timegrid-col-frame,
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-col.fc-day-today .fc-timegrid-col-frame {
    background-color: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col-bg,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col-bg {
    background: transparent !important;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col.fc-day-today,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col.fc-day-today {
    background: transparent !important;
    border-radius: 0;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-col-events,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-col-events {
    position: relative;
    z-index: 2;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot {
    height: var(--sa-slot-h);
    border: none !important;
    border-top: none !important;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot:not(.fc-timegrid-slot-minor) .fc-timegrid-slot-lane,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot:not(.fc-timegrid-slot-minor) .fc-timegrid-slot-lane {
    border-top: none !important;
    background-image: none;
}

.fc-direction-rtl .fc-timegrid-slot-label-frame {
    text-align: center;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-label:not(.fc-timegrid-slot-minor),
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-label:not(.fc-timegrid-slot-minor) {
    vertical-align: middle;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top center;
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-label:not(.fc-timegrid-slot-minor),
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-label:not(.fc-timegrid-slot-minor) {
    background: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot.fc-timegrid-slot-minor,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot.fc-timegrid-slot-minor {
    border-top: none !important;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-minor .fc-timegrid-slot-lane,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-minor .fc-timegrid-slot-lane {
    border-top: none !important;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-label.fc-timegrid-slot-minor,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-label.fc-timegrid-slot-minor {
    border-top: none !important;
    background-color: rgba(244, 247, 251, 0.5);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-label.fc-timegrid-slot-minor,
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-label.fc-timegrid-slot-minor {
    background-color: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-axis .fc-timegrid-slot-minor .fc-timegrid-slot-label,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-axis .fc-timegrid-slot-minor .fc-timegrid-slot-label {
    border-top: none !important;
    background-color: rgba(244, 247, 251, 0.5);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-axis .fc-timegrid-slot-minor .fc-timegrid-slot-label,
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-axis .fc-timegrid-slot-minor .fc-timegrid-slot-label {
    background-color: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-divider,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-divider {
    border-color: var(--df-border-subtle);
    padding: 0;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-slot-label-cushion,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-slot-label-cushion {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--df-text-subtle);
    padding-top: 0.375rem;
}

.sa-cal-wrap.is-week-view .fc .fc-timegrid-axis,
.sa-cal-wrap.is-day-view .fc .fc-timegrid-axis {
    border: none !important;
    border-inline-end: 1px solid var(--df-border-subtle) !important;
    background: rgba(244, 247, 251, 0.5);
}

[data-theme="dark"] .sa-cal-wrap.is-week-view .fc .fc-timegrid-axis,
[data-theme="dark"] .sa-cal-wrap.is-day-view .fc .fc-timegrid-axis {
    background: var(--df-surface);
}

.sa-cal-wrap.is-week-view .fc-timegrid-event.sa-ev,
.sa-cal-wrap.is-day-view .fc-timegrid-event.sa-ev {
    border: 1px solid color-mix(in srgb, var(--ev-accent, var(--df-primary)) 22%, var(--df-border-subtle)) !important;
    border-inline-start: 3px solid var(--ev-accent, var(--df-primary)) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 4px color-mix(in srgb, var(--ev-accent, var(--df-primary)) 8%, transparent) !important;
}

.sa-cal-wrap.is-week-view .fc-timegrid-event.sa-ev .fc-event-main,
.sa-cal-wrap.is-day-view .fc-timegrid-event.sa-ev .fc-event-main {
    padding: 0.25rem 0.4375rem;
}

.sa-month-cell__dots {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
}

.sa-month-cell__dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    font-style: normal;
}

.sa-month-cell__dot--warn { background: var(--df-warning); }
.sa-month-cell__dot--ok { background: var(--df-success); }
.sa-month-cell__dot--muted { background: var(--df-text-subtle); opacity: 0.5; }

/* Day grid base (week/other views — not month cards) */
.sa-cal-wrap:not(.is-month-view) .fc .fc-daygrid-day {
    min-height: 5rem;
    transition: background 0.15s;
    cursor: pointer;
}

.sa-cal-wrap:not(.is-month-view) .fc .fc-daygrid-day:hover {
    background: rgba(14, 165, 233, 0.04);
}

.sa-cal-wrap:not(.is-month-view) .fc .fc-daygrid-day-number {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.5rem;
    color: var(--df-text-muted);
}

.sa-cal-wrap:not(.is-month-view) .fc .fc-day-today {
    background: rgba(14, 165, 233, 0.04) !important;
}

.sa-cal-wrap:not(.is-month-view) .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: var(--df-primary);
    color: #fff;
    border-radius: 8px;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem;
    font-size: 0.6875rem;
}

.sa-cal-wrap .fc .fc-daygrid-event {
    margin: 1px 0;
    font-size: 0;
}

.sa-cal-wrap .fc .fc-more-link,
.sa-cal-wrap .fc .fc-timegrid-more-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 1.5rem;
    padding: 0.125rem 0.5rem !important;
    margin: 2px !important;
    border-radius: 8px !important;
    background: var(--df-bg-subtle) !important;
    border: 1px dashed color-mix(in srgb, var(--df-primary) 25%, var(--df-border-subtle)) !important;
    color: var(--df-text-muted) !important;
    font-size: 0.625rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sa-cal-wrap .fc .fc-more-link:hover,
.sa-cal-wrap .fc .fc-timegrid-more-link:hover {
    background: var(--df-primary-subtle) !important;
    border-color: var(--df-primary) !important;
    border-style: solid !important;
    color: var(--df-primary-dark) !important;
}

.sa-more-badge {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Popover for overflow events */
.sa-cal-wrap .fc .fc-popover {
    border: 1px solid var(--df-border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    min-width: 160px;
}

.sa-cal-wrap .fc .fc-popover-header {
    background: var(--df-bg-subtle);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--df-text-muted);
}

.sa-cal-wrap .fc .fc-popover-body {
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sa-cal-wrap .fc .fc-popover-body .fc-event {
    border-radius: 8px !important;
    margin: 0 !important;
}

/* Grid / scroll */
.sa-cal-wrap .fc .fc-scrollgrid {
    border-color: var(--df-border-subtle);
    border-radius: 12px;
    overflow: hidden;
}

.sa-cal-wrap .fc .fc-scrollgrid td:last-of-type { border-inline-end: none; }

/* Week view events in time grid */
.sa-cal-wrap.is-week-view .fc-timegrid-event .fc-event-main { padding: 0.125rem 0.25rem; }

@media (max-width: 575px) {
    .sa-cal-wrap { padding: 0.75rem 0.5rem 0.5rem; border-radius: 12px; }
    .sa-cal-wrap .fc .fc-toolbar { flex-direction: column; align-items: stretch; gap: 0.375rem; }
    .sa-cal-wrap .fc .fc-toolbar-title { font-size: 0.9375rem !important; text-align: center; }
    .sa-cal-wrap.is-week-view,
    .sa-cal-wrap.is-day-view { --sa-slot-h: 3.75rem; }
    .sa-cal-wrap .fc .fc-timegrid-slot { height: var(--sa-slot-h, 3.75rem); }
}

/* ══════════ Day detail ══════════ */

.sa-day-screen { animation: sa-slide-up 0.2s ease; }

.sa-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    border: none;
    background: transparent;
    color: var(--df-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.18s, gap 0.18s;
}

.sa-back:hover { color: var(--df-primary-dark); gap: 0.5rem; }

.sa-day {
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sa-day.is-today .sa-day__head {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, transparent 60%);
}

.sa-day__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--df-border-subtle);
}

.sa-day__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.sa-day__nav-btn {
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--df-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-size: 0.875rem;
}

.sa-day__nav-btn:hover {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.sa-day__today-btn {
    border: 1px solid var(--df-border-subtle);
    background: var(--df-bg-subtle);
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.375rem 0.625rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--df-text-muted);
    transition: all 0.18s;
}

.sa-day__today-btn:hover, .sa-day__today-btn.is-active {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

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

.sa-day__badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--df-primary);
    color: #fff;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.sa-day__title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.sa-day__stats {
    display: flex;
    gap: 0.375rem;
    margin-inline-start: auto;
    flex-shrink: 0;
}

.sa-day__stat {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 8px;
    background: var(--df-bg-subtle);
    color: var(--df-text-muted);
    white-space: nowrap;
}

.sa-day__stat strong { font-weight: 800; }
.sa-day__stat--warn { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.sa-day__stat--ok { background: rgba(22, 163, 74, 0.1); color: var(--df-success); }

/* Day list */
.sa-day__list {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sa-day__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    min-height: 280px;
}

.sa-day__empty-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.04) 100%);
    border: 1px solid rgba(14, 165, 233, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--df-primary);
    margin-bottom: 1rem;
}

.sa-day__empty-title {
    margin: 0 0 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--df-text);
}

.sa-day__empty-desc {
    margin: 0 0 1.25rem;
    max-width: 18rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--df-text-muted);
}

.sa-day__empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 9.5rem;
    padding: 0.6875rem 1.375rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8 0%, var(--df-primary) 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sa-day__empty-btn i {
    font-size: 0.9375rem;
    line-height: 1;
}

.sa-day__empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.34);
    filter: brightness(1.03);
}

.sa-day__empty-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.22);
}

[data-theme="dark"] .sa-day__empty-icon {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-color: rgba(14, 165, 233, 0.22);
}

/* Appointment card */
.sa-appt {
    display: grid;
    grid-template-columns: 4px 52px 36px 1fr auto;
    gap: 0 0.625rem;
    align-items: center;
    padding: 0.75rem 0.875rem 0.75rem 0;
    border-radius: 12px;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    overflow: hidden;
}

.sa-appt:hover {
    background: rgba(14, 165, 233, 0.025);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.sa-appt__accent {
    width: 4px;
    align-self: stretch;
    border-radius: 0 4px 4px 0;
    background: var(--accent, var(--df-primary));
}

[dir="rtl"] .sa-appt__accent {
    border-radius: 4px 0 0 4px;
}

.sa-appt__time {
    text-align: center;
    line-height: 1.15;
}

.sa-appt__hour { display: block; font-size: 0.875rem; font-weight: 700; }
.sa-appt__ampm { display: block; font-size: 0.5625rem; font-weight: 600; color: var(--df-text-subtle); }

.sa-appt__avatar .patient-avatar {
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--df-surface);
}

.sa-appt__body { min-width: 0; }

.sa-appt__row1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.1875rem;
}

.sa-appt__row1 strong { font-size: 0.875rem; }

.sa-appt__row2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    color: var(--df-text-muted);
}

.sa-appt__row2 i { opacity: 0.55; margin-inline-end: 2px; }

.sa-appt__notes {
    font-size: 0.6875rem;
    color: var(--df-text-subtle);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px dashed var(--df-border-subtle);
    line-height: 1.4;
}

.sa-appt__actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* ══════════ Range view ══════════ */

.sa-range { animation: sa-slide-up 0.2s ease; }

.sa-range__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1rem 1.125rem;
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: 14px;
    margin-bottom: 0.875rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sa-range__stat {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.sa-range__stat strong { font-size: 1.375rem; font-weight: 800; color: var(--df-primary); letter-spacing: -0.01em; }

.sa-range__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.625rem;
}

.sa-range-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.875rem 0.5rem 0.75rem;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    border-radius: 12px;
    text-align: center;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.sa-range-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); border-color: var(--df-primary); }

.sa-range-card.is-today {
    border-color: var(--df-primary);
    background: rgba(14, 165, 233, 0.04);
}

.sa-range-card__day { font-size: 0.625rem; font-weight: 600; color: var(--df-text-muted); }
.sa-range-card__num { font-size: 1.25rem; font-weight: 800; color: var(--df-text); }
.sa-range-card__count { font-size: 0.75rem; font-weight: 700; color: var(--df-primary); }

.sa-range-card__today {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--df-primary);
    color: #fff;
}

.sa-range-empty {
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    border-radius: 14px;
    padding: 2rem;
}

/* ══════════ Modal tweaks ══════════ */

.df-appt-modal-dialog {
    max-width: 420px;
}

.df-appt-modal .modal-header,
.df-appt-modal .modal-body,
.df-appt-modal .modal-footer {
    padding-inline: 1rem;
}

.df-appt-modal .modal-header {
    padding-top: 0.875rem;
    padding-bottom: 0.25rem;
}

.df-appt-modal .modal-body {
    padding-bottom: 0.75rem;
}

.df-appt-modal .modal-footer {
    padding-bottom: 0.875rem;
    gap: 0.375rem;
}

.df-appt-modal .modal-title {
    font-size: 1.0625rem;
}

.df-appt-modal__sub {
    font-size: 0.8125rem;
}

.df-appt-modal .form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.df-appt-modal .form-control,
.df-appt-modal .form-select {
    padding: 0.5rem 0.6875rem;
    font-size: 0.875rem;
    min-height: 2.25rem;
    border-radius: var(--df-radius-xs);
}

.df-appt-modal textarea.form-control {
    min-height: auto;
    padding: 0.5rem 0.6875rem;
}

.df-appt-modal .df-input-icon-wrap .form-select {
    padding-inline-start: 2rem;
    padding-inline-end: 1.75rem;
}

.df-appt-modal .df-input-icon-wrap .df-input-icon {
    inset-inline-start: 0.625rem;
    font-size: 0.875rem;
}

.df-appt-modal .btn {
    padding: 0.5rem 0.9375rem;
    font-size: 0.875rem;
}

.df-appt-price-hint {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    padding: 0.5625rem 0.8125rem;
    border-radius: var(--df-radius-xs);
    background: var(--df-bg-subtle);
    border: 1px solid var(--df-border-subtle);
    color: var(--df-text-muted);
}

.df-appt-price-hint--info {
    background: var(--df-primary-subtle);
    border-color: rgba(14, 165, 233, 0.25);
    color: var(--df-text);
}

.df-appt-pay-summary {
    padding: 0.5625rem 0.75rem;
    border-radius: var(--df-radius-xs);
    font-size: 0.875rem;
}

.df-appt-pay-summary__label {
    font-size: 0.75rem;
    color: var(--df-text-muted);
    margin-bottom: 0.125rem;
}

.df-appt-pay-hint {
    font-size: 0.75rem;
    color: var(--df-text-muted);
    margin-top: 0.25rem;
}

.df-appt-price-hint i { color: var(--df-primary); }

/* ══════════ Responsive ══════════ */

@media (max-width: 991px) {
    .sa-toolbar__row { flex-wrap: wrap; }
    .sa-view-switch { order: 3; width: 100%; justify-content: center; }
    .sa-day__head { flex-direction: column; align-items: flex-start; }
    .sa-day__stats { margin-inline-start: 0; }
    .sa-appt { grid-template-columns: 4px 48px 1fr; }
    .sa-appt__avatar { display: none; }
    .sa-appt__actions { grid-column: 2 / -1; justify-content: flex-end; padding-top: 0.375rem; }
}

@media (max-width: 575px) {
    .sa-header { flex-direction: column; align-items: flex-start; }
    .sa-header__add { width: 100%; justify-content: center; }
    .sa-toolbar__row { flex-direction: column; align-items: stretch; }
    .sa-toolbar__filters { flex-direction: column; align-items: stretch; }
    .sa-filter-group { flex-direction: column; align-items: stretch; width: 100%; }
    .sa-filter-group__sep { width: 100%; height: 1px; min-height: 0; }
    .sa-toolbar__select { max-width: none; width: 100%; }
    .sa-date-range { flex-direction: column; align-items: stretch; width: 100%; }
    .sa-date-field__input { width: 100%; }
    .sa-appt { grid-template-columns: 4px 48px 1fr; }
    .sa-appt__avatar { display: none; }
    .sa-appt__actions { grid-column: 2 / -1; justify-content: flex-end; }
    .sa-range__grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .sa-range__head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ═══ Payments — modern filter toolbar ═══ */
.df-pay-toolbar {
    margin-bottom: 1rem;
    padding: 1rem 1.125rem;
    --df-pay-control-h: 2.625rem;
    border-radius: var(--df-radius);
    border: 1px solid var(--df-border-subtle);
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(14, 165, 233, 0) 42%),
        linear-gradient(180deg, var(--df-surface) 0%, var(--df-bg-subtle) 100%);
    box-shadow:
        var(--df-shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition:
        border-color var(--df-transition),
        box-shadow var(--df-transition);
}

[data-theme="dark"] .df-pay-toolbar {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0) 42%),
        linear-gradient(180deg, var(--df-surface) 0%, rgba(15, 23, 42, 0.35) 100%);
    box-shadow: var(--df-shadow-sm);
}

.df-pay-toolbar.has-filters {
    border-color: rgba(14, 165, 233, 0.28);
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.07),
        var(--df-shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.df-pay-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.df-pay-toolbar__row--main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.df-pay-toolbar__row--main::-webkit-scrollbar {
    display: none;
}

.df-pay-toolbar .df-pay-date-group {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.df-pay-toolbar .df-pay-date-group.is-active .sa-date-field__input {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.04);
}

.df-pay-toolbar .sa-date-range {
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
}

.df-pay-toolbar .sa-date-range__sep {
    color: var(--df-text-subtle);
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.45;
    user-select: none;
}

.df-pay-toolbar .sa-date-field {
    align-items: center;
}

.df-pay-toolbar .sa-date-field__input {
    width: 8.5rem;
    height: var(--df-pay-control-h);
    font-size: 0.8125rem;
    padding-inline: 0.75rem 2.375rem;
    border-radius: 999px;
}

.df-pay-toolbar .sa-date-field__input:hover {
    border-color: rgba(14, 165, 233, 0.25);
}

.df-pay-toolbar .sa-date-field__input:focus {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.df-pay-toolbar .sa-date-field__trigger {
    width: 1.75rem;
    height: 1.75rem;
    inset-inline-end: 0.375rem;
    border-radius: 999px;
}

.df-pay-toolbar .sa-date-field__trigger i {
    font-size: 0.8125rem;
}

.df-pay-toolbar__search {
    position: relative;
    flex: 0 0 11.5rem;
    min-width: 9rem;
    max-width: 11.5rem;
}

.df-pay-toolbar__search > .bi {
    position: absolute;
    inset-inline-start: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--df-text-subtle);
    font-size: 0.9375rem;
    pointer-events: none;
    transition: color var(--df-transition);
}

.df-pay-toolbar__search-input {
    width: 100%;
    height: var(--df-pay-control-h);
    padding-inline: 2.25rem 0.75rem;
    border: 1px solid var(--df-border-subtle);
    border-radius: 999px;
    background: var(--df-surface);
    font-size: 0.875rem;
    color: var(--df-text);
    transition:
        border-color var(--df-transition),
        box-shadow var(--df-transition),
        background var(--df-transition);
}

.df-pay-toolbar__search-input::placeholder {
    color: var(--df-text-subtle);
}

.df-pay-toolbar__search-input:hover {
    border-color: rgba(14, 165, 233, 0.25);
}

.df-pay-toolbar__search-input:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
    background: var(--df-surface);
}

.df-pay-toolbar__search:focus-within > .bi {
    color: var(--df-primary);
}

.df-pay-toolbar__search.has-value::after {
    content: '';
    position: absolute;
    inset-inline-end: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.df-pay-toolbar__clear.is-hidden {
    display: none;
}

.df-pay-segment {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.1875rem;
    gap: 0.125rem;
    border-radius: 999px;
    border: 1px solid var(--df-border-subtle);
    background: var(--df-surface);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.df-pay-segment__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: calc(var(--df-pay-control-h) - 0.25rem);
    padding-inline: 0.75rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--df-text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background var(--df-transition),
        color var(--df-transition),
        box-shadow var(--df-transition),
        transform var(--df-transition-fast);
}

.df-pay-segment__btn i {
    font-size: 0.875rem;
    opacity: 0.75;
}

.df-pay-segment__btn:hover:not(.is-active) {
    background: var(--df-primary-subtle);
    color: var(--df-primary-dark);
    transform: translateY(-1px);
}

.df-pay-segment__btn.is-active {
    background: linear-gradient(135deg, var(--df-primary) 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.df-pay-segment__btn.is-active i {
    opacity: 1;
}

.df-pay-toolbar__clear {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    height: var(--df-pay-control-h);
    padding-inline: 0.75rem;
    border: 1px dashed rgba(239, 68, 68, 0.35);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.06);
    color: var(--df-danger);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background var(--df-transition),
        border-color var(--df-transition),
        transform var(--df-transition-fast);
}

.df-pay-toolbar__clear:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.df-pay-toolbar__summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1 1 auto;
    min-width: 0;
    margin-inline-start: auto;
    padding-inline-start: 0.5rem;
    font-size: 0.75rem;
    color: var(--df-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.df-pay-toolbar__summary strong {
    color: var(--df-primary-dark);
    font-weight: 700;
}

.df-payments-table-wrap {
    max-height: 520px;
    overflow-y: auto;
}

.df-scroll-modern {
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.55) transparent;
}

.df-scroll-modern::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.df-scroll-modern::-webkit-scrollbar-track {
    background: transparent;
    margin: 6px 0;
}

.df-scroll-modern::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.75), rgba(2, 132, 199, 0.85));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    min-height: 48px;
}

.df-scroll-modern::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--df-primary), #0284c7);
    background-clip: padding-box;
}

.df-scroll-modern::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 991px) {
    .df-pay-toolbar__row--main {
        flex-wrap: nowrap;
    }
}

@media (max-width: 575px) {
    .df-pay-toolbar {
        padding: 0.75rem;
    }

    .df-pay-toolbar__summary span {
        display: none;
    }

    .df-pay-segment__btn span {
        display: none;
    }

    .df-pay-toolbar .sa-date-field__input {
        width: 6.75rem;
    }

    .df-pay-toolbar__clear span {
        display: none;
    }
}

/* ── Services page banner ── */
.df-svc-banner {
    position: relative;
    margin-bottom: 1.25rem;
    border-radius: var(--df-radius);
    border: 1px solid rgba(14, 165, 233, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(6, 182, 212, 0.04) 48%, var(--df-surface) 100%);
    overflow: hidden;
}

.df-svc-banner__glow {
    position: absolute;
    inset: -40% auto auto -10%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.df-svc-banner__content {
    position: relative;
    padding: 1.25rem 1.5rem;
}

.df-svc-banner__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.df-svc-banner__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--df-primary), var(--df-accent));
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.28);
}

.df-svc-banner__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--df-text);
    margin: 0 0 0.375rem;
}

.df-svc-banner__desc {
    font-size: 0.875rem;
    color: var(--df-text-muted);
    margin: 0;
    line-height: 1.65;
    max-width: 52rem;
}

.df-svc-banner__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.df-svc-banner__points li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.875rem;
    border-radius: 999px;
    background: var(--df-surface);
    border: 1px solid var(--df-border-subtle);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--df-text);
    box-shadow: var(--df-shadow-sm);
}

.df-svc-banner__points li i {
    color: var(--df-primary);
    font-size: 0.9375rem;
}

[data-theme="dark"] .df-svc-banner {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(6, 182, 212, 0.06) 48%, var(--df-surface) 100%);
}

[data-theme="dark"] .df-svc-banner__points li {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 575.98px) {
    .df-svc-banner__content {
        padding: 1rem;
    }

    .df-svc-banner__points {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ── Currency amount display (RTL: number then unit) ── */
.df-money {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35em;
    direction: rtl;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.df-money__amount {
    direction: ltr;
    unicode-bidi: embed;
    font-variant-numeric: lining-nums tabular-nums;
}

.df-money__unit {
    direction: rtl;
    unicode-bidi: embed;
    font-weight: 600;
    color: inherit;
    opacity: 0.92;
}

.df-sar-sign {
    font-family: 'Tajawal', 'Noto Sans Symbols 2', system-ui, sans-serif;
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    position: relative;
    top: 0.05em;
}

.df-money:has(.df-sar-sign) {
    align-items: center;
    gap: 0.28em;
}

.df-sar-symbol-option__sample:has(.df-sar-sign) .df-sar-sign,
.df-sar-symbol-option__sample.df-sar-new-glyph .df-sar-sign {
    font-size: 1.55em;
}

.df-money--solo {
    direction: ltr;
}

html[dir="ltr"] .df-money {
    direction: ltr;
}

html[dir="ltr"] .df-money__unit {
    direction: ltr;
}

/* ── Currency settings ── */
.df-currency-pair .df-settings-field {
    margin-bottom: 0;
}

.df-currency-preview {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--df-settings-control-h);
    min-height: var(--df-settings-control-h);
    padding: 0 1rem;
    border-radius: var(--df-radius-sm);
    background: var(--df-primary-subtle);
    border: 1px solid rgba(14, 165, 233, 0.18);
    box-sizing: border-box;
}

.df-currency-preview__sample {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--df-primary);
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.df-currency-preview__hint {
    display: none;
}

.df-sar-symbol-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.df-sar-symbol-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.df-sar-symbol-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.df-sar-symbol-option__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: var(--df-radius-sm);
    border: 1.5px solid var(--df-border);
    background: var(--df-surface);
    transition: border-color var(--df-transition), box-shadow var(--df-transition);
    height: 100%;
}

.df-sar-symbol-option.is-active .df-sar-symbol-option__body,
.df-sar-symbol-option:has(input:checked) .df-sar-symbol-option__body {
    border-color: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.df-sar-symbol-option__body strong {
    font-size: 0.875rem;
    color: var(--df-text);
}

.df-sar-symbol-option__sample {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--df-primary);
}

.df-sar-new-glyph,
body.df-sar-new-symbol .stat-value,
body.df-sar-new-symbol .df-num {
    font-family: 'Tajawal', 'Noto Sans Symbols 2', system-ui, sans-serif;
}

.df-sar-symbol-panel {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--df-border-subtle);
}

@media (max-width: 575.98px) {
    .df-sar-symbol-options {
        grid-template-columns: 1fr;
    }
}
