/**
 * Admin Room Management Styles - Carolina Language Academy
 * Standalone CSS for the admin room management panel
 */

/* ==========================================================================
   CSS Variables - Same Brand Colors as Teacher Portal
   ========================================================================== */
:root {
    --primary: #222E66;
    --primary-dark: #1a2452;
    --primary-light: #2d3a7a;
    --primary-lighter: #f0f4ff;
    --accent: #F16C13;
    --accent-dark: #d85a0a;
    --accent-light: #fff7ed;
    --accent-hover: #e05d08;
    --secondary: #2EA3F2;
    --secondary-light: #e8f4fd;
    --success: #15803d;
    --success-light: #dcfce7;
    --warning: #ca8a04;
    --warning-light: #fef9c3;
    --error: #dc2626;
    --error-light: #fee2e2;
    --info: #0284c7;
    --info-light: #e0f2fe;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; border: none; background: none; font-family: inherit; }
select, input, textarea { font-family: inherit; }

.admin-app { min-height: 100vh; }

/* ==========================================================================
   Auth Screen
   ========================================================================== */
.admin-auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.auth-card > p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.auth-form { text-align: left; }

.auth-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.auth-hint i { color: var(--accent); }

.auth-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--error-light);
    color: var(--error);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.input-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(34, 46, 102, 0.1);
}

select, .filter-select {
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

select:focus, .filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    resize: vertical;
    color: var(--text-primary);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.search-box input {
    padding: 0.625rem 1rem 0.625rem 2.375rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    width: 200px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--text-inverse);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-secondary:hover { background: var(--border-light); }

.btn-full { width: 100%; }

.btn-approve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-approve:hover { background: #12692f; }

.btn-deny {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--error);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-deny:hover { background: #b91c1c; }

.btn-revert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: var(--info);
    transition: var(--transition-fast);
}

.btn-revert:hover { background: #0369a1; }

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 0.8125rem;
}

.btn-icon.approve { color: var(--success); }
.btn-icon.approve:hover { background: var(--success-light); }
.btn-icon.deny { color: var(--error); }
.btn-icon.deny:hover { background: var(--error-light); }
.btn-icon.edit { color: var(--primary); }
.btn-icon.edit:hover { background: var(--primary-lighter); }
.btn-icon.email { color: var(--info); }
.btn-icon.email:hover { background: var(--info-light); }
.btn-icon.undo { color: var(--warning); }
.btn-icon.undo:hover { background: var(--warning-light); }

/* ==========================================================================
   Header
   ========================================================================== */
.admin-header {
    background: var(--primary);
    color: var(--text-inverse);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
}

.header-brand i { font-size: 1.25rem; color: var(--accent); }

.header-nav { display: flex; gap: 0.25rem; }

.nav-tab {
    padding: 0.625rem 1rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-inverse); }
.nav-tab.active { background: rgba(255, 255, 255, 0.15); color: var(--text-inverse); }

.btn-lock {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-lock:hover { background: var(--error); color: white; }

/* ==========================================================================
   Main Content
   ========================================================================== */
.admin-content {
    padding: 80px 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   KPI Grid
   ========================================================================== */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--border-medium);
}

.kpi-card.kpi-pending { border-left-color: var(--warning); }
.kpi-card.kpi-today { border-left-color: var(--info); }
.kpi-card.kpi-week { border-left-color: var(--primary); }
.kpi-card.kpi-denied { border-left-color: var(--error); }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-pending .kpi-icon { background: var(--warning-light); color: var(--warning); }
.kpi-today .kpi-icon { background: var(--info-light); color: var(--info); }
.kpi-week .kpi-icon { background: var(--primary-lighter); color: var(--primary); }
.kpi-denied .kpi-icon { background: var(--error-light); color: var(--error); }

.kpi-data { display: flex; flex-direction: column; }
.kpi-number { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.kpi-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ==========================================================================
   Dashboard Grid
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i { color: var(--primary); }

.card-body { padding: 1rem 1.25rem; min-height: 200px; }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.header-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Pending Queue (Dashboard)
   ========================================================================== */
.pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-light);
}

.pending-item:last-child { border-bottom: none; }

.pending-info { flex: 1; }
.pending-teacher { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.pending-detail { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.125rem; }
.pending-detail i { margin-right: 0.25rem; }

.pending-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

/* ==========================================================================
   Today's Schedule (Dashboard)
   ========================================================================== */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.schedule-item:last-child { border-bottom: none; }

.schedule-day-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.schedule-day-header:first-child { margin-top: 0; }

.schedule-day-today {
    color: var(--primary);
}

.schedule-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 100px;
}

.schedule-room {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-inverse);
    background: var(--primary);
    padding: 0.2rem 0.625rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.schedule-details { flex: 1; }
.schedule-course { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.schedule-teacher { font-size: 0.75rem; color: var(--text-secondary); }

/* ==========================================================================
   Reservations Table
   ========================================================================== */
.reservations-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.admin-table thead { background: var(--bg-secondary); }

.admin-table th {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tbody tr { transition: background var(--transition-fast); }
.admin-table tbody tr:hover { background: var(--bg-secondary); }
.admin-table tbody tr:last-child td { border-bottom: none; }

.table-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.table-status-badge.status-pending { background: var(--warning-light); color: var(--warning); }
.table-status-badge.status-approved { background: var(--success-light); color: var(--success); }
.table-status-badge.status-denied { background: var(--error-light); color: var(--error); }
.table-status-badge.status-cancelled { background: var(--bg-tertiary); color: var(--text-muted); }
.table-status-badge.status-scheduled { background: var(--info-light); color: var(--info); }

.table-actions { display: flex; gap: 0.25rem; }

/* ==========================================================================
   Availability Gantt
   ========================================================================== */
.avail-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 3px;
}

.view-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.view-btn.active {
    background: var(--bg-primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.view-btn:hover:not(.active) { color: var(--text-primary); }

.location-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.location-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
}

.location-btn.active {
    background: var(--bg-primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.location-btn:hover:not(.active) { color: var(--text-primary); }

.avail-nav { display: flex; align-items: center; gap: 0.5rem; }

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.calendar-nav-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.calendar-today-btn {
    padding: 0.375rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition-fast);
}

.calendar-today-btn:hover { background: var(--primary-lighter); }

.calendar-date-jump {
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--bg-primary);
    cursor: pointer;
    width: 130px;
}
.calendar-date-jump:hover { border-color: var(--primary); }
.calendar-date-jump:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(241, 108, 19, 0.15); }

.avail-date-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
}

.avail-gantt-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

/* Gantt Day View — Draggable Blocks */
.gantt-day { min-width: 900px; }

.gantt-header {
    display: grid;
    grid-template-columns: 130px repeat(28, 1fr);
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.gantt-corner { padding: 0.625rem; font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; }
.gantt-time-cell {
    padding: 0.625rem 0;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    border-left: 1px solid var(--border-light);
}
.gantt-time-cell.hour { font-weight: 600; border-left-color: var(--border-medium); }
.gantt-time-cell.half { border-left: 1px dashed #eee; }

.gantt-body-drag { position: relative; }

.gantt-row {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    min-height: 56px;
}

.gantt-row-unassigned {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(245, 158, 11, 0.04) 8px,
        rgba(245, 158, 11, 0.04) 16px
    );
    border-top: 2px dashed var(--warning);
}

.gantt-room-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-light);
    position: sticky;
    left: 0;
    z-index: 1;
    width: 130px;
    min-width: 130px;
    flex-shrink: 0;
}

.gantt-room-name { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.gantt-room-cap { font-size: 0.65rem; color: var(--text-muted); }

/* Slots area — contains background grid and overlay blocks */
.gantt-row-slots {
    flex: 1;
    position: relative;
    min-height: 56px;
}

.gantt-bg-grid {
    display: grid;
    grid-template-columns: repeat(28, 1fr);
    position: absolute;
    inset: 0;
}

.gantt-bg-cell {
    border-left: 1px solid #f0f0f0;
    min-height: 56px;
}

.gantt-bg-cell.hour-line { border-left: 1px solid var(--border-light); }

/* Booking blocks layer — positioned over the grid */
.gantt-blocks-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Individual draggable booking block */
.gantt-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: grab;
    pointer-events: all;
    transition: box-shadow 0.15s, opacity 0.15s;
    z-index: 1;
    user-select: none;
}

.gantt-block:hover {
    box-shadow: var(--shadow-md);
    z-index: 5;
}

.gantt-block.block-approved {
    background: var(--success-light);
    border: 2px solid var(--success);
    color: var(--success);
}

.gantt-block.block-pending {
    background: var(--warning-light);
    border: 2px solid var(--warning);
    color: var(--warning);
}

.gantt-block.block-denied {
    background: var(--error-light);
    border: 2px solid var(--error);
    color: var(--error);
    opacity: 0.5;
}

.gantt-block.dragging {
    cursor: grabbing;
    opacity: 0.85;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

body.gantt-dragging { cursor: grabbing !important; user-select: none; }
body.gantt-dragging * { cursor: grabbing !important; }

.gantt-block-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.375rem;
    overflow: hidden;
    min-width: 0;
}

.gantt-block-name {
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gantt-block-time {
    font-size: 0.575rem;
    font-weight: 600;
    opacity: 0.8;
    white-space: nowrap;
}

.gantt-block-course {
    font-size: 0.525rem;
    font-weight: 400;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Resize handles */
.gantt-block-resize-l,
.gantt-block-resize-r {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    z-index: 2;
    pointer-events: all;
}

.gantt-block-resize-l { left: 0; border-radius: 6px 0 0 6px; }
.gantt-block-resize-r { right: 0; border-radius: 0 6px 6px 0; }

.gantt-block-resize-l:hover,
.gantt-block-resize-r:hover {
    background: rgba(0, 0, 0, 0.08);
}

.gantt-block-resize-l::after,
.gantt-block-resize-r::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s;
}

.gantt-block-resize-l::after { left: 2px; }
.gantt-block-resize-r::after { right: 2px; }

.gantt-block:hover .gantt-block-resize-l::after,
.gantt-block:hover .gantt-block-resize-r::after {
    opacity: 0.4;
}

/* Drag tooltip — shows updated time while dragging */
.gantt-drag-tooltip {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: var(--text-inverse);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    z-index: 200;
    box-shadow: var(--shadow-md);
}

/* Now line */
.gantt-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    z-index: 10;
    pointer-events: none;
}

.gantt-now-line::before {
    content: 'NOW';
    position: absolute;
    top: -18px;
    left: -14px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Legend */
.gantt-legend {
    display: flex;
    gap: 1.25rem;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.gantt-legend-hint {
    margin-left: auto;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.gantt-legend-hint i { margin-right: 0.125rem; }

.gantt-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.gantt-legend-dot.approved { background: var(--success-light); border-color: var(--success); }
.gantt-legend-dot.pending { background: var(--warning-light); border-color: var(--warning); }
.gantt-legend-dot.denied { background: var(--error-light); border-color: var(--error); }
.gantt-legend-dot.free { background: white; }

/* Gantt Week View */
.gantt-week { min-width: 700px; }

.gantt-week-header {
    display: grid;
    grid-template-columns: 130px repeat(7, 1fr);
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-secondary);
}

.gantt-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-left: 1px solid var(--border-light);
}

.gantt-day-name { font-size: 0.6875rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }
.gantt-day-date { font-size: 0.75rem; color: var(--text-primary); font-weight: 600; margin-top: 0.125rem; }
.gantt-day-header.today { background: var(--primary-lighter); }
.gantt-day-header.today .gantt-day-name { color: var(--primary); }

.gantt-week-row {
    display: grid;
    grid-template-columns: 130px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-light);
    min-height: 70px;
}

.gantt-week-row.gantt-row-unassigned {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(245, 158, 11, 0.04) 8px,
        rgba(245, 158, 11, 0.04) 16px
    );
    border-top: 2px dashed var(--warning);
}

.gantt-week-cell {
    border-left: 1px solid var(--border-light);
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gantt-week-cell.today { background: rgba(34, 46, 102, 0.02); }

.week-booking-bar {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-bar-time {
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.week-bar-teacher {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.week-bar-course {
    font-size: 0.55rem;
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.week-bar-type {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0 3px;
    border-radius: 2px;
    background: rgba(0,0,0,0.08);
    vertical-align: middle;
}

.week-booking-bar:hover { transform: scale(1.02); box-shadow: var(--shadow-sm); }

.week-booking-bar.approved { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.week-booking-bar.pending { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }
.week-booking-bar.denied { background: var(--error-light); color: var(--error); border-left: 3px solid var(--error); opacity: 0.6; }

/* ==========================================================================
   Master Calendar
   ========================================================================== */
#masterCalendarGrid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.master-location-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.master-location-header {
    padding: 0.875rem 1.25rem;
    background: var(--primary-lighter, #eef2ff);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-light);
}

.master-location-header i { margin-right: 0.5rem; color: var(--accent, #e97a1f); }

.master-location-grid { overflow-x: auto; }

.master-calendar-header,
.master-calendar-row {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-light);
}

.master-day-slot {
    padding: 0.375rem;
    border-left: 1px solid var(--border-light);
    min-height: 56px;
}

.master-room-col {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-left: none;
    min-height: auto;
}

.master-day-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: 0.5rem;
}

.master-day-header.today { background: var(--primary-lighter, #eef2ff); }

.master-day-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 70px;
}

.master-day-cell.today { background: rgba(34, 46, 102, 0.02); }

/* ==========================================================================
   Availability — Month View
   ========================================================================== */
.avail-month-grid {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.avail-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.avail-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.avail-month-dow {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0.625rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avail-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.avail-month-cell {
    min-height: 120px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
}

.avail-month-cell:nth-child(7n) { border-right: none; }

.avail-month-cell.blank {
    background: var(--bg-secondary);
    opacity: 0.4;
}

.avail-month-cell.today {
    background: rgba(34, 46, 102, 0.04);
}

.avail-month-cell.today .avail-month-day-num {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avail-month-cell.weekend {
    background: var(--bg-secondary);
}

.avail-month-day-num {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.avail-month-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}


.avail-month-more {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1px 5px;
    cursor: default;
}

/* ==========================================================================
   Room Directory
   ========================================================================== */
.rooms-directory {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Location group */
.room-dir-location-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.room-dir-loc-header {
    padding-bottom: 0.625rem;
    margin-bottom: 0;
}

.room-dir-loc-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-dir-loc-title i {
    font-size: 1rem;
    color: var(--primary);
}

.room-dir-loc-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.room-dir-loc-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Room directory table layout */
.room-dir-table {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.room-dir-table-head {
    display: grid;
    grid-template-columns: 140px 100px 90px 80px 1fr 70px;
    gap: 0;
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
}

.room-dir-th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.room-dir-row {
    display: grid;
    grid-template-columns: 140px 100px 90px 80px 1fr 70px;
    gap: 0;
    padding: 0.625rem 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.room-dir-row:last-child { border-bottom: none; }
.room-dir-row:hover { background: var(--bg-secondary); }

.room-dir-td {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.room-dir-td-name {
    gap: 0.5rem;
}

.room-dir-td-name strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.room-dir-row-icon {
    color: var(--primary);
    opacity: 0.5;
    font-size: 0.8rem;
}

.room-dir-td-cap {
    font-weight: 600;
    color: var(--text-primary);
}

.room-dir-td-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-dir-td-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition-fast);
}

.room-dir-row:hover .room-dir-td-actions { opacity: 1; }

.room-dir-size {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-dir-size.small { background: var(--info-light); color: var(--info); }
.room-dir-size.medium { background: var(--warning-light); color: var(--warning); }
.room-dir-size.large { background: var(--success-light); color: var(--success); }


/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    padding: 1rem;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: var(--transition-normal);
    position: relative;
}

.modal-overlay.active .modal-container { transform: scale(1); }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 1;
}

.modal-close:hover { background: var(--error-light); color: var(--error); }

.modal-header {
    padding: 1.5rem 2rem 1rem;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.modal-header h2 i { color: var(--primary); }

/* Review Modal */
.review-modal {
    max-width: 680px;
    width: 100%;
    padding: 0 2rem 2rem;
}

.review-content { margin-bottom: 1.5rem; }

.review-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.review-field { display: flex; flex-direction: column; gap: 0.125rem; }
.review-field-label { font-size: 0.6875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.review-field-value { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }

.review-status-current {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.review-status-label { font-size: 0.8125rem; color: var(--text-secondary); }

.review-notes-display {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Room Picker */
.room-picker {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.375rem;
    background: var(--bg-secondary);
}

.room-pick-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.room-pick-option:hover:not(.unavailable) {
    border-color: var(--primary-light);
    background: var(--primary-lighter);
}

.room-pick-option.selected {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.room-pick-option.unavailable {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}

.room-pick-status {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.room-pick-option:not(.unavailable) .room-pick-status { color: var(--success); }
.room-pick-option.unavailable .room-pick-status { color: var(--error); }
.room-pick-option.selected .room-pick-status { color: var(--primary); }
.room-pick-option.selected .room-pick-status i::before { content: "\f058"; } /* fa-check-circle filled */

.room-pick-info {
    flex: 1;
    min-width: 0;
}

.room-pick-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.room-pick-top strong {
    color: var(--text-primary);
}

.room-pick-cap {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.room-pick-cap i {
    font-size: 0.6rem;
    margin-right: 2px;
}

.room-pick-conflict {
    display: block;
    font-size: 0.6875rem;
    color: var(--error);
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-pick-conflict i {
    margin-right: 3px;
    font-size: 0.6rem;
}

.room-pick-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    white-space: nowrap;
}

.room-pick-option:not(.unavailable) .room-pick-badge {
    background: var(--success-light);
    color: var(--success);
}

.room-pick-option.unavailable .room-pick-badge {
    background: var(--error-light);
    color: var(--error);
}

.room-pick-option.selected .room-pick-badge {
    background: var(--primary-lighter);
    color: var(--primary);
}

.room-change-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--warning-light);
    color: var(--warning);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.review-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    justify-content: flex-end;
}

.review-actions button { flex: none; padding: 0.6rem 1.25rem; white-space: nowrap; }

/* Confirm Modal */
.confirm-modal {
    max-width: 440px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--warning-light);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.confirm-modal h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.confirm-modal p, .confirm-modal .confirm-body { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

.confirm-actions { display: flex; gap: 0.75rem; }
.confirm-actions button { flex: 1; }

/* Drag Confirm Details */
.drag-confirm-details {
    text-align: left;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
}

.drag-confirm-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light);
}

.drag-confirm-field:last-child,
.drag-confirm-change:last-child { border-bottom: none; }

.drag-confirm-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.drag-confirm-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.drag-confirm-change {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
}

.drag-confirm-arrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.3rem;
    font-size: 0.875rem;
}

.drag-confirm-arrow i {
    color: var(--accent);
    font-size: 1rem;
}

.drag-confirm-old {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-weight: 400;
}

.drag-confirm-new {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-lighter);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    animation: toastSlideIn 0.3s ease;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--error); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--primary); }

.toast-icon { font-size: 1.125rem; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--primary); }

.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.8125rem; margin-bottom: 0.125rem; }
.toast-message { font-size: 0.75rem; color: var(--text-secondary); }

.toast-close {
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px;
}

.toast-close:hover { color: var(--text-primary); }
.toast.toast-hiding { animation: toastSlideOut 0.3s ease forwards; }

@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ==========================================================================
   Empty States
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.875rem; }

/* ==========================================================================
   Room Edit Modal
   ========================================================================== */
.room-edit-modal {
    max-width: 520px;
    width: 100%;
    padding: 2rem;
}

.room-edit-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.room-edit-modal .form-group {
    margin-bottom: 1rem;
}

.room-edit-modal label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.room-edit-modal input[type="text"],
.room-edit-modal input[type="number"],
.room-edit-modal select,
.room-edit-modal textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-fast);
    font-family: inherit;
}

.room-edit-modal input:focus,
.room-edit-modal select:focus,
.room-edit-modal textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 46, 102, 0.1);
}


/* ==========================================================================
   Group Courses Tab
   ========================================================================== */
.gc-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gc-loading i { margin-right: 0.5rem; color: var(--primary); }

.gc-course-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition-fast);
}

.gc-course-card:hover { border-color: var(--border-medium); }
.gc-course-card.expanded { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.gc-course-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    gap: 1rem;
    user-select: none;
}

.gc-course-header:hover { background: var(--bg-secondary); }

.gc-course-main { flex: 1; min-width: 0; }

.gc-course-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-course-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.gc-course-meta i { margin-right: 0.25rem; opacity: 0.6; }

.gc-course-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.gc-course-stats {
    display: flex;
    gap: 0.5rem;
}

.gc-stat {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gc-stat i { font-size: 0.6rem; }
.gc-stat-ok { background: var(--success-light); color: var(--success); }
.gc-stat-warn { background: var(--warning-light); color: var(--warning); }
.gc-stat-muted { background: var(--bg-tertiary); color: var(--text-muted); }

.btn-bulk-assign {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-bulk-assign:hover { background: var(--accent-dark); }

.gc-expand-icon {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

/* Course body (classes table) */
.gc-course-body {
    border-top: 1px solid var(--border-light);
    padding: 0;
    background: var(--bg-secondary);
}

.gc-classes-table { padding: 0; }

.gc-classes-head {
    display: grid;
    grid-template-columns: 140px 120px 100px 1fr 120px;
    padding: 0.5rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.gc-class-row {
    display: grid;
    grid-template-columns: 140px 120px 100px 1fr 120px;
    padding: 0.5rem 1.25rem;
    align-items: center;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.gc-class-row:last-child { border-bottom: none; }
.gc-class-row:hover:not(.past) { background: var(--bg-primary); }

.gc-class-row.past { opacity: 0.5; }
.gc-class-row.cancelled { text-decoration: line-through; opacity: 0.4; }

.gc-class-date { font-weight: 500; color: var(--text-primary); }
.gc-class-time { color: var(--text-secondary); }
.gc-class-status { }
.gc-class-room { }
.gc-class-actions { display: flex; justify-content: flex-end; gap: 0.25rem; }

.gc-room-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.gc-room-badge.approved { background: var(--success-light); color: var(--success); }
.gc-room-badge.pending { background: var(--warning-light); color: var(--warning); }

.gc-room-unassigned {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--error);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.gc-room-unassigned i { font-size: 0.6rem; }

.btn-gc-assign {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition-fast);
}

.btn-gc-assign:hover { background: var(--primary-light); }

/* Past classes toggle */
.gc-past-divider {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    transition: var(--transition-fast);
}

.gc-past-divider:hover { color: var(--text-secondary); background: var(--bg-tertiary); }
.gc-past-divider i { font-size: 0.6rem; transition: var(--transition-fast); }

.gc-past-classes { display: none; }
.gc-past-classes.gc-past-visible { display: block; }

.gc-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

/* Bulk Assign Modal */
.bulk-assign-modal {
    width: 500px;
    max-width: 95vw;
    padding: 1.5rem;
}

.bulk-assign-info {
    padding: 0.75rem 1rem;
    background: var(--info-light);
    color: var(--info);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.bulk-assign-info p { margin: 0; }

.bulk-assign-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gc-room-loc-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0.5rem 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gc-room-loc-label:not(:first-child) {
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 0.75rem;
}

.room-pick-status.partial {
    font-size: 0.6875rem;
    color: var(--warning);
}

.room-pick-status.avail {
    font-size: 0.6875rem;
    color: var(--success);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .admin-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (max-width: 768px) {
    .admin-header { padding: 0 1rem; }
    .header-brand span { display: none; }
    .nav-tab span { display: none; }
    .admin-content { padding: 80px 1rem 1rem; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .avail-controls { flex-direction: column; align-items: flex-start; }
    .room-dir-table-head { display: none; }
    .room-dir-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.5rem;
        padding: 0.75rem 1rem;
    }
    .room-dir-td-desc { grid-column: 1 / -1; }
    .room-dir-td-actions { opacity: 1; }
    .review-info-grid { grid-template-columns: 1fr; }
    .review-actions { flex-wrap: wrap; justify-content: center; }
    .gc-course-header { flex-direction: column; align-items: flex-start; }
    .gc-course-right { width: 100%; justify-content: space-between; }
    .gc-classes-head { display: none; }
    .gc-class-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.5rem;
    }
    .gc-class-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ==========================================================================
   Announcements Tab & Modal
   ========================================================================== */

/* Announcement Modal */
.announcement-modal {
    max-width: 580px;
    width: 100%;
    padding: 0 2rem 2rem;
}

.announcement-modal .form-group {
    margin-bottom: 1.125rem;
}

.announcement-modal label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.announcement-modal label small {
    font-weight: 400;
    color: var(--text-muted);
}

.announcement-modal input[type="text"],
.announcement-modal input[type="date"],
.announcement-modal select,
.announcement-modal textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-fast);
    font-family: inherit;
    box-sizing: border-box;
}

.announcement-modal input:focus,
.announcement-modal select:focus,
.announcement-modal textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 46, 102, 0.1);
}

.announcement-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.announcement-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.announcement-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

/* Announcement Cards List */
.ann-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition-fast);
}

.ann-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ann-card.ann-inactive {
    opacity: 0.55;
}

.ann-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem 0.5rem;
    gap: 1rem;
}

.ann-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ann-card-title i {
    font-size: 1rem;
}

.ann-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.ann-card-meta i {
    margin-right: 0.2rem;
}

.ann-card-body {
    padding: 0 1.25rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.ann-card-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.ann-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ann-badge-pinned {
    background: var(--error-light);
    color: var(--error);
}

.ann-badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.ann-badge-expired {
    background: #fee2e2;
    color: #dc2626;
}

.ann-badge-upcoming {
    background: #dbeafe;
    color: #2563eb;
}

/* Expired/upcoming cards are dimmed */
.ann-expired {
    opacity: 0.5;
}

.ann-upcoming {
    opacity: 0.75;
}

/* Type color accents */
.ann-type-info    { border-left-color: #3b82f6; }
.ann-type-warning { border-left-color: #f59e0b; }
.ann-type-urgent  { border-left-color: #ef4444; }
.ann-type-closure { border-left-color: #8b5cf6; }

.ann-type-info    .ann-card-title i { color: #3b82f6; }
.ann-type-warning .ann-card-title i { color: #f59e0b; }
.ann-type-urgent  .ann-card-title i { color: #ef4444; }
.ann-type-closure .ann-card-title i { color: #8b5cf6; }

/* Loading state */
.ann-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .announcement-modal .form-row {
        grid-template-columns: 1fr;
    }
    .ann-card-header {
        flex-direction: column;
    }
    .ann-card-actions {
        align-self: flex-end;
    }
}
