:root {
  --bg: #f3f5f9; --card: #fff; --ink: #1b2233; --muted: #677089; --line: #dde2ec;
  --accent: #1f4fd6; --accent-ink: #fff; --ok: #1d8a4e; --warn: #b3261e; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Manrope, "Segoe UI", Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .35rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.bar { background: var(--ink); color: #fff; }
.bar a { color: #fff; }
.bar .muted { color: #b9c1d6; }
.bar-in { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; text-decoration: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.narrow { max-width: 400px; margin: 10vh auto 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: .3rem; }
.meta { font-weight: 600; margin: .3rem 0; }
.desc { white-space: pre-line; color: #3b4459; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 12px; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.hint { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; font: inherit; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--warn); }
.btn.wide { width: 100%; margin-top: 12px; padding: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--warn); }
.alert { background: #fdecea; color: var(--warn); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-row h1, .head-row h2 { margin: 0; }
.list { display: grid; gap: 10px; margin-top: 14px; }
.row-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin: 0; }
.row-card:hover { border-color: var(--accent); }
.t-title { font-weight: 700; }
.nums { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; white-space: nowrap; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill.on { background: #e3f4ea; color: var(--ok); }
.pill.off { background: #eef0f4; color: var(--muted); }
.share { background: var(--bg); border-radius: 10px; padding: 14px; margin: 16px 0; }
.copy-row { display: flex; gap: 8px; margin: 6px 0 10px; }
.copy-row input { margin: 0; }
.msg { font-size: .9rem; margin-bottom: 8px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.tbl { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; border-bottom: 1px solid var(--line); padding: 6px 8px; }
td { border-bottom: 1px solid var(--line); padding: 8px; }
tr:last-child td { border-bottom: 0; }
.c { text-align: center; width: 60px; }
td input[type=checkbox] { width: 20px; height: 20px; margin: 0 auto; accent-color: var(--ok); }
.person { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.person:first-child { border-top: 0; padding-top: 0; }
.person .link-btn { margin: -4px 0 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.empty p { margin: 0; }
.done { text-align: center; }
.done .ok { width: 56px; height: 56px; border-radius: 50%; background: #e3f4ea; color: var(--ok); font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 4px auto 10px; }
@media (max-width: 600px) {
  .grid2 { grid-template-columns: 1fr; }
  .row-card { flex-direction: column; align-items: flex-start; }
  .nums { justify-content: flex-start; }
  h1 { font-size: 1.3rem; }
}
.ico { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font: 700 16px/1 Manrope, Arial, sans-serif; cursor: pointer; }
.ico.del { color: var(--warn); }
.ico.del:hover { background: #fdecea; border-color: var(--warn); }
.ico.back { color: var(--ok); font-size: 20px; }
.ico.back:hover { background: #e3f4ea; border-color: var(--ok); }
.sheet form { margin: 0; }
tr.gone td { color: var(--muted); text-decoration: line-through; }
tr.gone td.c { text-decoration: none; }
.add-row { display: grid; grid-template-columns: 2fr 1.5fr 1fr auto; gap: 8px; align-items: center; }
.add-row input { margin: 0; }
.ico-add { width: 46px; height: 44px; padding: 0; font-size: 22px; }
@media (max-width: 600px) { .add-row { grid-template-columns: 1fr; } .ico-add { width: 100%; } }

.teacher-list { list-style: none; padding: 0; margin: 0 0 8px; }
.teacher-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.teacher-list form { margin: 0; }
