:root {
    --bg: #07090f;
    --panel: rgba(17, 20, 31, 0.9);
    --panel-2: rgba(24, 28, 42, 0.9);
    --text: #eef2ff;
    --muted: #99a3c7;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #7c5cff;
    --accent-2: #17d7ff;
    --danger: #ff5f7a;
    --success: #3ddc97;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
body { min-height: 100vh; }

.bg-orb {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.35;
}
.orb-1 { top: 20px; right: 100px; background: var(--accent); }
.orb-2 { bottom: 40px; left: 80px; background: var(--accent-2); }

.layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: rgba(10, 13, 20, 0.82);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--line);
    padding: 32px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.brand span { color: var(--accent-2); }
.brand-sub { color: var(--muted); margin-top: 8px; line-height: 1.5; }

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav a {
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    padding: 14px 16px;
    border-radius: 16px;
    transition: 0.25s ease;
}
.nav a:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.12);
}

.content {
    padding: 34px;
}

.card, .auth-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(480px, 100%);
    padding: 30px;
}

h1, h2, h3 { margin-top: 0; }
.subtle { color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.stat {
    padding: 22px;
}
.stat .label { color: var(--muted); font-size: 0.95rem; }
.stat .value { font-size: 2rem; font-weight: 800; margin-top: 10px; }

form.card {
    padding: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input, select, textarea, input[type="file"] {
    width: 100%;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus, select:focus, textarea:focus, input[type="file"]:focus {
    border-color: rgba(23, 215, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(23, 215, 255, 0.12);
}

textarea { min-height: 120px; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
    vertical-align: top;
}
th { color: var(--muted); font-weight: 600; }

.badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.15);
    border: 1px solid rgba(124, 92, 255, 0.28);
    font-size: 0.84rem;
}

.list-card {
    padding: 22px;
}
.list-card + .list-card { margin-top: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.video-frame { width: 100%; border-radius: 16px; margin-top: 16px; background: #000; }
.pdf-link { margin-top: 14px; display: inline-block; }
.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}
.flash-success { background: rgba(61,220,151,0.12); }
.flash-error { background: rgba(255,95,122,0.12); }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .col-4, .col-6, .col-8, .col-12 { grid-column: span 12; }
    .content { padding: 18px; }
}
