:root { --ink:#163329; --muted:#62756e; --cream:#f7f4ed; --card:#fffdf8; --green:#176b50; --lime:#b7e15e; --orange:#f09b56; --line:#dce5df; --red:#c0392b; }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color:var(--ink); background:var(--cream); }
button { font:inherit; cursor:pointer; }
a { color:var(--green); }
.app { max-width:1100px; min-height:100vh; margin:auto; padding:20px 28px 42px; }
.top { display:flex; justify-content:space-between; align-items:center; margin-bottom:26px; gap:14px; }
.brand { font-weight:800; font-size:22px; letter-spacing:-.7px; } .brand span { color:var(--green); }
.avatar { width:38px; height:38px; border-radius:50%; background:var(--lime); display:grid; place-items:center; font-weight:800; flex:none; }
.nav { display:flex; gap:8px; margin:0 0 25px; overflow:auto; }
.nav button { border:0; color:var(--muted); background:transparent; padding:8px 12px; border-radius:99px; font-weight:650; white-space:nowrap; }
.nav button.active { color:white; background:var(--green); }
.page { display:none; } .page.active { display:block; }
.eyebrow { color:var(--green); font-weight:750; font-size:12px; text-transform:uppercase; letter-spacing:1.1px; margin:0 0 6px; }
h1 { margin:0 0 7px; font-size:clamp(29px,5vw,45px); line-height:1.04; letter-spacing:-1.8px; } h2 { margin:0; font-size:22px; letter-spacing:-.6px; }
.sub { color:var(--muted); margin:0; max-width:550px; }
.hero { display:grid; grid-template-columns:1.55fr .75fr; gap:18px; margin-bottom:24px; }
.hero-main { background:var(--green); color:white; padding:28px; min-height:240px; border-radius:24px; position:relative; overflow:hidden; }
.hero-main:after { content:"✦"; position:absolute; font-size:210px; line-height:1; right:-39px; bottom:-74px; opacity:.13; color:var(--lime); }
.hero-main h1 { max-width:540px; } .hero-main .sub { color:#d7e8e0; margin-bottom:21px; }
.cta { border:0; border-radius:10px; background:var(--lime); color:#173328; font-weight:800; padding:12px 17px; }
.side-card, .card { border:1px solid var(--line); border-radius:20px; background:var(--card); padding:20px; }
.progress-num { font-size:46px; line-height:1; font-weight:850; margin:19px 0 4px; } .meter { height:9px; background:#e8eee8; border-radius:99px; overflow:hidden; margin:16px 0 8px; } .meter i { display:block; height:100%; background:var(--lime); border-radius:inherit; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap:12px; margin:27px 0 12px; } .section-head button { border:0; color:var(--green); background:none; font-weight:750; }
.actions { display:grid; grid-template-columns:repeat(3, 1fr); gap:13px; } .action { text-align:left; min-height:151px; border:1px solid var(--line); border-radius:18px; background:var(--card); padding:18px; } .action:hover { transform:translateY(-2px); border-color:#9dcdb9; } .action b { display:block; font-size:17px; margin:25px 0 4px; } .icon { font-size:24px; } .action small, .muted { color:var(--muted); }
.topics { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; } .topic { padding:14px; border-radius:15px; background:#e8f0e8; min-height:112px; } .topic:nth-child(2n) { background:#fcebdc; } .topic b { display:block; margin:16px 0 3px; font-size:13px; } .topic small { color:var(--muted); }
.test-shell { max-width:760px; margin:auto; } .testbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; color:var(--muted); font-weight:700; } .timer { color:#9d4d14; background:#fff0e4; padding:7px 10px; border-radius:9px; } .question { padding:27px; } .tag { color:var(--green); background:#e0f1e9; padding:5px 9px; border-radius:99px; font-size:12px; font-weight:750; } .question h2 { font-size:24px; margin:18px 0; } .options { display:grid; gap:10px; } .option { display:flex; align-items:center; gap:12px; width:100%; padding:13px 14px; background:white; border:1px solid var(--line); border-radius:12px; text-align:left; } .option.selected { border:2px solid var(--green); background:#edf8f1; } .letter { width:28px; height:28px; border:1px solid #c9d7ce; display:grid; place-items:center; border-radius:50%; font-weight:750; } .test-actions { display:flex; justify-content:space-between; gap:12px; margin-top:24px; } .ghost { border:1px solid var(--line); background:white; padding:11px 15px; border-radius:10px; font-weight:750; } .primary { border:0; background:var(--green); color:white; padding:11px 15px; border-radius:10px; font-weight:750; } .primary:disabled { opacity:.55; cursor:default; } .answer-box { width:100%; min-height:160px; resize:vertical; padding:13px; border:1px solid var(--line); border-radius:12px; color:var(--ink); font:inherit; line-height:1.5; } .answer-box:focus { outline:2px solid #9dcdb9; border-color:var(--green); } .help { color:var(--muted); font-size:13px; margin:0 0 10px; } .review-list { text-align:left; margin:14px 0 0; padding:0; list-style:none; } .review-list li { padding:10px 0; border-bottom:1px solid var(--line); } .review-list li:last-child { border:0; } .correct { color:#176b50; } .needs-work { color:#a85b20; }
.result { max-width:700px; margin:0 auto; text-align:center; } .score { color:var(--green); font-size:68px; font-weight:900; letter-spacing:-4px; margin:22px 0 4px; } .feedback { text-align:left; margin-top:24px; } .feedback h2 { margin-bottom:10px; } .notice { background:#fff0e4; padding:15px; border-radius:12px; color:#76451c; } .plan { text-align:left; margin-top:15px; } .task { display:flex; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); } .task:last-child { border:0; } .task span:first-child { font-weight:700; } .pill { background:#e0f1e9; color:var(--green); padding:3px 8px; height:max-content; border-radius:99px; font-size:12px; font-weight:750; white-space:nowrap; }
.dashboard-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:18px; } .weak { display:grid; gap:11px; margin-top:16px; } .weak-row { display:grid; grid-template-columns:170px 1fr 40px; align-items:center; gap:10px; } .weak-row .meter { margin:0; } .history { margin-top:15px; } .history div { padding:12px 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; } .history div:last-child { border:0; }
@media (max-width:700px) { .app { padding:17px 16px 30px; } .hero,.dashboard-grid { grid-template-columns:1fr; } .actions { grid-template-columns:1fr; } .action { min-height:100px; } .action b { margin:12px 0 3px; } .topics { grid-template-columns:repeat(2,1fr); } .topic:last-child { grid-column:span 2; } .weak-row { grid-template-columns:125px 1fr 35px; font-size:13px; } .hero-main { min-height:215px; } }

/* Auth / admin additions */
.auth-shell { max-width:420px; margin:8vh auto; padding:0 20px; }
.auth-shell .brand { text-align:center; margin-bottom:22px; font-size:26px; }
.field { margin-bottom:14px; }
.field label { display:block; font-weight:700; font-size:13px; margin-bottom:6px; }
.field input[type=text], .field input[type=email], .field input[type=password] { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font:inherit; color:var(--ink); background:white; }
.field input:focus { outline:2px solid #9dcdb9; border-color:var(--green); }
.checkbox-list { display:grid; gap:8px; }
.checkbox-list label { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:white; font-weight:650; }
.form-error { background:#fdecea; color:var(--red); padding:10px 12px; border-radius:10px; font-size:13px; margin-bottom:14px; }
.form-note { color:var(--muted); font-size:13px; text-align:center; margin-top:14px; }
.full { width:100%; }
table.admin-table { width:100%; border-collapse:collapse; font-size:13.5px; }
table.admin-table th, table.admin-table td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
table.admin-table th { color:var(--muted); font-weight:700; text-transform:uppercase; font-size:11px; letter-spacing:.5px; }
.badge { padding:3px 9px; border-radius:99px; font-size:11.5px; font-weight:750; display:inline-block; }
.badge.pending { background:#fff0e4; color:#9d4d14; }
.badge.approved { background:#e0f1e9; color:var(--green); }
.badge.disabled { background:#fdecea; color:var(--red); }
.subject-toggle { display:inline-flex; align-items:center; gap:6px; margin:2px 8px 2px 0; padding:4px 9px; border-radius:99px; border:1px solid var(--line); font-size:12px; font-weight:650; background:white; }
.subject-toggle input { margin:0; }
.small-btn { border:1px solid var(--line); background:white; padding:6px 10px; border-radius:8px; font-weight:700; font-size:12.5px; margin-right:6px; }
.small-btn.danger { color:var(--red); border-color:#f1c3bd; }
.small-btn.go { color:var(--green); border-color:#9dcdb9; }
.upload-row { display:grid; gap:10px; margin-top:10px; }
.upload-row select, .upload-row input[type=file], .upload-row textarea { width:100%; padding:10px; border:1px solid var(--line); border-radius:10px; font:inherit; background:white; color:var(--ink); }
.upload-row textarea { min-height:160px; font-family:ui-monospace, monospace; font-size:12.5px; }
.tabs { display:flex; gap:6px; margin-bottom:14px; }
.tabs button { border:1px solid var(--line); background:white; padding:8px 13px; border-radius:99px; font-weight:700; font-size:13px; }
.tabs button.active { background:var(--green); color:white; border-color:var(--green); }
.result-msg { font-size:13px; padding:10px 12px; border-radius:10px; margin-top:10px; }
.result-msg.ok { background:#e0f1e9; color:var(--green); }
.result-msg.err { background:#fdecea; color:var(--red); }
.coach-block { margin-top:10px; }
.coach-explanation { background:#f2f8f4; border:1px solid #cfe6d8; border-radius:12px; padding:12px 14px; margin-top:6px; }
.coach-explanation b { color:var(--green); display:block; margin-bottom:6px; font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
.coach-explanation p { margin:0 0 8px; line-height:1.55; }
.coach-explanation p:last-child { margin-bottom:0; }
.ai-grade-note { margin-top:8px; font-size:13px; color:var(--muted); background:#f7f4ed; border:1px dashed var(--line); border-radius:10px; padding:8px 10px; }
.ai-grade-note b { color:var(--ink); }
.timer-urgent { color:white !important; background:var(--red) !important; animation:timer-pulse 1s ease-in-out infinite; }
@keyframes timer-pulse { 0%, 100% { opacity:1; } 50% { opacity:.6; } }
.history-row { cursor:pointer; border-radius:8px; transition:background .12s; }
.history-row:hover { background:#f0ede3; padding-left:8px; padding-right:8px; margin:0 -8px; }

/* AI Providers */
.ghost.go { color:var(--green); border-color:#9dcdb9; }
.badge.role-primary { background:#e0f1e9; color:var(--green); }
.badge.role-fallback { background:#f0ede3; color:var(--muted); }
.badge.status-active { background:#e0f1e9; color:var(--green); }
.badge.status-paused { background:#fdecea; color:var(--red); }
.latency-ok { color:var(--green); font-weight:700; }
.latency-bad { color:var(--red); font-weight:700; }
.icon-btn { border:1px solid var(--line); background:white; width:28px; height:28px; border-radius:8px; font-size:13px; display:inline-flex; align-items:center; justify-content:center; margin-right:4px; padding:0; }
.icon-btn.danger { color:var(--red); border-color:#f1c3bd; }
.icon-btn.go { color:var(--green); border-color:#9dcdb9; }

.modal-backdrop { position:fixed; inset:0; background:rgba(22,51,41,.45); display:flex; align-items:flex-start; justify-content:center; padding:5vh 16px; overflow:auto; z-index:100; }
.modal-card { background:var(--card); border-radius:20px; border:1px solid var(--line); padding:24px; max-width:640px; width:100%; }
.modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.modal-grid select, .modal-grid input { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font:inherit; color:var(--ink); background:white; }
.modal-grid .field label { display:block; font-weight:700; font-size:12.5px; margin-bottom:6px; }
.modal-grid small { display:block; margin-top:4px; font-size:11.5px; }
.modal-actions { display:flex; align-items:center; margin-top:18px; gap:8px; }
@media (max-width:600px) { .modal-grid { grid-template-columns:1fr; } }
