:root {
    /* Grafikart-inspired Palette: Refined Slate-Indigo Dark Theme */
    --bg: #0d1124;
    --bg-surface: #131735;
    --bg-soft: #171d3f;
    --panel: #1c224a;
    --panel-hover: #232b5e;
    --border: #283267;
    --border-subtle: rgba(83, 150, 231, 0.16);
    --border-glow: rgba(83, 150, 231, 0.45);
    
    /* Typography */
    --text: #f0f4ff;
    --body-text: #c2cff2;
    --muted: #7e91c7;
    --muted-dark: #58699b;
    
    /* Signature Grafikart Accents */
    --primary: #4869ee;
    --primary-light: #5396e7;
    --primary-hover: #3b58cf;
    --primary-glow: rgba(72, 105, 238, 0.4);
    
    --accent: #4869ee;
    --accent-2: #38bdf8;
    --accent-purple: #8b5cf6;
    
    /* Status & Alerts */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.28);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.28);
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.12);
    --danger-border: rgba(244, 63, 94, 0.28);
    
    /* Layout & Metrics */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(1100px 550px at 50% -10%, rgba(72, 105, 238, 0.15), transparent 70%),
        radial-gradient(900px 450px at 90% 60%, rgba(56, 189, 248, 0.08), transparent 70%),
        radial-gradient(700px 450px at 10% 90%, rgba(139, 92, 246, 0.09), transparent 70%),
        var(--bg);
    color: var(--body-text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(13, 17, 36, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.brand:hover {
    opacity: 0.9;
}

.brand-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(72, 105, 238, 0.22), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(83, 150, 231, 0.38);
    border-radius: 8px;
    box-shadow: 0 4px 14px -2px rgba(72, 105, 238, 0.35);
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.brand:hover .brand-emblem {
    transform: translateY(-1px);
    border-color: var(--primary-light);
}

.brand-emblem svg {
    width: 22px;
    height: 22px;
}

.brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.06em;
    color: #fff;
    font-family: var(--font);
}

.brand-title span.brand-dot {
    color: var(--primary-light);
}

.brand-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 600;
    margin-top: 3px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: var(--muted);
}

.site-nav a {
    transition: color 0.15s ease;
    font-weight: 500;
}

.site-nav a:hover {
    color: #fff;
}

.hero {
    flex: 1;
    padding: 70px 24px 60px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-light);
    margin: 0 0 14px;
}

.hero h1 {
    font-size: clamp(34px, 5.5vw, 56px);
    line-height: 1.1;
    margin: 0 0 20px;
    letter-spacing: -0.03em;
    color: #fff;
}

.lead {
    color: var(--body-text);
    font-size: clamp(16px, 2vw, 18px);
    max-width: 640px;
    margin: 0 0 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--text);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary-light);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #4869ee, #3b82f6);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px -2px rgba(72, 105, 238, 0.45);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b58cf, #2563eb);
    box-shadow: 0 6px 22px -2px rgba(72, 105, 238, 0.65);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--body-text);
}

.btn-ghost:hover {
    background: rgba(83, 150, 231, 0.1);
    border-color: var(--primary-light);
    color: #fff;
}

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    padding: 24px 0;
    background: rgba(13, 17, 36, 0.6);
}

.site-footer p {
    margin: 0;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 4px 20px -4px rgba(5, 7, 16, 0.5);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: var(--border-glow);
}

.alert {
    border-radius: var(--radius);
    padding: 14px 18px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: #fca5a5;
}

.alert-success {
    border-color: var(--success-border);
    background: var(--success-bg);
    color: #6ee7b7;
}

.alert-warn {
    border-color: var(--warning-border);
    background: var(--warning-bg);
    color: #fcd34d;
}

.alert-info {
    border-color: rgba(83, 150, 231, 0.4);
    background: rgba(83, 150, 231, 0.1);
    color: #93c5fd;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.link {
    color: var(--primary-light);
    transition: color 0.15s ease;
}

.link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.break {
    word-break: break-all;
}

.auth-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 60px 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px -12px rgba(5, 7, 16, 0.7);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 28px;
    color: #fff;
    letter-spacing: -0.02em;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.form input,
.form select,
.form textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(83, 150, 231, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    align-items: end;
    margin-top: 20px;
}

.form-grid button {
    justify-self: start;
}

.btn-danger {
    background: transparent;
    border-color: rgba(255, 92, 108, 0.5);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(255, 92, 108, 0.08);
    border-color: var(--danger);
}

.nav-user {
    color: var(--text);
    font-weight: 600;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.user-chip svg {
    color: var(--accent);
    flex-shrink: 0;
}

.btn-admin-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 176, 32, 0.1);
    border: 1px solid rgba(255, 176, 32, 0.35);
    border-radius: 6px;
    color: #ffb020 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.btn-admin-nav:hover {
    background: rgba(255, 176, 32, 0.2);
    border-color: #ffb020;
    color: #fff !important;
    text-decoration: none;
}

.inline-form {
    display: inline;
    margin: 0;
}

.linklike {
    background: none;
    border: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.linklike:hover {
    color: var(--text);
}

.linklike.danger {
    color: var(--danger);
}

.page {
    flex: 1;
    padding: 48px 24px 72px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
}

.page-head .eyebrow {
    margin-bottom: 8px;
}

/* ── Admin dashboard ── */
.badge-admin-role {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(72, 105, 238, 0.18);
    border: 1px solid rgba(72, 105, 238, 0.4);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #93aeff;
}

.page-head-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Admin KPI strip */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.admin-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.15s;
}

.admin-kpi-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.admin-kpi-card--alert {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.06);
}

.admin-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--kpi-color) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--kpi-color) 35%, transparent);
    color: var(--kpi-color);
    flex-shrink: 0;
}

.admin-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.admin-kpi-label {
    font-size: 12px;
    color: var(--muted);
}

/* Admin shortcuts grid */
.admin-shortcuts-section {
    margin-bottom: 40px;
}

.admin-shortcuts-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
}

.admin-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.admin-shortcut-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}

.admin-shortcut-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--sc-color, var(--primary));
    opacity: 0;
    transition: opacity 0.18s;
}

.admin-shortcut-card:hover {
    border-color: var(--border-glow);
    background: var(--panel-hover);
    transform: translateX(3px);
}

.admin-shortcut-card:hover::before {
    opacity: 1;
}

.admin-shortcut-card--alert {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

.admin-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--sc-color) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--sc-color) 30%, transparent);
    color: var(--sc-color);
    flex-shrink: 0;
}

.admin-shortcut-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-shortcut-desc {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.admin-shortcut-badge {
    display: inline-block;
    padding: 1px 7px;
    background: rgba(83, 150, 231, 0.18);
    border: 1px solid rgba(83, 150, 231, 0.3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-light);
}

.admin-shortcut-badge--alert {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.admin-shortcut-arrow {
    margin-left: auto;
    color: var(--muted-dark);
    flex-shrink: 0;
    transition: transform 0.15s, color 0.15s;
}

.admin-shortcut-card:hover .admin-shortcut-arrow {
    transform: translateX(4px);
    color: var(--primary-light);
}

/* ── Participant stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
}

.card + .card {
    margin-top: 24px;
}

.card h2 {
    margin-top: 0;
    font-size: 20px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.admin-nav a {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    background: var(--bg-surface);
    transition: all 0.15s ease;
}

.admin-nav a:hover {
    color: #fff;
    border-color: var(--primary-light);
    background: rgba(83, 150, 231, 0.1);
}

.admin-nav a.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(72, 105, 238, 0.45);
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table th {
    background: rgba(19, 24, 53, 0.7);
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table tbody tr:hover {
    background: rgba(83, 150, 231, 0.04);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-ok {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #34d399;
}

.badge-off {
    background: rgba(126, 145, 199, 0.12);
    border: 1px solid rgba(126, 145, 199, 0.25);
    color: var(--muted);
}

.badge-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #f87171;
}

.badge-warn {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: #fbbf24;
}

.badge-info {
    background: rgba(83, 150, 231, 0.12);
    border: 1px solid rgba(83, 150, 231, 0.3);
    color: #60a5fa;
}

.code-output {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--primary-light);
    border-radius: 8px;
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    resize: vertical;
}

.secret-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.secret {
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--primary-light);
    word-break: break-all;
}

.steps {
    padding-left: 20px;
}

.steps li {
    margin: 6px 0;
}

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.challenge-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px -4px rgba(5, 7, 16, 0.5);
}

.challenge-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(5, 7, 16, 0.6), 0 0 16px -2px rgba(72, 105, 238, 0.25);
}

.challenge-card.is-solved {
    border-color: var(--success-border);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), var(--panel));
}

.challenge-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.challenge-points {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 14px;
}
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.challenge-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.challenge-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.solved-tag {
    color: var(--accent);
    font-weight: 600;
}

.challenge-score {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.challenge-description {
    white-space: normal;
}

.form label.checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.form label.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-grid .span-all {
    grid-column: 1 / -1;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.alert-info {
    border-color: rgba(42, 164, 255, 0.4);
    background: rgba(42, 164, 255, 0.08);
    color: var(--accent-2);
}

.alert-warn {
    border-color: rgba(255, 176, 32, 0.4);
    background: rgba(255, 176, 32, 0.08);
    color: #ffb020;
}

.linklike {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: var(--muted);
    padding: 0;
}

.linklike:hover {
    color: var(--danger);
}

/* ==========================================================================
   GRAFIKART-INSPIRED STYLING (ZMB STACK KIVAREX ARENA)
   ========================================================================== */

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 24px;
}

@media (min-width: 980px) {
    .hero-layout {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 48px;
    }
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(83, 150, 231, 0.12);
    border: 1px solid rgba(83, 150, 231, 0.3);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.pro-badge-warn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(83, 150, 231, 0.12);
    border: 1px solid rgba(83, 150, 231, 0.3);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    margin-bottom: 16px;
}

.pro-badge span.separator {
    color: var(--border);
    font-weight: 400;
}

.pro-badge strong {
    color: #fff;
    font-weight: 800;
}

.hero h1.executive-title {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 8px 0 20px;
    color: #fff;
}

.hero h1.executive-title span.highlight {
    background: linear-gradient(135deg, #60a5fa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-executive {
    color: var(--body-text);
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 28px;
}

.lead-executive strong {
    color: #fff;
}

/* Terminal / Lab Preview Card (Grafikart Hero Showcase) */
.hero-terminal {
    background: #141836;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(5, 7, 16, 0.7), 0 0 25px -4px rgba(72, 105, 238, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-terminal:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.terminal-header {
    background: #0f122c;
    border-bottom: 1px solid var(--border);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 7px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.dot-red { background: #f43f5e; }
.terminal-dot.dot-yellow { background: #f59e0b; }
.terminal-dot.dot-green { background: #10b981; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.terminal-body {
    padding: 22px 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
}

.terminal-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
}

.terminal-line {
    color: var(--body-text);
    margin: 8px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.terminal-line .term-prompt {
    color: var(--primary-light);
    user-select: none;
}

.terminal-line .term-cmd {
    color: #fff;
    font-weight: 600;
}

.terminal-stat-box {
    margin: 16px 0;
    background: rgba(19, 24, 54, 0.6);
    border: 1px solid rgba(83, 150, 231, 0.15);
    border-radius: 8px;
    padding: 14px 16px;
    font-family: var(--font);
}

.terminal-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--body-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.terminal-stat-item:last-child {
    border-bottom: none;
}

.terminal-stat-item span.term-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #fff;
}

.terminal-prize-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-top: 14px;
    font-family: var(--font);
    font-size: 12px;
    color: #fcd34d;
    font-weight: 600;
}

/* KPI Bar */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 40px 0;
}

.kpi-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: 0 4px 16px -4px rgba(5, 7, 16, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.kpi-val {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.kpi-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 600;
}

/* Executive Prize Card */
.executive-prize-card {
    background: linear-gradient(135deg, #1b2149, #151a3a);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin: 48px 0;
    box-shadow: 0 16px 40px -12px rgba(5, 7, 16, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.executive-prize-card:hover {
    border-color: rgba(245, 158, 11, 0.6);
}

.prize-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.prize-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    border-radius: 9999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 10px;
}

.prize-top h2 {
    margin: 0;
    font-size: 26px;
    color: #fff;
    letter-spacing: -0.02em;
}

.prize-desc {
    color: var(--body-text);
    font-size: 15px;
    line-height: 1.7;
    max-width: 820px;
}

.prize-desc strong {
    color: #fff;
}

.prize-criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.prize-criterion {
    background: rgba(13, 17, 36, 0.75);
    border: 1px solid rgba(245, 158, 11, 0.18);
    padding: 20px;
    border-radius: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.prize-criterion:hover {
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.prize-criterion h4 {
    margin: 0 0 6px;
    font-size: 14px;
    color: #fbbf24;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prize-criterion p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
}

/* Pillars Grid (Rules & Methodology) */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.pillar-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: border-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px -4px rgba(5, 7, 16, 0.4);
}

.pillar-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.pillar-num {
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0.08em;
}

.pillar-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #fff;
    line-height: 1.35;
}

.pillar-card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* Domain Tracks Grid */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.domain-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 4px 16px -4px rgba(5, 7, 16, 0.4);
    transition: border-color 0.2s ease;
}

.domain-card:hover {
    border-color: var(--primary-light);
}

.domain-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--primary-light);
}

.domain-card p.domain-sub {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--muted);
}

.domain-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.domain-list li {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--body-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-list li code {
    background: rgba(83, 150, 231, 0.1);
    border: 1px solid rgba(83, 150, 231, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #93c5fd;
    font-family: var(--font-mono);
}

.section-head-clean {
    margin: 54px 0 20px;
}

.section-head-clean p.eyebrow {
    margin-bottom: 8px;
}

.section-head-clean h2 {
    margin: 0;
    font-size: 26px;
    color: #fff;
    letter-spacing: -0.02em;
}

.section-head-clean p.muted {
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--muted);
}

/* ==========================================================================
   ADMIN GUIDE & ONBOARDING CARDS (ZMB STACK CONSOLE)
   ========================================================================== */

.admin-guide-card {
    background: linear-gradient(135deg, #1c224a, #151a3a);
    border: 1px solid rgba(83, 150, 231, 0.3);
    border-left: 4px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-bottom: 26px;
    box-shadow: 0 8px 24px -6px rgba(5, 7, 16, 0.6);
}

.admin-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-guide-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-guide-badge {
    padding: 3px 10px;
    background: rgba(83, 150, 231, 0.14);
    border: 1px solid rgba(83, 150, 231, 0.35);
    border-radius: 9999px;
    font-size: 10px;
    color: #60a5fa;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.admin-guide-role {
    font-size: 14px;
    color: var(--body-text);
    margin: 0 0 14px;
    line-height: 1.65;
}

.admin-guide-role strong {
    color: #fff;
}

.admin-guide-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-guide-action-item {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
    background: rgba(13, 17, 36, 0.65);
    border: 1px solid rgba(83, 150, 231, 0.12);
    padding: 12px 14px;
    border-radius: 8px;
}

.admin-guide-action-item strong {
    color: #fff;
    display: block;
    margin-bottom: 3px;
}

/* Interactive Accordion / FAQ */
.faq-wrap {
    margin-top: 36px;
}

.faq-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.faq-item:hover {
    border-color: rgba(83, 150, 231, 0.3);
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 18px;
    color: var(--muted);
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: "−";
    color: var(--primary-light);
}

.faq-item summary:hover {
    background: rgba(83, 150, 231, 0.06);
    color: #fff;
}

.faq-content {
    padding: 0 20px 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 4px;
}

.section-title {
    font-size: 24px;
    margin: 48px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.section-title span {
    color: var(--primary-light);
}


/* ════════════════════════════════════════════
   CLASSEMENT — Leaderboard
   ════════════════════════════════════════════ */

/* Badge "Votre position" dans le page-head */
.my-rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 28px;
    background: rgba(72, 105, 238, 0.12);
    border: 1px solid rgba(72, 105, 238, 0.35);
    border-radius: var(--radius-lg);
}

.my-rank-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.my-rank-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ── Podium ── */
.podium-section {
    margin-bottom: 40px;
}

.podium-grid {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    padding: 32px 0 0;
}

.podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 20px 24px 0;
    min-width: 160px;
}

.podium-me {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: var(--radius-lg);
}

.podium-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    background: var(--panel);
    border: 2px solid var(--border);
    color: var(--text);
    letter-spacing: 0.04em;
}

.podium-gold .podium-avatar   { border-color: #f59e0b; background: rgba(245,158,11,0.15); color: #fbbf24; }
.podium-silver .podium-avatar { border-color: #94a3b8; background: rgba(148,163,184,0.15); color: #cbd5e1; }
.podium-bronze .podium-avatar { border-color: #cd7c3f; background: rgba(205,124,63,0.15);  color: #fba87a; }

.podium-pseudo {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.podium-pts {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.podium-gold .podium-pts   { color: #fbbf24; }
.podium-silver .podium-pts { color: #cbd5e1; }
.podium-bronze .podium-pts { color: #fba87a; }

.podium-solved {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.podium-rank-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.podium-rank-gold   { background: rgba(245,158,11,0.18); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.podium-rank-silver { background: rgba(148,163,184,0.15); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }
.podium-rank-bronze { background: rgba(205,124,63,0.15); color: #fba87a; border: 1px solid rgba(205,124,63,0.3); }

.podium-crown { margin-right: 4px; }

.podium-base {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: 12px;
}
.podium-base-gold   { height: 100px; background: linear-gradient(180deg, rgba(245,158,11,0.25), rgba(245,158,11,0.08)); border-top: 2px solid rgba(245,158,11,0.5); }
.podium-base-silver { height: 72px;  background: linear-gradient(180deg, rgba(148,163,184,0.2), rgba(148,163,184,0.06)); border-top: 2px solid rgba(148,163,184,0.4); }
.podium-base-bronze { height: 50px;  background: linear-gradient(180deg, rgba(205,124,63,0.2), rgba(205,124,63,0.06)); border-top: 2px solid rgba(205,124,63,0.35); }

/* ── Tableau ── */
.lb-table-section {
    margin-bottom: 48px;
}

.lb-table-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
}

.lb-table-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
}

.lb-table thead {
    background: rgba(13, 17, 36, 0.5);
}

.lb-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.lb-th-rank   { width: 70px; text-align: center; }
.lb-th-pts    { width: 120px; text-align: right; }
.lb-th-solved { width: 110px; text-align: center; }
.lb-th-fb     { width: 100px; text-align: center; }
.lb-th-prog   { width: 180px; }

.lb-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--panel-hover); }

.lb-row-me {
    background: rgba(72, 105, 238, 0.07);
    border-left: 3px solid var(--primary);
}

.lb-row-me:hover { background: rgba(72, 105, 238, 0.12); }

.lb-table td {
    padding: 14px 18px;
    vertical-align: middle;
}

/* Rang */
.lb-td-rank { text-align: center; }

.lb-rank-num {
    display: inline-block;
    font-size: 15px;
    font-weight: 800;
    color: var(--muted);
    min-width: 28px;
    text-align: center;
}

.rank-gold   { color: #fbbf24; font-size: 18px; }
.rank-silver { color: #94a3b8; font-size: 16px; }
.rank-bronze { color: #cd7c3f; font-size: 15px; }

/* Pseudo */
.lb-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.lb-avatar-rank-gold   { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.4); color: #fbbf24; }
.lb-avatar-rank-silver { background: rgba(148,163,184,0.12); border-color: rgba(148,163,184,0.3); color: #cbd5e1; }
.lb-avatar-rank-bronze { background: rgba(205,124,63,0.12); border-color: rgba(205,124,63,0.3); color: #fba87a; }
.lb-avatar-default     { background: var(--bg-soft); border-color: var(--border); color: var(--muted); }

.lb-pseudo-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.lb-me-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    background: rgba(72,105,238,0.18);
    border: 1px solid rgba(72,105,238,0.4);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    color: #93aeff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: middle;
}

/* Points */
.lb-td-pts { text-align: right; }

.lb-pts {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.lb-pts-top { color: var(--primary-light); }

/* Flags */
.lb-td-solved { text-align: center; }

.lb-solved {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.lb-solved-total {
    font-size: 12px;
    color: var(--muted);
}

/* First blood */
.lb-td-fb { text-align: center; }

.lb-fb-badge {
    display: inline-block;
    padding: 2px 9px;
    background: rgba(244,63,94,0.15);
    border: 1px solid rgba(244,63,94,0.35);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #fb7185;
}

.lb-no-fb {
    color: var(--muted-dark);
    font-size: 14px;
}

/* Progression */
.lb-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lb-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    overflow: hidden;
}

.lb-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.6s ease;
}

.lb-progress-top {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.lb-progress-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    min-width: 32px;
    text-align: right;
}

.lb-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 14px;
}

/* ── Mini leaderboard widget (dashboard participant) ── */
.stat-card-rank {
    border-color: rgba(72, 105, 238, 0.4);
    background: rgba(72, 105, 238, 0.07);
}

.stat-value-rank {
    color: var(--primary-light);
}

.dash-lb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    transition: background 0.15s;
}

.dash-lb-row:hover {
    background: var(--panel-hover);
}

.dash-lb-row-me {
    background: rgba(72, 105, 238, 0.08);
    border-color: rgba(72, 105, 238, 0.35);
}

.dash-lb-pseudo {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.dash-lb-pts {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-light);
}

.dash-lb-solved {
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}


/* ── Sécurité & Sentinelle furtive ── */
.sentinel-canary,
[data-sentinel-canary] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
