/* Login and teacher panel pages: same colours and fonts as the workshop (style.css), but scrolling pages. */
:root {
  --bg: #0b0e24;
  --panel: rgba(17, 21, 52, 0.85);
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef0ff;
  --muted: #a3a9d2;
  --dim: #7a80aa;
  --orange: #f26a1b;
  --orange-2: #ff8a3d;
  --green: #34d399;
  --red: #fb7185;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% -10%, #1b2160 0%, var(--bg) 60%) fixed;
  color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange-2); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand strong { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 800; line-height: 1.1; }
.brand span { font-size: 13px; color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}

label.field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
label.field small { font-weight: 500; color: var(--dim); font-size: 13px; }
input[type=text], input[type=email], input[type=password] {
  height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05);
  font-size: 17px; outline: none; width: 100%;
}
input:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid rgba(242, 106, 27, .55); outline-offset: 2px; }
input.code { text-transform: uppercase; letter-spacing: .18em; font-family: var(--font-display); font-weight: 700; }

.btn {
  height: 50px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--orange); color: #fff;
  font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover { background: var(--orange-2); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.btn.small { height: 40px; padding: 0 14px; font-size: 14px; }

.msg { min-height: 1.5em; margin: 0; font-weight: 600; font-size: 15px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: min(440px, 100%); padding: 28px; display: grid; gap: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.tabs button { height: 46px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 16px; color: var(--muted); }
.tabs button[aria-selected=true] { background: var(--orange); color: #fff; }
.login form { display: grid; gap: 16px; }
.login form[hidden] { display: none; }
.login .back { font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Teacher panel ---------- */
.top { display: flex; align-items: center; gap: 16px; padding: 16px 24px; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.layout { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 20px; padding: 0 24px 32px; align-items: start; }
.classes { padding: 18px; display: grid; gap: 12px; }
.classes h2 { font-size: 17px; }
.classes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.classes li button {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: none;
  display: flex; justify-content: space-between; gap: 8px; font-weight: 600;
}
.classes li button:hover { background: var(--panel-2); }
.classes li button[aria-current=true] { background: rgba(242, 106, 27, .14); border-color: rgba(242, 106, 27, .4); }
.classes li small { color: var(--dim); font-weight: 600; }
.classes form { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.classes form input { height: 44px; font-size: 15px; }

.main { padding: 22px; display: grid; gap: 18px; min-width: 0; }
.main .empty { color: var(--muted); padding: 40px 0; text-align: center; }
.head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.head h2 { font-size: 24px; }
.class-code { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.class-code span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.class-code b { font-family: var(--font-display); font-size: 22px; letter-spacing: .16em; }
.summary { margin-left: auto; color: var(--muted); font-weight: 600; }
.summary b { color: var(--green); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
tr.student { cursor: pointer; }
tr.student:hover td { background: var(--panel-2); }
tr.student[aria-selected=true] td { background: rgba(242, 106, 27, .1); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); margin-right: 8px; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.step-tag { padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; }
.warn { color: #fbbf24; }

.add { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: end; padding-top: 16px; border-top: 1px solid var(--line); }
.add h3 { grid-column: 1 / -1; font-size: 17px; }
.add label.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.add label.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.add .msg { grid-column: 1 / -1; }

.events { padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.events h3 { font-size: 17px; }
.events ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.events li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.events time { color: var(--dim); font-variant-numeric: tabular-nums; flex: none; width: 48px; }

/* Homework (panel.js → homeworkSection) */
.homework { padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.homework h3 { font-size: 17px; }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hw-empty { color: var(--muted); }
.hw { padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; gap: 6px; }
.hw.closed { opacity: .7; }
.hw-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hw-head b { font-family: var(--font-display); font-size: 17px; }
.hw-level { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-2); }
.hw-state { margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--dim); border: 1px solid var(--line-2); }
.hw-state.on { color: var(--green); border-color: rgba(52, 211, 153, .4); }
.hw-meta { color: var(--muted); font-size: 14px; }
.hw-note { margin: 0; font-size: 14px; white-space: pre-line; }
.hw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-count { color: var(--text); }
.hw-subs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hw-subs li { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.hw-subs li.wait span { color: var(--dim); }
.hw-subs li.done span { color: var(--muted); }
.hw-form { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 10px 12px; align-items: end; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-2); }
.hw-form h4 { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-size: 15px; }
.hw-form .wide, .hw-form .hw-actions, .hw-form .msg { grid-column: 1 / -1; }
.hw-form label.field { font-size: 14px; }
.hw-form select, .hw-form input, .hw-form textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .05); font: inherit; font-weight: 500; color: inherit; outline: none;
}
.hw-form select option, .hw-form select optgroup { background: #141a44; }
.hw-form select:disabled { opacity: .6; }
.hw-form textarea { resize: vertical; }
.hw-form textarea:focus-visible { outline: 3px solid rgba(242, 106, 27, .55); outline-offset: 2px; }

dialog { border: 1px solid var(--line-2); border-radius: 20px; background: #141a44; color: var(--text); padding: 26px; width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(4, 5, 16, .6); }
dialog h3 { font-size: 20px; margin-bottom: 12px; }
dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: 16px; }
dialog dt { color: var(--muted); }
dialog dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
dialog p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 0 16px 24px; }
  .top { padding: 14px 16px; }
  .top .who span { display: none; }
  .add { grid-template-columns: 1fr; }
  .hw-form { grid-template-columns: 1fr; }
  .summary { margin-left: 0; }
}

/* ---------- Student actions, login card ---------- */
.events-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.events-head h3 { margin-right: auto; }
.btn.danger { color: var(--red); border-color: rgba(251, 113, 133, .4); }
.btn.danger:hover { background: rgba(251, 113, 133, .12); }
.login-card {
  display: flex; gap: 18px; align-items: center; padding: 16px; margin-bottom: 14px;
  border-radius: 16px; background: #fff; color: #111633;
}
.login-card .qr { width: 132px; height: 132px; flex: none; }
.login-card .qr svg { width: 100%; height: 100%; display: block; }
.login-card .lc-title { display: block; font-family: var(--font-display); font-size: 15px; margin-bottom: 6px; color: #f26a1b; }
.login-card dl { margin: 0 0 6px; gap: 2px 12px; font-size: 13px; }
.login-card dt { color: #5a6085; }
.login-card dd { font-size: 17px; }
.login-card .lc-help { color: #5a6085; font-size: 12px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.switch { background: none; border: 0; padding: 0; color: var(--orange-2); font-weight: 600; text-decoration: underline; font-size: 14px; }

/* Printing from the dialog prints only the login card */
@media print {
  body * { visibility: hidden; }
  #login-card, #login-card * { visibility: visible; }
  #login-card { position: fixed; top: 0; left: 0; border: 1px dashed #999; width: 90mm; }
}

/* ---------- Student home (ogrenci.html, ogrenci.js) ---------- */
.home { max-width: 860px; margin: 0 auto; padding: 4px 24px 40px; display: grid; gap: 18px; }
.hello h1 { font-size: 30px; }
.hello p { margin: 6px 0 0; color: var(--muted); font-size: 17px; }
.home .block { padding: 20px 22px; display: grid; gap: 12px; }
.home h2 { font-size: 19px; }
.home .sub { margin: 0; color: var(--muted); font-size: 15px; }
.home .tag { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-2); }
.due { font-size: 14px; font-weight: 600; color: var(--muted); }
.due.soon { color: #fcd34d; }
.status { font-size: 14px; font-weight: 600; color: var(--muted); }
.status.done { color: var(--green); }
.status.sent { color: #93c5fd; }

.next { padding: 22px; display: grid; gap: 10px; border-color: rgba(242, 106, 27, .45); background: linear-gradient(160deg, rgba(242, 106, 27, .16), var(--panel) 55%); }
.next h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: #ffb070; }
#next-body { display: grid; gap: 10px; justify-items: start; }
.next-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.next h3 { margin: 0; font-family: var(--font-display); font-size: 28px; }
.next .goal { margin: 0; font-size: 16px; line-height: 1.5; max-width: 62ch; }
.next .note { margin: 0; font-size: 15px; white-space: pre-line; }
.next .note b { color: #ffb070; }
.next .status { margin: 0; }
.btn.big { height: 56px; padding: 0 30px; font-size: 18px; border-radius: 14px; margin-top: 4px; }

.hw-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.hw-row-main { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.hw-row-main b { font-family: var(--font-display); font-size: 17px; }
.hw-row .status { grid-column: 1; }
.hw-row .btn { grid-column: 2; grid-row: 1 / span 2; }

.practice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.practice h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.practice ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.practice a { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 600; }
.practice a:hover { border-color: rgba(242, 106, 27, .5); }
.practice a small { color: var(--dim); font-size: 14px; font-weight: 600; white-space: nowrap; }
.practice a.done small { color: var(--green); }

.free { grid-template-columns: 1fr auto; align-items: center; }
#closed summary { cursor: pointer; list-style: none; }
#closed summary::-webkit-details-marker { display: none; }
#closed summary h2::after { content: ' ▾'; color: var(--dim); }
#closed[open] summary h2::after { content: ' ▴'; }
#closed .hw-row { opacity: .75; }
#closed:not([open]) { gap: 0; }

@media (max-width: 700px) {
  .home { padding: 0 16px 32px; }
  .hello h1 { font-size: 25px; }
  .next h3 { font-size: 23px; }
  .practice { grid-template-columns: 1fr; }
  .free { grid-template-columns: 1fr; }
  .hw-row { grid-template-columns: 1fr; }
  .hw-row .btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .btn.big { width: 100%; }
  #next-body { justify-items: stretch; }
}

/* ---------- Welcome page (index.html) ---------- */
.welcome { max-width: 1040px; margin: 0 auto; padding: 24px 24px 48px; display: grid; gap: 36px; }
.hero { text-align: center; display: grid; gap: 16px; justify-items: center; padding-top: 24px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; line-height: 1.1; max-width: 16em; }
.hero > p { margin: 0; max-width: 34em; color: var(--muted); font-size: 18px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.hero .hint { font-size: 14px; color: var(--dim); }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how li { padding: 22px 20px; display: grid; gap: 10px; align-content: start; }
.how svg { width: 52px; height: 52px; fill: none; stroke: var(--orange-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.how b { font-family: var(--font-display); font-size: 19px; display: flex; align-items: center; gap: 10px; }
.how b i {
  font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #fff;
  display: inline-grid; place-items: center; font-size: 15px;
}
.how p { margin: 0; color: var(--muted); }
.welcome .teacher { text-align: center; color: var(--dim); margin: 0; }
@media (max-width: 900px) { .how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .welcome { padding: 8px 16px 32px; gap: 24px; }
  .how { grid-template-columns: 1fr; }
  .hero .cta .btn { width: 100%; }
}
