/* Design system & styles for the committee scheduling tool */
html {
    font-size: 130%; /* Font size scaled by 1.3 */
}

:root {
    /* LIGHT MODE (Default) */
    --bg-dark: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.15);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --glass-gradient: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.04) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 45%),
                      radial-gradient(circle at 50% 50%, #f1f5f9 0%, #cbd5e1 100%);
}

body.theme-dark {
    /* DARK MODE */
    --bg-dark: #090d16;
    --card-bg: rgba(20, 27, 45, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.25);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --glass-gradient: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
                      radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 100%);
}

body.theme-high-contrast {
    /* HIGH CONTRAST MODE */
    --bg-dark: #000000;
    --card-bg: #000000;
    --card-border: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    
    --primary: #00ffff;
    --primary-hover: #00ffff;
    --primary-glow: rgba(0, 255, 255, 0.5);
    
    --success: #00ff00;
    --success-hover: #00ff00;
    --success-glow: rgba(0, 255, 0, 0.5);
    
    --warning: #ffff00;
    --warning-glow: rgba(255, 255, 0, 0.5);
    
    --danger: #ff0000;
    --danger-hover: #ff0000;
    --danger-glow: rgba(255, 0, 0, 0.5);
    
    --glass-gradient: solid #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Abstract Background */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: var(--glass-gradient);
    pointer-events: none;
}

.app-container {
    max-width: 98%;
    width: 98%;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #c084fc 100%);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}

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

/* Buttons */
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.nav-btn.icon-only {
    padding: 10px;
    font-size: 1.1rem;
}

/* Layout Main */
.app-main {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.glass-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Committee List */
.committee-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.member-avatar.student {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.member-status-indicator {
    font-size: 0.85rem;
}

.member-status-indicator.ready {
    color: var(--success);
}

.member-status-indicator.pending {
    color: var(--warning);
}

/* Recommended List */
.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rec-item {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rec-item:hover {
    background: rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.rec-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rec-date {
    font-size: 0.85rem;
    font-weight: 600;
}

.rec-hour {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.rec-badge {
    background: var(--success);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 8px var(--success-glow);
}

.no-rec-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 10px 0;
}

/* Share Card */
.share-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.share-input-group {
    display: flex;
    gap: 8px;
}

.share-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    outline: none;
}

.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--card-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px var(--success-glow);
}

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

.btn-icon {
    padding: 8px 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Content Views */
.app-content {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    min-height: 500px;
}

.content-view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-view.active {
    display: block;
    opacity: 1;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.view-title h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.view-title p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.4;
}

/* Legend */
.legend {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Color Categories */
.avail-6 { background: rgba(16, 185, 129, 0.7); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.avail-5 { background: rgba(52, 211, 153, 0.45); }
.avail-4 { background: rgba(245, 158, 11, 0.4); }
.busy { background: rgba(239, 68, 68, 0.2); }
.tentative-color { background: rgba(245, 158, 11, 0.25); }

/* Interactive Calendar Grid */
.calendar-wrapper {
    overflow-x: auto;
    margin-top: 10px;
}

.calendar-grid-container {
    display: grid;
    grid-template-columns: 80px repeat(var(--num-dates, 7), 1fr);
    min-width: 750px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.1);
}

.grid-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.grid-header.hour-label-header {
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--card-border);
}

.grid-header.date-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grid-header.date-header .day-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-header.date-header .day-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.hour-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.01);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-right: 1px solid var(--card-border);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    height: 48px;
}

/* Calendar Grid Cell */
.grid-cell {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    height: 48px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
}

.grid-cell:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--primary);
    box-shadow: inset 0 0 4px var(--primary-glow);
    pointer-events: none;
    border-radius: 4px;
    z-index: 5;
}

/* Dashboard cell content */
.db-cell-content {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.db-cell-content.status-6 {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
    color: #34d399;
}
.db-cell-content.status-6:hover {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.db-cell-content.status-5 {
    background: rgba(52, 211, 153, 0.09);
    border-left: 3px solid #34d399;
    color: #a7f3d0;
}
.db-cell-content.status-5:hover {
    background: rgba(52, 211, 153, 0.16);
}

.db-cell-content.status-4 {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    color: #fde68a;
}
.db-cell-content.status-4:hover {
    background: rgba(245, 158, 11, 0.15);
}

.db-cell-content.status-busy {
    background: rgba(239, 68, 68, 0.03);
    border-left: 3px solid rgba(239, 68, 68, 0.2);
    color: var(--text-muted);
}
.db-cell-content.status-busy:hover {
    background: rgba(239, 68, 68, 0.08);
}

.db-avatars {
    display: flex;
    gap: 2px;
}

.dot-avatar {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dot-avatar.avail { background: var(--success); }
.dot-avatar.tentative { background: var(--warning); }
.dot-avatar.busy { background: var(--danger); }

/* Editor View & Interactive elements */
.user-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.glass-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--card-border);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
}

.glass-select:focus {
    border-color: var(--primary);
}

.edit-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.edit-toolbar.disabled, .calendar-grid-container.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.brush-selector {
    display: flex;
    gap: 10px;
}

.brush-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.brush-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.brush-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

.brush-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.brush-color.avail { background: var(--success); }
.brush-color.tentative { background: var(--warning); }
.brush-color.busy { background: var(--danger); }

.bulk-actions {
    display: flex;
    gap: 8px;
}

/* Edit Cell statuses */
.editor-cell-inner {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.editor-cell-inner.state-available {
    background: rgba(16, 185, 129, 0.15);
    border: 1px dashed rgba(16, 185, 129, 0.3);
}

.editor-cell-inner.state-tentative {
    background: rgba(245, 158, 11, 0.2);
    border: 1px dashed rgba(245, 158, 11, 0.4);
}

.editor-cell-inner.state-busy {
    background: rgba(239, 68, 68, 0.25);
    border: 1px dashed rgba(239, 68, 68, 0.45);
}

/* Settings Styles */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 650px;
    margin: 0 auto;
}

.settings-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--card-border), transparent);
}

.settings-group h3 {
    margin-bottom: 12px;
}

.date-add-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.glass-input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--card-border);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.glass-input:focus {
    border-color: var(--primary);
}

.dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.date-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-chip button {
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0;
    display: flex;
}

.date-chip button:hover {
    color: var(--danger);
}

.time-range-row {
    display: flex;
    gap: 20px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.input-field label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Modal Popup Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 460px;
    position: relative;
    padding: 24px;
    animation: modalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlide {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 18px;
    color: var(--text-secondary);
    font-size: 1.6rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: white;
}

.modal h3 {
    font-size: 1.15rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.status-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.status-summary strong {
    color: var(--success);
}

.modal-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.modal-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.modal-user-item.state-available {
    border-left: 3px solid var(--success);
}
.modal-user-item.state-tentative {
    border-left: 3px solid var(--warning);
}
.modal-user-item.state-busy {
    border-left: 3px solid var(--danger);
}

.modal-user-name {
    font-size: 0.8rem;
    font-weight: 500;
}

.modal-user-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-user-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.modal-user-status.available {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.modal-user-status.tentative {
    background: rgba(245, 158, 11, 0.15);
    color: #fde68a;
}
.modal-user-status.busy {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

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

.toast.success {
    border-color: var(--success);
    background: #064e3b;
}

.toast.error {
    border-color: var(--danger);
    background: #7f1d1d;
}

/* Loading spinners */
.loading-spinner {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px 0;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .app-main {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .app-container {
        padding: 12px;
    }
    .app-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .header-nav {
        justify-content: space-between;
    }
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* High Contrast Override Styles */
body.theme-high-contrast {
    background-color: #000000 !important;
    background: #000000 !important;
}

body.theme-high-contrast .glass-bg {
    display: none !important;
}

body.theme-high-contrast .glass-card,
body.theme-high-contrast .app-header,
body.theme-high-contrast .app-content,
body.theme-high-contrast .modal-content {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
    box-shadow: none !important;
}

body.theme-high-contrast .nav-btn,
body.theme-high-contrast .glass-select,
body.theme-high-contrast .glass-input {
    background: #000000 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

body.theme-high-contrast .nav-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

body.theme-high-contrast .btn-success,
body.theme-high-contrast .btn-primary,
body.theme-high-contrast .btn-secondary {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

body.theme-high-contrast .btn-success:hover,
body.theme-high-contrast .btn-primary:hover,
body.theme-high-contrast .btn-secondary:hover {
    background: #ffffff !important;
    color: #000000 !important;
}

body.theme-high-contrast .calendar-grid-container {
    border: 2px solid #ffffff !important;
    background: #000000 !important;
}

body.theme-high-contrast .grid-header {
    border-bottom: 2px solid #ffffff !important;
    background: #000000 !important;
}

body.theme-high-contrast .hour-label {
    border-right: 2px solid #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
    background: #000000 !important;
    color: #ffffff !important;
}

body.theme-high-contrast .grid-cell {
    border-right: 1px solid #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
}

body.theme-high-contrast .db-cell-content.status-6 {
    background: #00ff00 !important;
    color: #000000 !important;
    border: 2px solid #00ff00 !important;
}

body.theme-high-contrast .db-cell-content.status-5 {
    background: #00bb00 !important;
    color: #ffffff !important;
    border: 2px solid #00ff00 !important;
}

body.theme-high-contrast .db-cell-content.status-4 {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffff00 !important;
}

body.theme-high-contrast .db-cell-content.status-busy {
    background: #333333 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

body.theme-high-contrast .member-item {
    border: 1px solid #ffffff !important;
    background: #000000 !important;
}

body.theme-high-contrast .rec-item {
    border: 2px solid #ffff00 !important;
    background: #000000 !important;
    color: #ffffff !important;
}

body.theme-high-contrast .rec-item:hover {
    background: #ffff00 !important;
    color: #000000 !important;
}

body.theme-high-contrast .rec-badge {
    background: #ffff00 !important;
    color: #000000 !important;
}

body.theme-high-contrast .close-btn {
    color: #ffffff !important;
}

body.theme-high-contrast .editor-cell-inner.state-available {
    background: #00ff00 !important;
    border: 2px solid #ffffff !important;
}

body.theme-high-contrast .editor-cell-inner.state-tentative {
    background: #ffff00 !important;
    border: 2px solid #ffffff !important;
}

body.theme-high-contrast .editor-cell-inner.state-busy {
    background: #ff0000 !important;
    border: 2px solid #ffffff !important;
}

/* Contact & Captcha Modal Styles */
.contact-panel {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: all 0.25s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.contact-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-label i {
    font-size: 1.1rem;
    color: var(--primary);
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.contact-link:hover {
    color: #a5b4fc;
    text-shadow: 0 0 8px var(--primary-glow);
}

.download-section {
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.15);
}

.download-section:hover {
    background: rgba(79, 70, 229, 0.08);
}

/* Captcha Modal styles override */
.captcha-modal-content {
    max-width: 420px;
    text-align: center;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

#captcha-image-wrapper {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 55px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#captcha-img {
    width: 160px;
    height: 55px;
    object-fit: contain;
}

.captcha-input-wrapper {
    margin: 10px 0 20px 0;
}

/* Footer Section */
.app-footer {
    margin-top: 40px;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* High Contrast Override for Contact */
body.theme-high-contrast .contact-item {
    border: 2px solid #ffffff !important;
    background: #000000 !important;
    color: #ffffff !important;
}

body.theme-high-contrast .contact-link {
    color: #00ffff !important;
    text-decoration: underline !important;
}

body.theme-high-contrast .app-footer {
    border-top: 2px solid #ffffff !important;
    color: #ffffff !important;
}

