:root{
  --bg:#0e1420; --card:#1b2436; --card-border:#2a3550; --text:#eef1f8; --text-dim:#a7b0c5;
  --accent-green:#4fd1a5; --accent-blue:#4f9eff; --accent-red:#ff6b6b;
}
@media (prefers-color-scheme: light){
  :root{ --bg:#f3f5fa; --card:#ffffff; --card-border:#dbe1ee; --text:#1c2333; --text-dim:#5b6478; }
}
*{ box-sizing:border-box; }
body{
  margin:0; min-height:100vh; min-height:100dvh;
  font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg); color:var(--text);
  padding:24px 16px calc(24px + env(safe-area-inset-bottom));
}
.topbar{ display:flex; align-items:center; justify-content:space-between; max-width:960px; margin:0 auto 32px; }
.topbar a.brand{ color:inherit; text-decoration:none; font-weight:700; font-size:1.05rem; display:flex; align-items:center; gap:8px; }
main.wrap{ max-width:420px; margin:0 auto; }
main.wrap.wide{ max-width:760px; }
.card{
  background:var(--card); border:1px solid var(--card-border); border-radius:16px;
  padding:26px; box-shadow:0 4px 14px rgba(0,0,0,.12);
}
h1{ font-size:1.3rem; margin:0 0 6px; }
.subtitle{ color:var(--text-dim); font-size:.85rem; margin:0 0 22px; }
label{ display:block; font-size:.8rem; font-weight:600; margin:14px 0 6px; }
input[type=email], input[type=password], input[type=text]{
  width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--card-border);
  background:var(--bg); color:var(--text); font-size:.9rem;
}
input:focus{ outline:2px solid var(--accent-blue); outline-offset:1px; }
.btn{
  width:100%; margin-top:20px; padding:11px; border-radius:10px; border:none;
  background:linear-gradient(135deg, var(--accent-green), var(--accent-blue)); color:#04101f;
  font-weight:700; font-size:.9rem; cursor:pointer;
}
.btn:disabled{ opacity:.5; cursor:not-allowed; }
.btn.secondary{ background:var(--card); color:var(--text); border:1px solid var(--card-border); }
.form-feedback{ min-height:20px; font-size:.82rem; margin-top:12px; }
.form-feedback.error{ color:var(--accent-red); }
.form-feedback.ok{ color:var(--accent-green); }
.switch-link{ margin-top:18px; font-size:.82rem; color:var(--text-dim); text-align:center; }
.switch-link a{ color:var(--accent-blue); text-decoration:none; }

.course-list{ display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.course-item{
  background:var(--card); border:1px solid var(--card-border); border-radius:14px; padding:18px;
  display:flex; flex-direction:column; gap:8px;
}
.course-item h3{ margin:0; font-size:1.05rem; }
.course-item p{ margin:0; font-size:.85rem; color:var(--text-dim); }
.progress-bar{ height:8px; border-radius:5px; background:var(--card-border); overflow:hidden; }
.progress-bar > span{ display:block; height:100%; background:linear-gradient(90deg, var(--accent-green), var(--accent-blue)); }
.account-row{ display:flex; justify-content:space-between; font-size:.85rem; padding:8px 0; border-bottom:1px solid var(--card-border); }
.account-row:last-child{ border-bottom:none; }
.empty-state{ color:var(--text-dim); font-size:.85rem; text-align:center; padding:20px 0; }
