﻿/* ===== Munasabat Dashboard ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --navy: #0F2B5B;
    --navy-dark: #0A2145;
    --navy-accent: #27477D;
    --gold: #C9A46A;
    --gold-dark: #A98345;
    --gold-light: #E3C899;
    --ivory: #F7F2EB;
    --cream: #FDFBF8;
    --beige: #E8DED0;
    --green: #198754;
    --yellow: #ffc107;
    --red: #dc3545;
    --gray: #6c757d;
    --white: #fff;
}

html {
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--ivory);
    color: #1F2430;
    overflow-y: scroll;
}

body.modal-open {
    overflow-y: scroll !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.print-backup-paper {
    background: var(--white);
    border: 1px solid var(--beige);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(15, 43, 91, 0.06);
}

.print-backup-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-bottom: 2px solid var(--navy);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.print-backup-title-block {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.print-backup-logo-frame {
    width: 78px;
    height: 78px;
    border: 1px solid var(--beige);
    border-radius: 14px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.print-backup-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.print-backup-logo-frame span {
    color: var(--gold-dark);
    font-size: 1.65rem;
    font-weight: 900;
}

.print-backup-brand {
    color: var(--gold-dark);
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.print-backup-header h2 {
    color: var(--navy-dark);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.print-backup-header p {
    color: var(--gray);
    margin: 0.35rem 0 0;
}

.print-backup-generated {
    border: 1px solid var(--beige);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-width: 220px;
    text-align: center;
}

.print-backup-generated span {
    display: block;
    color: var(--gray);
    font-size: 0.82rem;
}

.print-backup-generated strong {
    color: var(--navy-dark);
}

.print-backup-guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    background: rgba(201, 164, 106, 0.12);
    border: 1px solid var(--gold-light);
    border-radius: 10px;
    color: var(--navy-dark);
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
}

.print-backup-guide strong,
.print-backup-guide span {
    display: block;
}

.print-backup-guide strong {
    font-weight: 700;
}

.print-backup-guide span {
    color: var(--gray);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.print-backup-legend {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.print-backup-legend span {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    gap: 0.35rem;
    color: var(--navy-dark);
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.print-backup-legend i {
    width: 10px;
    height: 10px;
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    display: inline-block;
}

.print-backup-month {
    margin-top: 1.25rem;
}

.print-backup-month h3 {
    color: var(--navy);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}

.print-backup-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.print-backup-table th,
.print-backup-table td {
    border: 1px solid #d8d1c7;
    padding: 0.45rem 0.55rem;
    vertical-align: middle;
}

.print-backup-table th {
    background: var(--navy);
    color: var(--white);
    font-weight: 800;
    white-space: nowrap;
}

.print-backup-table td small {
    display: block;
    color: var(--gray);
    font-size: 0.75rem;
}

.print-row-available td {
    height: 44px;
    background: #fffdf9;
}

.print-row-booked td {
    background: #f8f5ef;
    font-weight: 700;
}

#auth-section {
    visibility: hidden;
    flex: 1 0 auto;
    padding: 0 0 2.5rem;
    background:
        radial-gradient(circle at 20% 8%, rgba(201,164,106,0.14), transparent 28%),
        linear-gradient(180deg, var(--cream), var(--ivory));
}

/* ===== Auth Form ===== */
.auth-navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(253, 251, 248, 0.94);
    border-bottom: 1px solid rgba(226, 213, 194, 0.75);
    backdrop-filter: blur(14px);
}
.auth-nav-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    text-decoration: none;
}
.auth-logo-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.auth-logo-text {
    color: var(--navy);
    font-size: 1.32rem;
    font-weight: 800;
}
.auth-nav-links {
    display: flex;
    align-items: center;
    gap: 1.05rem;
}
.auth-nav-links a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}
.auth-nav-links a:hover {
    color: var(--navy);
}
#auth-section h2 {
    font-weight: 800;
    color: var(--navy-dark);
    font-size: 1.6rem;
}
#auth-section > .container {
    width: min(calc(100vw - 32px), 520px);
    max-width: 520px;
    padding-inline: 0;
}
#auth-section > .container.mt-5 {
    margin-top: 3rem !important;
}
#auth-section .row {
    margin-inline: 0;
}
#auth-section .row > [class*="col-"] {
    padding-inline: 0;
    width: 100%;
    max-width: 100%;
}
#auth-section .nav-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--beige);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: rgba(255,255,255,0.72);
}
#auth-section .nav-tabs .nav-item { min-width: 0; }
#auth-section .nav-tabs .nav-link {
    width: 100%;
    font-weight: 700;
    color: #6F7682;
    border: none;
    padding: 0.7rem 0.7rem;
    border-radius: 10px;
    white-space: normal;
}
#auth-section .nav-tabs .nav-link.active {
    color: var(--white);
    background: var(--navy);
    border-bottom: 0;
}
#auth-section .tab-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--beige) !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 16px rgba(15, 43, 91, 0.06);
}
#auth-section .tab-pane,
#auth-section form,
#auth-section .mb-2,
#auth-section .mb-3 {
    max-width: 100%;
    min-width: 0;
}
#auth-section .form-label {
    display: inline-block;
    width: auto;
    max-width: calc(100% - 1rem);
    text-align: right;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.9rem;
}
#auth-section .form-label + .text-danger {
    display: inline-block;
    margin-inline-start: 0.2rem;
    vertical-align: top;
}
#auth-section .form-control {
    width: 100%;
    max-width: 100%;
    border: 2px solid var(--beige);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s;
}
#auth-section .form-control:focus {
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(15, 43, 91, 0.08);
}
#auth-section .btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    border-radius: 10px;
    font-weight: 700;
    padding: 0.7rem;
}
#auth-section .btn-primary:hover { background: var(--navy-dark); }
#auth-section .btn-success {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    border-radius: 10px;
    font-weight: 700;
    padding: 0.7rem;
    color: var(--navy-dark);
}
#auth-section .btn-success:hover { background: var(--gold); }
#auth-section .alert-info {
    background: rgba(201, 164, 106, 0.1);
    border-color: var(--gold-light);
    color: var(--navy-dark);
    border-radius: 10px;
}

/* ===== Sidebar ===== */
[dir="rtl"] .sidebar { right: 0; left: auto; }
[dir="rtl"] .main-content { margin-right: 250px; margin-left: 0; }

.sidebar {
    position: fixed;
    top: 0; bottom: 0;
    width: 250px;
    background: var(--navy-dark);
    color: #fff;
    padding: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
    -webkit-overflow-scrolling: touch;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.28);
    border-radius: 999px;
}

.sidebar nav {
    flex: 0 0 auto;
}

.nav-group {
    margin-bottom: 0.2rem;
}

.nav-group-toggle {
    border: 0;
    text-align: inherit;
    width: 100%;
}

.nav-group-chevron {
    font-size: 0.74rem;
    margin-inline-start: auto;
}

.nav-submenu {
    border-inline-start: 1px solid rgba(255,255,255,0.12);
    margin: 0.15rem 0.75rem 0.45rem 0;
    padding-inline-start: 0.45rem;
}

[dir="ltr"] .nav-submenu {
    margin: 0.15rem 0 0.45rem 0.75rem;
}

.nav-submenu .nav-link {
    font-size: 0.84rem;
    margin-bottom: 0.12rem;
    padding-block: 0.44rem;
}

.sidebar > .d-flex.gap-2 {
    margin-top: auto;
    padding-top: 1rem;
}

.sidebar .dropdown-menu {
    z-index: 1050;
    margin-right: 0.5rem;
}

#notif-dropdown {
    position: fixed !important;
    z-index: 1050;
    max-width: 320px;
}
.sidebar h5 {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--gold-light);
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.65);
    padding: 0.55rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.sidebar .nav-group-toggle.open {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.sidebar .btn-outline-light {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    border-radius: 10px;
}
.sidebar .btn-outline-info {
    border-color: var(--gold);
    color: var(--gold-light);
    border-radius: 10px;
}

.main-content {
    margin-left: 250px;
    padding: 2rem;
    max-width: calc(100vw - 250px);
}
.main-content h4 {
    font-weight: 800;
    color: var(--navy-dark);
}

/* ===== Cards ===== */
.card {
    border: 1px solid var(--beige);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(15, 43, 91, 0.05);
    background: var(--cream);
}
.card-title {
    font-weight: 700;
    color: var(--navy-dark);
}

/* ===== Forms ===== */
.form-label {
    font-weight: 600;
    color: var(--navy);
}
.form-control[required] + .form-label,
label:has(+ input[required]),
label:has(+ select[required]) {
    /* handled by manual * in HTML */
}
.form-control, .form-select {
    border: 2px solid var(--beige);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
}
.form-control:focus, .form-select:focus {
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(15, 43, 91, 0.08);
}
.booking-services-panel {
    font-size: 0.95rem;
}
.booking-service-choice {
    border: 1px solid var(--beige);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    background: #fff;
}
.booking-service-choice span {
    font-weight: 400;
}
.booking-service-price {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    border-radius: 10px;
    font-weight: 700;
}
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-success {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    border-radius: 10px;
    font-weight: 700;
    color: var(--navy-dark);
}
.btn-success:hover { background: var(--gold); border-color: var(--gold); }

/* ===== Calendar ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-header {
    text-align: center;
    font-weight: 700;
    padding: 0.5rem;
    background: var(--beige);
    border-radius: 8px;
    color: var(--navy);
    font-size: 0.8rem;
}
.calendar-day {
    min-height: 100px;
    padding: 6px;
    border: 2px solid var(--beige);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--cream);
}
.calendar-day:hover {
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(15, 43, 91, 0.1);
}
.calendar-day .day-num {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy-dark);
}
.calendar-day.empty { background: transparent; cursor: default; opacity: 0.3; border-color: transparent; }
.calendar-day.past { opacity: 0.45; cursor: default; background: var(--ivory); pointer-events: none; }

.slot-badge {
    display: block;
    position: relative;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 5px;
    margin-top: 2px;
    text-align: center;
    font-weight: 700;
}
.slot-meta-icon {
    position: absolute;
    top: 2px;
    inset-inline-end: 5px;
    font-size: 0.68rem;
    opacity: 0.82;
    line-height: 1;
}
.slot-available { background: #d1e7dd; color: #0f5132; }
.slot-pending { background: #fff3cd; color: #664d03; }
.slot-confirmed { background: #f8d7da; color: #842029; }
.slot-blocked { background: #e9ecef; color: var(--gray); cursor: default; }

.clickable-slot { cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; }
.clickable-slot:hover { transform: scale(1.05); box-shadow: 0 0 0 2px currentColor; }

.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 1rem; font-weight: 600; }
.legend-dot { width: 14px; height: 14px; border-radius: 4px; }
.legend-dot.green { background: #d1e7dd; border: 1px solid #0f5132; }
.legend-dot.yellow { background: #fff3cd; border: 1px solid #664d03; }
.legend-dot.red { background: #f8d7da; border: 1px solid #842029; }
.legend-dot.gray { background: #e9ecef; border: 1px solid #6c757d; }

/* ===== Tables ===== */
.table { background: var(--cream); border-radius: 12px; overflow: hidden; }
.table thead th {
    background: var(--navy-dark);
    color: var(--gold-light);
    font-weight: 700;
    border: none;
}
.table-striped > tbody > tr:nth-of-type(odd) { background: rgba(15, 43, 91, 0.02); }

/* ===== Modals ===== */
.modal-content {
    border: 1px solid var(--beige);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(15, 43, 91, 0.12);
}
.modal-header {
    border-bottom: 1px solid var(--beige);
    background: var(--cream);
    border-radius: 16px 16px 0 0;
}
.modal-title { font-weight: 800; color: var(--navy-dark); }
.modal-footer { border-top: 1px solid var(--beige); }

.alert-warning {
    background: rgba(201, 164, 106, 0.1);
    border-color: var(--gold-light);
    color: var(--gold-dark);
    border-radius: 10px;
}

/* ===== Toasts ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    pointer-events: none;
}

/* ===== Misc ===== */
.section-page { display: none; }
.section-page.active { display: block; }

.waitlist-table-card {
    overflow: hidden;
}
.waitlist-table thead th {
    background: var(--navy);
    color: var(--gold-light);
    font-weight: 800;
    white-space: nowrap;
}
.waitlist-table td {
    vertical-align: middle;
}
.waitlist-table th:nth-child(1) { width: 130px; }
.waitlist-table th:nth-child(3) { width: 130px; }
.waitlist-table th:nth-child(4) { width: 110px; }
.waitlist-table th:nth-child(5) { width: 170px; }
.waitlist-note-preview {
    color: var(--gray);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}
.waitlist-phone-link {
    direction: ltr;
    display: inline-block;
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
    text-decoration: none;
}
.waitlist-phone-link:hover {
    color: var(--navy-accent);
    text-decoration: underline;
}
.waitlist-phone-value {
    direction: ltr;
    unicode-bidi: isolate;
}
.waitlist-phone-mobile {
    display: none;
    margin-top: 0.15rem;
}
.waitlist-cell-value {
    min-width: 0;
}
.waitlist-status-select {
    min-width: 145px;
}
.waitlist-note-control {
    min-width: 220px;
}
.venue-services-table th:nth-child(1) { width: 24%; }
.venue-services-table th:nth-child(2) { width: 140px; }
.venue-services-table th:nth-child(4) { width: 90px; }
.venue-services-table th:nth-child(5) { width: 90px; }
.venue-services-table input[type="number"] {
    direction: ltr;
}
.slot-services-list {
    background: var(--cream);
    border: 1px solid var(--beige);
    border-radius: 10px;
    margin: 0.75rem 0;
    padding: 0.65rem 0.75rem;
}
.slot-services-list ul {
    margin: 0.4rem 1rem 0 0;
    padding: 0;
}
.slot-services-list li {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.waitlist-mobile-list {
    display: none;
}
.waitlist-mobile-card {
    background: #fff;
    border: 1px solid var(--beige);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 43, 91, 0.06);
    padding: 0.85rem;
}
.waitlist-mobile-primary {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}
.waitlist-mobile-label,
.waitlist-mobile-card span {
    color: var(--gray);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.12rem;
}
.waitlist-mobile-primary strong {
    color: var(--navy);
    display: block;
    font-size: 0.98rem;
}
.waitlist-mobile-phone {
    background: rgba(15, 43, 91, 0.08);
    border-radius: 999px;
    color: var(--navy);
    direction: ltr;
    flex: 0 0 auto;
    font-weight: 900;
    padding: 0.24rem 0.55rem;
    text-decoration: none;
    unicode-bidi: isolate;
}
.waitlist-mobile-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.75rem;
}
.waitlist-mobile-grid > div {
    background: var(--soft);
    border-radius: 10px;
    padding: 0.55rem;
}
.waitlist-mobile-grid strong,
.waitlist-mobile-grid small {
    display: block;
}
.waitlist-mobile-grid strong {
    color: var(--navy);
    font-weight: 900;
}
.waitlist-mobile-grid small {
    color: var(--gray);
    margin-top: 0.1rem;
}
.waitlist-mobile-note {
    border-top: 1px solid var(--beige);
    margin-top: 0.75rem;
    padding-top: 0.65rem;
}
.waitlist-mobile-note p {
    color: var(--navy);
    margin: 0;
}
.waitlist-mobile-field {
    margin-top: 0.75rem;
}

@media (max-width: 760px) {
    .waitlist-table-card {
        display: none;
    }
    .waitlist-mobile-list {
        display: grid;
        gap: 0.75rem;
        width: 100%;
    }
    .waitlist-list {
        margin-inline: -0.15rem;
    }
    .waitlist-mobile-card {
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
    }
    .waitlist-mobile-primary {
        display: grid;
        grid-template-columns: 1fr;
    }
    .waitlist-mobile-phone {
        justify-self: start;
        margin-top: 0.35rem;
        max-width: 100%;
    }
    .waitlist-mobile-grid {
        grid-template-columns: 1fr;
    }
    .waitlist-note-control {
        min-width: 0;
    }
    .waitlist-status-select {
        min-width: 0;
    }
}

/* ===== Onboarding & Empty States ===== */
.onboarding-panel {
    background: linear-gradient(135deg, #FFFFFF 0%, #FDFBF8 100%);
    border: 1px solid var(--beige);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(15, 43, 91, 0.05);
}
.onboarding-panel.complete {
    border-color: rgba(25,135,84,0.22);
}
.onboarding-panel.collapsed {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.onboarding-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.onboarding-kicker {
    display: inline-flex;
    color: var(--gold-dark);
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}
.onboarding-head h5 {
    margin: 0;
    color: var(--navy-dark);
    font-weight: 800;
    font-size: 1.05rem;
}
.onboarding-head p {
    margin: 0.2rem 0 0;
    color: #6F7682;
    font-size: 0.84rem;
}
.onboarding-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--beige);
    border-radius: 999px;
    background: #fff;
    color: #6F7682;
    padding: 0.42rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 800;
}
.onboarding-toggle:hover {
    border-color: var(--gold-light);
    color: var(--navy-dark);
}
.onboarding-collapsed-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--beige);
    border-radius: 12px;
    background: rgba(255,255,255,0.82);
    color: var(--navy-dark);
    padding: 0.7rem 0.9rem;
    text-align: right;
    box-shadow: 0 6px 18px rgba(15,43,91,0.04);
}
.onboarding-collapsed-card strong,
.onboarding-collapsed-card small {
    display: block;
}
.onboarding-collapsed-card strong {
    font-size: 0.9rem;
    font-weight: 800;
}
.onboarding-collapsed-card small {
    color: #6F7682;
    font-size: 0.75rem;
    margin-top: 0.1rem;
}
.onboarding-collapsed-card em {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gold-dark);
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 800;
}
.onboarding-meter {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 43, 91, 0.14);
}
.onboarding-meter strong {
    font-size: 1.15rem;
    line-height: 1;
}
.onboarding-meter span {
    color: rgba(255,255,255,0.72);
    font-size: 0.72rem;
    margin-top: -0.7rem;
}
.onboarding-progress {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15,43,91,0.08);
    margin: 0.9rem 0;
}
.onboarding-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--navy), var(--gold-dark));
}
.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}
.onboarding-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.45rem;
    width: 100%;
    text-align: right;
    border: 1px solid var(--beige);
    background: #fff;
    border-radius: 12px;
    padding: 0.65rem;
    color: #4F5865;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.onboarding-step:hover {
    border-color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,43,91,0.06);
}
.onboarding-step i {
    color: var(--gold-dark);
    margin-top: 0.15rem;
}
.onboarding-step.complete i {
    color: var(--green);
}
.onboarding-step strong,
.onboarding-step small,
.onboarding-step em {
    display: block;
}
.onboarding-step strong {
    color: var(--navy-dark);
    font-size: 0.82rem;
    line-height: 1.35;
}
.onboarding-step small {
    color: #6F7682;
    font-size: 0.7rem;
    line-height: 1.55;
    margin-top: 0.15rem;
}
.onboarding-step em {
    grid-column: 1 / -1;
    justify-self: start;
    color: var(--gold-dark);
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 800;
}
.onboarding-step.complete em {
    color: var(--green);
}
.onboarding-alert {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.8rem;
    border: 1px solid rgba(201,164,106,0.35);
    border-radius: 12px;
    background: rgba(201,164,106,0.1);
    color: var(--navy-dark);
    padding: 0.65rem 0.8rem;
    text-align: right;
    font-weight: 700;
}
.onboarding-alert i {
    color: var(--gold-dark);
}
.onboarding-alert span {
    flex: 1;
}
.onboarding-alert em {
    color: var(--gold-dark);
    font-style: normal;
    font-size: 0.78rem;
}
.onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--beige);
    border-radius: 14px;
    background: rgba(255,255,255,0.58);
}
.empty-state-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(15,43,91,0.08);
    color: var(--navy);
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
}
.empty-state h5 {
    color: var(--navy-dark);
    font-weight: 800;
    margin-bottom: 0.25rem;
}
.empty-state p {
    color: #6F7682;
    margin-bottom: 1rem;
    max-width: 420px;
}
.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.75rem 0.8rem;
    color: #1F2430;
    text-decoration: none;
    white-space: normal;
    border-bottom: 1px solid rgba(232,222,208,0.75);
}
.notification-item:hover {
    background: rgba(15,43,91,0.05);
    color: #1F2430;
}
.notification-item.unread {
    background: rgba(201,164,106,0.1);
}
.notification-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: transparent;
    margin-top: 0.42rem;
}
.notification-item.unread .notification-dot {
    background: var(--gold-dark);
}
.notification-copy strong,
.notification-copy small,
.notification-copy em {
    display: block;
}
.notification-copy strong {
    color: var(--navy-dark);
    font-size: 0.85rem;
}
.notification-copy small {
    color: #6F7682;
    font-size: 0.72rem;
    line-height: 1.5;
}
.notification-copy em {
    color: #4F5865;
    font-size: 0.78rem;
    font-style: normal;
    margin-top: 0.1rem;
}
.notification-empty {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 1.4rem;
    color: #6F7682;
    font-size: 0.84rem;
}
.notification-empty i {
    color: var(--gold-dark);
    font-size: 1.35rem;
}

/* ===== Reports ===== */
.reports-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.reports-eyebrow {
    color: var(--gold-dark);
    font-weight: 800;
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
}
.reports-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 0.75rem;
    background: var(--cream);
    border: 1px solid var(--beige);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.reports-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.report-kpi {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    border: 1px solid var(--beige);
    border-radius: 14px;
    padding: 1rem;
    min-height: 128px;
}
.report-kpi::after {
    content: "";
    position: absolute;
    top: -34px;
    left: -34px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    opacity: 0.12;
}
.report-kpi.paid::after { background: var(--navy); }
.report-kpi.owed::after { background: var(--gold-dark); }
.report-kpi.bookings::after { background: var(--green); }
.report-kpi.value::after { background: var(--navy-accent); }
.report-kpi span {
    display: block;
    color: #6F7682;
    font-weight: 700;
    font-size: 0.82rem;
}
.report-kpi strong {
    display: block;
    color: var(--navy-dark);
    font-size: 1.55rem;
    line-height: 1.25;
    margin: 0.45rem 0;
}
.report-kpi small {
    color: #6F7682;
    font-size: 0.75rem;
}
.reports-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: -0.15rem 0 1rem;
}
.report-insight-card {
    background: linear-gradient(135deg, #FFFFFF, #FDFBF8);
    border: 1px solid var(--beige);
    border-radius: 14px;
    padding: 0.95rem;
    box-shadow: 0 8px 22px rgba(15, 43, 91, 0.05);
}
.report-insight-card span {
    display: block;
    color: #6F7682;
    font-size: 0.78rem;
    font-weight: 800;
}
.report-insight-card strong {
    display: block;
    color: var(--navy-dark);
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0.35rem 0;
}
.report-insight-card small {
    display: block;
    color: #6F7682;
    font-size: 0.74rem;
}
.metric-bar {
    height: 7px;
    overflow: hidden;
    margin: 0.35rem 0 0.45rem;
    border-radius: 999px;
    background: rgba(15,43,91,0.08);
}
.metric-bar i {
    display: block;
    height: 100%;
    min-width: 4px;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--navy), var(--navy-accent));
}
.metric-bar.gold i {
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}
.reports-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.report-panel {
    background: var(--cream);
    border: 1px solid var(--beige);
    border-radius: 14px;
    padding: 1rem;
    min-width: 0;
    box-shadow: 0 8px 24px rgba(15, 43, 91, 0.05);
}
.report-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.report-panel-head h5 {
    margin: 0;
    font-weight: 800;
    color: var(--navy-dark);
    font-size: 1rem;
}
.report-panel-head span {
    color: #6F7682;
    font-size: 0.76rem;
}
.report-panel canvas {
    width: 100%;
    max-width: 100%;
    height: 230px;
    max-height: 230px;
    display: block;
}
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #4F5865;
}
.chart-legend span,
.chart-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.chart-pill {
    border: 1px solid var(--beige);
    border-radius: 999px;
    background: #fff;
    color: #4F5865;
    padding: 0.28rem 0.55rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: default;
}
.chart-pill:hover {
    border-color: var(--gold-light);
    box-shadow: 0 4px 14px rgba(15, 43, 91, 0.08);
}
.chart-pill strong {
    color: var(--navy-dark);
}
.chart-legend i,
.chart-pill i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}
.chart-fallback {
    min-height: 180px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #6F7682;
    font-weight: 700;
}
.text-muted { color: #6F7682 !important; }

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        overflow-x: hidden;
    }
    #auth-section {
        min-height: auto;
        padding: 0 0 2.75rem;
    }
    #auth-section > .container {
        width: min(100% - 40px, 680px);
    }
    #auth-section .col-md-5 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    #auth-section .tab-content {
        padding: 1.35rem !important;
    }
    #auth-section .form-control,
    #auth-section .btn {
        min-height: 46px;
    }

    [dir="rtl"] .sidebar,
    .sidebar {
        position: sticky;
        top: 0;
        right: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: none;
        padding: 0.95rem 1rem 0.85rem;
        border-bottom: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 12px 28px rgba(10, 33, 69, 0.16);
    }
    .sidebar h5 {
        margin-bottom: 0.25rem !important;
        font-size: 1.05rem;
    }
    .sidebar-user {
        display: none;
    }
    .sidebar-user p:first-child,
    #sidebar-venue p:first-of-type,
    .sidebar hr {
        display: none;
    }
    .sidebar-user p:last-child,
    #sidebar-venue-name {
        font-size: 0.88rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #sidebar-venue {
        margin-bottom: 0.35rem !important;
    }
    #sidebar-venue .text-center {
        display: none;
    }
    .sidebar nav {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding: 0.05rem 0 0.35rem;
        margin-inline: -0.1rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar .nav-link {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        margin: 0;
        padding: 0.45rem 0.8rem;
        border-radius: 999px;
        background: rgba(255,255,255,0.06);
        white-space: nowrap;
        font-size: 0.84rem;
    }
    .sidebar .nav-link.active {
        background: rgba(201,164,106,0.22);
        color: var(--gold-light);
    }
    .sidebar > .d-flex.gap-2 {
        gap: 0.5rem !important;
        margin-top: 0.1rem;
    }
    .sidebar > .d-flex.gap-2 .btn {
        min-height: 36px;
    }
    #notif-dropdown {
        right: 16px !important;
        left: 16px !important;
        width: auto;
        max-width: none;
        min-width: 0 !important;
    }

    [dir="rtl"] .main-content,
    .main-content {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        width: 100%;
        padding: 1rem 1rem 1.6rem;
    }
    .main-content h4 {
        font-size: 1.28rem;
        margin-bottom: 0.85rem;
    }
    .onboarding-panel {
        padding: 1rem;
        border-radius: 13px;
    }
    .onboarding-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .onboarding-steps {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .onboarding-step {
        flex: 0 0 240px;
    }
    .card-body {
        padding: 1rem;
    }

    #section-calendar > .d-flex {
        align-items: center !important;
        gap: 0.75rem;
        margin-bottom: 0.75rem !important;
    }
    #calendar-month-label {
        width: auto !important;
        min-width: 124px;
    }
    #section-calendar {
        overflow-x: visible;
        padding-bottom: 0;
    }
    .calendar-grid {
        width: 100%;
        min-width: 0;
        gap: 6px;
    }
    .calendar-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.78rem;
    }
    .calendar-day {
        min-height: clamp(106px, 9.7vh, 124px);
        padding: 5px;
        border-width: 1px;
    }
    .calendar-day .day-num {
        font-size: 0.86rem;
    }
    .slot-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 24px;
        padding: 3px 4px;
        font-size: 0.66rem;
        line-height: 1.25;
    }
    .legend-item {
        margin: 0 0.4rem;
        font-size: 0.86rem;
    }

    .reports-hero {
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }
    .reports-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        padding: 0.9rem;
    }
    .reports-grid,
    .reports-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .report-kpi {
        min-height: 118px;
    }
    .report-kpi strong {
        font-size: 1.45rem;
    }
    .reports-chart-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .report-panel {
        padding: 0.95rem;
    }
    .report-panel canvas {
        height: 240px;
        max-height: 240px;
        min-height: 0;
    }
    .table-responsive,
    #section-users {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table {
        min-width: 680px;
    }
    #section-pricing .table {
        min-width: 780px;
    }
    #dashboard-section #section-bulk > .row > [class*="col-"],
    #dashboard-section #section-settings > .row > [class*="col-"] {
        flex: 0 0 100%;
        width: 100%;
    }
    .modal-dialog {
        max-width: min(720px, calc(100% - 2rem));
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    #auth-section {
        min-height: auto;
        padding: 0 0 2rem;
    }
    .auth-nav-inner {
        min-height: auto;
        padding-block: 0.7rem;
        align-items: flex-start;
    }
    .auth-nav-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.45rem 0.85rem;
        max-width: 68%;
    }
    .auth-nav-links a {
        font-size: 0.82rem;
    }
    #auth-section > .container.mt-5 {
        margin-top: 1.6rem !important;
    }
    #auth-section > .container {
        width: min(100% - 24px, 520px);
    }
    #auth-section h2 {
        font-size: 1.35rem;
        line-height: 1.35;
    }
    #auth-section .text-center.mb-4 {
        margin-bottom: 1rem !important;
    }
    #auth-section .tab-content {
        padding: 1rem !important;
    }
    #auth-section .border.rounded.p-3 {
        padding: 0.85rem !important;
    }
    #auth-section .form-control,
    #auth-section .btn {
        min-height: 44px;
    }
    .password-rules {
        position: static;
        white-space: normal;
        margin-top: 0.45rem;
        line-height: 1.6;
    }

    [dir="rtl"] .sidebar,
    .sidebar {
        position: sticky;
        top: 0;
        right: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: none;
        padding: 0.85rem 0.85rem 0.75rem;
        border-bottom: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 10px 26px rgba(10, 33, 69, 0.18);
    }
    .sidebar h5 {
        margin-bottom: 0.45rem !important;
        font-size: 1rem;
    }
    .sidebar-user {
        margin-bottom: 0.55rem !important;
    }
    .sidebar-user p:first-child,
    #sidebar-venue p:first-of-type,
    .sidebar hr {
        display: none;
    }
    .sidebar-user p:last-child,
    #sidebar-venue-name {
        font-size: 0.86rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #sidebar-venue {
        margin-bottom: 0.55rem !important;
    }
    #sidebar-venue .text-center {
        display: none;
    }
    .sidebar nav {
        display: flex;
        gap: 0.45rem;
        overflow-x: auto;
        padding: 0.1rem 0 0.45rem;
        margin-inline: -0.15rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar .nav-link {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        margin: 0;
        padding: 0.48rem 0.75rem;
        border-radius: 999px;
        background: rgba(255,255,255,0.06);
        white-space: nowrap;
        font-size: 0.82rem;
    }
    .sidebar .nav-link.active {
        background: rgba(201,164,106,0.22);
        color: var(--gold-light);
    }
    .sidebar > .d-flex.gap-2 {
        gap: 0.45rem !important;
        margin-top: 0.25rem;
    }
    .sidebar > .d-flex.gap-2 .btn {
        min-height: 38px;
    }
    #notif-dropdown {
        right: 12px !important;
        left: 12px !important;
        max-width: none;
        width: auto;
        min-width: 0 !important;
    }
    [dir="rtl"] .main-content,
    .main-content {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        width: 100%;
        padding: 1rem 0.75rem 1.35rem;
    }
    .main-content h4 {
        font-size: 1.16rem;
        margin-bottom: 0.85rem;
    }
    .onboarding-panel {
        padding: 0.85rem;
        border-radius: 12px;
    }
    .onboarding-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .onboarding-head > div {
        flex: 1 1 180px;
    }
    .onboarding-head p {
        font-size: 0.78rem;
    }
    .onboarding-meter {
        width: 62px;
        height: 62px;
        border-radius: 15px;
    }
    .onboarding-meter strong {
        font-size: 0.98rem;
    }
    .onboarding-meter span {
        font-size: 0.66rem;
    }
    .onboarding-steps {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .onboarding-step {
        flex: 0 0 220px;
        padding: 0.6rem;
    }
    .onboarding-alert {
        align-items: flex-start;
        font-size: 0.82rem;
    }
    .onboarding-actions .btn {
        flex: 1 1 150px;
    }
    .empty-state {
        padding: 1.8rem 0.85rem;
    }
    .card {
        border-radius: 12px;
    }
    .card-body {
        padding: 0.95rem;
    }
    #section-calendar > .d-flex {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.75rem;
    }
    #section-calendar > .d-flex > div:first-child {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }
    #calendar-month-label {
        width: auto !important;
        min-width: 116px;
        margin-inline: 0.25rem !important;
    }
    #section-calendar > .d-flex > div:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem 0.7rem;
    }
    .legend-item {
        margin: 0;
        font-size: 0.82rem;
    }
    #section-calendar {
        overflow-x: auto;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }
    .calendar-grid {
        min-width: 700px;
        gap: 5px;
    }
    .calendar-header {
        padding: 0.42rem 0.2rem;
        font-size: 0.72rem;
    }
    .calendar-day {
        min-height: clamp(88px, 10.5vh, 108px);
        padding: 4px;
        border-width: 1px;
    }
    .calendar-day .day-num {
        font-size: 0.8rem;
    }
    .slot-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 22px;
        font-size: 0.58rem;
        line-height: 1.25;
        padding: 2px 3px;
    }
    .reports-hero {
        flex-direction: column;
        gap: 0.35rem;
    }
    .reports-filter-bar,
    .reports-grid,
    .reports-insights,
    .reports-chart-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .reports-filter-bar,
    .report-panel,
    .report-kpi {
        border-radius: 12px;
        padding: 0.85rem;
    }
    .report-kpi {
        min-height: auto;
    }
    .report-kpi strong {
        font-size: 1.35rem;
    }
    .report-panel-head {
        display: block;
    }
    .report-panel-head h5 {
        margin-bottom: 0.2rem;
    }
    .report-panel canvas {
        height: 220px;
        max-height: 220px;
        min-height: 0;
    }
    .table-responsive,
    #section-users {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table {
        min-width: 640px;
        font-size: 0.84rem;
    }
    #section-pricing .table {
        min-width: 760px;
    }
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-content {
        max-height: calc(100vh - 1rem);
        overflow: hidden;
        border-radius: 14px;
    }
    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
    .modal-footer > * {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .auth-nav-inner {
        width: min(100% - 18px, 520px);
    }
    .auth-logo-text {
        font-size: 1.1rem;
    }
    .auth-logo-icon img {
        width: 30px;
        height: 30px;
    }
    .auth-nav-links {
        gap: 0.35rem 0.65rem;
    }
    .auth-nav-links a {
        font-size: 0.78rem;
    }
    #auth-section > .container {
        width: min(100% - 18px, 520px);
    }
    #auth-section h2 {
        font-size: 1.22rem;
    }
    #auth-section .nav-tabs .nav-link {
        font-size: 0.86rem;
        padding-inline: 0.35rem;
    }
    .footer-bar {
        font-size: 0.74rem;
    }
    .sidebar {
        padding-inline: 0.65rem;
    }
    .sidebar .nav-link {
        min-height: 38px;
        padding-inline: 0.65rem;
        font-size: 0.78rem;
    }
    .sidebar > .d-flex.gap-2 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }
    .main-content {
        padding-inline: 0.55rem;
    }
    #dashboard-section .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    #dashboard-section .modal-body .row > [class*="col-"],
    #dashboard-section #section-bulk .row > [class*="col-"],
    #dashboard-section #section-settings form .row > [class*="col-"],
    #dashboard-section #manager-form .row > [class*="col-"] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    #dashboard-section #section-settings > .row > [class*="col-"],
    #dashboard-section #section-bulk > .row > [class*="col-"] {
        flex: 0 0 100%;
        width: 100%;
    }
    .calendar-grid {
        min-width: 640px;
        gap: 4px;
    }
    .calendar-day {
        min-height: clamp(84px, 10vh, 96px);
        border-radius: 8px;
    }
    .calendar-header {
        border-radius: 7px;
        font-size: 0.66rem;
    }
    .slot-badge {
        min-height: 20px;
        font-size: 0.56rem;
    }
    .report-kpi span,
    .report-kpi small,
    .report-insight-card span,
    .report-insight-card small,
    .report-panel-head span,
    .chart-legend {
        font-size: 0.72rem;
    }
    .toast-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
    }
    .toast-container .toast {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .sidebar > .d-flex.gap-2 {
        grid-template-columns: 1fr 1fr;
    }
    #btn-notifications {
        width: 100%;
    }
    #btn-lang-toggle {
        grid-column: 1 / -1;
        width: 100%;
    }
    .main-content {
        padding-inline: 0.4rem;
    }
}

.terms-editor {
    border: 2px solid #E8DED0;
    border-radius: 10px;
    padding: 0.75rem;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    line-height: 1.8;
}
.terms-editor:focus {
    border-color: #27477D;
    box-shadow: 0 0 0 3px rgba(15,43,91,0.08);
    outline: none;
}
.terms-toolbar { display: flex; gap: 0.25rem; }
.terms-display { font-size: 0.9rem; line-height: 1.9; }
.terms-display ul { padding-right: 1.25rem; margin-bottom: 0.5rem; }
.pricing-table { width: 100%; font-size: 0.85rem; }
.pricing-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #E8DED0; }
.pricing-table .price-num { font-weight: 700; color: #0F2B5B; text-align: left; white-space: nowrap; }
.pricing-period-public + .pricing-period-public { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid #E8DED0; }
.pricing-period-public h6 { color: #0F2B5B; font-weight: 800; margin-bottom: 0.15rem; }

.footer-bar {
    position: relative;
    bottom: 0; left: 0; right: 0;
    flex-shrink: 0;
    background: #0F2B5B;
    border-top: none;
    padding: 1.25rem 0.75rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    z-index: 10;
    margin-top: 0;
}
.footer-bar a { color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-bar a:hover { color: #E3C899; }
@media (max-width: 768px) { .footer-bar { position: relative; } }

.form-control.is-invalid { background-image: none !important; padding-right: 0.75rem !important; }
.password-rules {
    position: absolute;
    background: #0F2B5B;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 10;
    white-space: nowrap;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== Loaders ===== */

/* Gold Spinner for buttons */
.spinner-gold {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(201, 164, 106, 0.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn .spinner-gold {
    margin-left: 8px;
}

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

/* Skeleton Screens for content */
.skeleton {
    background: linear-gradient(90deg, var(--beige) 25%, var(--cream) 50%, var(--beige) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 120px;
    margin-bottom: 16px;
}

.skeleton-calendar {
    height: 400px;
    width: 100%;
}

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

/* ===== Receipts ===== */

.receipt-print {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    color: #0F2B5B;
}

.receipt-print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.receipt-print-venue {
    display: flex;
    flex-direction: column;
}

.receipt-print-venue strong {
    font-size: 1.3rem;
    font-weight: 800;
}

.receipt-print-venue small {
    color: #6F7682;
    font-size: 0.85rem;
}

.receipt-print-logo {
    font-size: 2rem;
    color: #C9A46A;
}

.receipt-print-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #6F7682;
    margin-bottom: 4px;
}

.receipt-print-number {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F2B5B;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.receipt-print-date {
    text-align: center;
    color: #6F7682;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.receipt-print-divider {
    border: none;
    border-top: 2px dashed #E6D9C8;
    margin: 16px 0;
}

.receipt-print-section,
.receipt-print-amounts {
    margin-bottom: 12px;
}

.receipt-print-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
}

.receipt-print-row span {
    color: #6F7682;
}

.receipt-print-row strong {
    color: #0F2B5B;
}

.receipt-print-amount {
    font-size: 1.25rem;
    color: #0F8B5F !important;
}

.receipt-print-note {
    margin-bottom: 12px;
}

.receipt-print-note span {
    display: block;
    color: #6F7682;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.receipt-print-note p {
    margin: 0;
    font-size: 0.9rem;
}

.receipt-print-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px dashed #E6D9C8;
}

.receipt-print-footer p {
    font-weight: 700;
    margin-bottom: 4px;
}

.receipt-print-footer small {
    color: #6F7682;
}

.audit-timeline {
    display: grid;
    gap: 0.65rem;
}

.audit-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--navy);
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    text-align: inherit;
    width: 100%;
}

.audit-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.audit-toggle em {
    color: var(--muted);
    font-size: 0.8rem;
    font-style: normal;
}

.audit-toggle strong {
    color: var(--navy-accent);
    font-size: 0.82rem;
}

.audit-toggle + .audit-timeline {
    margin-top: 0.75rem;
}

.audit-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 0.65rem;
    align-items: start;
}

.audit-dot {
    width: 9px;
    height: 9px;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(184, 131, 59, 0.14);
}

.audit-body {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: #fff;
}

.audit-title {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--navy);
    font-size: 0.95rem;
}

.audit-title span,
.audit-date,
.audit-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.audit-meta {
    margin-top: 0.2rem;
}

.history-result-count {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
}

.history-results-grid {
    display: grid;
    gap: 0.85rem;
}

.history-card {
    background: #fff;
    border: 1px solid var(--beige);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 43, 91, 0.06);
    padding: 1rem;
}

.history-card-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
}

.history-label {
    color: var(--muted);
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.history-card strong {
    color: var(--navy);
    font-weight: 900;
}

.history-status {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.25rem 0.65rem;
}

.history-status-pending { background: #FFF2C7; color: #8A6500; }
.history-status-confirmed { background: #FAD1D8; color: #9A1E2E; }
.history-status-cancelled { background: #E5E7EB; color: #4B5563; }
.history-status-rejected { background: #FFE4E6; color: #991B1B; }

.history-card-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.history-card-grid small {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.history-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.history-audit {
    border-top: 1px solid var(--border);
    margin-top: 0.85rem;
    padding-top: 0.85rem;
}

@media (max-width: 900px) {
    .history-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .history-card-grid {
        grid-template-columns: 1fr;
    }
    .history-card-head {
        display: grid;
    }
}

@media (max-width: 1024px) {
    .sidebar nav .nav-group {
        align-items: center;
        display: flex;
        flex: 0 0 auto;
        gap: 0.45rem;
        margin: 0;
    }

    .sidebar nav .nav-group-toggle {
        width: auto;
    }

    .sidebar nav .nav-submenu {
        border: 0;
        gap: 0.45rem;
        margin: 0;
        padding: 0;
    }

    .sidebar nav .nav-submenu:not(.d-none) {
        display: flex;
    }

    .sidebar nav .nav-submenu .nav-link {
        font-size: 0.78rem;
        margin: 0;
        padding-inline: 0.68rem;
    }
}

.public-calendar-mode-options {
    display: grid;
    gap: 0.75rem;
}

.public-calendar-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--beige);
    border-radius: 10px;
    background: var(--cream);
    cursor: pointer;
}

.public-calendar-mode-option strong,
.public-calendar-mode-option small {
    display: block;
}

.public-calendar-mode-option small {
    color: var(--gray);
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }

    body:not(.printing-backup) #receipt-print-modal,
    body:not(.printing-backup) #receipt-print-modal * {
        visibility: visible;
    }

    body:not(.printing-backup) #receipt-print-modal {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: none;
        background: #fff;
    }

    body.printing-backup #section-print-backup,
    body.printing-backup #section-print-backup * {
        visibility: visible;
    }

    body.printing-backup #section-print-backup {
        display: block !important;
        position: static;
    }

    body.printing-backup .sidebar,
    body.printing-backup #onboarding-panel,
    body.printing-backup .d-print-none,
    body.printing-backup #receipt-print-modal {
        display: none !important;
    }

    body.printing-backup .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.printing-backup .section-page:not(#section-print-backup) {
        display: none !important;
    }

    body.printing-backup .print-backup-paper {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    body.printing-backup .print-backup-header {
        border-bottom: 2px solid #000;
        color: #000;
        page-break-after: avoid;
    }

    body.printing-backup .print-backup-logo-frame {
        border-color: #000;
        border-radius: 4px;
        background: #fff;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body.printing-backup .print-backup-brand,
    body.printing-backup .print-backup-header h2,
    body.printing-backup .print-backup-header p,
    body.printing-backup .print-backup-generated span,
    body.printing-backup .print-backup-generated strong,
    body.printing-backup .print-backup-guide strong,
    body.printing-backup .print-backup-guide span,
    body.printing-backup .print-backup-legend span,
    body.printing-backup .print-backup-month h3 {
        color: #000;
    }

    body.printing-backup .print-backup-generated,
    body.printing-backup .print-backup-guide {
        border-color: #000;
        background: #fff;
        color: #000;
    }

    body.printing-backup .print-backup-legend i {
        border-color: #000;
    }

    body.printing-backup .print-backup-month {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.printing-backup .print-backup-table {
        font-size: 10.5pt;
        page-break-inside: auto;
    }

    body.printing-backup .print-backup-table tr {
        page-break-inside: avoid;
    }

    body.printing-backup .print-backup-table th {
        background: #eee !important;
        color: #000;
    }

    body.printing-backup .print-backup-table th,
    body.printing-backup .print-backup-table td {
        border: 1px solid #000;
        padding: 5px 6px;
    }

    body.printing-backup .print-row-available td,
    body.printing-backup .print-row-booked td {
        background: #fff !important;
        height: 30px;
    }

    .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }

    .modal-header,
    .modal-footer {
        display: none !important;
    }

    .modal-body {
        padding: 0 !important;
    }
}

