/* ======================================
   HACKEVAL — DEEP SLATE DESIGN SYSTEM
   ====================================== */

/* --- CSS Variables / Tokens --- */
:root {
    --bg-primary: #0B0E14;
    --bg-secondary: #111827;
    --bg-card: #111827;
    --bg-card-hover: #1a2233;
    --bg-input: rgba(255,255,255,0.04);
    --bg-input-focus: rgba(255,255,255,0.07);

    --accent-indigo: #6366F1;
    --accent-indigo-dim: rgba(99,102,241,0.12);
    --accent-emerald: #10B981;
    --accent-emerald-dim: rgba(16,185,129,0.12);
    --accent-amber: #F59E0B;
    --accent-amber-dim: rgba(245,158,11,0.12);
    --accent-red: #EF4444;
    --accent-red-dim: rgba(239,68,68,0.12);
    --accent-cyan: #06B6D4;

    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-accent: #818CF8;

    --border: #1F2937;
    --border-hover: #374151;
    --border-active: #6366F1;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    --radius: 4px;
    --radius-md: 6px;
    --radius-full: 999px;

    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;

    --transition: 150ms ease;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset & Base --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Ambient Background (removed — clean slate) --- */
.ambient-bg { display: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1F2937; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: #374151; }

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: rgba(11,14,20,0.82);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--border);
    height: 56px;
}
.logo { display: flex; align-items: center; gap: var(--space-sm); overflow: hidden; }
.logo-icon { font-size: 1.2rem; flex-shrink: 0; color: var(--accent-indigo); }
.logo-text {
    font-size: 1rem; font-weight: 600; letter-spacing: -0.02em;
    color: var(--text-primary); white-space: nowrap;
    transition: opacity var(--transition);
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .badge-text,
.sidebar.collapsed .badge-dot { opacity: 0; width: 0; overflow: hidden; }

.sidebar-toggle {
    background: none; border: none; color: var(--text-muted);
    font-size: 1rem; cursor: pointer; padding: var(--space-xs);
    border-radius: var(--radius); transition: color var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text-primary); }

.nav-links {
    list-style: none; flex: 1; padding: var(--space-sm) var(--space-sm);
    display: flex; flex-direction: column; gap: 2px;
}
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: var(--radius);
    color: var(--text-muted); text-decoration: none;
    font-weight: 500; font-size: 0.87rem;
    transition: all var(--transition); position: relative;
}
.nav-link:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
.nav-link.active {
    color: var(--text-primary); background: var(--accent-indigo-dim);
}
.nav-link.active::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 3px; background: var(--accent-indigo); border-radius: var(--radius-full);
}
.nav-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-label { white-space: nowrap; transition: opacity var(--transition); }

/* Primary action in the sidebar — "New Hackathon" for organizers/sysadmins. */
.nav-link-create {
    margin: var(--space-sm) var(--space-md);
    padding: 9px 12px;
    background: linear-gradient(135deg, var(--accent-indigo), #5558E6);
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
    transition: all 180ms ease;
}
.nav-link-create:hover {
    background: linear-gradient(135deg, #5558E6, var(--accent-indigo));
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(99,102,241,0.4);
}
.nav-link-create.active { background: linear-gradient(135deg, #5558E6, var(--accent-indigo)); }
.nav-link-create.active::before { display: none; }
.nav-link-create .nav-icon svg { stroke-width: 2.4; }

.sidebar-footer { padding: var(--space-md); border-top: 1px solid var(--border); }

.hackathon-badge {
    display: flex; align-items: center; gap: var(--space-sm);
    font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted); overflow: hidden;
}
.badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-emerald); flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* --- User Info --- */
.user-info {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-xs) 0; margin-bottom: var(--space-sm); overflow: hidden;
}
.user-avatar {
    width: 32px; height: 32px; border-radius: var(--radius);
    background: var(--accent-indigo-dim); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.8rem; color: var(--accent-indigo);
    flex-shrink: 0; text-transform: uppercase;
}
.user-details { min-width: 0; overflow: hidden; }
.user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role {
    font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-indigo);
}
.sidebar.collapsed .user-details,
.sidebar.collapsed .btn-logout .nav-label { opacity: 0; width: 0; overflow: hidden; }

.btn-logout {
    display: flex; align-items: center; gap: var(--space-sm);
    width: 100%; padding: 6px var(--space-sm);
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-muted);
    font-family: inherit; font-size: 0.75rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition); margin-bottom: var(--space-sm);
}
.btn-logout:hover { color: var(--accent-red); border-color: rgba(239,68,68,0.3); background: var(--accent-red-dim); }

/* ═══════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width); min-height: 100vh;
    position: relative; z-index: 1;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
    padding: var(--space-xl) var(--space-2xl);
}
.sidebar.collapsed~.main-content { margin-left: var(--sidebar-collapsed); }
.page-container { max-width: 1200px; margin: 0 auto; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* --- Page Headers --- */
.page-header { margin-bottom: var(--space-xl); }
.page-header h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2px; color: var(--text-primary); }
.page-header .subtitle { color: var(--text-muted); font-size: 0.92rem; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); }

/* ═══════════════════════════════════════
   CARDS
   ═══════════════════════════════════════ */
.glass-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: var(--space-lg);
    transition: border-color var(--transition), background var(--transition);
}
.glass-card::before { display: none; }
.glass-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.glass-card.no-hover:hover { border-color: var(--border); background: var(--bg-card); }

/* --- Stats Grid --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-xl); }
.stat-card { padding: var(--space-lg); }
.stat-card .stat-icon { font-size: 1.2rem; margin-bottom: var(--space-xs); opacity: 0.7; }
.stat-card .stat-value {
    font-family: var(--font-mono); font-size: 2rem; font-weight: 600;
    letter-spacing: -0.02em; line-height: 1.1; color: var(--text-primary);
}
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: var(--space-xs); text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius);
    font-family: inherit; font-size: 0.82rem; font-weight: 500;
    cursor: pointer; border: none; transition: all var(--transition);
    text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent-indigo); color: #fff; }
.btn-primary:hover { background: #5558E6; }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); background: rgba(255,255,255,0.03); }
.btn-danger { background: var(--accent-red-dim); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 4px 10px; font-size: 0.75rem; }
.btn-icon { padding: 6px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */
.form-group { margin-bottom: var(--space-md); }
.form-label {
    display: block; font-size: 0.7rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-family: var(--font-mono);
}
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 9px 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary);
    font-family: inherit; font-size: 0.95rem;
    transition: all var(--transition); outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    background: var(--bg-input-focus); border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select {
    appearance: none; cursor: pointer; padding-right: 32px;
    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 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}

/* --- Sliders --- */
.score-slider-group { margin-bottom: var(--space-md); }
.score-slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.score-slider-label { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); }
.score-slider-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--accent-indigo); min-width: 24px; text-align: right; }
.score-slider {
    width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
    border-radius: var(--radius-full); background: var(--border); outline: none; cursor: pointer;
}
.score-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: var(--accent-indigo); cursor: pointer; transition: transform var(--transition);
    box-shadow: 0 0 0 3px var(--bg-primary);
}
.score-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.score-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent-indigo); border: none; cursor: pointer; }

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: 10px var(--space-md);
    font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 10px var(--space-md); font-size: 0.85rem;
    border-bottom: 1px solid rgba(31,41,55,0.5); vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ═══════════════════════════════════════
   LEADERBOARD
   ═══════════════════════════════════════ */
.leaderboard-list { display: flex; flex-direction: column; gap: 0; }
.leaderboard-item {
    display: grid; grid-template-columns: 48px 1fr auto;
    align-items: center; gap: var(--space-md);
    padding: 12px var(--space-md);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    position: relative;
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item:hover { background: rgba(255,255,255,0.02); }
.leaderboard-item.top-glow { background: rgba(99,102,241,0.04); }
.leaderboard-item.top-glow::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-indigo); border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.leaderboard-rank {
    width: 36px; height: 36px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem;
}
.rank-1 { background: var(--accent-amber-dim); color: var(--accent-amber); }
.rank-2 { background: rgba(148,163,184,0.12); color: var(--text-secondary); }
.rank-3 { background: rgba(217,119,6,0.12); color: #D97706; }
.rank-other { background: rgba(255,255,255,0.03); color: var(--text-muted); }
.leaderboard-info { min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: 0.87rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-bar-container { height: 4px; background: rgba(255,255,255,0.04); border-radius: var(--radius-full); overflow: hidden; }
.leaderboard-bar { height: 100%; border-radius: var(--radius-full); background: var(--accent-indigo); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); width: 0; }
.leaderboard-score {
    font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600;
    color: var(--text-primary); text-align: right; min-width: 50px;
}

/* --- Score Breakdown --- */
.score-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--space-xs); margin-top: var(--space-sm); }
.score-breakdown-item { text-align: center; padding: var(--space-xs); border-radius: var(--radius); background: rgba(255,255,255,0.02); }
.score-breakdown-item .sb-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--accent-indigo); }
.score-breakdown-item .sb-label { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Hybrid Score */
.hybrid-score-bar { display: flex; gap: 1px; height: 4px; border-radius: var(--radius-full); overflow: hidden; margin-top: var(--space-xs); }
.hybrid-bar-human { background: var(--accent-cyan); border-radius: var(--radius-full) 0 0 var(--radius-full); }
.hybrid-bar-ai { background: var(--accent-indigo); border-radius: 0 var(--radius-full) var(--radius-full) 0; }
.hybrid-legend { display: flex; gap: var(--space-md); font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.hybrid-legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* ═══════════════════════════════════════
   PROJECTS LIST
   ═══════════════════════════════════════ */
.projects-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.project-list-item {
    display: grid; 
    grid-template-columns: 2.5fr 2fr 2fr 80px auto; 
    gap: var(--space-md); 
    align-items: center; 
    padding: var(--space-md) var(--space-lg);
    cursor: default;
    transition: all var(--transition);
}
.pli-main { min-width: 0; }
.pli-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.pli-desc { color: var(--text-secondary); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-members, .pli-tech { display: flex; flex-wrap: wrap; gap: 4px; }
.member-chip {
    padding: 2px 8px; background: var(--accent-indigo-dim); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-accent);
    font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em;
}
.tech-chip {
    padding: 2px 8px; background: rgba(6,182,212,0.08); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-cyan);
    font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em;
}
.project-score-badge {
    padding: 2px 8px; border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
    background: var(--accent-emerald-dim); color: var(--accent-emerald);
    display: inline-block;
}
.pli-score { text-align: center; flex-shrink: 0; }
.pli-actions { display: flex; gap: var(--space-xs); justify-content: flex-end; flex-shrink: 0; }

/* ═══════════════════════════════════════
   JUDGING
   ═══════════════════════════════════════ */
.judging-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-lg); }
.judging-sidebar { display: flex; flex-direction: column; gap: 2px; max-height: 75vh; overflow-y: auto; }
.judging-project-item {
    padding: 10px 12px; border-radius: var(--radius);
    background: transparent; border: 1px solid transparent;
    cursor: pointer; transition: all var(--transition);
}
.judging-project-item:hover { background: rgba(255,255,255,0.03); }
.judging-project-item.selected { border-color: var(--accent-indigo); background: var(--accent-indigo-dim); }
.judging-project-item .jp-name { font-weight: 600; font-size: 0.82rem; margin-bottom: 1px; }
.judging-project-item .jp-status { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }
.judging-form { flex: 1; }
.judge-label {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 8px 12px; background: var(--accent-indigo-dim);
    border: 1px solid rgba(99,102,241,0.15); border-radius: var(--radius);
    margin-bottom: var(--space-md);
}
.judge-label-text { font-size: 0.78rem; color: var(--text-secondary); }
.judge-label-name { font-weight: 600; color: var(--text-accent); }

/* ═══════════════════════════════════════
   MODAL
   ═══════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); z-index: 1000;
    display: none; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-md); width: 90%; max-width: 520px;
    max-height: 85vh; overflow-y: auto;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 2px 6px; border-radius: var(--radius); transition: color var(--transition); line-height: 1; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: var(--space-lg); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--space-sm); padding: var(--space-sm) var(--space-lg); border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
.toast-container { position: fixed; top: var(--space-md); right: var(--space-md); z-index: 2000; display: flex; flex-direction: column; gap: var(--space-xs); }
.toast {
    min-width: 260px; padding: 10px var(--space-md); border-radius: var(--radius);
    background: var(--bg-secondary); border: 1px solid var(--border);
    display: flex; align-items: center; gap: var(--space-sm); font-size: 0.82rem;
    animation: toastSlide 0.25s ease;
}
.toast.toast-exit { animation: toastExit 0.2s ease forwards; }
@keyframes toastSlide { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastExit { to { opacity: 0; transform: translateX(30px); } }
.toast-success { border-left: 3px solid var(--accent-emerald); }
.toast-error { border-left: 3px solid var(--accent-red); }
.toast-info { border-left: 3px solid var(--accent-indigo); }

/* ═══════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════ */
.auth-screen { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: var(--space-lg); background: var(--bg-primary); }
.auth-card {
    width: 100%; max-width: 400px; padding: var(--space-2xl) var(--space-xl);
    text-align: center; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    animation: fadeIn 0.4s ease;
}
.auth-logo { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.auth-logo-icon { font-size: 1.5rem; color: var(--accent-indigo); }
.auth-logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); }
.auth-subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: var(--space-xl); }
#auth-form .form-group { text-align: left; margin-bottom: var(--space-md); }
.auth-error { background: var(--accent-red-dim); border: 1px solid rgba(239,68,68,0.25); border-radius: var(--radius); padding: 6px 12px; color: var(--accent-red); font-size: 0.78rem; margin-bottom: var(--space-md); text-align: left; }
.auth-success { background: var(--accent-emerald-dim); border: 1px solid rgba(16,185,129,0.25); border-radius: var(--radius); padding: 6px 12px; color: var(--accent-emerald); font-size: 0.78rem; margin-bottom: var(--space-md); text-align: left; }
.auth-forgot { margin-top: var(--space-sm); text-align: right; font-size: 0.78rem; }
.auth-forgot a { color: var(--text-secondary); }
.auth-forgot a:hover { color: var(--text-accent); }
.auth-submit { width: 100%; padding: 10px; font-size: 0.9rem; margin-top: var(--space-sm); }
.auth-submit::after { display: none; }
.auth-toggle { margin-top: var(--space-lg); font-size: 0.78rem; color: var(--text-muted); }
.auth-toggle-link { color: var(--accent-indigo); text-decoration: none; font-weight: 600; margin-left: var(--space-xs); }
.auth-toggle-link:hover { color: var(--text-accent); }

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state { text-align: center; padding: var(--space-2xl) var(--space-xl); color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2rem; margin-bottom: var(--space-sm); opacity: 0.4; }
.empty-state .empty-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-xs); }
.empty-state .empty-desc { font-size: 0.82rem; margin-bottom: var(--space-md); }

/* ═══════════════════════════════════════
   EVAL HISTORY & SETTINGS
   ═══════════════════════════════════════ */
.eval-history { margin-top: var(--space-xl); }
.eval-history-title { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-md); color: var(--text-muted); }
.eval-item { padding: var(--space-md); border-radius: var(--radius); background: rgba(255,255,255,0.02); border: 1px solid var(--border); margin-bottom: var(--space-sm); }
.eval-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.eval-judge-name { font-weight: 600; font-size: 0.82rem; }
.eval-date { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }
.eval-notes { font-size: 0.78rem; color: var(--text-secondary); font-style: italic; margin-top: var(--space-sm); }

.settings-section { margin-bottom: var(--space-xl); }
.settings-section h3 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; margin-bottom: var(--space-md); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.criteria-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.criteria-item { display: grid; grid-template-columns: 1fr 80px 36px; gap: var(--space-sm); align-items: center; padding: 8px var(--space-sm); border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); }
.criteria-item .form-input { margin: 0; }
.btn-group { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-xl) 0; }

/* --- Activity --- */
.activity-list { display: flex; flex-direction: column; gap: 2px; }
.activity-item { display: flex; align-items: center; gap: var(--space-sm); padding: 8px var(--space-sm); border-radius: var(--radius); }
.activity-item:hover { background: rgba(255,255,255,0.02); }
.activity-icon { width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; background: var(--accent-indigo-dim); flex-shrink: 0; }
.activity-text { font-size: 0.82rem; flex: 1; }
.activity-time { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); flex-shrink: 0; }

/* --- Two Column / Top Projects --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.top-project { display: flex; align-items: center; gap: var(--space-sm); padding: 8px; border-radius: var(--radius); margin-bottom: 2px; }
.top-project:hover { background: rgba(255,255,255,0.02); }
.top-project-rank { width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.75rem; flex-shrink: 0; }
.top-project-info { flex: 1; min-width: 0; }
.top-project-name { font-weight: 600; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-project-score { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }

/* --- Role Badges --- */
.role-badge { display: inline-block; padding: 1px 6px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.55rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.role-badge-admin { background: var(--accent-amber-dim); color: var(--accent-amber); }
.role-badge-judge { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }
.role-badge-participant { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
/* System role badges (Settings → User Management) */
.role-badge-user         { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.role-badge-organizer    { background: var(--accent-indigo-dim); color: var(--accent-indigo); }
.role-badge-system_admin { background: var(--accent-red-dim); color: var(--accent-red); }

/* --- User Management --- */
.users-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.user-list-item { display: grid; grid-template-columns: 32px 1fr auto auto; gap: var(--space-sm); align-items: center; padding: 8px var(--space-sm); border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); transition: border-color var(--transition); }
.user-list-item:hover { border-color: var(--border-hover); }
.user-list-avatar { width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-indigo-dim); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.75rem; color: var(--accent-indigo); text-transform: uppercase; }
.user-list-info { min-width: 0; }
.user-list-name { font-weight: 600; font-size: 0.82rem; }
.user-list-email { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }

/* ═══════════════════════════════════════
   FILE UPLOAD & BROWSER
   ═══════════════════════════════════════ */
.file-dropzone { border: 2px dashed var(--border); border-radius: var(--radius-md); padding: var(--space-xl) var(--space-lg); text-align: center; cursor: pointer; transition: all var(--transition); margin-bottom: var(--space-sm); }
.file-dropzone:hover, .file-dropzone.dragover { border-color: var(--accent-indigo); background: var(--accent-indigo-dim); }
.file-dropzone-icon { font-size: 2.8rem; margin-bottom: var(--space-sm); opacity: 0.7; }
.file-dropzone-text { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.file-dropzone-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.02em; }
.upload-progress-wrap { display: none; margin-top: var(--space-md); }
.upload-progress-wrap.visible { display: block; }
.upload-progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; font-family: var(--font-mono); }
.upload-progress-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #6366f1, #a855f7); border-radius: 99px; transition: width 0.15s ease; }

.file-list { display: flex; flex-direction: column; gap: 1px; margin-top: var(--space-sm); max-height: 200px; overflow-y: auto; }
.file-item { display: flex; align-items: center; gap: var(--space-sm); padding: 4px 10px; background: transparent; border: none; border-radius: var(--radius); font-size: 0.78rem; cursor: pointer; transition: background var(--transition); border-bottom: 1px solid rgba(31,41,55,0.3); }
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: rgba(255,255,255,0.03); }
.file-item.active { background: var(--accent-indigo-dim); border-left: 2px solid var(--accent-indigo); }
.file-item-name, .file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 0.75rem; }
.file-item-size, .file-size { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.6rem; flex-shrink: 0; }
.file-item-remove { background: none; border: none; color: var(--accent-red); cursor: pointer; font-size: 0.9rem; padding: 0 2px; opacity: 0.5; transition: opacity var(--transition); }
.file-item-remove:hover { opacity: 1; }
.file-icon { font-size: 0.9rem; width: 20px; text-align: center; flex-shrink: 0; }
.file-download-btn { color: var(--text-muted); text-decoration: none; font-size: 0.7rem; padding: 2px 4px; border-radius: var(--radius); transition: all var(--transition); flex-shrink: 0; }
.file-download-btn:hover { color: var(--accent-indigo); background: var(--accent-indigo-dim); }

.file-browser { margin-bottom: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.file-browser-header { display: flex; justify-content: space-between; align-items: center; padding: 6px var(--space-md); background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.file-browser-title { font-weight: 600; font-size: 0.78rem; display: flex; align-items: center; gap: var(--space-xs); }
.file-count-badge { background: var(--accent-indigo); color: #fff; font-family: var(--font-mono); font-size: 0.55rem; padding: 0 5px; border-radius: var(--radius); font-weight: 600; }
.file-browser-hint { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }

.file-viewer { border-top: 1px solid var(--border); }
.file-viewer-header { display: flex; justify-content: space-between; align-items: center; padding: 4px var(--space-md); background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--border); }
.file-viewer-name { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-indigo); font-weight: 600; }
.file-viewer-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; padding: 2px 6px; border-radius: var(--radius); }
.file-viewer-close:hover { color: var(--accent-red); }
.file-viewer-content { max-height: 400px; overflow: auto; }

.code-viewer { position: relative; }
.code-lang-badge { position: absolute; top: 4px; right: var(--space-md); background: var(--accent-indigo-dim); color: var(--accent-indigo); font-family: var(--font-mono); font-size: 0.55rem; padding: 1px 6px; border-radius: var(--radius); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; z-index: 1; }
.code-container { display: flex; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; overflow-x: auto; }
.line-numbers { display: flex; flex-direction: column; padding: var(--space-sm); background: rgba(0,0,0,0.3); color: var(--text-muted); text-align: right; user-select: none; min-width: 36px; border-right: 1px solid var(--border); margin: 0; }
.line-num { font-size: 0.6rem; opacity: 0.5; }
.code-content { flex: 1; padding: var(--space-sm) var(--space-md); margin: 0; white-space: pre; color: var(--text-primary); background: rgba(0,0,0,0.15); }
.code-content code { font-family: inherit; color: var(--text-primary); }

/* ═══════════════════════════════════════
   AI EVALUATION
   ═══════════════════════════════════════ */
.ai-eval-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-lg); margin-top: var(--space-md); position: relative; overflow: hidden; }
.ai-eval-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent-indigo), var(--accent-emerald)); }
.ai-eval-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.ai-eval-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--accent-indigo-dim); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; color: var(--accent-indigo); text-transform: uppercase; }
.ai-eval-model { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); margin-left: auto; }
.ai-eval-feedback { padding: 10px; background: rgba(255,255,255,0.02); border-radius: var(--radius); font-size: 0.78rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: var(--space-md); border-left: 2px solid var(--accent-indigo); }
.ai-score-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.ai-score-row:last-child { border-bottom: none; }
.ai-score-label { color: var(--text-secondary); }
.ai-score-value { font-family: var(--font-mono); font-weight: 600; color: var(--accent-indigo); min-width: 24px; text-align: center; }
.ai-score-reasoning { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); margin-top: 1px; }

.btn-ai { background: var(--accent-indigo); color: #fff; border: none; }
.btn-ai:hover { background: #5558E6; }
.btn-ai:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .judging-layout { grid-template-columns: 1fr; }
    .judging-sidebar { max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: var(--space-sm); }
    .judging-project-item { min-width: 160px; flex-shrink: 0; }
    .two-col { grid-template-columns: 1fr; }
    .project-list-item { grid-template-columns: 2fr 1.5fr 80px auto; }
    .pli-tech { display: none; }
}
@media (max-width: 768px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .logo-text, .sidebar .nav-label, .sidebar .badge-text, .sidebar .badge-dot { opacity: 0; width: 0; overflow: hidden; }
    .main-content { margin-left: var(--sidebar-collapsed); padding: var(--space-md); }
    .project-list-item { grid-template-columns: 1fr; gap: var(--space-sm); padding: var(--space-md); }
    .pli-members, .pli-actions { justify-content: flex-start; }
    .pli-score { text-align: left; display: flex; gap: var(--space-md); align-items: center; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-header h1 { font-size: 1.2rem; }
    .leaderboard-item { grid-template-columns: 36px 1fr auto; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-content { padding: var(--space-sm); }
    .score-breakdown { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */
.landing {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.15), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 30%, rgba(16,185,129,0.08), transparent 60%),
        var(--bg-primary);
    color: var(--text-primary);
}

/* ── Top nav ── */
.landing-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-md) var(--space-2xl);
    background: rgba(11,14,20,0.72);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.landing-logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; letter-spacing: -0.01em; font-size: 1rem;
}
.landing-nav-links {
    display: flex; gap: var(--space-xl);
    font-size: 0.85rem;
}
.landing-nav-links a {
    color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition);
}
.landing-nav-links a:hover { color: var(--text-primary); }
.landing-nav-actions { display: flex; gap: var(--space-sm); }

/* ── Generic landing buttons ── */
.btn-ghost {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--border-hover); }
.btn-lg {
    padding: 12px 22px; font-size: 0.95rem;
    border-radius: var(--radius-md);
}

/* ── Hero ── */
.landing-hero {
    max-width: 920px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-2xl) var(--space-2xl);
    text-align: center;
}
.landing-hero-eyebrow { margin-bottom: var(--space-lg); }
.hero-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-full);
    color: var(--text-accent);
    font-size: 0.8rem; font-weight: 500;
    font-family: var(--font-mono);
}
.hero-pill-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 12px rgba(16,185,129,0.6);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }

.landing-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1; letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
}
.hero-gradient {
    background: linear-gradient(135deg, #6366F1 0%, #06B6D4 50%, #10B981 100%);
    background-clip: text; -webkit-background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.landing-hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto var(--space-xl);
    line-height: 1.6;
}
.landing-hero-actions {
    display: flex; justify-content: center; gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}
.landing-hero-trust {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: var(--space-lg);
    list-style: none;
    color: var(--text-muted);
    font-size: 0.8rem; font-family: var(--font-mono);
}

/* ── Stats ── */
.landing-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    max-width: 920px; margin: 0 auto;
    padding: 0 var(--space-2xl) var(--space-2xl);
    gap: var(--space-md);
}
.stat-card {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.stat-num {
    font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text-primary);
}
.stat-label {
    font-size: 0.75rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ── Section headings ── */
.landing-section-eyebrow {
    text-align: center;
    color: var(--accent-indigo);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
    font-weight: 500;
}
.landing-section-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: var(--space-2xl);
    line-height: 1.2;
}

/* ── Features ── */
.landing-features {
    max-width: 1100px; margin: 0 auto;
    padding: var(--space-2xl) var(--space-2xl);
}
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}
.feature-card {
    padding: var(--space-xl);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 200ms ease;
}
.feature-card:hover {
    background: rgba(255,255,255,0.035);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.feature-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
}
.feature-icon-indigo  { background: var(--accent-indigo-dim);  color: var(--accent-indigo); }
.feature-icon-emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.feature-icon-amber   { background: var(--accent-amber-dim);   color: var(--accent-amber); }
.feature-icon-cyan    { background: rgba(6,182,212,0.12);      color: var(--accent-cyan); }
.feature-card h4 {
    font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: var(--space-sm);
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Flow / how it works ── */
.landing-flow {
    max-width: 1100px; margin: 0 auto;
    padding: var(--space-2xl) var(--space-2xl);
    background:
        linear-gradient(180deg, transparent, rgba(99,102,241,0.03) 50%, transparent);
}
.flow-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    counter-reset: step;
}
.flow-card {
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.02);
    position: relative;
}
.flow-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-indigo);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
}
.flow-card h4 {
    font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: var(--space-sm);
}
.flow-card p {
    font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6;
}
.flow-card code {
    font-family: var(--font-mono); font-size: 0.78rem;
    background: rgba(99,102,241,0.15); padding: 1px 6px;
    border-radius: 3px; color: var(--accent-indigo);
}

/* ── Roles ── */
.landing-roles {
    max-width: 1100px; margin: 0 auto;
    padding: var(--space-2xl) var(--space-2xl);
}
.role-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}
.role-card {
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.02);
    transition: all 200ms ease;
}
.role-card:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.035);
}
.role-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase; letter-spacing: 0.12em;
    padding: 3px 10px; border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    font-weight: 600;
}
.role-tag-indigo  { background: var(--accent-indigo-dim);  color: var(--accent-indigo); }
.role-tag-emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.role-tag-amber   { background: var(--accent-amber-dim);   color: var(--accent-amber); }
.role-tag-cyan    { background: rgba(6,182,212,0.12);      color: var(--accent-cyan); }
.role-card h4 {
    font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: var(--space-md);
}
.role-card ul {
    list-style: none; padding: 0;
    font-size: 0.85rem; color: var(--text-secondary);
}
.role-card li {
    padding: 4px 0; padding-left: 18px; position: relative;
    line-height: 1.5;
}
.role-card li::before {
    content: '→'; position: absolute; left: 0;
    color: var(--accent-indigo); font-weight: 600;
}

/* ── Final CTA ── */
.landing-cta-final {
    max-width: 720px; margin: 0 auto;
    padding: var(--space-2xl) var(--space-2xl);
    text-align: center;
}
.landing-cta-final h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}
.landing-cta-final p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

/* ── Footer ── */
.landing-footer {
    max-width: 1100px; margin: 0 auto;
    padding: var(--space-xl) var(--space-2xl);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-md);
    color: var(--text-muted); font-size: 0.8rem;
}
.landing-footer-links {
    display: flex; gap: var(--space-lg);
}
.landing-footer-links a {
    color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition);
}
.landing-footer-links a:hover { color: var(--text-primary); }
.landing-footer-tag { font-family: var(--font-mono); font-size: 0.75rem; }

/* ── Auth checkbox row (register-only) ── */
.auth-checkbox-row {
    padding: 10px 12px;
    background: rgba(99,102,241,0.05);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: var(--radius-md);
}
.auth-checkbox {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none;
    font-size: 0.85rem; color: var(--text-primary);
    font-weight: 500;
}
.auth-checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--accent-indigo);
    cursor: pointer;
}
.auth-help {
    margin-top: 6px;
    color: var(--text-muted); font-size: 0.75rem;
    line-height: 1.5; padding-left: 26px;
}

/* ── Auth legal note ── */
.auth-legal {
    margin-top: var(--space-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.5;
}
.auth-legal a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border);
    transition: color var(--transition);
}
.auth-legal a:hover { color: var(--accent-indigo); text-decoration-color: var(--accent-indigo); }

/* ── Cookie consent banner ── */
.cookie-banner {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 1000;
    display: flex; align-items: center; gap: var(--space-md);
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgba(11,14,20,0.95);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
    animation: cookieSlideUp 240ms ease-out;
}
.cookie-banner-text { flex: 1; min-width: 240px; }
.cookie-banner-text strong { color: var(--text-primary); }
.cookie-banner-text a {
    color: var(--accent-indigo); text-decoration: none;
    margin-left: 4px; white-space: nowrap;
}
.cookie-banner-text a:hover { text-decoration: underline; }
.cookie-banner code {
    font-family: var(--font-mono); font-size: 0.85em;
    background: rgba(99,102,241,0.1); color: var(--accent-indigo);
    padding: 1px 5px; border-radius: 3px;
}
@keyframes cookieSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 640px) {
    .cookie-banner {
        bottom: 8px; left: 8px; right: 8px;
        flex-direction: column; align-items: stretch;
        font-size: 0.8rem;
    }
}

/* ── Auth back link ── */
.auth-back {
    position: absolute; top: var(--space-lg); left: var(--space-lg);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px; border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.auth-back:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.04);
}

/* ── Landing responsive ── */
@media (max-width: 768px) {
    .landing-nav { padding: var(--space-md); flex-wrap: wrap; gap: var(--space-sm); }
    .landing-nav-links { display: none; }
    .landing-hero,
    .landing-stats,
    .landing-features,
    .landing-flow,
    .landing-roles,
    .landing-cta-final,
    .landing-footer { padding-left: var(--space-md); padding-right: var(--space-md); }
    .landing-stats { grid-template-columns: repeat(2, 1fr); }
    .landing-footer { flex-direction: column; text-align: center; }
}


@keyframes slideDown { from { opacity:0; max-height:0; } to { opacity:1; max-height:600px; } }