@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/nunito-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/nunito-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/nunito-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #fff8f4;
  --card: #ffffff;
  --text: #2b1d16;
  --text2: #3d2c24;
  --muted: #6b5a51;
  --muted2: #8a7468;
  --label: #6b4a3a;
  --accent: #c2490c;
  --accent-ink: #8f350a;
  --peach: #fdebe1;
  --flower: #fadbcb;
  --line: #f3c9b3;
  --line2: #f0d2c1;
  --focus: #e8a27d;
  --danger: #b3261e;
  --shadow: 0 2px 10px rgba(43, 29, 22, 0.05);
  --shadow-btn: 0 2px 8px rgba(235, 98, 26, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 15px/1.45 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-user-select: text; user-select: text; -webkit-text-size-adjust: 100%; }
/* No visible scrollbars anywhere: touch, wheel and trackpad still scroll; the bar appearing/disappearing broke the layout feel. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted2); }
.clearable { position: relative; }
.clearable .clear { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: none; border-radius: 12px; background: transparent; color: var(--muted2); }
.clearable input::-webkit-search-cancel-button { -webkit-appearance: none; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; }

/* ---------- screens ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: #f6ede7; } /* clip: focus must not scroll the stage mid-slide (review 11-30); hidden = fallback */
.screen { position: absolute; inset: 0; margin: 0 auto; max-width: 640px; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; will-change: transform; }
@media (min-width: 641px) {
  /* Wide windows (desktop, Telegram fullscreen): clip sliding screens to the centred column, as on a phone; 2 px extra keeps the screen's 1 px ring visible (user 11-30). */
  html, body { background: #f6ede7; }
  .stage { left: 0; right: 0; margin: 0 auto; max-width: 642px; }
  .screen { box-shadow: 0 0 0 1px var(--line2); }
}
.screen.behind { visibility: hidden; pointer-events: none; }
.scroll { position: relative; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 24px; }
.footer { flex: none; padding: 10px 20px calc(16px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, rgba(255, 248, 244, 0)); margin-top: -18px; position: relative; z-index: 1; }

.flower-bg { position: absolute; top: -70px; right: -70px; width: 230px; height: 230px; pointer-events: none; }
.top { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 20px 8px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px; }
.grow { flex: 1 1 auto; min-width: 0; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: #b8450c; text-transform: uppercase; }
.top h1 { font-size: 26px; font-weight: 800; line-height: 1.2; }
.bar-title { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title { padding: 10px 20px 0; font-size: 24px; font-weight: 800; }
.sub { font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- press states (transform only) ---------- */
.tap { transition: transform 140ms var(--ease-out), background-color 140ms, box-shadow 140ms; }
.tap:active { transform: scale(0.97); }
@media (hover: hover) { .tap:hover { filter: brightness(0.985); } .row.tap:hover { background: #fff4ee; } }

.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 14px; border: none; background: var(--card); box-shadow: var(--shadow-btn); display: flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn.primary { background: var(--accent); box-shadow: 0 4px 12px rgba(194, 73, 12, 0.3); }
.text-btn { height: 44px; padding: 0 14px; border: none; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-btn); font-size: 15px; font-weight: 700; color: var(--label); }
.text-btn.primary { background: var(--accent); color: #fff; font-weight: 800; padding: 0 18px; box-shadow: none; }
.big-btn { width: 100%; height: 56px; border: none; border-radius: 20px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 8px 20px rgba(194, 73, 12, 0.35); display: flex; align-items: center; justify-content: center; gap: 8px; }
.big-btn[disabled], .text-btn[disabled] { opacity: 0.6; }
.small-btn { height: 36px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.small-btn.grow { flex: 1 1 auto; }
.small-btn.danger { color: var(--danger); }
.link-btn { padding: 0; border: none; background: transparent; font-size: 12px; font-weight: 700; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 4px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- list ---------- */
.search { position: relative; margin: 12px 20px 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: var(--card); border-radius: 16px; box-shadow: 0 2px 10px rgba(43, 29, 22, 0.06); }
.search .clearable { flex: 1 1 auto; min-width: 0; }
.search input { caret-color: var(--accent); width: 100%; height: 48px; padding: 0 40px 0 0; border: none; outline: none; background: transparent; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search .clear { right: -8px; }
.chips { position: relative; display: flex; gap: 8px; padding: 14px 20px 6px; overflow-x: auto; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--label); font-size: 14px; font-weight: 600; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.list { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px 20px 0; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: none; text-align: left; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 18px; background: var(--peach); display: flex; align-items: center; justify-content: center; }
.avatar.lg { width: 76px; height: 76px; border-radius: 26px; }
.row-name {
  font-size: 16px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
.row-sub { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--muted); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

.label { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.st-active { background: #e3f2e8; color: #22603c; }
.st-paused { background: #fbefd5; color: #7a4e00; }
.st-left { background: #efe9e5; color: #5f514a; }
.label.plain { background: var(--card); color: var(--label); border: 1px solid var(--line); font-weight: 700; }
.label.soon { background: var(--peach); color: var(--accent-ink); font-size: 11px; padding: 2px 7px; }

/* ---------- card ---------- */
.head { display: flex; align-items: center; gap: 16px; padding: 12px 20px 0; }
.name { font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.panel { margin: 14px 20px 0; padding: 14px; background: var(--card); border-radius: 18px; border: 1px solid var(--line2); }
.panel-head { display: flex; align-items: center; gap: 8px; }
.panel-head h2 { flex: 1 1 auto; font-size: 16px; font-weight: 800; }
.panel-meta { font-size: 12px; color: var(--muted); }
.clamp3 { margin: 8px 0 0; font-size: 14px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.panel-actions { display: flex; gap: 8px; margin-top: 10px; }
.muted-p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.reports { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 20px 0; }
.report-btn { height: 68px; border: none; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 20px 8px; }
.section-head h2 { font-size: 17px; font-weight: 800; }
.section-head span { font-size: 13px; color: var(--muted); }
.notes { display: flex; flex-direction: column; gap: 10px; padding: 0 20px; }
.note { position: relative; padding: 14px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); transition: opacity 200ms; }
.note-meta { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 12px; color: var(--muted); min-height: 20px; }
.note-meta .who { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-meta .nw { white-space: nowrap; }
.note-edit { margin: -10px -8px -10px auto; width: 40px; height: 40px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; border-radius: 12px; flex: none; }
.note-text { font-size: 14px; color: var(--text2); white-space: pre-wrap; overflow-wrap: anywhere; }
.diagnostic-label { display: inline-block; margin: 0 0 7px; color: #8f350a; background: #fce8de; }
.note-text.clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note-foot { display: flex; gap: 14px; margin-top: 8px; }
.note.pending { opacity: 0.6; }
.note.failed { box-shadow: 0 0 0 1.5px #f2b8b5; }
.note .state { font-size: 12px; font-weight: 700; color: var(--muted); }
.note.failed .state { color: var(--danger); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 0; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--label); margin-bottom: 6px; }
.input { caret-color: var(--accent); width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 16px; -webkit-appearance: none; appearance: none; transition: border-color 150ms; }
.clearable .input { padding-right: 46px; }
.input[type="date"] { padding: 0 10px; min-width: 0; display: flex; align-items: center; }
.input.err, .textarea.err { border-color: var(--danger); }
.field-err { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--danger); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.seg.err { box-shadow: 0 0 0 1px var(--danger); }
.seg button { height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--label); font-size: 14px; font-weight: 600; transition: background-color 180ms var(--ease-out), color 180ms; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.note-form { flex: 1 1 auto; display: flex; flex-direction: column; padding: 14px 20px 0; min-height: 260px; }
.note-fields { display: grid; gap: 12px; padding: 14px 20px 0; }
.textarea { caret-color: var(--accent); flex: 1 1 auto; width: 100%; min-height: 220px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-size: 16px; line-height: 1.5; resize: none; }
.note-scroll { display: flex; flex-direction: column; }

/* ---------- skeleton ---------- */
.skel { position: relative; overflow: hidden; background: #f6e9e1; border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-row { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.skel-line { height: 14px; }

/* ---------- overlays ---------- */
.layer { position: fixed; inset: 0; z-index: 10; }
.backdrop { position: absolute; inset: 0; background: rgba(43, 29, 22, 0.38); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px; max-height: 88%; display: flex; flex-direction: column; background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(43, 29, 22, 0.18); padding-bottom: var(--safe-b); will-change: transform; }
.grab { flex: none; padding: 10px 0 4px; display: flex; justify-content: center; touch-action: none; }
.grab::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: #e2cbbd; }
.sheet-title { flex: none; padding: 6px 20px 4px; font-size: 20px; font-weight: 800; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; }
.sheet-actions .big-btn { box-shadow: none; height: 50px; border-radius: 16px; font-size: 16px; }
.sheet-actions .ghost { background: var(--card); color: var(--label); border: 1px solid var(--line); }
@media (min-width: 720px) {
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; width: 480px; max-height: 80vh; transform: translate(-50%, -50%); border-radius: 22px; padding-bottom: 0; box-shadow: 0 16px 40px rgba(43, 29, 22, 0.25); }
  .sheet .grab { visibility: hidden; padding: 6px 0 0; }
}
.drawer { position: absolute; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); display: flex; flex-direction: column; overflow: hidden; background: var(--card); border-radius: 0 28px 28px 0; box-shadow: 8px 0 30px rgba(43, 29, 22, 0.18); padding: 28px 16px calc(24px + var(--safe-b)); will-change: transform; }
@media (min-width: 641px) {
  /* Overlays live in the same centred column as the stage: drawer, backdrop and sheets never show beyond the app area (user 11-30). */
  .layer { left: 0; right: 0; margin: 0 auto; max-width: 642px; overflow: hidden; overflow: clip; }
  .drawer { left: 1px; }
}
.drawer .flower { position: absolute; right: -70px; bottom: -60px; width: 180px; height: 180px; pointer-events: none; }
.brand { padding: 0 8px 22px; }
.brand b { display: block; font-size: 24px; font-weight: 800; letter-spacing: 0.04em; color: var(--accent); }
.brand span { font-size: 13px; color: var(--muted); }
.nav-item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; padding: 0 12px; border: none; border-radius: 16px; background: transparent; text-align: left; font-size: 16px; font-weight: 700; }
.nav-item[aria-current="page"] { background: var(--peach); color: var(--accent-ink); font-weight: 800; }
.nav-item .label { margin-left: auto; }
.dev { position: relative; margin-top: auto; padding: 12px 8px 0; }
.dev .field-label { font-size: 12px; }

.versions { display: flex; flex-direction: column; gap: 10px; }
.version { padding: 12px 14px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.version.current { box-shadow: 0 0 0 1.5px var(--focus); }
.version-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.version-meta b { color: var(--text); font-size: 13px; }
.version .small-btn { margin-top: 10px; }
.full-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; color: var(--text2); }
.instruction-text { margin: 12px 20px 0; padding: 16px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.instruction-edit { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px 20px calc(16px + var(--safe-b)); }
.instruction-edit .textarea { min-height: 0; }
.instruction-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 0; }
.account-row { align-items: flex-start; flex-direction: column; gap: 8px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hidden-accounts { margin-top: 16px; }
.hidden-accounts summary { padding: 8px 20px; color: var(--label); font-weight: 700; cursor: pointer; }
select.input { appearance: auto; }

.specialist-card { padding-bottom: calc(20px + var(--safe-b)); }
.specialist-head { flex-wrap: wrap; }
.specialist-head .grow { min-width: 0; }
.specialist-head .label.plain { max-width: 100%; overflow-wrap: anywhere; }
.specialist-empty { padding: 12px 20px 18px; }
.specialist-note-form .note-fields, .specialist-note-form .note-form { padding-inline: 0; }
.specialist-note-form .note-form { min-height: 0; }
.specialist-note-form .textarea { min-height: 130px; }
.attendance-body { display: grid; gap: 12px; }
.attendance-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.attendance-nav button, .attendance-help { min-width: 40px; min-height: 36px; }
.attendance-nav button { font-size: 22px; line-height: 1; }
.attendance-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.attendance-weekday { font-size: 12px; color: var(--muted); font-weight: 800; padding-bottom: 2px; }
.attendance-day { display: grid; align-content: center; justify-items: center; min-height: 44px; padding: 2px 0; border: 1px solid transparent; border-radius: 10px; background: var(--bg); font-size: 13px; font-weight: 800; line-height: 1.12; }
.attendance-day[data-mark="worked"] { background: #e3f4e9; }
.attendance-day[data-mark="late"] { background: #e4efff; }
.attendance-day[data-mark="absent"] { background: #fae7e6; }
.attendance-day[data-mark="excused"] { background: #f9efcf; }
.attendance-day[aria-current="date"] { border-color: var(--focus); }
.attendance-day:disabled { opacity: .5; cursor: default; }
.attendance-pad { min-height: 44px; }
.attendance-symbol { min-height: 15px; font-size: 15px; font-weight: 900; line-height: 15px; }
[data-mark="worked"] .attendance-symbol, .attendance-symbol[data-mark="worked"] { color: #216340; }
[data-mark="late"] .attendance-symbol, .attendance-symbol[data-mark="late"] { color: #164a88; }
[data-mark="absent"] .attendance-symbol, .attendance-symbol[data-mark="absent"] { color: #a12520; }
[data-mark="excused"] .attendance-symbol, .attendance-symbol[data-mark="excused"] { color: #815800; }
.attendance-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text2); }
.attendance-legend span span { display: inline-block; min-width: 14px; }
.attendance-bulk { justify-self: start; min-height: 40px; text-align: left; }

.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(100px + var(--safe-b)); z-index: 20; display: flex; align-items: center; gap: 8px; max-width: min(calc(100vw - 40px), 600px); padding: 10px 16px; border-radius: 14px; background: var(--text); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(43, 29, 22, 0.25); pointer-events: none; }
.fatal { padding: 48px 28px; text-align: center; color: var(--muted); }
.fatal b { display: block; font-size: 18px; color: var(--text); margin-bottom: 6px; }
.envtag { position: fixed; right: 8px; bottom: calc(6px + var(--safe-b)); z-index: 5; font-size: 10px; font-weight: 800; color: var(--accent-ink); background: var(--peach); padding: 1px 6px; border-radius: 6px; pointer-events: none; opacity: 0.8; }
@media (min-width: 641px) { .envtag { right: max(8px, calc(50% - 313px)); } } /* inside the 642 px column: 321 px half-width - 8 px */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* phase 3: anketa (Sheet linking) */
.cands { display: flex; flex-direction: column; gap: 8px; }
.cand { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out); }
.cand.on { background: var(--peach); border-color: var(--focus); }
.cand input { width: 20px; height: 20px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.cand-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cand-top { display: flex; gap: 8px; align-items: center; }
.cand-name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.cand-sub { font-size: 12px; color: var(--muted); }
.cand-prev { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.cand-note { font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.sheet-box h2 { font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.sheet-lead { font-size: 14px; margin: 0 0 12px; line-height: 1.4; }
.qa { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.qa dt { font-size: 12px; font-weight: 700; color: var(--label); }
.qa dd { margin: 2px 0 0; font-size: 14px; color: var(--text2); white-space: pre-wrap; overflow-wrap: anywhere; }
.qa.full dd { font-size: 15px; }
.qa.diff dd + dd { margin-top: 0; }
.qa .was { text-decoration: line-through; color: var(--muted2); }
.notice { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fbefd5; color: #7a4e00; font-size: 13px; font-weight: 600; line-height: 1.35; }
.linked-form { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.linked-form b { font-size: 15px; }

.report-list-link { display: flex; justify-content: flex-end; margin: 8px 20px 0; }
.report-form { display: grid; gap: 14px; margin: 14px 20px 24px; }
.sheet .report-form { margin: 0; }
.report-form .muted-p { margin: 0; }
.report-form .textarea { min-height: 90px; }
.report-form .full-text { margin: 0; overflow-wrap: anywhere; }
.report-form .report-range .muted-p { margin-top: 8px; }
.report-form .full-text mark { background: #FADBCB; color: var(--text); }
.report-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.report-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer; }
.report-check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #B84A13; }
.report-instruction summary { min-height: 36px; cursor: pointer; font-weight: 700; }
.report-history { padding-bottom: 20px; }
.report-row { display: grid; gap: 7px; }
.report-row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.report-name { min-width: 0; overflow-wrap: anywhere; }
.report-by { overflow-wrap: anywhere; }
.report-row-head .label { flex-shrink: 0; }
.report-row .hint, .report-row .muted-p { margin: 0; }
.report-row .small-btn { justify-self: start; }
.report-more { display: block; margin: 16px auto; }

/* Owner test bank and trial */
.test-inset { padding: 12px 20px 0; }
.test-stack, .test-actions, .test-panel { display: grid; gap: 10px; }
.test-actions { margin: 14px 20px 0; }
.test-actions .ghost, .test-footer .ghost, .test-stack .ghost { background: var(--card); color: var(--label); border: 1px solid var(--line); box-shadow: none; }
.test-wrap, .test-panel { overflow-wrap: anywhere; }
.test-panel h2 { font-size: 18px; }
.test-panel p, .trial-result p, .trial-answer p { margin: 0; }
.test-preview, .test-guide { padding: 14px; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; }
.test-guide .test-code { margin-top: 10px; padding: 12px; background: var(--bg); border-radius: 12px; }
.test-code { font-family: ui-monospace, monospace; }
.test-upload .textarea { min-height: 150px; }
.test-file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.test-file-control { position: relative; min-height: 44px; }
.test-file-control:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.test-file-control:has(:disabled) { opacity: 0.6; }
.test-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.test-sections, .test-counts, .trial-order { list-style: none; padding: 0; margin: 0; }
.test-sections li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line2); }
.test-sections .sub { flex: none; }
.test-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.test-counts li { padding: 3px 8px; border-radius: 10px; background: var(--peach); color: var(--label); font-size: 13px; }
.test-preview > ul:not([class]) { margin: 0; padding-left: 20px; color: var(--danger); }
.test-footer { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.test-footer .big-btn { font-size: clamp(12px, 4vw, 16px); }
.test-save { padding: 5px 20px; overflow-wrap: anywhere; }
.test-save:not([hidden]) + .test-footer { margin-top: 0; }
.test-save .small-btn { margin-inline-start: 8px; }
.row-sub.test-wrap { white-space: normal; }

.owner-stats-period { margin: 12px 20px; }
.owner-stats-table { margin: 0 20px; overflow-x: auto; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); }
.owner-stats-table:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.owner-stats-table table { width: 100%; min-width: 530px; border-collapse: collapse; text-align: center; }
.owner-stats-table thead { background: var(--peach); color: var(--label); }
.owner-stats-table th, .owner-stats-table td { padding: 0 8px; }
.owner-stats-table th:first-child { width: 29%; text-align: left; }
.owner-stats-table button { padding: 8px 4px; min-height: 44px; border: 0; background: transparent; font-weight: 800; }
.owner-stats-table thead button { white-space: nowrap; }
.owner-stats-table [aria-sort] { color: var(--accent-ink); }
.owner-stats-table thead button span:not(:empty) { margin-inline-start: 4px; }
.owner-stats-table tbody tr { border-top: 1px solid var(--line2); cursor: pointer; }
.owner-stats-table tbody tr:hover, .owner-stats-table tbody tr:focus-within { background: var(--bg); }
.owner-stats-table tbody button { text-align: left; overflow-wrap: anywhere; }
.owner-stats-table td { font-variant-numeric: tabular-nums; }
.owner-stats-table small { display: block; color: var(--muted); white-space: nowrap; }

.trial-progress { display: grid; gap: 6px; padding: 10px 20px 0; }
.trial-progress-line { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.trial-progress progress { width: 100%; height: 5px; border: 0; border-radius: 6px; background: var(--flower); color: var(--accent); overflow: hidden; }
.trial-progress progress::-webkit-progress-bar { background: var(--flower); }
.trial-progress progress::-webkit-progress-value { background: var(--accent); }
.trial-progress progress::-moz-progress-bar { background: var(--accent); }
.trial-section { padding: 18px 20px 0; color: var(--accent-ink); font-size: 17px; font-weight: 800; text-transform: uppercase; }
.trial-card { display: grid; gap: 12px; margin-top: 10px; }
.trial-card-meta, .trial-range-ends { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trial-badge, .trial-points { padding: 4px 10px; color: var(--accent-ink); background: var(--peach); border-radius: 10px; font-size: 13px; font-weight: 800; }
.trial-question { font-size: 18px; font-weight: 800; white-space: pre-wrap; }
.trial-options, .trial-order, .trial-match-row { display: grid; gap: 8px; }
.trial-option { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 12px; }
.trial-option:has(input:checked) { background: var(--peach); border-color: var(--focus); }
.trial-option input { margin: 0; width: 17px; height: 17px; flex: none; }
.trial-option input, .trial-range input { accent-color: var(--accent); }
.trial-letter { flex: none; font-weight: 800; color: var(--accent-ink); }
.trial-order-row .small-btn { padding: 0 8px; min-width: 36px; }
.trial-order-row .small-btn:disabled { opacity: 0.45; }
.trial-match-row select { appearance: auto; }
.trial-range-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.trial-range-row input { display: block; width: 100%; height: 44px; margin: 0; }
.trial-range-row .small-btn { min-width: 44px; height: 44px; font-size: 18px; }
.trial-range-row .small-btn:disabled { opacity: 0.45; }
.trial-range-ends span { overflow-wrap: anywhere; min-width: 0; }
.trial-range-ends span:last-child { text-align: right; }
.trial-result { gap: 2px; }
.trial-total { color: var(--accent-ink); font-size: 24px; font-weight: 800; overflow-wrap: anywhere; }
.trial-answer-meta { color: var(--accent-ink); font-weight: 800; }
.timing-notice { margin: 0; font-size: 13px; }
.timing-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.timing-badge { padding: 2px 8px; border-radius: 8px; font-size: 13px; font-weight: 800; color: var(--danger); background: rgba(179, 38, 30, 0.1); }
.timing-badge.soft { color: var(--muted); background: var(--bg); }
.timing-flag { color: var(--danger); font-weight: 700; }
.trial-answer.flagged { border-left: 4px solid var(--danger); }

.staff-report-body { display: grid; justify-items: start; gap: 10px; padding: 0 20px 24px; }
.staff-report-body > .skel-row { width: 100%; margin-inline: 0; }
.staff-report-body p { margin: 0; }
.staff-report-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* owner #6 requirements */
.req-row { flex-direction: column; align-items: stretch; gap: 10px; }
.req-text { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.req-actions, .req-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.req-actions .small-btn[disabled], .req-buttons .small-btn[disabled] { opacity: 0.5; }
.req-input { min-height: 96px; }
.req-panel, .req-form { display: grid; gap: 14px; }
.req-item { display: grid; gap: 8px; }
.req-panel .muted-p { margin: 0; }
.req-history { display: grid; gap: 10px; margin: 12px 20px 0; }
.req-history-title { font-size: 15px; font-weight: 800; }
.req-entry { padding: 12px 14px; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; font-size: 13px; overflow-wrap: anywhere; }
.req-entry ul { margin: 6px 0 0; padding-left: 18px; }
.req-entry-head { color: var(--muted); }
.req-entry-head b { color: var(--text); }
.req-change { margin: 6px 0 0; color: var(--muted); }
.req-history > .small-btn { justify-self: start; }
/* Owner #7 «Должность» next to the name */
.row-pos { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specialist-position { margin-top: 2px; font-weight: 600; }
