:root {
    --primary: #116035;
    --primary-dark: #0a4526;
    --secondary: #FFDD00;
    --accent: #E76F51;
    --ink: #111111;
    --white: #FDFDFD;
    --grey: #f1f5f9;
    --grey-mid: #e2e8f0;
    --grey-dark: #64748b;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --yellow-soft: #fefce8;
    --yellow-border: #fef08a;
    --red-soft: #fef2f2;
    --red-border: #fecaca;
    --red-text: #991b1b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--white);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ─── BUTTONS ─────────────────────────────────── */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--grey-mid);
    background: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    color: var(--ink);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17,96,53,0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--ink);
    border-color: var(--secondary);
}
.btn-secondary:hover {
    background: #f0d000;
    border-color: #f0d000;
    transform: translateY(-1px);
}

.btn-danger {
    background: white;
    color: #dc2626;
    border-color: #fca5a5;
}
.btn-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

.btn-full { width: 100%; justify-content: center; }

/* ─── FORMS ───────────────────────────────────── */
.form-group { margin-bottom: 1.4rem; }
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
}
.form-group .optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.3rem;
}
.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--grey-mid);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17,96,53,0.1);
}
.form-group input.error { border-color: #dc2626; }

.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
}
.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}
.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

/* ─── CARDS ───────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-mid);
}

/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.dashboard-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-mid);
    transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.dashboard-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}
.dashboard-card h2 i {
    width: 22px;
    height: 22px;
}
.badge {
    display: inline-flex;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-grey { background: var(--grey); color: var(--grey-dark); }

/* === SPONSOR SECTION === */
.sponsor-section {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    text-align: center;
}
.sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
    margin-top: 2rem;
}
.sponsor-grid img {
    opacity: 0.75;
    transition: all 0.3s;
    filter: grayscale(100%);
}
.sponsor-grid img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* === HOME HERO === */
.portal-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}
.portal-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}
.portal-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.portal-hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.portal-hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* ─── FONTS (Local Hosting) ───────────────────── */
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/Outfit-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/Outfit-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/Outfit-Bold.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/Outfit-ExtraBold.ttf') format('truetype');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* (Standard definitions below at the end of file for consistency) */

/* === ADMIN MOBILE & TRANSITIONS === */
.admin-sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-hamburger {
    display: none;
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 1001;
    background: var(--ink);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 1000;
        height: 100vh;
    }
    .admin-sidebar.nav-open {
        transform: translateX(0);
    }
    .admin-overlay.nav-open {
        display: block;
    }
    .admin-hamburger {
        display: flex;
    }
    .admin-main {
        padding: 1.5rem;
        padding-top: 4.5rem;
    }
}

/* === UTILITIES === */
.container, .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
.section { margin-bottom: 3rem; }
.page-subtitle { color: var(--grey-dark); margin-bottom: 2rem; }

.admin-card {
    background: white;
    padding: 1.8rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--grey-mid);
}

/* === PORTAL NAV === */
.portal-nav {
    background: white;
    border-bottom: 2px solid var(--grey);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.nav-logo img { border-radius: 8px; box-shadow: var(--shadow-sm); }

.nav-toggle {
    display: none;
    background: var(--grey);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.2s;
}
.nav-toggle:hover { background: var(--grey-mid); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links a {
    color: var(--grey-dark);
    text-decoration: none;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.nav-links a:hover { background: var(--grey); color: var(--primary); }
.nav-links a.active { color: var(--primary); background: rgba(17,96,53,0.08); }

.nav-admin {
    background: var(--primary) !important;
    color: white !important;
    margin-left: 0.75rem;
    box-shadow: 0 4px 12px rgba(17,96,53,0.2);
}
.nav-admin:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(17,96,53,0.3) !important; }

/* Sub-Nav (Breadcrumb Pill Nav) */
.portal-subnav {
    background: #fdfdfd;
    border-bottom: 1px solid var(--grey-mid);
    padding: 0.6rem 1.5rem;
    z-index: 999;
}
.subnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-inner a {
    color: #64748b;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.subnav-inner a:hover { background: white; border-color: var(--grey-mid); color: var(--ink); }
.subnav-inner a.active { 
    background: #e7f3ef; 
    color: var(--primary); 
    border-color: rgba(17,96,53,0.15);
}
.subnav-back {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-right: 1.25rem !important;
    margin-right: 0.5rem;
    border-right: 2px solid var(--grey-mid) !important;
    border-radius: 0 !important;
}
.subnav-back:hover { background: transparent !important; color: var(--primary) !important; }

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--grey-mid);
        flex-direction: column;
        padding: 0.75rem;
        box-shadow: var(--shadow-lg);
        gap: 0.15rem;
        z-index: 1000;
    }
    .nav-links.open { display: flex; }
    .nav-admin { margin-left: 0 !important; }

    .portal-hero {
        padding: 2.6rem 1rem;
    }
    .portal-hero-title {
        font-size: 2rem;
        letter-spacing: -0.4px;
    }
    .portal-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 0 0.75rem;
        gap: 1rem;
    }
    .dashboard-card {
        padding: 1.2rem;
    }
    .sponsor-section {
        padding: 0 1rem;
    }
    .sponsor-grid {
        gap: 1.2rem;
    }
}

/* === PORTAL FOOTER === */
.portal-footer {
    text-align: center;
    padding: 0.5rem 1rem 1.5rem;
    color: var(--grey-dark);
    font-size: 0.85rem;
    margin-top: 0;
}

/* === ADMIN LAYOUT & SIDEBAR (Restored from Archive) === */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    background: var(--grey);
}

.admin-sidebar {
    background: var(--ink);
    color: white;
    padding: 2rem 1.2rem;
    position: sticky;
    top: 0; /* Adjusted in JS or simplified for now */
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    z-index: 900;
}

.admin-sidebar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.admin-sidebar .logo img { height: 36px; }
.admin-sidebar .logo span { color: var(--secondary); }

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.admin-nav a i {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-nav a.active {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.admin-nav .divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 1rem 0;
}

.logout-btn {
    background: none;
    border: none;
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-top: 1rem;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: white;
}

.admin-main {
    padding: 2.5rem;
    background: var(--grey);
}

.admin-main h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Admin Mobile Toggles */
.admin-hamburger {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1001;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
}

@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    .admin-sidebar.nav-open {
        transform: translateX(0);
    }
    .admin-overlay.nav-open {
        display: block;
    }
    .admin-hamburger {
        display: flex;
    }
    .admin-main {
        padding: 1.5rem;
    }
}
