/* styles.css - VERSION 2: ARCHITECTURAL LUXURY (FINAL) */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    /* PALETTE: Architectural Luxury */
    --bg-main: #050505; /* OLED Black */
    --bg-panel: #0a0a0a; /* Deep Charcoal */
    --text-main: #EAEAEA;
    --text-muted: #888888;

    /* ACCENTS */
    --gold-primary: #D4AF37;       /* Antique Gold */
    --gold-dim: #8a7e5f;           /* Muted Gold for borders */
    --brown-executive: #2C2A26;    /* Warm dark background */

    /* GLASS PHYSICS */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: white !important;
    font-weight: 400; /* Lighter weight for elegance */
}

/* Force Text Colors */
.text-slate-900, .text-slate-800, .text-slate-700 { color: white !important; }
.text-slate-600, .text-slate-500, .text-slate-400 { color: var(--text-muted) !important; }

/* --- NAVIGATION & GLASSWARE --- */
.glass-panel-dark {
    background-color: rgba(5, 5, 5, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: 0 40px 100px rgba(0,0,0,1);
}

/* Control Panel (Buttons Container) */
.glass-control-panel {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    display: flex;
    padding: 0.75rem;
    gap: 0.75rem;
    justify-content: center;
    border-radius: 2rem;
}

@media (min-width: 640px) {
    .glass-control-panel {
        border-radius: 100px;
        padding: 0.5rem;
    }
}

/* Standard Tile */
.glass-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.0) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 1rem;
    transition: all 0.3s ease-out;
}
.glass-panel:hover {
    border-color: var(--gold-dim);
    background: rgba(255, 255, 255, 0.04);
}

/* --- ACCENTS --- */
.accent-pill {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
}

/* --- BUTTONS --- */
.primary-btn {
    display: inline-block;
    white-space: nowrap;
    background-color: var(--text-main);
    color: var(--bg-main);
    border-radius: 99px;
    padding: 16px 36px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid white;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
}

.primary-btn:hover {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.5);
}

.secondary-btn {
    display: inline-block;
    white-space: nowrap;
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 99px;
    padding: 16px 36px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

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

/* --- PRESS SECTION STYLES (Reference Match) --- */
.press-row {
    display: grid;
    grid-template-columns: 1fr;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.press-row:hover {
    border-bottom: 1px solid var(--text-main);
    padding-left: 1rem; /* Subtle drift */
}

.press-row:hover .press-arrow {
    transform: translateX(5px) rotate(-45deg);
    color: var(--gold-primary);
}

@media (min-width: 768px) {
    .press-row {
        grid-template-columns: 100px 1fr 150px 40px;
        align-items: baseline;
    }
}

.press-date {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--gold-dim);
}

.press-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-main);
    line-height: 1.2;
}

.press-source {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: right;
}

.press-arrow {
    text-align: right;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* --- UTILITIES --- */
.logo-white-force { filter: grayscale(100%) invert(100%) brightness(200%); opacity: 1; }
.horizon-mask { mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%); }
.vignette { background: radial-gradient(circle, transparent 40%, var(--bg-main) 100%); }

/* INPUTS */
input, select, textarea {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    color: white !important;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem !important;
    padding: 1rem 0 !important;
    border-radius: 0 !important;
    width: 100%;
    transition: border-color 0.3s;
}
input:focus, select:focus {
    border-bottom-color: var(--gold-primary) !important;
    outline: none !important;
}
label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

/* PAGE TRANSITIONS */
.page-section { display: none; animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- THEME FIXES & OVERRIDES --- */

/* 1. Force Dark Mode on Legacy Light Sections (Old Boys, Schools, etc) */
#old-boys-page .bg-blue-50,
#old-boys-page .bg-white,
#schools-page .bg-white,
#schools-page .bg-blue-50,
#teacher-relief-page .bg-slate-50,
#remedial-page .bg-slate-50,
#business-page .bg-slate-50,
#structure-page .bg-white,
#structure-page .bg-slate-50,
#media-page .bg-slate-50 {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

/* 2. Fix Text Colors inside those forced dark sections */
#old-boys-page h1, #old-boys-page h3, #old-boys-page h4,
#schools-page h1, #schools-page h3, #schools-page h4,
#structure-page h1, #structure-page h3,
#teacher-relief-page h1 {
    color: white !important;
}

#old-boys-page p,
#schools-page p,
#structure-page p,
#teacher-relief-page p {
    color: var(--text-muted) !important;
}

/* 3. Mobile Menu Visibility */
/* Ensure menu is solid black so text is legible */
#mobile-menu {
    background-color: #000000 !important;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* 4. Fix Vetting Page Cards */
#vetting-page .glass-panel-dark {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--glass-border);
}

/* --- DASHBOARD ARCHITECTURE (FIXED) --- */

/* --- DASHBOARD ARCHITECTURE (SEAMLESS MODE) --- */

/* Layout Grid */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px); /* Subtract Header Height */
    background-color: var(--bg-main);
    position: relative;
    overflow-x: hidden;
}

/* Sidebar */
.dash-sidebar {
    width: 280px;
    background: rgba(10, 10, 10, 0.98);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);

    /* POSITIONING FIX: Sit below the Global Header */
    position: fixed;
    top: 80px; /* Height of your Global Header */
    left: 0;
    height: calc(100vh - 80px);
    z-index: 40; /* Below Global Header (50), Above Content */

    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;

    /* MOBILE STATE: Hidden by default */
    transform: translateX(-100%);
}

/* Sidebar Active State (Mobile Open) */
.dash-sidebar.active {
    transform: translateX(0);
}

/* Desktop Overrides */
@media (min-width: 1024px) {
    .dash-sidebar {
        transform: translateX(0); /* Always show on desktop */
    }

    .dash-main {
        margin-left: 280px; /* Push content right */
    }
}

/* Main Content Area */
.dash-main {
    flex: 1;
    width: 100%;
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.03), transparent 40%);
    position: relative;
    z-index: 10;
    padding-top: 2rem; /* Add breathing room */
}

/* Dashboard Cards */
.dash-card {
    background: #0a0a0a;
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dash-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.stat-value {
    font-family: 'Playfair Display', serif;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
}

.activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.activity-row:last-child { border-bottom: none; }

.dash-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-left: 3px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.dash-nav-link:hover, .dash-nav-link.active {
    color: white;
    background: rgba(255,255,255,0.03);
    border-left-color: var(--gold-primary);
}

.user-avatar-ring {
    padding: 2px;
    border: 1px solid var(--gold-dim);
    border-radius: 50%;
}