:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #f1f3f9;
  --text: #1d2233;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ef;
  --accent: #4f6bed;
  --accent-text: #ffffff;
  --accent-soft: #eef1fe;
  --danger: #d0384b;
  --danger-soft: #fdecee;
  --ok: #1f9d6b;
  --warn: #c2410c;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c;
    --panel: #1b1e29;
    --panel-2: #232736;
    --text: #e8eaf2;
    --muted: #a2a9bc;
    --faint: #6f7790;
    --line: #2e3345;
    --accent: #7b90ff;
    --accent-text: #0d1020;
    --accent-soft: #262d4d;
    --danger: #ff6b7d;
    --danger-soft: #3a1f26;
    --ok: #4fd1a1;
    --warn: #ff9b5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
.sub { color: var(--muted); font-size: 14px; }
.nav-link .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
summary.nav-section { cursor: pointer; list-style: none; }
summary.nav-section::-webkit-details-marker { display: none; }
.table-wrap { overflow-x: auto; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 2px 8px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.nav-link:hover { background: var(--panel-2); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-link.active .count { color: var(--accent); }
.nav-icon { width: 18px; height: 18px; flex: none; }
.nav-section { display: flex; align-items: center; justify-content: space-between; margin: 16px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.viewing { padding: 0 6px; }
.viewing label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.who { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 14px; }
.who .name { font-weight: 600; }
.who .role { color: var(--muted); font-size: 12px; }
.who-actions { display: flex; gap: 6px; padding: 0 4px; }

.main { padding: 28px 36px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head .sub { color: var(--muted); }
.page-head .spacer { flex: 1; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500;
  box-shadow: var(--shadow); white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--panel-2); }
.btn:focus-visible, .input:focus-visible, .check:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.input, select.input, textarea.input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.form-grid { display: grid; gap: 14px; }
.error-text { color: var(--danger); font-size: 14px; min-height: 1.2em; }

/* ---------- cards & panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; }
.panel-body { padding: 14px 16px; }

/* Big "+" tiles for adding a task / assignment / exam */
.add-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.panel-body > .add-tiles { margin-bottom: 0; }
.add-tile {
  --t: var(--ok); --t-soft: #e6f6ef;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px;
  border: 2px dashed var(--t); border-radius: 10px; background: var(--t-soft); color: var(--t);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}
.add-tile.assignment { --t: #3451c9; --t-soft: #e9eeff; }
.add-tile.exam { --t: #c42239; --t-soft: #fdecee; }
.add-tile-plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--t); color: #fff; }
.add-tile:hover { border-style: solid; box-shadow: var(--shadow); transform: translateY(-1px); }
.add-tile:active { transform: translateY(0); }
.add-tile:focus-visible { outline: 3px solid var(--t); outline-offset: 3px; }
@media (prefers-color-scheme: dark) {
  .add-tile { --t: #4fd1a1; --t-soft: #173328; }
  .add-tile.assignment { --t: #9db1ff; --t-soft: #1f2a55; }
  .add-tile.exam { --t: #ff8a99; --t-soft: #4a1d26; }
  .add-tile-plus { color: #12141c; }
}

.group { margin-bottom: 22px; }
.group-title { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px 4px; }
.group-title .n { font-weight: 500; color: var(--faint); }
.group.overdue .group-title { color: var(--danger); }
.group.today .group-title { color: var(--accent); }

/* ---------- todos ---------- */
.todo-list { list-style: none; margin: 0; padding: 0; }
.panel > .todo-list > li + li, .todo-list.boxed > li + li { border-top: 1px solid var(--line); }
.todo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 14px;
}
.todo:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint);
  background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: background .12s, border-color .12s;
}
.check:hover { border-color: var(--ok); }
.check svg { width: 13px; height: 13px; opacity: 0; }
.todo.done .check { background: var(--ok); border-color: var(--ok); }
.todo.done .check svg { opacity: 1; }
.todo-main { min-width: 0; cursor: pointer; }
.todo-title { font-weight: 500; overflow-wrap: anywhere; }
.todo.done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--muted); }
.todo-details { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--text); text-decoration: none;
}
.chip .dot { width: 8px; height: 8px; }
.due { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.due.late { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty p { margin: 0 0 16px; }
.empty-small { color: var(--muted); padding: 14px 16px; font-size: 14px; }

/* ---------- class page ---------- */
.class-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.class-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px; flex: none; }
.class-head h1 { font-size: 26px; }
.class-head .sub { color: var(--muted); }
.class-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.notes { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--panel); }
.note-title { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.note-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--faint); }
.note-foot .spacer { flex: 1; }
.note.editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); display: grid; gap: 8px; }
.done-toggle { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 16px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; }
.done-toggle:hover { color: var(--text); }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; }
.cal-head h1 { font-size: 26px; min-width: 230px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; box-shadow: var(--shadow); }
.cal-dow { background: var(--panel-2); padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-day { background: var(--panel); min-height: 118px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-day:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.cal-day.other { background: var(--panel-2); }
.cal-day.other .cal-num { color: var(--faint); }
.cal-day.weekend:not(.other) { background: color-mix(in srgb, var(--panel-2) 40%, var(--panel)); }
.cal-num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 2px; }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-text); }
.cal-item {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px; line-height: 1.3;
  padding: 3px 6px; border-radius: 5px; background: var(--panel-2); border-left: 3px solid var(--c, var(--accent));
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; min-width: 0;
}
.cal-item:hover { filter: brightness(.96); }
.cal-item span { overflow: hidden; text-overflow: ellipsis; }
.cal-item.done { opacity: .55; text-decoration: line-through; }
.cal-more { font-size: 12px; color: var(--muted); padding: 0 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- family ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; background: var(--panel-2); }
.table tr:last-child td { border-bottom: 0; }
.table td.num { font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.stack { display: grid; gap: 22px; }
.narrow { max-width: 460px; }

/* ---------- dialogs ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px));
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(15, 18, 30, .45); }
.dlg-head { padding: 18px 22px 0; }
.dlg-head h2 { font-size: 19px; }
.dlg-body { padding: 16px 22px; display: grid; gap: 14px; }
.dlg-foot { padding: 14px 22px 18px; display: flex; gap: 8px; align-items: center; }
.dlg-foot .spacer { flex: 1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch[aria-pressed="true"] { border-color: var(--panel); box-shadow: 0 0 0 2px var(--text); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(380px, 100%); padding: 30px 28px; }
.login .brand { justify-content: center; padding-bottom: 6px; font-size: 22px; }
.login p.lead { text-align: center; color: var(--muted); margin: 0 0 22px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-weight: 500; z-index: 100; max-width: calc(100vw - 32px);
}
#toast.error { background: var(--danger); color: #fff; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 20px 16px 48px; }
  .class-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 80px; }
  .cal-item span { display: none; }
}

/* ---------- profile pictures ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; color: #fff; font-weight: 700; background: var(--panel-2); user-select: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.avatar.lg { width: 76px; height: 76px; font-size: 32px; }
.avatar.xl { width: 168px; height: 168px; font-size: 68px; }
.avatar.lg, .avatar.xl { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent-soft); }
.avatar-btn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.avatar-btn:hover .avatar { filter: brightness(.92); }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.avatar-edit .nav-icon { width: 14px; height: 14px; }
.avatar-btn:hover .avatar-edit { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.who { gap: 14px; padding: 6px 6px 2px; }
.who-text { min-width: 0; }
.who .name { font-size: 17px; overflow-wrap: anywhere; }
.avatar-preview { display: grid; place-items: center; padding: 8px 0 4px; }
.avatar-actions { justify-content: center; flex-wrap: wrap; }
.hint { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- notes: timestamps & search ---------- */
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.note-head .btn.small { margin: -4px -6px -4px 0; }
.note-stamp { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.note.editing .note-head { margin-bottom: 0; }
.notes.flat { padding: 0; }
.notes.flat .note { box-shadow: var(--shadow); }
mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { mark { background: #7a6400; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin-bottom: 18px; }
.filters .filter-text { flex: 1 1 240px; }
.filters select.input { width: auto; min-width: 150px; }
.filters input[type="date"] { width: 160px; }
.filters .range { gap: 8px; }
.result-count { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px 4px; }

/* ---------- class page: notes search ---------- */
.note-filter { display: grid; gap: 8px; padding: 12px 16px 0; }
.note-filter-dates { flex-wrap: wrap; gap: 8px; }
.note-filter-dates select.input { width: auto; }
.note-filter-dates input[type="date"] { width: 150px; }
.note-filter-dates .range { gap: 8px; flex-wrap: wrap; }
.note-filter-count { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* ---------- profile picture: camera ---------- */
.avatar-preview .avatar.xl { width: 200px; height: 200px; font-size: 80px; }
.camera-wrap { position: relative; border-radius: 50%; }
video.avatar.camera { transform: scaleX(-1); background: #111; object-fit: cover; display: block; }
.countdown {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 84px; font-weight: 800; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.camera-wrap.flash::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff;
  animation: flash .35s ease-out forwards; pointer-events: none;
}
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .camera-wrap.flash::after { animation: none; opacity: 0; } }

/* ---------- exams, Canvas links, calendar list view ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 5px; vertical-align: 2px; margin-right: 7px; }
.badge.exam { background: #fde4e6; color: #c42239; }
@media (prefers-color-scheme: dark) { .badge.exam { background: #4a1d26; color: #ff8a99; } }
.todo.exam .todo-title { font-weight: 600; }
.todo.past { opacity: .7; }
.canvas-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.canvas-link:hover { text-decoration: underline; }
.canvas-link .nav-icon { width: 13px; height: 13px; }
.dlg-foot .canvas-link { margin-left: 6px; font-size: 14px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); padding: 2px; gap: 2px; justify-self: start; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg-btn .nav-icon { width: 15px; height: 15px; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.page-head .seg { margin-left: 6px; }

.cal-item.exam { background: var(--c, var(--accent)); color: #fff; font-weight: 700; border-left-color: transparent; }
.cal-item.exam.done { opacity: .6; }
button.cal-more { border: 0; background: none; text-align: left; cursor: pointer; }
button.cal-more:hover { color: var(--accent); text-decoration: underline; }
.legend .badge { margin-right: 0; }

.agenda { display: grid; gap: 18px; }
.agenda-date { display: flex; align-items: baseline; gap: 8px; font-size: 15px; margin: 0 0 8px 4px; font-weight: 500; color: var(--muted); }
.agenda-dow { font-weight: 700; color: var(--text); }
.agenda-day.past .agenda-date, .agenda-day.past .todo-list { opacity: .7; }
.agenda-day.today .agenda-dow { color: var(--accent); }
.tag-today { align-self: center; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-text); padding: 1px 8px; border-radius: 999px; }
.badge.assignment { background: #e3ebff; color: #3451c9; }
@media (prefers-color-scheme: dark) { .badge.assignment { background: #1f2a55; color: #9db1ff; } }
.todo.assignment .todo-title { font-weight: 600; }
.dlg-body .seg { flex-wrap: wrap; }

/* ---------- Add: Task | Assignment | Exam ---------- */
.add-group { display: inline-flex; align-items: stretch; border-radius: 9px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--accent); background: var(--panel); }
.add-label { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; background: var(--accent); color: var(--accent-text); font-weight: 600; }
.add-label .nav-icon { width: 16px; height: 16px; }
.add-btn { border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 13px; font-weight: 500; cursor: pointer; }
.add-label + .add-btn { border-left: 0; }
.add-btn:hover { background: var(--accent-soft); color: var(--accent); }
.add-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.add-group.small { border-radius: 8px; font-size: 13px; }
.add-group.small .add-label { padding: 0 9px; }
.add-group.small .add-label .nav-icon { width: 14px; height: 14px; }
.add-group.small .add-btn { padding: 4px 9px; }

/* ---------- All tasks: class name block on the left of each row ---------- */
ul.panel.todo-list { overflow: hidden; }
.todo.with-class { grid-template-columns: 168px auto 1fr auto; padding: 0 14px 0 0; align-items: stretch; gap: 14px; }
.todo.with-class > .check, .todo.with-class > .icon-btn { align-self: center; }
.todo.with-class > .todo-main { align-self: center; padding: 10px 0; }
.class-block {
  display: flex; color: #fff; align-items: center; padding: 10px 14px;
  font-weight: 700; font-size: 13.5px; line-height: 1.25; letter-spacing: .01em;
  text-decoration: none; overflow-wrap: anywhere; min-height: 56px;
}
.class-block:hover { filter: brightness(1.07); text-decoration: underline; }
.class-block:focus-visible { outline: 3px solid var(--text); outline-offset: -3px; }
@media (max-width: 900px) { .todo.with-class { grid-template-columns: 104px auto 1fr auto; } .class-block { font-size: 12.5px; padding: 8px 10px; } }
