:root {
    --bg: #0b1020;
    --panel: #151b2f;
    --panel-2: #1c2440;
    --line: rgba(255,255,255,.08);
    --text: #eef3ff;
    --muted: #9fb0d3;
    --accent: #5aa8ff;
    --accent-2: #84f2ff;
    --danger: #ff7272;
    --success: #4dd58b;
    --warning: #ffb454;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: linear-gradient(180deg, #08101d 0%, #111933 100%); color: var(--text); }
a { color: inherit; text-decoration: none; }
body { min-height: 100vh; }
.container { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(10, 14, 25, .78); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 1.05rem; }
.brand span { color: var(--muted); font-size: .88rem; }
.nav { display: flex; gap: 12px; flex-wrap: wrap; }
.nav a { padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.nav a:hover, .nav a.active { border-color: rgba(132,242,255,.34); background: rgba(90,168,255,.12); }
.hero { padding: 36px 0 20px; }
.hero-card, .card { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card { padding: 28px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3rem); }
.hero p { margin: 0; color: var(--muted); line-height: 1.6; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { padding: 22px; }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi strong { font-size: 2rem; }
.kpi span { color: var(--muted); }
.main { padding: 0 0 42px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: .92rem; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px; font-size: .84rem; border: 1px solid var(--line); background: rgba(255,255,255,.05); }
.badge.success { color: #baf7d2; border-color: rgba(77,213,139,.35); }
.badge.warning { color: #ffe0b3; border-color: rgba(255,180,84,.35); }
.badge.danger { color: #ffc0c0; border-color: rgba(255,114,114,.35); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(11,16,32,.9); color: var(--text); }
.field textarea { min-height: 130px; resize: vertical; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent; font-weight: 700; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08101d; }
.btn-secondary { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line); }
.btn-danger { background: rgba(255,114,114,.12); color: #ffd1d1; border-color: rgba(255,114,114,.35); }
.alert { margin-bottom: 18px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); }
.alert-error { background: rgba(255,114,114,.12); color: #ffd1d1; }
.alert-success { background: rgba(77,213,139,.12); color: #d9ffe9; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(720px, 100%); padding: 28px; }
.auth-header { margin-bottom: 20px; }
.auth-header h1 { margin: 0 0 8px; }
.auth-header p { margin: 0; color: var(--muted); }
.mobile-shell { min-height: 100vh; padding: 22px 16px 36px; background: linear-gradient(180deg, #07111f 0%, #0d1930 100%); }
.mobile-banner { margin-bottom: 18px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.mobile-banner strong { display: block; margin-bottom: 6px; }
.mobile-banner p { margin: 0; color: var(--muted); line-height: 1.5; }
.mobile-test-card { padding: 18px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.mobile-question { font-size: 1.08rem; line-height: 1.45; margin-bottom: 16px; }
.option-list { display: grid; gap: 10px; }
.option-btn { width: 100%; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); }
.footer-note { color: var(--muted); font-size: .92rem; margin-top: 18px; }
@media (max-width: 1099px) {
  .desktop-only { display: none !important; }
}
@media (min-width: 1100px) {
  .mobile-only { display: none !important; }
}

.section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.section-head h2 { margin:0 0 6px; }
.section-head p { margin:0; color:var(--muted); }
.row-meta { margin-top:6px; color:var(--muted); font-size:.88rem; }
.muted { color: var(--muted); }
.actions.compact { gap: 8px; }
.actions.compact form { margin: 0; }
.toggle { display:inline-flex; align-items:center; gap:10px; color:var(--text); }
.toggle input { width:18px; height:18px; }
.card h2 { margin-top:0; }

.wrap-actions { flex-wrap: wrap; }
input[type=file] { padding: 12px; background: rgba(11,16,32,.72); }

.question-card { margin-bottom: 18px; }
.question-number { display:inline-flex; padding:6px 10px; border-radius:999px; background: rgba(90,168,255,.12); border:1px solid rgba(90,168,255,.28); color:#dcecff; font-size:.84rem; margin-bottom:12px; }
.question-meta { color: var(--muted); margin: 6px 0 14px; font-size: .92rem; }
.option-row { display:flex; gap:12px; align-items:flex-start; padding:14px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.04); }
.option-row input { margin-top: 3px; }
.review-card { border-width: 1px; }
.review-ok { border-color: rgba(77,213,139,.35); }
.review-bad { border-color: rgba(255,114,114,.35); }
.review-options { margin: 12px 0 0; padding-left: 18px; color: var(--muted); display:grid; gap:8px; }

.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.dashboard-kpis .kpi strong { font-size: 2.15rem; }
.topic-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; }
.topic-card { display:flex; flex-direction:column; gap:12px; padding:20px; border-radius:18px; border:1px solid var(--line); background: rgba(255,255,255,.04); }
.topic-card h3 { margin:0; }
.topic-card-head, .topic-card-meta, .topic-card-footer, .topic-hero-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.progress-bar { height:10px; border-radius:999px; background: rgba(255,255,255,.08); overflow:hidden; }
.progress-bar span { display:block; height:100%; border-radius:999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.stack-list { display:grid; gap:12px; }
.stack-item { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.04); }
.inline-form { margin:0; }
.compact-line { align-items:flex-start; }
.media-card { padding:16px; border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,.04); margin-bottom:14px; }
.media-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.study-audio { width:100%; }
.form-grid-single { grid-template-columns: 1fr; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; }
@media (max-width: 1399px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


.document-layout{display:grid;grid-template-columns:1.65fr 1fr;gap:18px}.document-frame{width:100%;min-height:78vh;border:0;border-radius:18px;background:#fff}.notes-textarea{min-height:70vh;width:100%;padding:14px;border-radius:14px;border:1px solid #d1d5db;resize:vertical}.document-notes-card,.document-viewer-card{min-height:80vh}
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.muted { color: var(--muted); }
.stack-list { display:grid; gap:12px; }
.stack-item { display:flex; justify-content:space-between; gap:16px; padding:14px; border:1px solid var(--line); border-radius:14px; background: rgba(255,255,255,.03); align-items:center; }
.stack-item.compact-line { align-items:flex-start; }
.row-meta { color: var(--muted); font-size:.92rem; margin-top:4px; }
.topic-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; }
.topic-card { display:block; padding:18px; border-radius:18px; border:1px solid var(--line); background: rgba(255,255,255,.03); }
.topic-card-head, .topic-card-meta, .topic-card-footer { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.progress-bar { height:10px; border-radius:999px; background: rgba(255,255,255,.06); overflow:hidden; margin:14px 0; }
.progress-bar span { display:block; height:100%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.inline-form { display:inline-flex; }
.subcard { background: rgba(255,255,255,.025); }
.review-item.ok { border-color: rgba(77,213,139,.35); }
.review-item.ko { border-color: rgba(255,114,114,.35); }
.calendar-grid { display:grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap:10px; }
.calendar-head { margin-bottom:10px; color: var(--muted); font-weight:700; }
.calendar-cell { min-height:150px; padding:12px; border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,.03); }
.calendar-cell.empty { background: transparent; border-style:dashed; opacity:.35; }
.calendar-cell.today { border-color: rgba(132,242,255,.5); box-shadow: inset 0 0 0 1px rgba(132,242,255,.25); }
.calendar-day { font-size:1.2rem; font-weight:800; margin-bottom:10px; }
.calendar-pill { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:.8rem; margin-bottom:8px; }
.calendar-pill.warning { background: rgba(255,180,84,.16); color:#ffd89c; border:1px solid rgba(255,180,84,.28); }
.calendar-entry { font-size:.84rem; color: var(--text); margin-bottom:6px; }
@media (max-width: 1099px) {
  .grid-4, .grid-3, .grid-2, .topic-grid, .calendar-grid, .form-grid { grid-template-columns: 1fr; }
  .stack-item, .section-head { flex-direction: column; align-items: stretch; }
}
