/* ===== Свет — стили ================================================== */
:root {
  --bg: #f4f7fc;
  --bg-soft: #eaf0fa;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --line: #dfe6f2;
  --line-strong: #c8d4e8;
  --ink: #14203a;
  --ink-soft: #4a5875;
  --ink-mute: #5f6c86;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #e5edff;
  --violet: #6d5cf0;
  --green: #0f7252;
  --green-soft: #dcf5ea;
  --amber: #96560a;
  --amber-soft: #fdf0d5;
  --red: #c53030;
  --red-soft: #fde8e8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 32, 58, .05), 0 8px 24px -12px rgba(20, 32, 58, .18);
  --shadow-lg: 0 20px 60px -24px rgba(20, 32, 58, .38);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.hidden { display: none !important; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(12px, 4vw, 34px);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--violet));
  color: #fff; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 6px 16px -8px var(--accent);
  flex: 0 0 auto;
}
.brand-mark svg { width: 24px; height: 24px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { color: var(--ink-mute); font-size: .72rem; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 6px; }
.topnav a {
  padding: 7px 12px; border-radius: 999px; color: var(--ink-soft);
  font-size: .92rem; font-weight: 500;
}
.topnav a:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.topnav a.active { background: var(--accent); color: #fff; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: .8rem;
}
.user-chip .who { font-size: .85rem; font-weight: 600; }
.user-chip .role { font-size: .72rem; color: var(--ink-mute); }

/* ---------- layout ---------- */
.view { flex: 1 1 auto; width: 100%; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: clamp(16px, 3vw, 30px) clamp(12px, 4vw, 34px) 60px; }
.wrap.narrow { width: min(560px, 100%); }
.wrap.mid { width: min(820px, 100%); }
.page-head { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { min-width: 220px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 14px; }
.card.tight { padding: 14px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { color: var(--ink-mute); font-size: .85rem; }
.stat.accent { background: linear-gradient(140deg, var(--accent), var(--violet)); border: none; color: #fff; }
.stat.accent .lbl { color: rgba(255,255,255,.92); }

/* ---------- отчёты по группам ---------- */
.report-card { display: block; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.report-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.report-metrics { display: flex; gap: 26px; margin-top: 14px; }
.report-metrics > div { display: flex; flex-direction: column; }
.report-metrics .rm-num { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }
.report-metrics .rm-cap { font-size: .8rem; color: var(--ink-mute); }
.report-months { display: flex; flex-direction: column; gap: 9px; }
.report-month { display: grid; grid-template-columns: 110px minmax(80px, 1fr) 52px 84px; gap: 10px; align-items: center; }
.report-month .rm-label { font-size: .85rem; color: var(--ink-soft); }
.report-month .rm-bar { height: 9px; }
.report-month .rm-val { font-weight: 700; text-align: right; }
.report-month .rm-n { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .report-month { grid-template-columns: 88px minmax(60px, 1fr) 46px; }
  .report-month .rm-n { display: none; }
  .report-metrics { gap: 18px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; transition: background .15s, transform .08s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent-dark); }
.btn.soft { background: var(--accent-soft); color: var(--accent-dark); }
.btn.soft:hover { background: #d6e3ff; }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.danger:hover { background: #f9d5d5; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #0b5f45; }
.btn.sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.link { background: none; color: var(--accent); padding: 4px 6px; }
.btn.link:hover { background: var(--accent-soft); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1 1 auto; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 13px; }
.field > .lab { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field .hint { font-size: .78rem; color: var(--ink-mute); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
textarea { resize: vertical; min-height: 80px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer;
}
.check-row:hover { border-color: var(--accent); }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; }
.filters .search { flex: 1 1 220px; min-width: 180px; }

/* поле пароля с кнопкой-«глазиком» */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input[type=password], .pw-wrap > input[type=text] { padding-right: 44px; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-mute); cursor: pointer;
  transition: color .15s, background .15s;
}
.pw-eye:hover { color: var(--ink-soft); background: var(--bg-soft); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-eye.on { color: var(--accent); }
.pw-eye svg { display: block; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .01em; background: var(--bg-soft); color: var(--ink-soft);
  white-space: nowrap;
}
.badge.blue { background: var(--accent-soft); color: var(--accent-dark); }
.badge.violet { background: #ece9fe; color: #4c3fd0; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.grey { background: #eceff5; color: var(--ink-mute); }
.badge.teal { background: #d5f3ee; color: #0d7d6b; }
h1 .badge, h2 .badge, .ttl + .badge { vertical-align: middle; }
h1 .badge { position: relative; top: 2px; }

/* тип работы: фильтр в списке работ и компактный выбор в карточке */
.works-kind-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.kind-pick { display: inline-flex; align-items: center; gap: 5px; }
select.kind-select {
  font: inherit; font-size: .8rem; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); cursor: pointer;
}
select.kind-select:hover { border-color: var(--accent); color: var(--accent-dark); }
select.kind-select:disabled { opacity: .6; cursor: default; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem;
}
.chip button { border: none; background: none; cursor: pointer; color: var(--ink-mute); font-size: 1rem; line-height: 1; padding: 0 2px; }
.chip button:hover { color: var(--red); }

/* ---------- lists ---------- */
.list { display: grid; gap: 12px; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start;
  transition: border-color .15s;
}
.item:hover { border-color: var(--line-strong); }
.item .body { min-width: 0; flex: 1 1 auto; }
.item .title { font-weight: 650; font-size: 1.02rem; margin: 0 0 3px; }
.item .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .83rem; color: var(--ink-mute); }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item.linkable { cursor: pointer; }
.item.clickable:hover { border-color: var(--accent); box-shadow: 0 10px 30px -18px rgba(37,99,235,.5); }

.empty {
  text-align: center; padding: 42px 20px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); color: var(--ink-mute); background: var(--surface-2);
}
.empty h3 { color: var(--ink-soft); margin-bottom: 6px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a {
  padding: 9px 14px; border-radius: 9px 9px 0 0; color: var(--ink-soft); font-weight: 600;
  font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { background: var(--bg-soft); text-decoration: none; }
.tabs a.active { color: var(--accent-dark); border-bottom-color: var(--accent); background: var(--surface); }
.tabs a .cnt { color: var(--ink-mute); font-weight: 500; }

/* ---------- landing ---------- */
.hero {
  background: radial-gradient(1000px 400px at 10% -20%, #dbe7ff 0%, transparent 60%),
              radial-gradient(800px 400px at 100% 0%, #eae4ff 0%, transparent 55%), var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner { width: min(1180px, 100%); margin: 0 auto; padding: clamp(28px, 6vw, 68px) clamp(12px, 4vw, 34px); display: grid; align-items: start; gap: 34px; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
@media (max-width: 880px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 12px; }
.hero .lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; }
.tick { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; font-size: .95rem; }
.tick .dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: .75rem; margin-top: 2px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.feature .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 10px; }
.section { padding: clamp(30px, 5vw, 56px) 0; }
.section-title { text-align: center; margin-bottom: 26px; }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; box-shadow: var(--shadow); }
.step::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 10px; font-size: .9rem;
}
.footer { border-top: 1px solid var(--line); padding: 22px clamp(12px, 4vw, 34px); color: var(--ink-mute); font-size: .85rem; background: var(--surface); }
.footer .inner { width: min(1180px, 100%); margin: 0 auto; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* ---------- auth ---------- */
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; }
.switch { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 11px; margin-bottom: 20px; }
.switch button {
  flex: 1 1 0; padding: 8px; border: none; border-radius: 8px; background: none; font: inherit;
  font-weight: 600; font-size: .9rem; color: var(--ink-soft); cursor: pointer;
}
.switch button.active { background: var(--surface); color: var(--accent-dark); box-shadow: var(--shadow); }
/* на узких экранах вкладки встают в столбик — подписи не «рвутся» по слогам */
@media (max-width: 560px) {
  .switch { flex-direction: column; }
  .switch button { text-align: left; padding: 9px 12px; }
  .assign-due { flex: 1 1 100%; }
  .assign-due input { width: 100%; }
  .due-item { flex-wrap: wrap; }
  .due-item input { flex: 1 1 100%; }
}

/* ---------- назначение работы: срок у каждой группы и ученика свой ---------- */
.assign-list { display: grid; gap: 8px; }
.assign-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.assign-row:hover { border-color: var(--accent); }
.assign-hit { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; cursor: pointer; }
.assign-hit input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.assign-due { display: flex; align-items: center; gap: 6px; flex: 0 1 220px; }
.assign-due input { padding: 7px 10px; font-size: .88rem; }
.due-bulk {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 12px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2);
}
.due-bulk .field { flex: 1 1 220px; }
.due-list { display: grid; gap: 8px; margin-top: 14px; }
.due-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.due-item .grow { min-width: 0; }
.due-item input { flex: 0 1 220px; padding: 7px 10px; font-size: .88rem; }
.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; word-break: break-all;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px;
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: clamp(10px, 4vh, 44px) 12px;
  overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(880px, 100%);
  display: flex; flex-direction: column; max-height: calc(100vh - 60px); overflow: hidden;
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: .6 } to { transform: none; opacity: 1 } }
.modal.narrow { width: min(520px, 100%); }
.modal.wide { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-head .x { margin-left: auto; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-mute); padding: 0 4px; }
.modal-head .x:hover { color: var(--red); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface-2); }

/* ---------- rich editor ---------- */
.editor { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.toolbar { display: flex; gap: 3px; flex-wrap: wrap; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.toolbar button {
  border: 1px solid transparent; background: none; font: inherit; font-size: .88rem; font-weight: 600;
  padding: 4px 9px; border-radius: 7px; cursor: pointer; color: var(--ink-soft); min-width: 30px;
}
.toolbar button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.toolbar .sep { width: 1px; background: var(--line); margin: 3px 4px; }
.rich {
  min-height: 130px; max-height: 340px; overflow-y: auto; padding: 12px 14px; font-size: .97rem; outline: none;
  line-height: 1.65;
}
.rich:empty::before { content: attr(data-placeholder); color: var(--ink-mute); }
.rich img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.rich sup, .rich sub, .rich-body sup, .rich-body sub { font-size: .72em; }
.rich .formula, .rich-body .formula {
  font-family: "Cambria Math", "Times New Roman", Georgia, serif; font-style: italic;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap;
}
.rich-body { font-size: .97rem; line-height: 1.65; word-break: break-word; }
.rich-body img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); margin: 6px 0; }
.rich-body p { margin: 0 0 .6em; }
.rich-body ul, .rich-body ol { margin: 0 0 .6em; padding-left: 1.4em; }
.formula-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.formula-bar input { flex: 1 1 240px; font-family: "Cambria Math", Georgia, serif; }

/* ---------- task view ---------- */
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; margin-bottom: 8px; }
.opt:hover { border-color: var(--accent); }
.opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.opt.selected { background: var(--accent-soft); border-color: var(--accent); }
.opt.correct { background: var(--green-soft); border-color: var(--green); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); }
.opt .idx { font-weight: 700; color: var(--ink-mute); font-size: .86rem; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.task-card + .task-card { margin-top: 14px; }
.task-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.task-num { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; flex: 0 0 auto; }

/* ---------- misc ---------- */
.toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 11px; box-shadow: var(--shadow-lg);
  font-size: .9rem; max-width: 340px; animation: pop .2s ease;
}
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
.toast.warn { background: var(--amber); }
.bar { height: 7px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--violet)); border-radius: 999px; transition: width .3s; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .82rem; }
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: var(--surface-2); }
.pick-list .pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 7px; }
.pick-list .pick .grow { min-width: 0; }
.pick-list .pick .t { font-weight: 600; font-size: .9rem; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -3px; }
.spin.dark { border-color: var(--line-strong); border-top-color: var(--accent); }
@keyframes sp { to { transform: rotate(360deg) } }
.loading-box { display: grid; place-items: center; gap: 10px; padding: 50px; color: var(--ink-mute); }
.correct-note { border-left: 3px solid var(--green); background: var(--green-soft); padding: 10px 13px; border-radius: 0 8px 8px 0; font-size: .9rem; }
.wrong-note { border-left: 3px solid var(--red); background: var(--red-soft); padding: 10px 13px; border-radius: 0 8px 8px 0; font-size: .9rem; }
/* ---------- ответ числом: единица измерения справа от поля ---------- */
.answer-line { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.answer-line input[type=text] { flex: 1 1 auto; min-width: 130px; max-width: 240px; }
.answer-line.has-unit input[type=text] { border-color: var(--accent); font-weight: 600; letter-spacing: .01em; }
.answer-unit {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  font-weight: 700; font-size: .95rem; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 0 12px; white-space: nowrap;
}
.answer-unit.muted { color: var(--ink-mute); background: var(--surface-2); font-weight: 600; }
.unit-note { font-weight: 500; font-size: .78rem; color: var(--ink-mute); text-transform: none; }
/* список заданий, ответ в которых не совпал с форматом «число»/«слово» */
.fmt-issues { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; }
.fmt-issues li { margin: 4px 0; }
.fmt-issues li strong { font-weight: 600; }
.info-note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 13px; border-radius: 0 8px 8px 0; font-size: .9rem; }
.warn-note { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 13px; border-radius: 0 8px 8px 0; font-size: .9rem; }

/* ---------- папки ---------- */
.folders-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.folder-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft);
  font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.crumb { color: var(--accent); font-weight: 600; }
.crumb-sep { color: var(--ink-mute); }
.crumb-cur { color: var(--ink); font-weight: 700; }
.folder-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.folder-card {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font: inherit;
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; font-size: .92rem;
}
.folder-card:hover { border-color: var(--accent); color: var(--accent-dark); }
.folder-ico { font-size: 1.05rem; }
.folder-cnt { background: var(--bg-soft); color: var(--ink-mute); border-radius: 999px; font-size: .76rem; padding: 2px 8px; }

/* папки банка внутри конструктора работы */
.bank-pick-bar .folders-bar { padding: 9px 10px; margin-bottom: 10px; background: var(--surface-2); box-shadow: none; }
.bank-pick-bar .folder-cards { margin-bottom: 0; gap: 8px; flex: 1 1 100%; }
.bank-pick-bar .folder-card { padding: 6px 11px; font-size: .85rem; box-shadow: none; }
.bank-pick-bar .crumbs { margin: 2px 0; }
.pick-folder { color: var(--ink-mute); }

/* ---------- перемещение по папкам ---------- */
.dnd-hint { flex: 1 1 100%; font-size: .8rem; color: var(--ink-mute); }
.drag-src { cursor: grab; }
.drag-src:active { cursor: grabbing; }
.item.dragging, .folder-card.dragging { opacity: .45; }
.item.drop-over, .folder-card.drop-over, .chip-btn.drop-over, .crumb.drop-over {
  outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); color: var(--accent-dark);
}

/* ---------- файлы ---------- */
.file-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.file-block + .file-block { margin-top: 12px; }
.file-block-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.file-block-head h4 { margin: 0; font-size: .98rem; flex: 1 1 auto; }
.file-pick { cursor: pointer; }
/* «до 50 МБ» рядом с кнопкой загрузки */
.upload-cta { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-limit { font-size: .8rem; color: var(--ink-mute); white-space: nowrap; }
.file-list { display: grid; gap: 8px; margin-top: 8px; }
.file-row {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.file-ico {
  flex: 0 0 auto; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--ink-mute);
}
.file-ico.pdf { background: var(--red-soft); color: var(--red); }
.file-ico.img { background: var(--accent-soft); color: var(--accent-dark); }
.file-name { flex: 1 1 auto; min-width: 0; word-break: break-word; font-size: .9rem; font-weight: 600; }
.file-name.loading { color: var(--ink-mute); }
.file-name.dead { color: var(--ink-mute); text-decoration: line-through; cursor: default; }
.file-size { flex: 0 0 auto; font-size: .78rem; color: var(--ink-mute); }

/* ---------- статистика ---------- */
.month-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.month-label { font-weight: 700; min-width: 132px; text-align: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.data-table th, .data-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
.data-table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .ttl { font-weight: 650; }

@media (max-width: 720px) {
  .brand-text small { font-size: .66rem; max-width: 156px; line-height: 1.2; }
  .brand-mark { display: none; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .topnav { order: 3; width: 100%; margin: 4px 0 0; overflow-x: auto; flex-wrap: nowrap; }
  .topnav a { padding: 6px 10px; font-size: .86rem; }
  .topbar { flex-wrap: wrap; }
  .item { flex-direction: column; }
  .modal { max-height: calc(100vh - 24px); }
  .modal-back { padding: 12px 8px; }
  .folders-bar { padding: 10px; }
  .folder-cards { gap: 8px; }
  .folder-card { flex: 1 1 100%; }
  .file-row { flex-wrap: wrap; }
  .file-name { flex: 1 1 60%; }
  .month-label { min-width: 110px; }
}

/* ---------- роли и команда школы ---------- */
.role-card { border-top: 3px solid var(--line); }
.role-card.admin { border-top-color: var(--violet); }
.role-card.teacher { border-top-color: var(--accent); }
.role-card.student { border-top-color: var(--line-strong); }
.role-card h3 { margin: 10px 0 12px; font-size: 1rem; }
.item.team-item .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item.team-item .badge { position: relative; top: 1px; }
.team-note { font-size: .82rem; color: var(--ink-mute); }

/* ---------- восстановление доступа ученика ---------- */
.link-btn {
  background: none; border: none; padding: 0; color: var(--accent);
  font: inherit; font-size: .86rem; cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: var(--accent-strong, var(--accent)); }

.rp-block {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; margin-top: 14px; background: var(--surface);
}
.rp-block h3 { margin: 0 0 6px; font-size: 1rem; }
.rp-block .hint { margin: 0 0 10px; }

.rp-result {
  margin-top: 14px; border-left: 3px solid var(--green);
  background: var(--green-soft, #e8f5ef); border-radius: 0 8px 8px 0; padding: 12px 13px;
}
.rp-result .rp-ok { margin: 0 0 8px; font-weight: 650; color: var(--green); }
.rp-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.rp-line:last-of-type { border-bottom: none; }
.rp-line .lbl { color: var(--ink-mute); font-size: .82rem; min-width: 74px; }
.rp-line code {
  font-family: ui-monospace, monospace; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 8px; font-size: .9rem; word-break: break-all;
}
.rp-line .rp-code { letter-spacing: .16em; font-weight: 700; font-size: 1rem; }
#rpPass { font-family: ui-monospace, monospace; letter-spacing: .04em; max-width: 100%; }

/* ---------- мастер-доступ и режим просмотра ---------- */
.impersonation-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; height: 46px;
  padding: 0 clamp(12px, 4vw, 34px);
  background: linear-gradient(90deg, #4c3fd0, var(--violet));
  color: #fff; font-size: .9rem;
}
/* шапка «уезжает» вниз, чтобы не перекрывать плашку */
body.has-impersonation .topbar { top: 46px; }
.imp-tag {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 3px 10px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.imp-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-text strong { font-weight: 700; }
.imp-left { opacity: .85; }
.impersonation-bar .btn { flex: 0 0 auto; background: #fff; color: #4c3fd0; border-color: transparent; }
.impersonation-bar .btn:hover { background: #efecff; color: #3a2fbe; }

.master-block h3 { font-size: 1rem; }
.master-unlock { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.master-unlock .field { flex: 1 1 240px; min-width: 0; margin-bottom: 0; }
.master-unlock .btn { flex: 0 0 auto; }
.imp-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
.imp-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.imp-row-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.imp-name { font-weight: 600; }
.imp-extra { font-size: .8rem; color: var(--ink-mute); }
.imp-empty {
  padding: 18px; text-align: center; color: var(--ink-mute);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
}

@media (max-width: 720px) {
  .impersonation-bar { position: static; height: auto; flex-wrap: wrap; padding: 8px 12px; row-gap: 6px; }
  body.has-impersonation .topbar { top: 0; }
  .imp-text { white-space: normal; }
  .impersonation-bar .btn { margin-left: 0; }
  .imp-row { flex-wrap: wrap; }
}

/* ---------- Журнал входов от имени ---------- */
.journal-block h3 { font-size: 1rem; }
.journal-search { flex: 0 1 320px; margin: 0; }
.journal-table {
  margin-top: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.journal-head, .journal-row {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(160px, 1.1fr) minmax(170px, .9fr);
}
.journal-head {
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); font-weight: 700;
}
.journal-row { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.journal-row:last-child { border-bottom: none; }
.journal-row:hover { background: var(--surface-2); }
.journal-cell { min-width: 0; }
.journal-when { font-size: .88rem; }
.journal-actor { font-weight: 600; }
.journal-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.journal-empty {
  padding: 18px; text-align: center; color: var(--ink-mute);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
}
.journal-table .journal-empty { border: none; }

@media (max-width: 820px) {
  .journal-table { background: none; border: none; box-shadow: none; border-radius: 0; overflow: visible; margin-top: 12px; }
  .journal-head { display: none; }
  .journal-list { display: grid; gap: 12px; }
  .journal-row {
    display: block; padding: 14px 16px; margin: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .journal-row:last-child { border-bottom: 1px solid var(--line); }
  .journal-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 3px 0; }
  .journal-cell::before {
    content: attr(data-lbl); flex: 0 0 118px; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .03em; color: var(--ink-mute); font-weight: 700;
  }
  .journal-search { flex: 1 1 100%; }
}

/* ---------- «Назначения»: контроль администратора школы ---------- */
.asg-filter { display: flex; flex-direction: column; gap: 3px; flex: 0 1 250px; }
.asg-filter .lab { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.filters .asg-reset { align-self: flex-end; }

.asg-table {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.asg-head, .asg-row {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: minmax(120px, .95fr) minmax(180px, 1.45fr) minmax(140px, 1.05fr) minmax(160px, .95fr) minmax(150px, 1fr) 190px;
}
.asg-head {
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); font-weight: 700;
}
.asg-head span:last-child { text-align: right; }
.asg-list { display: block; }
.asg-row { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.asg-row:last-child { border-bottom: none; }
.asg-row:hover { background: var(--surface-2); }
.asg-cell { min-width: 0; }
.asg-cell .ttl { font-weight: 650; font-size: .95rem; }
.asg-meta { font-size: .78rem; color: var(--ink-mute); margin-top: 2px; }
.asg-work .badge { vertical-align: middle; }
.asg-due .badge { white-space: normal; }
.asg-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item.focus { border-color: var(--accent); box-shadow: 0 10px 30px -18px rgba(37,99,235,.6); }

@media (max-width: 820px) {
  .asg-table { background: none; border: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .asg-head { display: none; }
  .asg-list { display: grid; gap: 12px; }
  .asg-row {
    display: block; margin: 0; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .asg-row:last-child { border-bottom: 1px solid var(--line); }
  .asg-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 3px 0; }
  .asg-cell::before {
    content: attr(data-lbl); flex: 0 0 104px; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .03em; color: var(--ink-mute); font-weight: 700;
  }
  .asg-cell .asg-meta { flex: 1 1 100%; margin: 0 0 0 114px; }
  .asg-acts { justify-content: flex-start; padding-top: 10px; }
  .asg-acts::before { display: none; }
}

/* ---------- Материалы: библиотека файлов и ссылок ---------- */
.mat-ico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; font-size: .95rem; line-height: 1;
  background: var(--bg-soft); color: var(--ink-mute); vertical-align: middle;
}
.mat-ico.video { background: var(--violet); color: #fff; }
.mat-ico.image { background: var(--accent-soft); color: var(--accent-dark); }
.mat-ico.audio { background: var(--amber-soft); color: var(--amber); }
.mat-ico.link { background: var(--green-soft); color: var(--green); }
.mat-ico.doc { background: var(--bg-soft); color: var(--ink-mute); }
.mat-pick-ico { flex: 0 0 auto; display: inline-flex; }
.mat-pick-ico .mat-ico { width: 30px; height: 30px; font-size: 1.05rem; }

.item .title .mat-ico { margin-right: 4px; }

.mat-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); margin-top: 14px;
}
.mat-block-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.mat-block-head h3, .mat-block-head h4 { margin: 0; }
.mat-list { display: grid; gap: 8px; }
.mat-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.mat-row .grow { display: flex; flex-direction: column; min-width: 0; }
.mat-name { font-weight: 600; word-break: break-word; }
.mat-row .meta { display: inline; }

.mat-sel-block { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 14px; }
.mat-sel-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mat-sel-head h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.mat-name-inp {
  width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: .88rem; background: var(--surface);
}

.mat-mark.ok { background: var(--green-soft); color: var(--green); border-color: var(--green-soft); font-weight: 700; }
.mat-mark.no { background: var(--bg-soft); color: var(--ink-mute); }

/* просмотр материала в окне */
.mat-view { min-height: 120px; }
.mat-view-meta { font-size: .78rem; color: var(--ink-mute); margin-left: auto; }
.mat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.mat-image { text-align: center; }
.mat-image img { max-width: 100%; max-height: 70vh; border-radius: 10px; border: 1px solid var(--line); }
.mat-video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; }
.mat-audio { width: 100%; margin-top: 8px; }
.mat-frame { width: 100%; height: 72vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.mat-player { position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; }
.mat-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mat-doc-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }

@media (max-width: 700px) {
  .mat-row { align-items: flex-start; }
  .mat-row .grow { flex: 1 1 100%; }
  .mat-frame { height: 60vh; min-height: 320px; }
  .mat-sel-head { align-items: flex-start; }
}

/* ---------- Напоминание о сроках сдачи (кабинет ученика) ---------- */
.remind-block {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 20px;
}
.remind-block-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.remind-block-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.remind-bell { font-size: 1.05rem; line-height: 1; }
.remind-count {
  font-size: .78rem; font-weight: 700; color: var(--amber); background: var(--amber-soft);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.remind-list { display: grid; gap: 8px; }
.remind-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.remind-row .grow { display: flex; flex-direction: column; min-width: 0; }
.remind-name { font-weight: 600; word-break: break-word; }
.remind-when { font-size: .82rem; color: var(--ink-mute); }
.remind-when.soon { color: var(--amber); font-weight: 700; }
.remind-when.past { color: var(--red); font-weight: 700; }
.remind-sub {
  border: 1px solid #f6d2d2; background: var(--red-soft); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 10px;
}
.remind-sub h4 {
  margin: 0 0 8px; color: var(--red); font-size: .84rem; text-transform: uppercase; letter-spacing: .04em;
}
.remind-row.past { background: var(--surface); border-color: #f2c9c9; }

@media (max-width: 700px) {
  .remind-block { padding: 12px 13px; }
  .remind-row { align-items: flex-start; }
  .remind-row .grow { flex: 1 1 100%; }
  .remind-block-head .grow { flex: 1 1 100%; }
}

