/* Aspekta Font */
@font-face { font-family: 'Aspekta'; src: url('/fonts/Aspekta-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('/fonts/Aspekta-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('/fonts/Aspekta-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('/fonts/Aspekta-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Theme tokens */
:root {
    --md-primary: #0066f9;
    --md-primary-strong: #0066f9;
    --md-on-primary: #ffffff;
    --md-primary-container: #e8f1ff;
    --md-on-primary-container: #12345d;
    --md-accent: #e7ff92;
    --md-accent-strong: #d4f36a;
    --md-secondary: #4f6078;
    --md-surface: #f5f9ff;
    --md-surface-container: rgba(255, 255, 255, 0.85);
    --md-surface-container-high: rgba(255, 255, 255, 0.94);
    --md-surface-muted: rgba(239, 246, 255, 0.9);
    --md-on-surface: #0f1d33;
    --md-on-surface-variant: #5d6d85;
    --md-outline: rgba(0, 102, 249, 0.2);
    --md-outline-variant: rgba(20, 52, 93, 0.12);
    --md-error: #c73b48;
    --md-error-container: #ffecef;
    --md-success: #1e7f49;
    --md-success-container: #effdf4;
    --md-warning: #9f6f00;
    --md-warning-container: #fff9e7;
    --md-shadow-1: 0 12px 28px rgba(15, 41, 79, 0.09);
    --md-shadow-2: 0 18px 40px rgba(15, 41, 79, 0.16);
    --md-shape-sm: 4px;
    --md-shape-md: 6px;
    --md-shape-lg: 8px;
    --md-shape-xl: 6px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    position: relative;
    min-height: 100vh;
    font-family: 'Aspekta', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(0, 102, 249, 0.34), transparent 50%),
        radial-gradient(circle at 86% 14%, rgba(218, 255, 92, 0.34), transparent 40%),
        linear-gradient(165deg, #f5faff 0%, #e9f3ff 44%, #f5fcff 100%);
    color: var(--md-on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: -1;
}
body::before {
    width: 320px;
    height: 320px;
    background: rgba(0, 102, 249, 0.3);
    top: -120px;
    right: -90px;
}
body::after {
    width: 360px;
    height: 360px;
    background: rgba(212, 248, 71, 0.3);
    bottom: -150px;
    left: -100px;
}
a { color: var(--md-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 24px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 24px; }
#admin-panel .container-wide { max-width: 1600px; }
#admin-panel .header-inner { max-width: 1600px; }
.container-wide > * { animation: fade-rise 0.5s ease both; }

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 14px auto 22px;
    width: calc(100% - 28px);
    max-width: none;
    border-radius: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(234, 244, 255, 0.94));
    border: 1px solid rgba(0, 102, 249, 0.26);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    box-shadow: var(--md-shadow-1);
    color: var(--md-on-surface);
}
.header h1 { font-size: 1.34rem; font-weight: 700; letter-spacing: -0.02em; color: var(--md-primary-strong); }
.header p { color: #445977; font-size: 0.9rem; margin-top: 3px; font-weight: 500; }
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Cards */
.card {
    background: linear-gradient(145deg, var(--md-surface-container-high), var(--md-surface-container));
    border-radius: var(--md-shape-md);
    box-shadow: var(--md-shadow-1);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--md-outline);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--md-on-surface);
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--md-outline-variant);
    padding-bottom: 12px;
}
.card h3 { font-size: 0.96rem; font-weight: 700; margin-bottom: 12px; color: var(--md-on-surface); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--md-shape-xl);
    border: none;
    cursor: pointer;
    font-family: 'Aspekta', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(150deg, var(--md-primary), var(--md-primary-strong));
    color: var(--md-on-primary);
    box-shadow: 0 10px 20px rgba(0, 102, 249, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 24px rgba(0, 102, 249, 0.33); }
.btn-danger {
    background: linear-gradient(140deg, #d45761, #b93647);
    color: #fff;
    box-shadow: 0 10px 20px rgba(185, 54, 71, 0.22);
}
.btn-danger:hover { box-shadow: 0 12px 24px rgba(185, 54, 71, 0.3); }
.btn-success {
    background: linear-gradient(140deg, #2f9f5d, #227e48);
    color: #fff;
    box-shadow: 0 10px 20px rgba(33, 128, 72, 0.26);
}
.btn-success:hover { box-shadow: 0 12px 24px rgba(33, 128, 72, 0.34); }
.btn-accent {
    background: linear-gradient(140deg, var(--md-accent), var(--md-accent-strong));
    color: #2f3c12;
    box-shadow: 0 10px 20px rgba(195, 224, 90, 0.28);
}
.btn-accent:hover { box-shadow: 0 12px 24px rgba(195, 224, 90, 0.34); }
.btn-outline {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--md-outline);
    color: var(--md-primary-strong);
}
.btn-outline:hover { background: rgba(232, 241, 255, 0.92); }
.btn-sm { padding: 6px 16px; font-size: 0.76rem; border-radius: var(--md-shape-xl); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: var(--md-on-surface-variant);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
    padding: 0;
    text-decoration: none;
}
.btn-icon:hover {
    background: rgba(232, 241, 255, 0.88);
    box-shadow: 0 8px 16px rgba(15, 41, 79, 0.12);
    color: var(--md-primary);
}
.btn-icon:active { opacity: 0.8; }
.btn-icon-danger:hover { color: var(--md-error); background: var(--md-error-container); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.76rem;
    color: var(--md-on-surface-variant);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-sm);
    font-family: 'Aspekta', sans-serif;
    font-size: 0.9rem;
    color: var(--md-on-surface);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(8px);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--md-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 249, 0.15);
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--md-shape-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}
.alert-success { background: var(--md-success-container); color: #1b6b3f; border-color: rgba(30, 127, 73, 0.2); }
.alert-error { background: var(--md-error-container); color: var(--md-error); border-color: rgba(199, 59, 72, 0.18); }
.alert-info { background: rgba(232, 241, 255, 0.8); color: var(--md-on-primary-container); border-color: rgba(0, 102, 249, 0.22); }
.alert-warning { background: var(--md-warning-container); color: #7d5b00; border-color: rgba(159, 111, 0, 0.16); }

/* Booking two-column layout */
.booking-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.booking-calendar { min-width: 0; }
.booking-slots { min-width: 0; }
@media (max-width: 768px) {
    .booking-layout { grid-template-columns: 1fr; }
}
.booking-flow { min-width: 0; }
.booking-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.step-pill {
    border: 1px solid var(--md-outline);
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--md-shape-sm);
    padding: 10px 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    transition: all 0.2s;
}
.step-pill .num {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    background: rgba(93, 109, 133, 0.15);
}
.step-pill.active {
    border-color: var(--md-primary);
    color: var(--md-primary);
    background: rgba(232, 241, 255, 0.9);
}
.step-pill.active .num { background: var(--md-primary); color: #fff; }
.step-pill.done {
    border-color: rgba(30, 127, 73, 0.22);
    color: #1b6b3f;
    background: var(--md-success-container);
}
.step-pill.done .num { background: #1e7f49; color: #fff; }
.step-pill.locked { opacity: 0.55; cursor: not-allowed; }
.step-panel { min-height: 240px; }
.booking-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-sm);
    background: var(--md-surface-muted);
    font-size: 0.86rem;
}
.step-actions {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* Booking calendar grid */
.days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.day-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-sm);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.day-card:hover { border-color: var(--md-primary); background: rgba(232, 241, 255, 0.9); }
.day-card.selected {
    border-color: var(--md-primary);
    background: linear-gradient(150deg, var(--md-primary), var(--md-primary-strong));
    color: var(--md-on-primary);
    box-shadow: 0 10px 20px rgba(0, 102, 249, 0.28);
}
.day-card .day-name { font-size: 0.7rem; text-transform: capitalize; opacity: 0.72; font-weight: 500; }
.day-card .day-date { font-size: 0.92rem; font-weight: 700; margin: 2px 0; }
.day-card .day-slots { font-size: 0.68rem; opacity: 0.58; font-weight: 500; }
.day-card.selected .day-name, .day-card.selected .day-slots { opacity: 1; }

/* Slots grid */
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.slot {
    padding: 10px;
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-sm);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.slot.available { background: rgba(255, 255, 255, 0.72); }
.slot.available:hover {
    border-color: rgba(30, 127, 73, 0.35);
    background: var(--md-success-container);
}
.slot.occupied {
    background: rgba(243, 246, 250, 0.9);
    border-color: var(--md-outline-variant);
    color: #a8b2c2;
    cursor: not-allowed;
    text-decoration: line-through;
}
.slot.selected {
    background: linear-gradient(140deg, var(--md-accent), var(--md-accent-strong));
    color: #2f3c12;
    border-color: #b4d255;
    box-shadow: 0 10px 18px rgba(195, 224, 90, 0.24);
}

/* Confirm button in slots panel */
.confirm-inline { margin-top: 20px; text-align: center; }
.confirm-inline .selected-summary { font-size: 0.9rem; color: #1b6b3f; font-weight: 700; margin-bottom: 12px; }

/* Confirmation modal */
.confirm-modal-body { text-align: center; padding: 16px 0; }
.confirm-modal-body h3 { color: var(--md-primary-strong); margin-bottom: 16px; font-size: 1.15rem; font-weight: 700; }
.confirm-modal-body .detail { font-size: 1.25rem; font-weight: 700; margin: 8px 0; }
.confirm-modal-body .sub { font-size: 1rem; color: var(--md-on-surface-variant); margin-bottom: 8px; }
.confirm-modal-body .actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }

/* Current appointment */
.appointment-current {
    background: linear-gradient(145deg, rgba(239, 253, 244, 0.9), rgba(231, 255, 146, 0.5));
    border: 1px solid rgba(30, 127, 73, 0.2);
    border-radius: var(--md-shape-lg);
    padding: 28px;
    text-align: center;
}
.appointment-current h3 { color: #1e7f49; font-weight: 700; }
.appointment-current .detail { font-size: 1.4rem; font-weight: 700; color: var(--md-on-surface); margin: 10px 0; }
.appointment-current .sub { color: var(--md-on-surface-variant); font-size: 0.9rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
    background: rgba(224, 237, 255, 0.95);
    text-align: left;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.76rem;
    color: #3f536f;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--md-outline);
}
td { padding: 12px 16px; border-bottom: 1px solid var(--md-outline-variant); }
tr:hover td { background: rgba(232, 241, 255, 0.62); }

/* Dashboard stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 255, 0.9));
    border-radius: var(--md-shape-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--md-shadow-1);
    border: 1px solid var(--md-outline);
}
.stat-card .number { font-size: 2rem; font-weight: 700; }
.stat-card .label { font-size: 0.76rem; color: var(--md-on-surface-variant); margin-top: 4px; font-weight: 600; }
.stat-blue .number { color: var(--md-primary); }
.stat-green .number { color: var(--md-success); }
.stat-orange .number { color: var(--md-warning); }
.stat-red .number { color: var(--md-error); }

/* Calendar (Admin) */
.cal-legend { display: flex; gap: 16px; font-size: 0.76rem; color: var(--md-on-surface-variant); align-items: center; }
.cal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.cal-dot-free { background: #effdf4; border: 1px solid #34a853; }
.cal-dot-partial { background: #fff7d6; border: 1px solid #e5ad00; }
.cal-dot-full { background: var(--md-error-container); border: 1px solid var(--md-error); }
.cal-dot-weekend { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--md-outline-variant); }

.cal-header-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-header-cell { text-align: center; font-weight: 700; font-size: 0.75rem; color: var(--md-on-surface-variant); padding: 8px 0; letter-spacing: 0.04em; }

.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
    border: 1px solid var(--md-outline-variant);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    min-height: 72px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.cal-cell:hover { border-color: var(--md-primary); box-shadow: 0 0 0 2px rgba(0, 102, 249, 0.16); }
.cal-empty { border: none; cursor: default; background: transparent; }
.cal-empty:hover { box-shadow: none; }
.cal-weekend { background: rgba(245, 248, 253, 0.95); cursor: default; opacity: 0.72; }
.cal-weekend:hover { border-color: var(--md-outline-variant); box-shadow: none; }
.cal-inactive { background: rgba(245, 248, 253, 0.9); cursor: default; opacity: 0.56; }
.cal-inactive:hover { border-color: var(--md-outline-variant); box-shadow: none; }
.cal-free { background: #effdf4; }
.cal-partial { background: #fff9e5; }
.cal-full { background: #fff0f2; }

.cal-day-num { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.cal-day-bar { height: 4px; background: #dde5f2; border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.cal-day-fill { height: 100%; border-radius: 2px; background: var(--md-primary); transition: width 0.3s; }
.cal-full .cal-day-fill { background: var(--md-error); }
.cal-day-info { font-size: 0.7rem; color: var(--md-on-surface-variant); }

.cal-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.cal-slot { padding: 6px 10px; border-radius: 8px; font-size: 0.76rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cal-slot-free { background: #effdf4; color: #1b6b3f; }
.cal-slot-taken { background: var(--md-error-container); color: var(--md-error); }
.cal-slot-owner { margin-top: 2px; font-size: 0.72rem; font-weight: 700; opacity: 0.9; }

.cal-detail-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 2100;
    background: rgba(10, 28, 56, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.cal-detail-overlay.show { opacity: 1; pointer-events: auto; }
.cal-detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(680px, 92vw);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(239, 247, 255, 0.6));
    border-left: 1.5px solid rgba(210, 230, 255, 0.82);
    box-shadow:
        -12px 0 24px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255,255,255,0.65);
    backdrop-filter: blur(22px) saturate(155%);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    padding: 18px;
    overflow-y: auto;
}
.cal-detail-overlay.show .cal-detail-panel { transform: translateX(0); }
.cal-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    background: transparent;
    padding: 0 0 8px 0;
    z-index: 1;
}
.cal-detail-head .btn-icon {
    position: static;
    margin-left: auto;
    margin-right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.cal-detail-panel h3 {
    font-size: 1.72rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.cal-detail-panel h4 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.005em;
}
.cal-slots-grid {
    gap: 8px;
}
.cal-slot {
    border-radius: 8px;
    border: 1px solid rgba(210, 230, 255, 0.74);
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(10px) saturate(145%);
    -webkit-backdrop-filter: blur(10px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    font-size: 0.74rem;
    font-weight: 500;
}
.cal-slot-free {
    background: rgba(94, 203, 141, 0.16);
    border-color: rgba(96, 189, 133, 0.52);
    color: #176c41;
}
.cal-slot-taken {
    background: rgba(220, 89, 116, 0.16);
    border-color: rgba(226, 128, 149, 0.52);
    color: #9f3247;
}
.cal-slot-owner {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.92;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--md-outline-variant);
}
.tab {
    padding: 14px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}
.tab:hover { color: var(--md-primary); background: rgba(232, 241, 255, 0.66); }
.tab.active {
    color: var(--md-primary);
    border-bottom-color: var(--md-primary);
    background: rgba(232, 241, 255, 0.8);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 28, 56, 0.34);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.modal-overlay.show { display: flex; }

.modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 12px;
    border: 1.5px solid rgba(210, 230, 255, 0.78);
    background: linear-gradient(160deg, rgba(255,255,255,0.38), rgba(240,249,255,0.26));
    box-shadow:
        0 22px 44px rgba(35, 70, 120, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.62);
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    padding: 20px;
}

.modal .actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--md-shape-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge-green { background: #effdf4; color: #1b6b3f; }
.badge-red { background: #ffe8ec; color: #b62f41; }
.badge-yellow { background: #fff4c9; color: #7b5800; }
.badge-blue { background: rgba(232, 241, 255, 0.85); color: #12345d; }
.badge-purple { background: #f3e8fd; color: #7b1fa2; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
#admin-panel .header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
#admin-panel .header-title {
    margin-left: auto;
    text-align: right;
}
#admin-panel .header-title h1 { margin: 0; }
#admin-panel .header-title p { margin-top: 3px; }
.btn-header {
    font-size: 0.76rem;
    color: #0e3f91;
    border-color: rgba(0, 102, 249, 0.3);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    padding-left: 18px;
    padding-right: 18px;
}
.btn-header:hover {
    color: #0a336f;
    border-color: rgba(0, 102, 249, 0.52);
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.76),
        0 10px 20px rgba(35, 70, 120, 0.16);
}

.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.panel-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.ui-control {
    height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--md-outline);
    border-radius: 10px;
    font-size: 0.875rem;
    color: var(--md-on-surface);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ui-control:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 249, 0.14);
}
.ui-control-search { width: 220px; }
.ui-control-wide { min-width: 220px; }

/* Booking page style parity with admin */
.booking-page {
    font-size: 13px;
}
.booking-page,
.booking-page button,
.booking-page input,
.booking-page select,
.booking-page textarea {
    font-family: "Aspekta", "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial, sans-serif;
}
.booking-page .header {
    border: 1.5px solid rgba(145, 179, 229, 0.62);
    background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(237,246,255,0.86));
    box-shadow: 0 10px 24px rgba(35, 70, 120, 0.1);
}
.booking-page .header h1 {
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: -0.015em;
}
.booking-page .header p {
    font-size: 0.86rem;
    font-weight: 400;
}
.booking-page .header.booking-header {
    position: relative;
    top: auto;
    width: 100%;
    margin: 0 0 18px;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.booking-page .header.booking-header .header-inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: space-between;
}
.booking-page .booking-header-title {
    margin-left: auto;
    text-align: right;
}
.booking-page .booking-header-inline {
    margin: -4px -4px 14px;
    border-radius: 0;
}
.booking-page .booking-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.booking-page .booking-user-info {
    text-align: right;
    font-size: 0.88rem;
}
.booking-page .container-wide {
    max-width: 1280px;
}
.booking-page .appointment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.booking-page .card {
    border: 1.5px solid rgba(220, 237, 255, 0.72);
    background: linear-gradient(165deg, rgba(255,255,255,0.34), rgba(240,249,255,0.2));
    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
    box-shadow:
        0 14px 28px rgba(35, 70, 120, 0.14),
        inset 0 1px 0 rgba(255,255,255,0.52);
    border-radius: 8px;
}
.booking-page .card h2 {
    font-size: 1.42rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.booking-page .card h3 {
    font-size: 1.08rem;
    font-weight: 500;
}
.booking-page .btn {
    border-radius: 999px;
    border: 1px solid rgba(188, 214, 245, 0.9);
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.58),
        0 8px 16px rgba(35, 70, 120, 0.1);
    font-size: 0.78rem;
    font-weight: 500;
}
.booking-page .btn:hover {
    background: rgba(255, 255, 255, 0.44);
    border-color: rgba(200, 224, 252, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.76),
        0 10px 22px rgba(35, 70, 120, 0.18);
}
.booking-page .btn-primary {
    background: rgba(18, 108, 255, 0.18);
    border-color: rgba(102, 162, 255, 0.9);
    color: #0f4ea5;
}
.booking-page .btn-outline {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(188, 214, 245, 0.9);
    color: #174c90;
}
.booking-page .btn-success {
    background: rgba(77, 197, 127, 0.2);
    border-color: rgba(96, 189, 133, 0.7);
    color: #176c41;
}
.booking-page .form-group input,
.booking-page .form-group select {
    border-radius: 999px;
    border: 1px solid rgba(188, 214, 245, 0.9);
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.58),
        0 8px 16px rgba(35, 70, 120, 0.1);
    font-size: 0.85rem;
}
.booking-page .badge {
    border-radius: 999px;
    border: 1px solid rgba(210, 230, 255, 0.75);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    font-size: 0.74rem;
    font-weight: 500;
}
.booking-page .step-pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(188, 214, 245, 0.7);
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    font-size: 0.72rem;
    font-weight: 400;
}
.booking-page .step-pill .num {
    font-size: 0.72rem;
    font-weight: 500;
}
.booking-page .modal {
    background: linear-gradient(160deg, rgba(255,255,255,0.72), rgba(239,247,255,0.62));
    border-color: rgba(210, 230, 255, 0.88);
}
.booking-page .alert {
    font-size: 0.92rem;
    font-weight: 500;
}
.booking-page .booking-summary {
    font-size: 0.92rem;
}
.booking-page .booking-summary strong {
    font-weight: 500;
}
.booking-page .step-panel h2 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.booking-page .step-panel p {
    font-size: 0.9rem;
    font-weight: 400;
}
.booking-page .day-card,
.booking-page .slot {
    border-radius: 8px;
    border: 1px solid rgba(220, 237, 255, 0.65);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.booking-page .day-card .day-name {
    font-size: 0.72rem;
    font-weight: 400;
}
.booking-page .day-card .day-date {
    font-size: 1.1rem;
    font-weight: 500;
}
.booking-page .day-card .day-slots {
    font-size: 0.76rem;
    font-weight: 400;
}
.booking-page .slot {
    font-size: 0.78rem;
    font-weight: 500;
}
.booking-page .day-card.selected,
.booking-page .slot.selected {
    background: rgba(18, 108, 255, 0.22);
    border-color: rgba(102, 162, 255, 0.9);
    color: #0f4ea5;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        0 10px 18px rgba(35, 70, 120, 0.18);
}
@media (max-width: 900px) {
    .booking-page .appointment-grid {
        grid-template-columns: 1fr;
    }
    .booking-page .booking-header-title {
        margin-left: 0;
        text-align: left;
    }
    .booking-page .booking-status-head {
        flex-direction: column;
    }
    .booking-page .booking-user-info {
        text-align: left;
    }
}

/* Admin Reference Match: clean single override block */
#admin-panel {
    position: relative;
    min-height: 100vh;
    background: transparent;
    --admin-font: "Aspekta", "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
}
#admin-panel, #admin-panel button, #admin-panel input, #admin-panel select, #admin-panel textarea {
    font-family: var(--admin-font);
}
#admin-panel > .header,
#admin-panel > .container-wide {
    position: relative;
    z-index: 1;
}
#admin-panel > .modal-overlay {
    position: fixed;
    z-index: 1000;
}
#admin-panel .modal {
    background: linear-gradient(160deg, rgba(255,255,255,0.72), rgba(239,247,255,0.62));
    border-color: rgba(210, 230, 255, 0.88);
}

#admin-panel .header {
    width: min(1240px, calc(100% - 28px));
    margin: 14px auto 14px;
    border-radius: 0;
    border: 1.5px solid rgba(145, 179, 229, 0.62);
    background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(237,246,255,0.86));
    box-shadow: 0 10px 24px rgba(35, 70, 120, 0.1);
}
#admin-panel .header h1 { font-size: 1.9rem; font-weight: 500; letter-spacing: -0.015em; }
#admin-panel .header p { font-size: 0.86rem; font-weight: 400; }

#admin-panel .admin-shell {
    width: min(1500px, calc(100% - 20px));
    margin: 14px auto 26px;
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(220, 238, 255, 0.16));
    backdrop-filter: blur(22px) saturate(155%);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    box-shadow:
        0 20px 42px rgba(35, 70, 120, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(160, 196, 240, 0.3);
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
        "shell-header shell-header"
        "sidebar stats"
        "sidebar content";
    column-gap: 18px;
    row-gap: 18px;
}

#admin-panel .shell-header { grid-area: shell-header; }
#admin-panel .shell-header .header {
    width: 100%;
    max-width: none;
    margin: 0;
    position: relative;
    top: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#admin-panel #dashboard-stats { grid-area: stats; margin: 0; gap: 12px; }
#admin-panel .stats-grid .stat-card {
    border-radius: 8px;
    border: 1.5px solid rgba(220, 237, 255, 0.72);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(236, 247, 255, 0.18));
    box-shadow:
        0 8px 18px rgba(35, 70, 120, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    padding: 18px 12px;
}
#admin-panel .stats-grid .stat-card .number { font-size: 1.7rem; font-weight: 600; }
#admin-panel .stats-grid .stat-card .label { font-weight: 400; letter-spacing: 0; }

#admin-panel .tabs {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1.5px solid rgba(210, 230, 255, 0.62);
    border-radius: 8px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.2), rgba(219, 236, 255, 0.12));
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
    padding: 8px 6px;
    position: sticky;
    top: 90px;
    height: fit-content;
}
#admin-panel .tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 68px;
    overflow: hidden;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    color: #5a6780;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
    transition: color 0.16s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#admin-panel .tab:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(202, 224, 252, 0.52);
    color: #174c90;
}
#admin-panel .tab::before {
    content: none;
}
#admin-panel .tab i {
    font-size: 1.1rem;
    line-height: 1;
}
#admin-panel .tab span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#admin-panel .tab.active {
    background: linear-gradient(160deg, rgba(255,255,255,0.28), rgba(235,246,255,0.18));
    border: 1px solid rgba(188, 214, 245, 0.66);
    color: #124889;
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.52),
        0 3px 8px rgba(35, 70, 120, 0.08);
}
#admin-panel .tab.tab-logout {
    margin-top: 8px;
    color: #9e2e43;
    border-color: rgba(226, 128, 149, 0.45);
    background: rgba(220, 89, 116, 0.12);
}
#admin-panel .tab.tab-logout:hover {
    color: #8a1f36;
    background: rgba(220, 89, 116, 0.2);
    border-color: rgba(226, 128, 149, 0.62);
}

#admin-panel .tab-content { grid-area: content; }
#admin-panel .tab-content .card {
    border-radius: 8px;
    border: 1.5px solid rgba(220, 237, 255, 0.72);
    background: linear-gradient(165deg, rgba(255,255,255,0.34), rgba(240,249,255,0.2));
    box-shadow:
        0 14px 28px rgba(35, 70, 120, 0.14),
        inset 0 1px 0 rgba(255,255,255,0.52);
    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
    padding: 24px;
}

#admin-panel .panel-toolbar h2 {
    color: #173f72;
    font-size: 1.42rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
#admin-panel .ui-control {
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(188, 214, 245, 0.9);
    background: rgba(255, 255, 255, 0.32);
    font-size: 0.85rem;
    padding: 0 14px;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.58),
        0 8px 16px rgba(35, 70, 120, 0.1);
}
#admin-panel .ui-control-search { width: 260px; }
#admin-panel select.ui-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.2 5.2 7 9l3.8-3.8' fill='none' stroke='%231b2f50' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}
#admin-panel select.ui-control::-ms-expand { display: none; }
#admin-panel .btn-sm {
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(188, 214, 245, 0.9);
    background: rgba(255, 255, 255, 0.32);
    color: #174c90;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.58),
        0 8px 16px rgba(35, 70, 120, 0.1);
}
#admin-panel .btn-sm:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.44);
    border-color: rgba(200, 224, 252, 0.95);
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.76),
        0 10px 22px rgba(35, 70, 120, 0.18);
}
#admin-panel .btn-primary {
    background: rgba(18, 108, 255, 0.18);
    border-color: rgba(102, 162, 255, 0.9);
    color: #0f4ea5;
}
#admin-panel .btn-accent {
    background: rgba(198, 235, 89, 0.22);
    border-color: rgba(191, 224, 101, 0.95);
    color: #355214;
}
#admin-panel .btn-danger {
    background: rgba(226, 86, 114, 0.2);
    border-color: rgba(226, 118, 142, 0.92);
    color: #9e2e43;
}

#admin-panel .table-wrap { border-radius: 8px; overflow: hidden; }
#admin-panel thead th {
    background: linear-gradient(180deg, rgba(206, 224, 248, 0.72) 0%, rgba(196, 217, 245, 0.62) 100%);
    color: #36547a;
    border-bottom: 1px solid rgba(145, 179, 229, 0.46);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 14px 16px;
}
#admin-panel tbody td {
    background: rgba(255, 255, 255, 0.28);
    border-bottom: 1px solid rgba(198, 216, 243, 0.74);
    font-size: 0.82rem;
    font-weight: 400;
    padding: 16px;
}
#admin-panel tbody tr:hover td { background: rgba(236, 245, 255, 0.48); }

#admin-panel .badge {
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 500;
    border: 1px solid rgba(210, 230, 255, 0.75);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
#admin-panel .badge-green {
    background: rgba(77, 197, 127, 0.18);
    border-color: rgba(96, 189, 133, 0.6);
    color: #176c41;
}
#admin-panel .badge-red {
    background: rgba(220, 89, 116, 0.18);
    border-color: rgba(226, 128, 149, 0.62);
    color: #9f3247;
}
#admin-panel .badge-yellow {
    background: rgba(226, 194, 90, 0.2);
    border-color: rgba(221, 187, 74, 0.62);
    color: #7a5a00;
}

#admin-panel .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(210, 230, 255, 0.75);
    background: rgba(255, 255, 255, 0.3);
    color: #4a658a;
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
#admin-panel .btn-icon:hover {
    background: rgba(255, 255, 255, 0.42);
    color: #1b4f95;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.68),
        0 8px 14px rgba(35, 70, 120, 0.14);
}
#admin-panel .btn-icon-danger {
    color: #9e2e43;
    border-color: rgba(226, 128, 149, 0.62);
    background: rgba(220, 89, 116, 0.16);
}
#admin-panel .btn-icon-danger:hover {
    color: #8a1f36;
    background: rgba(220, 89, 116, 0.24);
}

/* Login overlay on top of blurred admin */
body.login-mode {
    overflow: hidden;
}
#login-page {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    background: rgba(10, 28, 56, 0.16);
    backdrop-filter: blur(5px) saturate(120%);
    -webkit-backdrop-filter: blur(5px) saturate(120%);
}
#login-page .login-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#login-page .login-card {
    width: min(380px, 100%);
    border-radius: 10px;
    border: 1.5px solid rgba(210, 230, 255, 0.82);
    background: linear-gradient(160deg, rgba(255,255,255,0.78), rgba(239,247,255,0.7));
    box-shadow:
        0 20px 38px rgba(35, 70, 120, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.64);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}
#login-page .login-logo-wrap {
    text-align: center;
    margin-bottom: 12px;
}
#login-page .login-logo {
    max-height: 44px;
}
#login-page .login-title {
    text-align: center;
    border: none;
    margin-bottom: 18px;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
#login-page .form-group label {
    font-size: 0.72rem;
    font-weight: 500;
}
#login-page .form-group input {
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 400;
}
#login-page .login-submit {
    width: 100%;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
}
#admin-panel.login-backdrop {
    filter: blur(8px) saturate(85%);
    opacity: 0.9;
    pointer-events: none;
    user-select: none;
}

/* Final modal glass override (admin + booking) */
.modal-overlay {
    background: rgba(8, 24, 46, 0.4);
    backdrop-filter: blur(12px) saturate(128%);
    -webkit-backdrop-filter: blur(12px) saturate(128%);
}

.modal,
#admin-panel .modal,
.booking-page .modal {
    position: relative;
    border-radius: 18px;
    border: 1.6px solid rgba(208, 227, 252, 0.92);
    background:
        radial-gradient(360px 240px at -8% -18%, rgba(84, 156, 255, 0.18), transparent 72%),
        radial-gradient(320px 220px at 108% -12%, rgba(194, 236, 100, 0.2), transparent 72%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.76), rgba(236, 246, 255, 0.62));
    box-shadow:
        0 18px 34px rgba(33, 68, 118, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    overflow: hidden;
}

.modal::before,
#admin-panel .modal::before,
.booking-page .modal::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        radial-gradient(220px 130px at 18% 82%, rgba(133, 183, 255, 0.14), transparent 78%);
    pointer-events: none;
}

.modal > *,
#admin-panel .modal > *,
.booking-page .modal > * {
    position: relative;
    z-index: 1;
}

.cal-detail-panel {
    background:
        radial-gradient(420px 260px at -8% -10%, rgba(84, 156, 255, 0.2), transparent 74%),
        radial-gradient(360px 220px at 112% -12%, rgba(194, 236, 100, 0.2), transparent 74%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(238, 247, 255, 0.66));
}

/* Modal controls same style as site */
.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(188, 214, 245, 0.92);
    background: rgba(255, 255, 255, 0.34);
    color: #1b2f50;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 0 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.66),
        0 8px 16px rgba(35, 70, 120, 0.1);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.modal .form-group textarea {
    min-height: 96px;
    height: auto;
    padding: 12px 14px;
    border-radius: 20px;
}
.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    outline: none;
    border-color: rgba(120, 175, 245, 0.95);
    background: rgba(255, 255, 255, 0.46);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 3px rgba(82, 139, 235, 0.14),
        0 10px 18px rgba(35, 70, 120, 0.12);
}

.modal .btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}
.modal .btn-outline {
    border: 1px solid rgba(188, 214, 245, 0.92);
    background: rgba(255, 255, 255, 0.38);
    color: #0f4ea5;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.72),
        0 8px 16px rgba(35, 70, 120, 0.1);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.modal .btn-outline:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(200, 224, 252, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.84),
        0 10px 20px rgba(35, 70, 120, 0.16);
}
.modal .btn-primary,
.modal .btn-danger,
.modal .btn-accent,
.modal .btn-success {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 10px 20px rgba(35, 70, 120, 0.18);
}

.modal .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(210, 230, 255, 0.8);
    background: rgba(255, 255, 255, 0.36);
    color: #4a658a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
}
.modal .btn-icon:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #1b4f95;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.76),
        0 8px 14px rgba(35, 70, 120, 0.14);
}

@media (max-width: 1120px) {
    #admin-panel .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    #admin-panel .header-title {
        margin-left: 0;
        text-align: left;
    }
    #admin-panel .admin-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "shell-header"
            "stats"
            "sidebar"
            "content";
    }
    #admin-panel .tabs {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
    }
    #admin-panel .tab { flex: 0 0 auto; }
}
