/* Шторки, тост, пустые состояния и экран списка группы. */

/* ---------- состояния вместо таблицы ---------- */
.state { flex: 1; min-height: 0; overflow: auto; margin: 0 8px; display: flex; flex-direction: column; gap: 16px;
  align-items: stretch; justify-content: flex-start; padding: 24px 8px 16px; }
.state .card { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 24px 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.state .big { font: 700 22px/1.15 var(--f-display); letter-spacing: -.01em; }
.state p { color: var(--muted); max-width: 34ch; }
.state svg.big-i { width: 28px; height: 28px; color: var(--ink); }
.state .btn { margin-top: 6px; }
.plan { list-style: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.plan li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.plan li:last-child { border-bottom: 0; }
.plan time { font: 600 13px/1.2 var(--f-mono); }
.plan span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- шторка ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(10, 8, 6, .5); animation: fade .18s ease; }
.drawer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px;
  animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
.drawer .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong); align-self: center; opacity: .6; }
.drawer .kicker { font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.drawer h2 { font: 700 19px/1.2 var(--f-display); letter-spacing: -.01em; margin-top: 8px; overflow-wrap: anywhere; }
.drawer .meta { color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.drawer .meta .unknown { font-style: italic; }
.drawer .tally { font: 500 12px/1.3 var(--f-mono); color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.act { height: 76px; border-radius: 14px; border: 1.5px solid var(--line-strong); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; text-align: center; }
.act b { font: 700 22px/1 var(--f-mono); }
.act.p { background: var(--present-bg); border-color: var(--present-line); color: var(--present-ink); }
.act.n { background: var(--absent-bg); border-color: var(--absent-bg); color: var(--absent-ink); }
.act:active { transform: scale(.97); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

/* ---------- тост ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 30; max-width: 528px; margin: 0 auto;
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 12px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: rise .2s ease; }
.toast span { flex: 1; min-width: 0; }
.toast button { font-weight: 700; color: var(--accent); padding: 6px 4px; }
:root:not([data-theme="dark"]) .toast button { color: #ff8a70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: var(--on-accent); } }
:root[data-theme="dark"] .toast button { color: var(--on-accent); }

/* ---------- список группы ---------- */
.screen { position: fixed; inset: 0; z-index: 15; background: var(--bg); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; animation: rise .2s ease; }
.screen-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px 10px; }
.screen-top h2 { flex: 1; font: 700 20px/1.1 var(--f-display); letter-spacing: -.01em; }
.screen-top .count { font: 500 13px/1 var(--f-mono); color: var(--muted); }
.roster-list { flex: 1; min-height: 0; overflow: auto; margin: 0 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 40px; align-items: center; border-bottom: 1px solid var(--line); padding-left: 12px; }
.rrow:last-child { border-bottom: 0; }
.rrow i { font: 500 11px/1 var(--f-mono); font-style: normal; color: var(--muted); }
.rrow input { width: 100%; height: 50px; border: 0; background: transparent; color: var(--ink); font: 500 15px/1 var(--f-body); padding: 0 8px 0 0; }
.rrow input::placeholder { color: var(--muted); font-weight: 400; }
.rrow input:focus-visible { outline: none; }
.rrow:focus-within { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rrow .del { height: 50px; display: grid; place-items: center; color: var(--muted); }
.rrow .del svg { width: 16px; height: 16px; }
.rrow .del:active { color: var(--stale); }
.row-tools { display: flex; gap: 8px; padding: 10px 8px 0; }
.row-tools .btn { flex: 1; height: 44px; font-size: 14px; padding: 0 12px; }
.bulk { margin: 0 8px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.bulk label { font: 600 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bulk textarea { width: 100%; min-height: 168px; resize: none; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-body); padding: 10px 12px; }
.bulk .row { display: flex; gap: 8px; }
.bulk .row .btn { flex: 1; height: 44px; }
.screen .bar-b { padding-top: 12px; }
.screen .bar-b .btn { flex: 1; }
.err { color: var(--stale); font-size: 13px; padding: 0 16px; min-height: 18px; }

/* ---------- отправка куратору ---------- */
.drawer .lead { color: var(--muted); font-size: 15px; max-width: 40ch; }
.drawer .warn { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--absent-bg); font-size: 14px; background: color-mix(in srgb, var(--absent-bg) 10%, transparent); }
.drawer .err { padding: 0; }
.btn.wide { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.btn.wide svg, .btn.send svg { width: 18px; height: 18px; flex: none; }
.btn.send { display: inline-flex; align-items: center; gap: 9px; padding: 0 18px; }
.done { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.done .ok { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--present-bg); color: var(--present-ink); }
.done .ok svg { width: 22px; height: 22px; }

.switch { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; width: 100%; }
.switch .sw { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); padding: 3px; transition: background-color .15s ease; }
.switch .sw i { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: transform .15s ease; }
.switch[aria-checked="true"] .sw { background: var(--present-solid); }
.switch[aria-checked="true"] .sw i { transform: translateX(18px); background: var(--present-solid-ink); }
.switch .sw-t { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 15px; }
.switch small { font-weight: 400; font-size: 13px; color: var(--muted); }
