/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Color Variables and Theme tokens */
:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Light Mode Palette */
    --bg-app: #f6f8fa;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8f9fa;
    --bg-header: #ffffff;
    --border-color: #e1e4e8;
    
    --text-primary: #1a1d20;
    --text-secondary: #57606a;
    --text-muted: #8c959f;
    
    --primary: #003a5a; /* UFA Corporate Blue */
    --primary-hover: #002235;
    --primary-light: rgba(0, 58, 90, 0.07);
    
    --success: #09825d;
    --success-light: rgba(9, 130, 93, 0.08);
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.08);
    --danger: #cf222e;
    --danger-light: rgba(207, 34, 46, 0.08);
    --info: #0969da;
    --info-light: rgba(9, 105, 218, 0.08);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    --transition-speed: 0.25s;

    /* UFA Blue (Bertelsmann Blue) branding */
    --ufa-blue: #005a9c;
    --ufa-blue-light: rgba(0, 90, 156, 0.08);
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-app: #0f1115;
    --bg-surface: #161b22;
    --bg-surface-hover: #1f242c;
    --bg-header: #161b22;
    --border-color: #30363d;
    
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-light: rgba(56, 189, 248, 0.15);
    
    --success: #3fb950;
    --success-light: rgba(63, 185, 80, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #f85149;
    --danger-light: rgba(248, 81, 73, 0.15);
    --info: #2f81f7;
    --info-light: rgba(47, 129, 247, 0.15);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.4);

    --ufa-blue: #2f81f7;
    --ufa-blue-light: rgba(47, 129, 247, 0.18);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Header & Top Navigation */
header.app-header {
    height: 80px;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-container {
    height: 44px;
    display: flex;
    align-items: center;
}

.logo-container img {
    max-height: 100%;
    max-width: 140px;
    object-fit: contain;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-hover);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.user-name-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-logout {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

/* Main Content Container */
.content-container {
    padding: 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
}

/* Typography & Headings */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 35px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Card Component */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

/* Flat SVG Icon Styles */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* Forms Design */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--bg-surface);
}

/* Switch (Toggle Checkbox) */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    margin-bottom: 12px;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.toggle-wrapper:hover {
    background-color: var(--bg-surface-hover);
}

.toggle-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-label {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.toggle-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
}

.toggle-wrapper:has(input:checked) {
    border-color: var(--success);
    background-color: var(--success-light);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Dynamic Hidden Sub-options panel */
.sub-panel {
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 20px;
    margin-top: -12px;
    margin-bottom: 16px;
    display: none;
    animation: slideDown 0.2s ease-out forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:focus,
.btn:active,
.btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

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

.btn-secondary {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #b31b23;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 30px;
}

/* Tables and Lists */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-surface);
}

table.data-table th, 
table.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

table.data-table th {
    background-color: var(--bg-surface-hover);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

table.data-table tr:last-child td {
    border-bottom: none;
}

table.data-table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

/* Actions in tables (always stacked vertically to fit narrow screens and prevent horizontal overflow) */
.table-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    width: 100%;
}

.table-actions form {
    margin: 0;
    display: block;
    width: 100%;
}

.table-actions .btn,
.table-actions form button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
}

/* Badges for status */
.status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.live-badge {
    position: relative;
}

.status-badge.live-badge::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    border: 1.5px solid var(--bg-surface);
    box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7);
    animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(46, 160, 67, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 160, 67, 0);
    }
}

.status-confirmed {
    background-color: var(--success-light);
    color: var(--success);
}

.status-past {
    background-color: rgba(100, 116, 139, 0.12);
    color: var(--text-secondary);
}

.status-cancelled {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Info Banner / Alert */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-warning {
    background-color: var(--warning-light);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .alert-warning {
    color: var(--warning);
}

.alert-danger {
    background-color: var(--danger-light);
    color: #a01a21;
    border: 1px solid rgba(207, 34, 46, 0.2);
}

[data-theme="dark"] .alert-danger {
    color: var(--danger);
}

.alert-success {
    background-color: var(--success-light);
    color: #06573e;
    border: 1px solid rgba(9, 130, 93, 0.2);
}

[data-theme="dark"] .alert-success {
    color: var(--success);
}

.alert-info {
    background-color: var(--info-light);
    color: #0950a0;
    border: 1px solid rgba(9, 105, 218, 0.2);
}

[data-theme="dark"] .alert-info {
    color: var(--info);
}

/* Login/Register Specific Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--bg-app);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    height: 44px;
}

.auth-logo img {
    max-height: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.btn-sso {
    margin-top: 16px;
    background-color: #ffffff;
    color: #24292f;
    border: 1px solid #d0d7de;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-sso:hover {
    background-color: #f6f8fa;
    border-color: #afb8c1;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

/* Statistics row layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.stat-card:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.stat-card.active-filter.filter-active {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

.stat-card.active-filter.filter-past {
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
}

[data-theme="dark"] .stat-card.active-filter.filter-past {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.stat-card.active-filter.filter-cancelled {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}

.stat-card.active-filter.filter-all {
    border-color: var(--ufa-blue);
    box-shadow: 0 0 0 3px var(--ufa-blue-light);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-app);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.stat-content {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
    white-space: nowrap;
}

.stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    flex-shrink: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    header.app-header {
        height: auto;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        align-items: stretch;
    }
    
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .header-right {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .content-container {
        padding: 20px;
    }

    /* Responsive Table Styles (Cards on Mobile) */
    .table-responsive {
        border: none;
        overflow-x: visible;
    }
    
    table.data-table,
    table.data-table tbody,
    table.data-table tr,
    table.data-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    table.data-table thead {
        display: none; /* Hide header rows */
    }
    
    table.data-table tr {
        background-color: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    table.data-table tr:hover {
        background-color: var(--bg-surface);
    }
    
    table.data-table td[data-label] {
        position: relative;
        padding: 12px 0 12px 160px; /* 160px left padding for label */
        border: none;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
        min-height: 45px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
    }
    
    table.data-table td[data-label]:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    table.data-table td[data-label]::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 12px;
        width: 150px;
        font-weight: 600;
        font-size: 12px;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Stack actions vertically in mobile view */
    .table-actions {
        width: 100%;
        max-width: 160px;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
}

/* Checkbox Grid and Items styling for Settings Filters */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    padding: 10px 14px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Styling for Select Menu Optgroups (Grouping by Floor / Building) */
select optgroup {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 700;
    font-style: normal;
    padding: 8px 4px 4px 4px;
    margin-top: 4px;
    border-top: 1px dashed var(--border-color);
}

select optgroup:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 4px;
}

select optgroup option {
    font-weight: normal;
    color: var(--text-primary);
    padding: 6px 12px;
}

select optgroup option:disabled {
    color: var(--text-muted);
}

/* Custom Select Trigger Cards */
.select-trigger-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

.select-trigger-card.selected {
    border-color: var(--success);
    background-color: var(--success-light);
}

.select-trigger-card:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-surface-hover);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

/* Modal Layout */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 0;
    overflow-y: auto;
    transition: opacity var(--transition-speed) ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.65);
}

.modal-container {
    position: relative;
    max-width: 650px;
    width: 90%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: 96vh;
    height: auto;
    z-index: 1060;
    box-shadow: var(--shadow-lg);
    animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#room-modal .modal-container,
#parking-modal .modal-container {
    max-width: 975px;
    height: 96vh;
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-close:focus,
.modal-close:active,
.modal-close:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.modal-search-bar {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface-hover);
}

.modal-search-bar input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.modal-tabs {
    padding: 10px 24px 18px 24px;
    min-height: 62px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    align-items: center;
}

.modal-tabs::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
}

.modal-tabs .tab-btn {
    min-width: 88px;
    height: 34px;
    padding: 8px 18px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-tabs .tab-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.modal-tabs .tab-btn:focus,
.modal-tabs .tab-btn:active,
.modal-tabs .tab-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.modal-tabs .tab-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.modal-tabs .tab-btn.active:focus,
.modal-tabs .tab-btn.active:active,
.modal-tabs .tab-btn.active:focus-visible {
    border-color: var(--primary) !important;
    background-color: var(--primary) !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Grid layout for resource cards */
.resource-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.resource-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background-color: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    position: relative;
    user-select: none;
}

.resource-card:hover {
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.resource-card.selected {
    border-color: var(--ufa-blue);
    background-color: var(--ufa-blue-light);
    box-shadow: 0 0 0 1px var(--ufa-blue);
}

.resource-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: var(--ufa-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-card.disabled {
    opacity: 0.7;
    cursor: pointer;
    background-color: var(--bg-surface-hover);
}

.resource-card.disabled:hover {
    border-color: var(--danger-light);
    box-shadow: var(--shadow-sm);
}

.resource-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 65px; /* Leave space for status badge & checkmark */
}

.resource-card .card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-card .card-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: right var(--transition-speed) ease;
}

.resource-card.selected .card-status-badge {
    right: 34px; /* Slide left when selected checkmark is shown (10px padding + 20px checkmark + 4px gap) */
}

.resource-card .badge-avail {
    background-color: var(--success-light);
    color: var(--success);
}

.resource-card .badge-occupied {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Card & Trigger Equipment Badges */
.card-equipment {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.resource-card .card-equipment {
    margin-top: auto;
    padding-top: 4px;
}

.equipment-badge {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
    transition: all var(--transition-speed) ease;
}

.resource-card.selected .equipment-badge {
    background-color: var(--bg-surface);
    border-color: rgba(0, 90, 156, 0.3);
}

.capacity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-app);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.2;
    transition: all var(--transition-speed) ease;
}

.capacity-icon {
    color: var(--text-muted);
    width: 12px;
    height: 12px;
    stroke-width: 2;
    flex-shrink: 0;
}

.resource-card.selected .capacity-badge {
    border-color: rgba(0, 90, 156, 0.4);
    background-color: rgba(0, 90, 156, 0.05);
    color: var(--ufa-blue);
}

.resource-card.selected .capacity-icon {
    color: var(--ufa-blue);
}

/* Selection Trigger Card details layout */
.trigger-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.trigger-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.trigger-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}


.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-surface-hover);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* User Dropdown Navigation */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.user-avatar-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.03);
}

.user-avatar-btn:focus,
.user-avatar-btn:active,
.user-avatar-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 230px;
    z-index: 1000;
    animation: dropdownEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownEnter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.dropdown-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.dropdown-user-details {
    display: flex;
    flex-direction: column;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.dropdown-user-status {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background-color: var(--bg-surface-hover);
}

.dropdown-item:focus,
.dropdown-item:active,
.dropdown-item:focus-visible {
    outline: none !important;
    background-color: var(--bg-surface-hover);
}

.dropdown-item svg.icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: color 0.2s;
}

.dropdown-item:hover svg.icon {
    color: var(--text-primary);
}

.dropdown-item.logout-item:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

.dropdown-item.logout-item:hover svg.icon {
    color: var(--danger);
}

/* View Switcher Toggle */
.view-toggle {
    display: inline-flex;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
}

.view-toggle .view-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-toggle .view-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.view-toggle .view-btn.active {
    background-color: var(--primary);
    color: #ffffff;
}

.view-toggle .view-btn svg.icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Calendar iCal View Layout */
.calendar-view-container {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    overflow: hidden;
    margin-top: 8px;
    flex-grow: 1;
    height: 100%;
}

.calendar-grid-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface-hover);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.calendar-time-header-cell {
    width: 60px;
    min-width: 60px;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.calendar-column-headers {
    display: flex;
    flex-grow: 1;
}

.calendar-header-cell {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.calendar-header-cell:last-child {
    border-right: none;
}

.calendar-grid-body {
    display: flex;
    position: relative;
    overflow-y: auto;
    flex-grow: 1;
}

.calendar-time-axis {
    width: 60px;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-surface-hover);
    user-select: none;
    flex-shrink: 0;
}

.calendar-time-label {
    height: 60px;
    font-size: 11px;
    color: var(--text-secondary);
    padding-top: 4px;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    box-sizing: border-box;
}

.calendar-columns-container {
    display: flex;
    flex-grow: 1;
    position: relative;
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 100% 60px;
}

.calendar-column {
    flex: 1;
    min-width: 120px;
    position: relative;
    height: 600px; /* 10 hours * 60px */
    border-right: 1px solid var(--border-color);
    box-sizing: border-box;
}

.calendar-column:last-child {
    border-right: none;
}

/* Calendar Stripes / Slots */
.calendar-slot {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.calendar-slot.occupied {
    background-color: var(--danger-light);
    color: var(--danger);
    border-left-color: var(--danger);
    cursor: not-allowed;
    opacity: 0.85;
}

.calendar-slot.occupied .slot-title {
    font-weight: 600;
}

.calendar-slot.occupied .slot-time {
    font-size: 11px;
    opacity: 0.8;
}

.calendar-slot.free {
    background-color: var(--success-light);
    color: var(--success);
    border-left-color: var(--success);
    cursor: pointer;
}

.calendar-slot.free:hover {
    filter: brightness(0.95);
    box-shadow: var(--shadow-sm);
    transform: scale(0.99);
}

.calendar-slot.free.selected {
    background-color: var(--ufa-blue-light);
    color: var(--ufa-blue);
    border-left-color: var(--ufa-blue);
    box-shadow: 0 0 0 1.5px var(--ufa-blue);
}

.calendar-slot .slot-title {
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.calendar-slot .slot-time {
    font-size: 10px;
    margin-top: 2px;
}

/* Prompt to choose a floor */
.calendar-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    text-align: center;
    gap: 12px;
    width: 100%;
}

.calendar-prompt svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Availability Badge timing */
.card-avail-timing {
    font-size: 11px;
    color: var(--warning);
    font-weight: 600;
    margin-top: 2px;
}

[data-theme="dark"] .calendar-slot.occupied {
    background-color: rgba(227, 6, 19, 0.15);
}

[data-theme="dark"] .calendar-slot.free {
    background-color: rgba(46, 160, 67, 0.15);
}

/* Toast Notifications Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 48px);
    pointer-events: none;
}

/* Toast Card Base */
.toast {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), margin-bottom 0.2s ease;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
    transition: transform 4000ms linear;
}

.toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast.hide {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
}

.toast-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-danger .toast-icon {
    color: var(--danger);
}

.toast-success {
    border-left: 5px solid var(--success);
}

.toast-danger {
    border-left: 5px solid var(--danger);
}

.toast-content {
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    margin-top: -2px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Accordion / Collapsible Panels for Settings */
.settings-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.accordion-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.accordion-header {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    outline: none;
    box-sizing: border-box;
}

.accordion-header:hover {
    background-color: var(--bg-surface-hover);
}

.accordion-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.accordion-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.accordion-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-width: 2;
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid transparent;
    padding: 0;
    box-sizing: border-box;
}

.accordion-item.active .accordion-content {
    border-top-color: var(--border-color);
    padding: 0;
    max-height: 1500px; /* A safe large number for content height */
}

.accordion-body {
    padding: 24px;
    box-sizing: border-box;
}

/* Spinner Rotation Keyframe */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin Page Tab Navigation */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.admin-tab {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Storno Grace Period Button Disabled Style */
.btn-disabled-grace {
    background-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
    cursor: not-allowed !important;
    opacity: 0.85;
    line-height: 1.2 !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    text-align: center !important;
}

/* Prevent Actions columns from squeezing and cutting off content on desktop viewports without forcing horizontal scroll */
@media (min-width: 993px) {
    table.data-table td[data-label="Aktionen"] {
        padding-left: 10px;
        padding-right: 10px;
        min-width: 125px;
    }
}

/* Personal Address Book CSS Styles */
.contact-row {
    transition: background-color var(--transition-speed);
}
.contact-row:hover {
    background-color: var(--bg-surface-hover);
}

/* Booking Page Modern Tabbed Layout & Sticky Header */
.booking-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    position: sticky;
    top: 80px;
    z-index: 40;
    background-color: var(--bg-app);
    padding: 12px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-header-titles {
    flex-grow: 1;
}

.booking-header-titles h1 {
    margin: 0;
    font-size: 28px;
}

.booking-header-titles .subtitle {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.booking-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Tabs Navigation */
.booking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.booking-tabs::-webkit-scrollbar {
    display: none;
}

.booking-tab-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.booking-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.booking-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--primary-light);
}

/* Tab Status Dots */
.tab-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: 6px;
    flex-shrink: 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tab-status-dot.dot-red {
    background-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}

.tab-status-dot.dot-green {
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.45);
}

.tab-status-dot.dot-blue {
    background-color: #0b3f6b !important;
    box-shadow: 0 0 6px rgba(11, 63, 107, 0.55) !important;
}

[data-theme="dark"] .tab-status-dot.dot-blue {
    background-color: #38bdf8 !important;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.55) !important;
}

/* Height-stable Tab Panes using CSS Grid */
.booking-tabs-container {
    display: grid;
    grid-template-columns: 100%;
    align-items: start;
    position: relative;
    width: 100%;
}

.booking-tab-pane {
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    width: 100%;
}

.booking-tab-pane.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* Invalid Field Highlights */
input.input-invalid,
select.input-invalid,
textarea.input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
    .booking-header-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 0;
    }
    
    .booking-header-actions {
        justify-content: flex-end;
    }
}








