/* ═══════════════════════════════════════════
   app.css — LCC PAI 2026 Premium Theme
   Pentas PAI Jawa Barat — KKG PAI Kota Bandung
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens ─────────────────────── */
:root {
    /* Core palette */
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-solid: #0f172a;
    --bg-card-hover: rgba(15, 23, 42, 0.9);
    --bg-surface: #0c1222;

    /* Accent colors */
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --primary-glow: rgba(245, 158, 11, 0.15);
    --success: #10b981;
    --success-dark: #059669;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-dark: #2563eb;
    --info-glow: rgba(59, 130, 246, 0.15);
    --warning: #8b5cf6;
    --warning-glow: rgba(139, 92, 246, 0.15);

    /* Text */
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(245, 158, 11, 0.3);
    --border-active: rgba(245, 158, 11, 0.5);

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.1);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.3s;
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
}
a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(245, 158, 11, 0.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ── Typography ────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 0.5em; }
code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--primary-light);
}
pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.88em;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
td { color: var(--text); }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ── Layout ────────────────────────────── */
.container, .main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.section {
    padding: 80px 0;
    position: relative;
}
.section-alt {
    background: rgba(0, 0, 0, 0.2);
}
.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-title {
    color: var(--text);
    margin-bottom: 8px;
}
.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 100px 24px 80px;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 70%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}
.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-glow);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #f8fafc 0%, #f59e0b 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}
.btn-secondary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.3);
}
.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.5);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}
.btn-warning {
    background: rgba(139, 92, 246, 0.15);
    color: var(--warning);
    border-color: rgba(139, 92, 246, 0.3);
}
.btn-warning:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
}
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   FEATURE CARDS
   ═══════════════════════════════════════════ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--duration) var(--ease);
    backdrop-filter: blur(10px);
}
.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.6rem;
    line-height: 1;
    background: var(--primary-glow);
}
.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Feature icon variants */
.icon-event { background: var(--primary-glow); color: var(--primary); }
.icon-timer { background: var(--info-glow); color: var(--info); }
.icon-display { background: var(--success-glow); color: var(--success); }
.icon-export { background: var(--warning-glow); color: var(--warning); }

/* ═══════════════════════════════════════════
   WORKFLOW CARDS
   ═══════════════════════════════════════════ */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.workflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}
.workflow-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.workflow-step {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    position: absolute;
    top: 12px;
    right: 20px;
    line-height: 1;
}
.workflow-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--primary);
}
.workflow-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   GUIDE ACCORDION
   ═══════════════════════════════════════════ */
.guide-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.guide-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--duration) var(--ease);
}
.guide-item.open {
    border-color: var(--border-hover);
}
.guide-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
}
.guide-trigger:hover {
    background: rgba(255, 255, 255, 0.03);
}
.guide-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}
.guide-label { flex: 1; text-align: left; }
.guide-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration) var(--ease);
}
.guide-arrow::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform var(--duration) var(--ease);
}
.guide-item.open .guide-arrow::after {
    transform: rotate(-135deg);
}
.guide-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
    padding: 0 20px;
}
.guide-item.open .guide-body {
    max-height: 600px;
    padding: 0 20px 20px;
}
.guide-body ol, .guide-body ul {
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}
.guide-body li { margin-bottom: 4px; }
.guide-body strong { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════
   TROUBLESHOOTING
   ═══════════════════════════════════════════ */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.ts-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--duration) var(--ease);
}
.ts-card:hover {
    border-color: var(--border-hover);
}
.ts-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text);
}
.ts-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}
.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}
.footer-org {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-copy {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 0;
}

/* ═══════════════════════════════════════════
   HEADER (Admin/Operator pages)
   ═══════════════════════════════════════════ */
.header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-brand h1,
.header h1 {
    font-size: 1.2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-brand .subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
    font-weight: 400;
}
.header-actions,
.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-left h1 { font-size: 1.1rem; }

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: all var(--duration) var(--ease);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group input::placeholder {
    color: var(--text-dim);
}
select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    cursor: pointer;
}
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: all var(--duration) var(--ease);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
input::placeholder { color: var(--text-dim); }
textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    resize: vertical;
    min-height: 80px;
}

/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}
.login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), transparent 50%, rgba(59, 130, 246, 0.08));
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 1px;
}
.login-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.login-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.login-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--duration) var(--ease);
}
.login-back:hover { color: var(--primary); }
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.82rem;
}
.login-footer a { color: var(--primary); }

/* Legacy login classes (other pages may use) */
.login-box { max-width: 420px; margin: 80px auto; padding: 48px 40px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); position: relative; z-index: 1; }
.btn-login { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #000; border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; cursor: pointer; margin-top: 8px; }
.btn-back { display: block; text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 0.85rem; }
.footer-note { text-align: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.82rem; }

/* ═══════════════════════════════════════════
   CARDS & PANELS
   ═══════════════════════════════════════════ */
.card, .panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all var(--duration) var(--ease);
}
.card:hover, .panel:hover {
    border-color: var(--border-hover);
}
.card-header, .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-header h2, .panel-header h2 {
    font-size: 1.1rem;
    color: var(--text);
}
.card-body, .panel-body { /* content area */ }
.card-footer, .panel-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Info cards (legacy) */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
}
.info-card h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 12px;
}
.info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.info-card ul {
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}
.info-card li { margin-bottom: 4px; }

/* Action buttons row */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ═══════════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 24px;
    max-width: 100%;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    min-width: 48px;
    text-align: center;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   TABLES (enhanced)
   ═══════════════════════════════════════════ */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}
.data-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
.data-table tr:last-child td {
    border-bottom: none;
}

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.3s var(--ease);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card-solid);
    z-index: 1;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h2 {
    font-size: 1.15rem;
    color: var(--text);
}
.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}
.modal-body {
    padding: 24px;
}
.modal-body table {
    margin: 12px 0;
}

/* Doc sections (inside modal) */
.doc-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.doc-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.doc-section h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
}
.doc-section h4 {
    font-size: 0.92rem;
    color: var(--text);
    margin: 12px 0 6px;
}
.doc-section ol, .doc-section ul {
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.8;
}
.doc-section li { margin-bottom: 4px; }
.doc-section strong { color: var(--text); }

/* ═══════════════════════════════════════════
   ALERTS & BADGES
   ═══════════════════════════════════════════ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 12px 0;
}
.alert-success {
    background: var(--success-glow);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}
.alert-danger, .alert-error {
    background: var(--danger-glow);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}
.alert-warning {
    background: var(--warning-glow);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--warning);
}
.alert-info {
    background: var(--info-glow);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 50px;
}
.badge-success { background: var(--success-glow); color: var(--success); }
.badge-danger { background: var(--danger-glow); color: var(--danger); }
.badge-warning { background: var(--warning-glow); color: var(--warning); }
.badge-info { background: var(--info-glow); color: var(--info); }
.badge-primary { background: var(--primary-glow); color: var(--primary); }

/* ═══════════════════════════════════════════
   TIMER BAR
   ═══════════════════════════════════════════ */
.timer-bar {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.timer-display {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 100px;
    text-align: center;
}
.timer-display.danger { color: var(--danger); }
.timer-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.timer-input {
    width: 80px;
    text-align: center;
}

/* ═══════════════════════════════════════════
   SIREN CONTROLS
   ═══════════════════════════════════════════ */
.siren-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.siren-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   SCORE INPUTS
   ═══════════════════════════════════════════ */
.score-input {
    width: 70px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all var(--duration) var(--ease);
}
.score-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}
.score-input.saved {
    border-color: var(--success);
    box-shadow: 0 0 0 2px var(--success-glow);
}

/* ═══════════════════════════════════════════
   CATEGORY GRID (Operator)
   ═══════════════════════════════════════════ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.category-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════
   TEAM CARDS (Display/Operator)
   ═══════════════════════════════════════════ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}
.team-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.team-card .team-rank {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    position: absolute;
    top: 8px;
    right: 16px;
}
.team-card .team-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}
.team-card .team-school {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.team-card .team-score {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}
.team-card.qualified {
    border-color: rgba(16, 185, 129, 0.4);
}
.team-card.qualified::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 0; height: 0;
    border-top: 32px solid var(--success);
    border-left: 32px solid transparent;
}

/* ═══════════════════════════════════════════
   SESSION CARDS (Event Dashboard)
   ═══════════════════════════════════════════ */
.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--duration) var(--ease);
}
.session-card:hover {
    border-color: var(--border-hover);
}
.session-card .session-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 8px;
}
.session-card .session-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.session-card .session-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   EVENT GRID (Event Manager)
   ═══════════════════════════════════════════ */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--duration) var(--ease);
}
.event-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.event-card .event-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 4px;
}
.event-card .event-year {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.event-card .event-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.event-card .event-stat {
    text-align: center;
}
.event-card .event-stat-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}
.event-card .event-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.event-card .event-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   EVENT CARDS (detailed)
   ═══════════════════════════════════════════ */
.event-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.event-card-info {
    flex: 1;
}
.event-card-info .event-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 2px;
}
.event-card-info .event-year {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.meta-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.meta-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.event-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.event-card-active {
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

/* Header extras */
.header-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 2px;
}
.header-user {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Badge status variants */
.badge-draft {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}
.badge-active {
    background: var(--success-glow);
    color: var(--success);
}
.badge-archived {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}
.badge-completed {
    background: var(--info-glow);
    color: var(--info);
}


/* ═══════════════════════════════════════════
   HISTORY LOG
   ═══════════════════════════════════════════ */
.history-log {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}
.history-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.history-item:last-child { border-bottom: none; }
.history-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 60px;
    white-space: nowrap;
}
.history-text {
    color: var(--text-muted);
    flex: 1;
}
.history-text strong { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════ */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.filter-bar label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.filter-bar select,
.filter-bar input {
    max-width: 200px;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}
.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   EVENT INFO BAR
   ═══════════════════════════════════════════ */
.event-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.event-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.event-info-status {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.event-info-date {
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════
   SESSION CARD (detailed)
   ═══════════════════════════════════════════ */
.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}
.session-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.session-card-title h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin: 0;
}
.session-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.session-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   TEAM TABLE (inside session card)
   ═══════════════════════════════════════════ */
.team-table {
    margin: 8px 0;
}
.team-table-head {
    display: grid;
    grid-template-columns: 40px 70px 1fr 80px;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.team-row {
    display: grid;
    grid-template-columns: 40px 70px 1fr 80px;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    align-items: center;
    transition: background var(--duration) var(--ease);
}
.team-row:last-child { border-bottom: none; }
.team-row:hover { background: rgba(255,255,255,0.02); }
.team-col-no {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}
.team-col-nopes {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}
.team-col-school {
    color: var(--text);
    font-weight: 500;
}
.team-kab {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 400;
    margin-top: 2px;
}
.team-col-score {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}
.score-qualified { color: var(--primary); }
.team-qualified { background: rgba(245,158,11,0.03); }
.team-row.rank-gold { background: rgba(245,158,11,0.08); }
.team-row.rank-silver { background: rgba(148,163,184,0.06); }
.team-row.rank-bronze { background: rgba(205,127,50,0.06); }
.team-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 20px;
    border-top: 1px dashed var(--border);
    margin-top: 8px;
}

/* ═══════════════════════════════════════════
   QUALIFIED SECTION
   ═══════════════════════════════════════════ */
.qualified-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.qualified-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.qualified-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
}
.qualified-session-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.qualified-team-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.qualified-team-list {
    padding: 4px 0;
}
.qualified-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.qualified-item:last-child { border-bottom: none; }
.qualified-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #000;
}
.qualified-name {
    flex: 1;
    color: var(--text);
    font-weight: 500;
}
.qualified-score {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.88rem;
}


/* ═══════════════════════════════════════════
   OPERATOR — SELECTOR PAGE
   ═══════════════════════════════════════════ */
.selector-box {
    max-width: 560px;
    margin: 60px auto;
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}
.selector-header {
    text-align: center;
    margin-bottom: 28px;
}
.selector-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.selector-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.session-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--duration) var(--ease);
}
.session-link:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}
.session-link .name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}
.session-link .meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.action-links {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
}
.back-link:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   OPERATOR — HEADER
   ═══════════════════════════════════════════ */
.session-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.user-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
}
.btn-export {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.3);
}
.btn-export:hover {
    background: rgba(16,185,129,0.25);
    border-color: rgba(16,185,129,0.5);
}
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: 6px;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
}
.nav-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.nav-link.danger { color: var(--danger); }
.nav-link.danger:hover { background: var(--danger-glow); }

/* ═══════════════════════════════════════════
   OPERATOR — TIMER BAR
   ═══════════════════════════════════════════ */
.timer-bar {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 20px;
}
.timer-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.timer-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.timer-input {
    width: 70px;
    text-align: center;
    padding: 6px 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
}
.timer-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}
.timer-unit {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.btn-timer {
    padding: 7px 18px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-start {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
}
.btn-start:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-1px);
}
.btn-stop {
    background: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-stop:hover {
    background: rgba(239,68,68,0.25);
}
.timer-display-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.timer-countdown {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: center;
}
.timer-countdown.warning { color: #f59e0b; }
.timer-countdown.danger { color: #ef4444; }
.timer-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 50px;
}
.status-ready { background: rgba(100,116,139,0.2); color: #94a3b8; }
.status-running { background: var(--success-glow); color: var(--success); }
.status-stopped { background: var(--danger-glow); color: var(--danger); }

/* ═══════════════════════════════════════════
   OPERATOR — SIREN
   ═══════════════════════════════════════════ */
.siren-section {
    display: flex;
    align-items: center;
    gap: 8px;
}
.siren-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.siren-play {
    background: var(--warning-glow);
    color: var(--warning);
    border: 1px solid rgba(139,92,246,0.3);
}
.siren-play:hover { background: rgba(139,92,246,0.25); }
.siren-stop {
    background: rgba(100,116,139,0.15);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.siren-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.siren-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: background var(--duration) var(--ease);
}
.siren-dot.active {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════
   OPERATOR — MAIN CONTENT
   ═══════════════════════════════════════════ */
.main-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr));
    gap: 16px;
    padding: 16px 20px;
    overflow-y: auto;
    align-content: start;
}
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color var(--duration) var(--ease);
    position: relative;
}
.team-card:hover {
    border-color: var(--border-hover);
}
.group-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.group-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}
.total-badge {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 6px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}
.team-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.team-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 2px;
}
.team-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.cat-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sticky-cat-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}
.score-input {
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 6px 4px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text);
    transition: all 0.2s var(--ease);
    outline: none;
}
.score-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    background: rgba(245,158,11,0.05);
}
.score-input::placeholder { color: var(--text-dim); font-weight: 400; }

/* Remove number input spinners */
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input[type=number] { -moz-appearance: textfield; }

.total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary-glow);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-sm);
}
.total-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.total-val {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

/* ═══════════════════════════════════════════
   OPERATOR — FOOTER
   ═══════════════════════════════════════════ */
footer {
    background: rgba(15,23,42,0.9);
    border-top: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    position: sticky;
    bottom: 0;
    z-index: 50;
    flex-wrap: wrap;
}
.footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}
.footer-link {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}
.footer-link:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   OPERATOR — RESPONSIVE
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   DISPLAY — SELECTOR PAGES
   ═══════════════════════════════════════════ */
.display-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}
.display-brand {
    text-align: center;
    margin-bottom: 32px;
}
.display-brand h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}
.display-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.display-header {
    text-align: center;
    margin-bottom: 28px;
}
.display-header h1,
.display-header h2 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 4px;
}
.display-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.display-back {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.display-back:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   DISPLAY — LIVE VIEW
   ═══════════════════════════════════════════ */
body.display-live {
    overflow: hidden;
    height: 100vh;
}
.display-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: rgba(15,23,42,0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}
.display-live-info .display-babak {
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
}
.display-live-info h1 {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    color: var(--text);
    margin-top: 2px;
}
.display-live-nav {
    display: flex;
    gap: 8px;
}
.display-live-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 24px;
    height: calc(100vh - 60px);
    overflow: hidden;
}
.display-teams {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.display-history {
    flex-shrink: 0;
    max-height: 140px;
    overflow-y: auto;
}
.display-timer-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}
.display-timer {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    padding: 8px 32px;
    background: var(--bg-card);
    border: 2px solid rgba(245,158,11,0.3);
    border-radius: var(--radius-lg);
    min-width: 180px;
    text-shadow: 0 0 20px rgba(245,158,11,0.15);
}
.display-timer.danger {
    color: var(--danger);
    border-color: rgba(239,68,68,0.5);
    text-shadow: 0 0 20px rgba(239,68,68,0.2);
    animation: timerPulse 0.5s ease-in-out infinite alternate;
}
@keyframes timerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.03); }
}
.display-teams {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 18px);
    padding: 8px 0;
    align-items: stretch;
}
.display-history {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.82rem;
}
.display-history h3 {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


/* ═══════════════════════════════════════════
   DISPLAY — TEAM CARD FRAGMENTS (get_teams_display.php)
   ═══════════════════════════════════════════ */
.group-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Display team grid (injected by get_teams_display.php) */
.display-teams .team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(14px, 2vw, 24px) clamp(14px, 2.5vw, 28px);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    flex: 1 1 clamp(160px, 20vw, 280px);
    max-width: clamp(200px, 22vw, 320px);
    min-width: 160px;
    height: 220px;
    justify-content: space-between;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}
.display-teams .team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    border-color: var(--border-hover);
}
.display-teams .team-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(0.82rem, 1.5vw, 1.1rem);
    color: var(--text);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.3;
}
.display-teams .team-score {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.display-teams .team-meta {
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    color: var(--text-dim);
    text-align: center;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   DISPLAY — HISTORY LOG FRAGMENTS (get_history.php)
   ═══════════════════════════════════════════ */
.log-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
}
.log-entry:last-child { border-bottom: none; }
.log-entry .log-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    min-width: 50px;
}
.log-entry .log-info {
    color: var(--text-muted);
    flex: 1;
}
.log-entry .log-score {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
}


/* ═══════════════════════════════════════════
   STANDING AKHIR
   ═══════════════════════════════════════════ */
.standing-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.standing-head {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 90px;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.3);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.standing-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 90px;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s ease;
}
.standing-row:last-child { border-bottom: none; }
.standing-row:hover { background: rgba(255,255,255,0.02); }
.standing-col-rank {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-align: center;
}
.standing-col-team {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.standing-col-team strong {
    font-size: 0.92rem;
    color: var(--text);
}
.standing-col-sesi {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.standing-col-score {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
}
.standing-col-source {
    text-align: center;
}
.badge-final {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}
.badge-semifinal {
    background: rgba(59,130,246,0.15);
    color: #3b82f6;
}


/* ═══════════════════════════════════════════
   SETUP SESSION PAGE
   ═══════════════════════════════════════════ */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.form-card h2 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.event-badge {
    font-size: 0.82rem;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Info box */
.info-box {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* Team selector grid */
.team-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.team-item {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
}
.team-item:hover {
    border-color: var(--border-hover);
    background: rgba(245,158,11,0.03);
}
.team-item.selected {
    border-color: var(--primary);
    background: var(--primary-glow);
}
.team-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.team-item input[type="checkbox"] {
    position: absolute;
    top: 12px;
    right: 12px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}
.team-item .team-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 2px;
    padding-right: 24px;
}
.team-item .team-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.team-warning {
    font-size: 0.72rem;
    color: var(--warning);
    margin-top: 4px;
}
.qualified-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--success-glow);
    color: var(--success);
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.filter-input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}
.filter-input:focus { border-color: var(--primary); }
.filter-input::placeholder { color: var(--text-dim); }
.filter-btn {
    padding: 8px 14px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 6px;
    color: var(--info);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.filter-btn:hover { background: rgba(59,130,246,0.25); }
.filter-btn.clear {
    background: rgba(100,116,139,0.1);
    border-color: var(--border);
    color: var(--text-muted);
}
.filter-btn.clear:hover { background: rgba(100,116,139,0.2); }
.filter-result {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.filter-result .count {
    font-weight: 700;
    color: var(--primary);
}

/* New team rows */
.new-team-section { margin-top: 8px; }
.new-team-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.new-team-row input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}
.new-team-row input:focus { border-color: var(--primary); }
.new-team-row input::placeholder { color: var(--text-dim); }
.btn-remove {
    width: 32px;
    height: 32px;
    background: var(--danger-glow);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 6px;
    color: var(--danger);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) var(--ease);
    flex-shrink: 0;
}
.btn-remove:hover { background: rgba(239,68,68,0.25); }
.btn-add-row {
    width: 100%;
    padding: 10px;
    background: rgba(16,185,129,0.08);
    border: 1px dashed rgba(16,185,129,0.3);
    border-radius: 6px;
    color: var(--success);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    margin-top: 8px;
}
.btn-add-row:hover { background: rgba(16,185,129,0.15); }
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}
.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}

/* Hidden class for filter */
.team-item.hidden { display: none; }

/* Responsive */

/* ═══════════════════════════════════════════
   MANAGE USERS PAGE
   ═══════════════════════════════════════════ */
.security-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(139,92,246,0.06);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
}
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.search-box input {
    width: 100%;
    padding: 9px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.search-box input::placeholder { color: var(--text-dim); }
.filter-select {
    padding: 9px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.table-header h3 {
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}
.table-card table {
    width: 100%;
    border-collapse: collapse;
}
.table-card thead {
    background: rgba(0,0,0,0.2);
}
.table-card th {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table-card td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table-card tr:last-child td { border-bottom: none; }
.table-card tr:hover td { background: rgba(255,255,255,0.02); }
.role-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 50px;
}
.role-admin {
    background: rgba(139,92,246,0.15);
    color: #8b5cf6;
}
.role-operator {
    background: rgba(16,185,129,0.15);
    color: #10b981;
}
.action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.action-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0,0,0,0.2);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.action-btn:hover { border-color: var(--border-hover); color: var(--text); }
.action-btn.edit { color: var(--info); border-color: rgba(59,130,246,0.3); }
.action-btn.edit:hover { background: rgba(59,130,246,0.1); }
.action-btn.reset { color: var(--warning); border-color: rgba(139,92,246,0.3); }
.action-btn.reset:hover { background: rgba(139,92,246,0.1); }
.action-btn.delete { color: var(--danger); border-color: rgba(239,68,68,0.3); }
.action-btn.delete:hover { background: rgba(239,68,68,0.1); }

@media (max-width: 768px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-box input { width: 100%; }
    .table-card { overflow-x: auto; }
    .table-card table { min-width: 500px; }
    .action-btns { flex-direction: column; }
    .action-btn { width: 100%; text-align: center; }
}
@media (max-width: 768px) {
    .form-card { padding: 16px; }
    .form-card h2 { font-size: 1rem; }
    .tab-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-btn { padding: 8px 12px; font-size: 0.78rem; }
    .team-selector { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-input { min-width: 100%; }
    .new-team-row { flex-direction: column; }
    .new-team-row input { width: 100%; }
    .btn-remove { width: 100%; height: 36px; }
}

@media (max-width: 768px) {
    /* ── Global ── */
    .container, .main-container { padding: 0 14px; }
    .section { padding: 40px 0; }
    .section-header { margin-bottom: 28px; }
    .section-title { font-size: 1.2rem; }

    /* ── Header ── */
    .header {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .header-brand h1, .header h1 { font-size: 0.95rem; }
    .header-subtitle { font-size: 0.72rem; }
    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .header-actions .btn { font-size: 0.75rem; padding: 6px 10px; }
    .header-user { font-size: 0.75rem; }
    .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; }

    /* ── Hero ── */
    .hero { min-height: 60vh; padding: 60px 16px 40px; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.88rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }

    /* ── Feature / Workflow / TS cards ── */
    .feature-grid, .workflow-grid, .ts-grid, .info-section { grid-template-columns: 1fr; }
    .feature-card, .workflow-card, .ts-card { padding: 20px; }
    .feature-icon { width: 44px; height: 44px; font-size: 1.3rem; }

    /* ── Guide Accordion ── */
    .guide-trigger { padding: 12px 14px; font-size: 0.88rem; }
    .guide-body { padding: 0 14px; }
    .guide-item.open .guide-body { padding: 0 14px 14px; }

    /* ── Login ── */
    .login-card { padding: 28px 20px; margin: 20px 12px; }
    .login-brand { font-size: 1.4rem; }

    /* ── Stats Grid ── */
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat-card { padding: 12px 10px; gap: 10px; }
    .stat-value { font-size: 1.4rem; min-width: 36px; }
    .stat-label { font-size: 0.68rem; }

    /* ── Event Grid ── */
    .event-grid { grid-template-columns: 1fr; }
    .event-card { padding: 18px; }
    .event-card-top { flex-direction: column; gap: 8px; }
    .event-card-meta { gap: 6px; }
    .event-card-actions { flex-wrap: wrap; }

    /* ── Session Grid ── */
    .session-grid { grid-template-columns: 1fr; }
    .session-card { padding: 16px; }
    .session-card-header { flex-direction: column; gap: 6px; }
    .session-card-actions { flex-wrap: wrap; }

    /* ── Event Info Bar ── */
    .event-info-bar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 14px; }
    .event-info-left { flex-direction: column; gap: 6px; }

    /* ── Team Table (event dashboard) ── */
    .team-table-head, .team-row {
        grid-template-columns: 32px 50px 1fr 60px;
        gap: 6px;
        font-size: 0.78rem;
    }
    .team-col-school { font-size: 0.8rem; }
    .team-col-score { font-size: 0.82rem; }

    /* ── Standing Table ── */
    .standing-head, .standing-row {
        grid-template-columns: 40px 1fr 80px 70px 70px;
        gap: 8px;
        padding: 10px 14px;
        font-size: 0.78rem;
    }
    .standing-col-rank { font-size: 0.9rem; }
    .standing-col-score { font-size: 0.9rem; }

    /* ── Qualified Grid ── */
    .qualified-grid { grid-template-columns: 1fr; }
    .qualified-item { padding: 8px 12px; font-size: 0.82rem; }

    /* ── Filter Bar ── */
    .filter-bar { flex-direction: column; align-items: stretch; padding: 12px; }
    .filter-bar select, .filter-bar input { max-width: 100%; }

    /* ── Modal ── */
    .modal-content { margin: 10px; max-height: 90vh; }
    .modal-body { padding: 16px; }
    .modal-header { padding: 14px 16px; }

    /* ── Operator ── */
    .timer-bar {
        flex-direction: column;
        align-items: stretch;
        margin: 10px 12px;
        padding: 10px 14px;
        gap: 10px;
    }
    .timer-display-wrapper { justify-content: center; }
    .timer-countdown { font-size: 1.4rem; }
    .siren-section { justify-content: center; flex-wrap: wrap; }
    .main-wrapper { grid-template-columns: 1fr; padding: 10px 12px; gap: 12px; }
    .team-card { padding: 14px; }
    .group-label-row { flex-direction: row; gap: 8px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .score-input { font-size: 0.82rem; padding: 5px 3px; }
    .sticky-cat-title { font-size: 0.62rem; padding: 4px 6px; }
    .total-badge { font-size: 0.9rem; }
    footer { justify-content: center; text-align: center; gap: 10px; padding: 8px 14px; font-size: 0.72rem; }

    /* ── Display ── */
    .display-brand h1 { font-size: 1.4rem; }
    .display-header h2 { font-size: 1.1rem; }
    .display-timer-section { padding: 10px 0; }
    .display-timer { font-size: 2.2rem; padding: 8px 24px; min-width: 160px; }
    .display-live-header {
        padding: 10px 14px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .display-live-info h1 { font-size: 0.95rem; margin-top: 2px; }
    .display-babak { font-size: 0.68rem; }
    .display-live-nav { display: flex; gap: 6px; }
    .display-live-nav .btn { font-size: 0.72rem; padding: 6px 12px; }
    .display-live-body { padding: 10px 14px; gap: 10px; }
    .display-teams {
        gap: 10px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-content: start;
    }
    .display-teams .team-card {
        flex: none;
        min-width: 0;
        max-width: none;
        padding: 14px 16px;
    }
    .display-teams .team-score { font-size: 1.8rem; }
    .display-teams .team-name { font-size: 0.85rem; }
    .display-teams .team-meta { font-size: 0.72rem; }
    .display-teams .group-badge { font-size: 0.65rem; padding: 3px 10px; }
    .display-history {
        max-height: 120px;
        padding: 10px 14px;
    }
    .display-history h3 { font-size: 0.72rem; margin-bottom: 6px; }
    .log-entry { font-size: 0.8rem; padding: 4px 0; }

    /* ── Selector Pages ── */
    .selector-box { margin: 30px 14px; padding: 28px 20px; }
    .session-link { padding: 12px 14px; flex-direction: column; gap: 4px; }
    .display-page { padding: 30px 14px; }

    /* ── Buttons ── */
    .btn-lg { padding: 12px 24px; font-size: 0.9rem; }
    .btn-sm { padding: 6px 12px; font-size: 0.75rem; }
    .btn-xs { padding: 4px 8px; font-size: 0.7rem; }
    .btn-block { width: 100%; }
}

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding: 80px 16px 60px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    .section {
        padding: 48px 0;
    }
    .section-header {
        margin-bottom: 32px;
    }
    .feature-grid,
    .workflow-grid,
    .ts-grid {
        grid-template-columns: 1fr;
    }
    .header {
        padding: 12px 16px;
    }
    .header-brand h1,
    .header h1 {
        font-size: 1rem;
    }
    .container, .main-container {
        padding: 0 16px;
    }
    .login-box {
        margin: 40px 16px;
        padding: 32px 24px;
    }
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar select,
    .filter-bar input {
        max-width: 100%;
    }
    .event-grid,
    .session-grid {
        grid-template-columns: 1fr;
    }
    .timer-bar {
        flex-direction: column;
        text-align: center;
    }
    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Display mobile small */
    .display-live-header { padding: 8px 10px; }
    .display-live-info h1 { font-size: 0.85rem; }
    .display-timer { font-size: 1.8rem; padding: 6px 18px; min-width: 140px; }
    .display-teams { gap: 8px; grid-template-columns: repeat(2, 1fr); }
    .display-teams .team-card { padding: 10px 12px; }
    .display-teams .team-score { font-size: 1.4rem; }
    .display-teams .team-name { font-size: 0.78rem; }
    .display-history { max-height: 90px; padding: 8px 10px; }
    .log-entry { font-size: 0.75rem; }
    .hero { min-height: 50vh; padding: 50px 12px 30px; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.82rem; }
    .hero-badge { font-size: 0.65rem; padding: 4px 12px; }
    .login-card { padding: 24px 16px; margin: 16px 8px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { flex-direction: column; text-align: center; gap: 4px; padding: 10px 6px; }
    .stat-value { font-size: 1.2rem; }
    .stat-value { font-size: 1.2rem; }
    .team-table-head, .team-row { grid-template-columns: 28px 40px 1fr 50px; gap: 4px; font-size: 0.72rem; }
    .standing-head, .standing-row { grid-template-columns: 32px 1fr 60px; font-size: 0.72rem; }
    .standing-col-sesi, .standing-col-source { display: none; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .score-input { font-size: 0.78rem; padding: 4px 2px; }
    .display-timer { font-size: 1.6rem; padding: 6px 16px; }
    .display-teams .team-card { min-width: 120px; padding: 10px 12px; }
    .display-teams .team-score { font-size: 1.4rem; }
    .modal-content { margin: 6px; border-radius: 12px; }
    .timer-countdown { font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════ */
@media print {
    body { background: #fff; color: #000; }
    body::before { display: none; }
    .header, .btn, .modal, .site-footer,
    .hero-bg, .filter-bar { display: none; }
    .card, .panel, .team-card, .session-card, .event-card {
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
    }
    .container, .main-container {
        max-width: 100%;
        padding: 0;
    }
    a { color: #000; text-decoration: underline; }
}
