@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --bg-base:          #09090f;
    --bg-surface:       #111120;
    --bg-card:          #13131f;
    --bg-card-hover:    #17172a;
    --bg-input:         #0e0e1c;
    --bg-input-focus:   #12121e;
    --bg-overlay:       rgba(9, 9, 15, 0.85);

    --border:           #1e1e35;
    --border-muted:     #171728;
    --border-focus:     #6d28d9;
    --border-accent:    rgba(109, 40, 217, 0.4);

    --accent:           #7c3aed;
    --accent-hover:     #6d28d9;
    --accent-light:     #a78bfa;
    --accent-dim:       #4c1d95;
    --accent-glow:      rgba(124, 58, 237, 0.4);
    --accent-glow-sm:   rgba(124, 58, 237, 0.15);
    --accent-glow-xs:   rgba(124, 58, 237, 0.08);

    --text-primary:     #e2e2f0;
    --text-secondary: #ffffff;
    --text-muted: #a3a3aa;
    --text-on-accent:   #ffffff;

    --color-success:    #4ade80;
    --color-success-bg: rgba(74, 222, 128, 0.08);
    --color-success-bd: rgba(74, 222, 128, 0.25);

    --color-error:      #f87171;
    --color-error-bg:   rgba(248, 113, 113, 0.08);
    --color-error-bd:   rgba(248, 113, 113, 0.25);

    --color-warning:    #fbbf24;
    --color-warning-bg: rgba(251, 191, 36, 0.08);
    --color-warning-bd: rgba(251, 191, 36, 0.25);

    --color-info:       #38bdf8;
    --color-info-bg:    rgba(56, 189, 248, 0.08);
    --color-info-bd:    rgba(56, 189, 248, 0.25);

    --font-display: 'Orbitron', sans-serif;
    --font-body:    'Rajdhani', sans-serif;

    --text-xs:   0.72rem;
    --text-sm:   0.83rem;
    --text-base: 1rem;
    --text-lg:   1.15rem;
    --text-xl:   1.35rem;
    --text-2xl:  1.65rem;
    --text-3xl:  2rem;

    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg:  0 20px 50px rgba(0,0,0,0.6);
    --shadow-accent: 0 0 24px var(--accent-glow);

    --transition-fast: 150ms ease;
    --transition-base: 220ms ease;
    --transition-slow: 350ms ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--text-primary); }

img { display: block; max-width: 100%; }

ul, ol { list-style: none; }

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: var(--space-6) 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl);  }
h4 { font-size: var(--text-lg);  }

.text-gradient {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-xs        { font-size: var(--text-xs); }
.text-sm        { font-size: var(--text-sm); }
.text-base      { font-size: var(--text-base); }
.text-lg        { font-size: var(--text-lg); }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-accent    { color: var(--accent-light) !important; }
.text-success   { color: var(--color-success) !important; }
.text-error     { color: var(--color-error) !important; }
.text-warning   { color: var(--color-warning) !important; }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.uppercase    { text-transform: uppercase; letter-spacing: 0.1em; }

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px 40px 36px;
    box-shadow:
            var(--shadow-lg),
            0 0 0 1px rgba(124,58,237,0.08),
            0 0 80px var(--accent-glow-xs);
    position: relative;
    z-index: 1;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: var(--radius-full);
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.logo-icon-wrap {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

.logo-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 900;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #c4b5fd, var(--accent-light), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.logo-subtitle {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.login-alert { display: none; margin-bottom: var(--space-5); }
.login-alert.visible { display: flex; }

.btn-login { padding: 13px 20px; font-size: 0.88rem; }

.login-footer {
    margin-top: var(--space-6);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.login-footer a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.login-footer a:hover { color: var(--accent-light); }

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center{ justify-content: center; }
.justify-between{justify-content: space-between; }
.gap-2         { gap: var(--space-2); }
.gap-3         { gap: var(--space-3); }
.gap-4         { gap: var(--space-4); }
.gap-6         { gap: var(--space-6); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }

.w-full   { width: 100%; }
.h-full   { height: 100%; }
.min-h-screen { min-height: 100vh; }
.text-center  { text-align: center; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow-xs);
}
.card-sm { padding: var(--space-4); border-radius: var(--radius-md); }
.card-lg { padding: var(--space-10); border-radius: var(--radius-xl); }

.card-header {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: 0.06em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition:
            transform var(--transition-fast),
            box-shadow var(--transition-base),
            background var(--transition-fast),
            border-color var(--transition-fast),
            color var(--transition-fast),
            opacity var(--transition-fast);
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}
.btn:active   { transform: scale(0.97); }
.btn:disabled, .btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #5b21b6, var(--accent));
    color: var(--text-on-accent);
    border-color: transparent;
    box-shadow: 0 4px 18px var(--accent-glow-sm);
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent);
    pointer-events: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 6px 28px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-light);
    border-color: var(--border-accent);
}
.btn-secondary:hover {
    background: var(--accent-glow-xs);
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #7f1d1d, var(--color-error));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(248,113,113,0.2);
}
.btn-danger:hover {
    box-shadow: 0 6px 28px rgba(248,113,113,0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #14532d, var(--color-success));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(74,222,128,0.15);
}
.btn-success:hover {
    box-shadow: 0 6px 28px rgba(74,222,128,0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-xs { padding: 5px 12px;  font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-sm { padding: 8px 16px;  font-size: var(--text-xs); }
.btn-lg { padding: 13px 28px; font-size: var(--text-base); }
.btn-xl { padding: 16px 36px; font-size: var(--text-lg); letter-spacing: 0.12em; }
.btn-block { width: 100%; }

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.btn-icon:hover {
    background: var(--bg-card);
    border-color: var(--border-accent);
    color: var(--accent-light);
}

.btn.loading { pointer-events: none; }
.btn.loading .btn-label { opacity: 0; }
.btn.loading::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.label-required::after {
    content: ' *';
    color: var(--color-error);
}

.input,
.select,
.textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    padding: 10px 14px;
    outline: none;
    transition:
            border-color var(--transition-base),
            background var(--transition-base),
            box-shadow var(--transition-base);
    -webkit-appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--text-muted); font-weight: 400; }

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow-xs);
}
.input:disabled,
.select:disabled,
.textarea:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.input-wrap {
    position: relative;
}
.input-wrap .input {
    padding-left: 42px;
}
.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    transition: color var(--transition-base);
}
.input-wrap .input:focus + .input-icon,
.input-wrap .input:focus ~ .input-icon {
    color: var(--accent-light);
}
.input-wrap.icon-right .input {
    padding-left: 14px;
    padding-right: 42px;
}
.input-wrap.icon-right .input-icon {
    left: auto;
    right: 14px;
}
.input-wrap .input-action {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.input-wrap .input-action:hover {
    color: var(--accent-light);
    background: var(--accent-glow-xs);
}
.input-wrap.has-action .input {
    padding-right: 42px;
}

.textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a9a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.input.is-error,
.select.is-error,
.textarea.is-error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(248,113,113,0.1);
}
.input.is-success,
.select.is-success {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(74,222,128,0.08);
}

.field-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.field-error {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.check-label,
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    user-select: none;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.check-label input[type="checkbox"],
.radio-label  input[type="radio"] { display: none; }

.check-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}
.check-label:hover .check-box {
    border-color: var(--border-focus);
}
.check-label input:checked + .check-box {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow-sm);
}
.check-box svg { opacity: 0; transition: opacity var(--transition-fast); }
.check-label input:checked + .check-box svg { opacity: 1; }

.radio-dot {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-input);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}
.radio-label input:checked + .radio-dot {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow-sm);
}
.radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity var(--transition-base), transform var(--transition-base);
}
.radio-label input:checked + .radio-dot::after {
    opacity: 1;
    transform: scale(1);
}

.toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    user-select: none;
}
.toggle-wrap input[type="checkbox"] { display: none; }
.toggle-track {
    width: 42px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--border);
    position: relative;
    transition: background var(--transition-base), box-shadow var(--transition-base);
    flex-shrink: 0;
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform var(--transition-base), background var(--transition-base);
}
.toggle-wrap input:checked + .toggle-track {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow-sm);
}
.toggle-wrap input:checked + .toggle-track::after {
    transform: translateX(18px);
    background: #fff;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.badge-accent  { background: var(--accent-glow-sm); color: var(--accent-light); border-color: var(--border-accent); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success-bd); }
.badge-error   { background: var(--color-error-bg);   color: var(--color-error);   border-color: var(--color-error-bd); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: var(--color-warning-bd); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info);    border-color: var(--color-info-bd); }
.badge-muted   { background: var(--bg-card); color: var(--text-muted); border-color: var(--border); }

.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: var(--text-sm);
    line-height: 1.5;
}
.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 700; margin-bottom: 2px; display: block; }

.alert-success { background: var(--color-success-bg); border-color: var(--color-success-bd); color: var(--color-success); }
.alert-error   { background: var(--color-error-bg);   border-color: var(--color-error-bd);   color: var(--color-error); }
.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning-bd); color: var(--color-warning); }
.alert-info    { background: var(--color-info-bg);    border-color: var(--color-info-bd);    color: var(--color-info); }

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.table thead {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}
.table th {
    padding: 10px 16px;
    text-align: left;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-muted);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-muted);
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-muted);
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
            linear-gradient(rgba(124,58,237,0.045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(124,58,237,0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-top {
    position: fixed;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(109,40,217,0.14) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    animation: glowPulse 7s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50%       { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}

.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--accent-light);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: particleFloat linear infinite;
}
@keyframes particleFloat {
    0%   { transform: translateY(100vh); opacity: 0; }
    8%   { opacity: 0.5; }
    92%  { opacity: 0.2; }
    100% { transform: translateY(-5vh);  opacity: 0; }
}

.page-content { position: relative; z-index: 1; }

.animate-in {
    animation: animateIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.animate-in-delay-1 { animation-delay: 0.05s; }
.animate-in-delay-2 { animation-delay: 0.1s; }
.animate-in-delay-3 { animation-delay: 0.15s; }
.animate-in-delay-4 { animation-delay: 0.2s; }

@keyframes animateIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease both; }
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

::-webkit-scrollbar               { width: 6px; height: 6px; }
::-webkit-scrollbar-track         { background: var(--bg-base); }
::-webkit-scrollbar-thumb         { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover   { background: var(--accent-dim); }

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .container { padding: 0 var(--space-4); }
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
}

body { overflow-x: hidden; }

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 16px var(--accent-glow-sm);
}
.brand-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #c4b5fd, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 8px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.nav-link:hover {
    background: var(--accent-glow-xs);
    color: var(--text-primary);
    border-color: var(--border-accent);
}
.nav-link.active {
    background: var(--accent-glow-sm);
    color: var(--accent-light);
    border-color: var(--border-accent);
}
.nav-link svg { flex-shrink: 0; opacity: 0.7; }
.nav-link.active svg,
.nav-link:hover svg { opacity: 1; }

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid var(--border-muted);
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 10px;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--color-error); }

.main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.topbar {
    height: 60px;
    border-bottom: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(9,9,15,0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-family: var(--font-display);
}

.page-body {
    padding: 32px 28px;
    flex: 1;
}

.greeting {
    margin-bottom: 32px;
}
.greeting-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.greeting-label::before {
    content: '';
    width: 20px; height: 1px;
    background: var(--accent);
}
.greeting-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}
.greeting-title span {
    background: linear-gradient(135deg, #c4b5fd, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.greeting-sub {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-base), transform var(--transition-base);
}
.status-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}
.status-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-color, var(--accent));
    opacity: 0.6;
}
.status-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--card-color-bg, var(--accent-glow-xs));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.status-icon svg { color: var(--card-color, var(--accent-light)); }
.status-info { flex: 1; min-width: 0; }
.status-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.status-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    animation: dotPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
.status-dot.offline {
    background: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
    animation: none;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.3); }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    width: 3px; height: 14px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.quickaccess-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.quick-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.quick-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-glow-xs);
    opacity: 0;
    transition: opacity var(--transition-base);
}
.quick-btn:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-glow-xs);
}
.quick-btn:hover::before { opacity: 1; }

.quick-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-glow-sm);
    border: 1px solid var(--border-accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-light);
    position: relative;
}
.quick-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.quick-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.quick-arrow {
    position: absolute;
    top: 14px; right: 14px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.quick-btn:hover .quick-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition-base);
}
.team-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.team-avatar {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}
.team-avatar.color-1 { background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.team-avatar.color-2 { background: linear-gradient(135deg, #3b1f5e, #7c3aed); }
.team-avatar.color-3 { background: linear-gradient(135deg, #1a3d2b, #16a34a); }
.team-avatar.color-4 { background: linear-gradient(135deg, #5c1a1a, #dc2626); }
.team-avatar.color-5 { background: linear-gradient(135deg, #4a3000, #d97706); }
.team-avatar.color-6 { background: linear-gradient(135deg, #1a3a3a, #0891b2); }

.online-indicator {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    background: var(--text-muted);
}
.online-indicator.online  { background: var(--color-success); }
.online-indicator.away    { background: var(--color-warning); }

.team-info { flex: 1; min-width: 0; }
.team-name {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-top: 2px;
}
.role-admin { color: var(--color-error); }
.role-mod   { color: var(--accent-light); }
.role-build { color: var(--color-success); }
.role-sup   { color: var(--color-info); }

.team-status-text {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
    position: relative;
    z-index: 1;
}
.login-card-wide { max-width: 560px; }

.auth-lead {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

.error-code {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #c4b5fd, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-3);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}
.sidebar-toggle { display: none; }

.main { min-width: 0; }
.toolbar .filter-tabs { max-width: 100%; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 90;
}

.user-chip-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    color: inherit;
}
.user-chip-link:hover { color: inherit; }
.user-chip-link:hover .user-name { color: var(--accent-light); }

.user-avatar img,
.team-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    image-rendering: pixelated;
}
.team-card { color: inherit; }
.team-card:hover { color: inherit; }

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
    }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar.open + .sidebar-backdrop { display: block; }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .topbar { padding: 0 var(--space-4); }
    .page-body { padding: var(--space-6) var(--space-4); }
    .topbar-time { display: none; }
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
}
.stack { display: flex; flex-direction: column; gap: var(--space-6); }
.section { margin-bottom: var(--space-8); }

@media (max-width: 1100px) {
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}
.page-head .greeting { margin-bottom: 0; }
.page-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}
.back-link:hover { color: var(--accent-light); }

.flash-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
}
.empty-state strong {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.tone-green  { --card-color: var(--color-success); --card-color-bg: var(--color-success-bg); --card-color-bd: var(--color-success-bd); }
.tone-purple { --card-color: var(--accent-light);  --card-color-bg: rgba(167,139,250,0.08); --card-color-bd: var(--border-accent); }
.tone-blue   { --card-color: var(--color-info);    --card-color-bg: var(--color-info-bg);    --card-color-bd: var(--color-info-bd); }
.tone-yellow { --card-color: var(--color-warning); --card-color-bg: var(--color-warning-bg); --card-color-bd: var(--color-warning-bd); }
.tone-red    { --card-color: var(--color-error);   --card-color-bg: var(--color-error-bg);   --card-color-bd: var(--color-error-bd); }

.quick-icon[class*="tone-"] {
    background: var(--card-color-bg);
    border-color: var(--card-color-bd);
    color: var(--card-color);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.toolbar .input-wrap { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .toolbar-select { width: auto; min-width: 150px; flex: 0 1 auto; }
@media (max-width: 640px) {
    .toolbar .toolbar-select { flex: 1 1 100%; }
}

.filter-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}
.filter-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active {
    background: var(--accent-glow-sm);
    border-color: var(--border-accent);
    color: var(--accent-light);
}

.is-filtered-out { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.table .cell-player {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    color: var(--text-primary);
}
.mc-head {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    image-rendering: pixelated;
    background: var(--bg-surface);
    flex-shrink: 0;
}
.mc-head-lg {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-accent);
}
.table .cell-actions {
    text-align: right;
    white-space: nowrap;
}
.table .cell-muted { color: var(--text-muted); }
.mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--text-xs);
}
.table-row-link { cursor: pointer; }

.info-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
}
.info-list dt {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 2px;
}
.info-list dd {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}
.profile-head .greeting { margin-bottom: 0; }
.profile-head .page-actions { margin-left: auto; }

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px dashed var(--border-accent);
    color: var(--accent-light);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
}

.prose {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}
.form-actions-split { justify-content: space-between; }
.inline-form { display: inline; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0 var(--space-4);
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.check-grid .check-label {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.check-grid .check-label:hover { border-color: var(--border-accent); }
.check-grid .check-label:has(input:checked) {
    border-color: var(--border-accent);
    background: var(--accent-glow-xs);
    color: var(--text-primary);
}
.check-grid .mc-head { width: 22px; height: 22px; }

.danger-zone { border-color: var(--color-error-bd); }
.danger-zone:hover { border-color: var(--color-error); box-shadow: var(--shadow-md); }
.danger-zone .card-title { color: var(--color-error); }
.danger-zone p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-4);
}
.event-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.event-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-color, var(--border));
    opacity: 0.7;
}
.event-card:hover {
    color: inherit;
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-glow-xs);
}
.event-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.event-card-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-primary);
}
.event-card-mode {
    font-size: var(--text-sm);
    color: var(--accent-light);
    font-weight: 700;
}
.event-card .info-list { gap: var(--space-2) var(--space-4); }

.map-folder-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    color: var(--accent-light);
}
.map-folder-title svg { flex-shrink: 0; }
.map-folder-title .event-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.map-folder .event-card-head .badge { flex-shrink: 0; }

.bar-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.bar-row {
    display: grid;
    grid-template-columns: minmax(80px, 140px) 1fr 48px;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
}
.bar-label {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bar-track {
    height: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent-light));
    border-radius: inherit;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-value {
    text-align: right;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-primary);
}

.glossar-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.glossar-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    transition: border-color var(--transition-base);
}
.glossar-item:hover { border-color: var(--border-accent); }
.glossar-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.glossar-term {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-light);
}
.glossar-def {
    margin-top: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-base);
    white-space: pre-wrap;
}

.map-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.map-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-base);
}
.map-item[open],
.map-item:hover { border-color: var(--border-accent); }
.map-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
}
.map-item summary::-webkit-details-marker { display: none; }
.map-item summary .quick-icon { width: 32px; height: 32px; }
.map-item summary .chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--transition-base);
}
.map-item[open] summary .chevron { transform: rotate(180deg); }
.map-item-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-6);
    padding: var(--space-5);
    border-top: 1px solid var(--border-muted);
}
.map-item-body h4 {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}
.map-item-body .check-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    margin-bottom: var(--space-3);
}

.stat-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-6);
    overflow-x: auto;
}
.stat-tab {
    padding: var(--space-2) var(--space-4);
    color: var(--text-muted);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.stat-tab:hover { color: var(--text-primary); }
.stat-tab.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

a.filter-tab { text-decoration: none; display: inline-block; }

.trend {
    align-self: flex-start;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.trend-up   { color: var(--color-success); }
.trend-down { color: var(--color-error); }

.chart-box {
    position: relative;
    height: 280px;
}

.heatmap-wrap { overflow-x: auto; }
.heatmap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 560px;
}
.heatmap-row {
    display: grid;
    grid-template-columns: 28px repeat(24, 1fr);
    gap: 3px;
    align-items: center;
}
.heatmap-head span {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}
.heatmap-day {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
}
.heatmap-cell {
    height: 18px;
    border-radius: 3px;
    background: var(--bg-input);
    border: 1px solid var(--border-muted);
}
.heatmap-cell.lvl-1 { background: rgba(167, 139, 250, 0.2); }
.heatmap-cell.lvl-2 { background: rgba(167, 139, 250, 0.4); }
.heatmap-cell.lvl-3 { background: rgba(167, 139, 250, 0.65); }
.heatmap-cell.lvl-4 { background: var(--accent-light); }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}
.pagination .is-disabled {
    pointer-events: none;
    opacity: 0.4;
}

.card-collapsible > summary {
    list-style: none;
    cursor: pointer;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.card-collapsible > summary::-webkit-details-marker { display: none; }
.card-collapsible[open] > summary {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-muted);
}
.card-collapsible .chevron {
    color: var(--text-muted);
    transition: transform var(--transition-base);
}
.card-collapsible[open] .chevron { transform: rotate(180deg); }

.right-group + .right-group { margin-top: var(--space-6); }
.right-group-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}
.right-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.check-label.is-implied {
    opacity: 0.6;
    cursor: default;
}
.check-label .check-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
