:root {
    --bg: #0b1020;
    --bg-soft: #111831;
    --card: #151f3a;
    --line: rgba(255,255,255,.08);
    --text: #eef2ff;
    --muted: #a7b2d4;
    --primary: #4f7cff;
    --primary-strong: #315ee8;
    --success: #19c37d;
    --warning: #f5a524;
    --danger: #ef476f;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #08101f 0%, #0d1529 100%);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(14px);
    background: rgba(8, 16, 31, .74);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex; justify-content: space-between; align-items: center; padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #7a5cff 100%);
    font-weight: 800;
}
.brand small { display: block; color: var(--muted); }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a, .nav-user { color: var(--muted); }
.nav a:hover { color: #fff; }
.main-content { padding: 28px 0 48px; }
.card {
    background: rgba(21, 31, 58, .86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}
.gradient-card {
    background:
        radial-gradient(circle at top right, rgba(79,124,255,.22), transparent 30%),
        radial-gradient(circle at bottom left, rgba(25,195,125,.15), transparent 28%),
        rgba(21, 31, 58, .92);
}
.page-hero {
    display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 22px;
}
.page-hero h1, .auth-card h2, .hero-card h1, .section-head h2 { margin: 0 0 10px; }
.eyebrow {
    display: inline-block; margin-bottom: 8px; color: #b6c5ff; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
}
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats div {
    min-width: 120px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}
.hero-stats strong { display: block; font-size: 1.6rem; margin-bottom: 4px; }
.hero-stats span, .muted, .helper-text, .empty-state { color: var(--muted); }
.stats-grid, .grid.two-cols { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; }
.stat-card strong { display: block; font-size: 2rem; margin-top: 6px; }
.section-head {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px;
}
.table-card input[type="search"], input, select, textarea {
    width: 100%; border: 1px solid rgba(255,255,255,.1); background: rgba(6, 10, 20, .45);
    color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit;
}
label { display: grid; gap: 8px; margin-bottom: 14px; }
textarea { resize: vertical; min-height: 120px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
tr:last-child td { border-bottom: none; }
.progress-bar {
    width: 140px; max-width: 100%; height: 10px; background: rgba(255,255,255,.08);
    border-radius: 999px; overflow: hidden; margin: 10px 0 4px;
}
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary) 0%, #7a5cff 100%); }
.status-badge, .pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; font-size: .82rem; border: 1px solid transparent;
}
.status-nao_iniciado { background: rgba(255,255,255,.05); color: #d7def6; }
.status-em_andamento { background: rgba(79,124,255,.16); color: #b5c7ff; }
.status-revisao { background: rgba(245,165,36,.18); color: #ffd98f; }
.status-concluido { background: rgba(25,195,125,.18); color: #91f0c7; }
.status-atrasado { background: rgba(239,71,111,.18); color: #ff9ab0; }
.pill { background: rgba(79,124,255,.14); color: #c9d6ff; }
.pill.light { background: rgba(255,255,255,.05); color: #d8ddf1; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 16px; border: 1px solid transparent; cursor: pointer; font-weight: 700;
}
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, #7a5cff 100%); color: white; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-outline { border-color: rgba(255,255,255,.12); color: #dbe4ff; background: transparent; }
.auth-layout {
    min-height: calc(100vh - 165px);
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: center;
}
.auth-layout-single { grid-template-columns: 1fr; justify-items: center; }
.auth-card { max-width: 470px; width: 100%; }
.auth-card.wide { max-width: 760px; }
.hero-card { padding: 18px 8px; }
.feature-list { padding-left: 18px; color: var(--muted); line-height: 1.8; }
.grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-main-cols { grid-template-columns: 1.3fr .9fr; align-items: start; }
.stack { display: grid; gap: 18px; }
.subtopic-list {
    list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
}
.subtopic-list li {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02);
}
.subtopic-order {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; background: rgba(79,124,255,.18); color: #dbe4ff; font-size: .86rem; font-weight: 700;
}
.timeline { display: grid; gap: 14px; }
.timeline-item {
    padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.timeline-item h3 { margin: 10px 0 8px; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alert {
    margin-bottom: 18px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
}
.alert-success { background: rgba(25,195,125,.14); color: #abf3d5; }
.alert-error { background: rgba(239,71,111,.14); color: #ffb3c5; }
@media (max-width: 980px) {
    .stats-grid, .grid.two-cols, .auth-layout, .two-main-cols, .page-hero { grid-template-columns: 1fr; display: grid; }
    .hero-stats { width: 100%; }
    .table-wrap { overflow-x: auto; }
}
