/* Светло-коричневая палитра, как у портала «Личности кинематографа». Шрифт Tilda Sans (OFL, ParaType) лежит в static/fonts. */
@font-face { font-family: "Tilda Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/tilda-sans-400.d9f7fa56b701.woff2") format("woff2"); }
@font-face { font-family: "Tilda Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/tilda-sans-500.7b1f81377019.woff2") format("woff2"); }
@font-face { font-family: "Tilda Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/tilda-sans-600.763db98a7338.woff2") format("woff2"); }
@font-face { font-family: "Tilda Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/tilda-sans-700.25dc58a63430.woff2") format("woff2"); }
:root {
  /* палитра: основной тёмный #171B26 (шапка), активный элемент #2B3242, фон страниц #F5F6F8, акцентный голубой #8CA9E8 */
  --dark: #171b26; --dark-active: #2b3242; --dark-ink: #ffffff; --dark-muted: #a9b1c2;
  --bg: #f5f6f8; --card: #ffffff; --card-2: #f0f2f6; --ink: #171b26; --ink-2: #2b3242; --muted: #5f6878; --line: #e1e4ea;
  /* голубой #8CA9E8 светлый: на нём тёмный текст, а для ссылок на белом — тот же тон, только темнее, иначе не читается */
  --accent: #3b5ca6; --accent-bg: #8ca9e8; --accent-bg-hover: #7493db; --accent-hover: #2b467f; --accent-solid: #8ca9e8; --accent-ink: #171b26;
  --accent-soft: rgba(140, 169, 232, .22);
  --amber: #8ca9e8; --amber-soft: #e6ecfa; --amber-ink: #2b3242;
  --ok: #3f7a4c; --ok-soft: #e3f1e6; --warn: #8a5a12; --warn-soft: #f8eedb;
  --bad: #b23a3a; --bad-soft: #f9e2e2;
  --field-bg: #ffffff; --field-line: #c9cfdb; --neutral-soft: #eceff4; --out-ink: #a3aab8;
  --radius: 14px; --shadow: 0 1px 2px rgba(23, 27, 38, .05), 0 6px 20px rgba(23, 27, 38, .06);
  --serif: "Tilda Sans", "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: "Tilda Sans", "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 16px/1.55 var(--sans);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }
h1 { font-size: 2rem; margin: 0 0 1rem; line-height: 1.2; }
h2 { font-size: 1.35rem; margin: 1.75rem 0 .85rem; line-height: 1.25; }
h3 { font-size: 1.1rem; margin: 1rem 0 .5rem; line-height: 1.3; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }

/* шапка */
header.top { position: sticky; top: 0; z-index: 40; background: var(--dark); color: var(--dark-ink); }
header.top .container { display: flex; align-items: center; gap: 16px; min-height: 74px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--dark-ink); text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand:hover { color: var(--dark-ink); }
.brand-logo { flex: none; width: 64px; height: 52px; background: #fff; border-radius: 4px; display: grid; place-items: center; }
.brand-logo img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 540px; }
.brand-title { font: 700 15px/1.3 var(--sans); letter-spacing: .02em; }
.brand-tagline { font-size: 14px; color: var(--dark-muted); }
nav.main { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
nav.main a, nav.main button.link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .95rem; font-weight: 600; transition: color .15s, background .15s; }
nav.main a:hover, nav.main button.link:hover { background: var(--neutral-soft); color: var(--ink); }
nav.main a.active { background: var(--dark-active); color: var(--dark-ink); }
header.top nav.main a, header.top nav.main button.link { color: var(--dark-ink); }
header.top nav.main a:hover, header.top nav.main button.link:hover, header.top nav.main a.active { background: var(--dark-active); color: var(--dark-ink); }
.nav-sep { width: 1px; height: 32px; background: rgba(255, 255, 255, .18); margin: 0 10px; }
@media (max-width: 760px) {
  .brand-tagline { display: none; }
  .brand-title { font-size: 12px; line-height: 1.3; letter-spacing: .01em; }
  .brand-logo { width: 48px; height: 40px; }
  .brand-logo img { height: 34px; }
  nav.main a, nav.main button.link { padding: 7px 10px; font-size: .9rem; }
  .nav-sep { display: none; }
}

/* кабинет абитуриента: меню слева */
.container.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.app-side { position: sticky; top: 104px; display: grid; gap: 18px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.side-user:hover { color: var(--ink); border-color: var(--field-line); }
.side-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--amber-soft); color: var(--ink-2); display: grid; place-items: center; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-user-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.side-user-id { font-size: .8rem; color: var(--muted); }
.side-chevron { color: var(--muted); flex: none; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.side-nav a .icon { color: var(--ink-2); }
.side-nav a:hover { background: var(--neutral-soft); color: var(--ink); }
.side-nav a.active { background: var(--amber-soft); color: var(--ink); font-weight: 700; }
.app-main.narrow { max-width: 760px; }
.container:not(.app) > .app-main.narrow { max-width: 680px; margin: 0 auto; }
@media (max-width: 900px) {
  .container.app { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .app-side { position: static; }
  .side-nav { display: none; }
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { font-size: 2.4rem; font-weight: 700; margin-bottom: 1.25rem; }
.section-title { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; }
@media (max-width: 640px) { .page-title { font-size: 1.7rem; } .section-title { font-size: 1.2rem; } }

/* вкладки */
/* Вкладки прокручиваются по горизонтали на узком экране, но без видимой полосы прокрутки.
   Линия снизу — тенью, чтобы активная вкладка не выходила за край и не вызывала вертикальную прокрутку. */
.tabs { display: flex; gap: 8px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 28px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 1.05rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent-bg); }
.tabs .count { min-width: 28px; padding: 1px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--ink-2); font-size: .85rem; text-align: center; }
.tabs a.active .count { background: var(--accent-bg); color: #fff; }

/* информационная плашка */
.info-panel { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: var(--amber-soft); border: 1px solid #d6e0f6; border-radius: var(--radius); flex-wrap: wrap; }
.info-panel > div { flex: 1 1 240px; min-width: 0; }
.info-icon { flex: none; color: var(--accent); display: inline-flex; }
.info-title { font-weight: 700; margin-bottom: 4px; }
.info-panel .btn { display: inline-flex; align-items: center; gap: 6px; }

main { padding: 32px 0 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
/* ячейка с кнопками: flex внутри ячейки, а не на самой td, иначе таблица теряет выравнивание строк */
td.actions { white-space: nowrap; }
td.actions > .row { flex-wrap: nowrap; justify-content: flex-end; }
.spacer { flex: 1; }

/* кнопки */
.btn { display: inline-block; border: 1px solid transparent; background: var(--accent-bg); color: var(--accent-ink); padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-bg-hover); color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--accent-hover); border-color: var(--field-line); }
.btn.secondary:hover { background: var(--amber-soft); color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--neutral-soft); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { background: #962f2f; color: #fff; }
.btn.small { padding: 5px 10px; font-size: .875rem; }
.btn.outline, .btn.outline-bad { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--card); border-radius: 10px; font-weight: 600; padding: 12px 18px; }
.btn.outline { color: var(--accent-hover); border-color: var(--accent-bg); }
.btn.outline:hover { background: var(--amber-soft); color: var(--accent-hover); }
.btn.outline-bad { color: var(--bad); border-color: #e9a3a3; }
.btn.outline-bad:hover { background: var(--bad-soft); color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
form.inline { display: inline; }

/* формы */
.field { margin-bottom: 14px; }
.field > label, .field .label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field input[type=time],
.field input[type=number], .field input[type=tel], .field input:not([type]), .field select, .field textarea, input.search,
.audit-filters input:not([type=hidden]), .audit-filters select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--field-line); border-radius: 12px; font: inherit; background: var(--field-bg); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, input.search:focus, .audit-filters input:focus, .audit-filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .help { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.field .errors { color: var(--bad); font-size: .875rem; margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.field ul.choices, .field div[id$="gender"], .field div[id$="doc_type"] { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.field div[id$="gender"] > div, .field div[id$="doc_type"] > div { display: flex; }
.field.checkbox { display: flex; gap: 8px; align-items: flex-start; }
.field.checkbox label { font-weight: 400; margin: 0; }
.field.checkbox input { margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-family: var(--serif); font-weight: 600; padding: 0 6px; }
.form-errors { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.hidden { display: none !important; }

/* сообщения */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; background: var(--accent-soft); }
.messages li.success { background: var(--ok-soft); color: var(--ok); }
.messages li.error { background: var(--bad-soft); color: var(--bad); }
.messages li.warning, .messages li.info { background: var(--warn-soft); color: var(--warn); }

/* метки */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; background: var(--neutral-soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* таблицы */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: transparent; font-size: .925rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 600; }
table.data tr.has-active td { background: var(--accent-soft); }
.legend-active { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--line); vertical-align: -1px; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--neutral-soft); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--accent-solid); }

/* каталог */
.faculty { margin-bottom: 24px; }
.faculty > h2 { margin-top: 0; }
.direction { margin: 0 0 12px; }
.direction h3 { color: var(--muted); font-weight: 600; font-size: .95rem; }
.workshop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.workshop-list a.ws { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; }
.workshop-list a.ws:hover { border-color: var(--accent); background: var(--card-2); }
.workshop-list .ws-name { font-weight: 600; }
.workshop-list .ws-dates { display: block; margin-top: 2px; }
.workshop-list .ws-date { display: block; white-space: nowrap; line-height: 1.6; }
@media (max-width: 640px) {
  .workshop-list a.ws { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* карточка мастерской */
@media (max-width: 640px) {
  .gallery { margin-bottom: 16px; }
  .gallery .hero { aspect-ratio: 16/9; max-height: 28vh; border-radius: 12px; }
  .gallery .thumbs img { width: 64px; height: 44px; }
  .ws-header h1 { font-size: 1.4rem; }
}
.description { white-space: pre-line; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 .7em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose h2, .prose h3, .prose h4 { margin: 1em 0 .4em; font-size: 1.1rem; }
.prose blockquote { border-left: 3px solid var(--line); padding-left: 12px; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }

/* инструкции */
.guide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.guide-toc { position: sticky; top: 16px; }
.guide-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: .95rem; }
.guide-toc a { color: var(--ink); text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.guide-text { max-width: 820px; line-height: 1.55; }
.guide-text h2 { font-size: 1.35rem; margin: 1.6em 0 .6em; padding-top: .2em; scroll-margin-top: 16px; }
.guide-text h2:first-of-type { margin-top: 1.2em; }
.guide-text li { margin-bottom: .3em; }
.guide-text li > ul { margin: .3em 0 0; }
.guide-text code { background: var(--neutral-soft); padding: 1px 5px; border-radius: 4px; font-size: .92em; white-space: nowrap; }
@media (max-width: 1000px) {
  .guide { grid-template-columns: 1fr; }
  .guide-toc { position: static; }
}

/* календарь */
@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .card { padding: 14px; }
}

/* мои записи */
.booking-item { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.countdown { font-weight: 700; color: var(--accent); }
.bk { display: grid; grid-template-columns: 100px minmax(0, 1fr) 220px; gap: 24px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.bk-date { background: var(--card-2); border-radius: 10px; padding: 12px 6px; text-align: center; line-height: 1.25; }
.bk-day { font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
.bk-month, .bk-year { font-weight: 600; }
.bk-wd { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.bk-time { color: var(--ink-2); margin-top: 4px; }
.bk-body { border-left: 1px solid var(--line); padding-left: 24px; min-height: 100%; }
.bk-meta { font-size: .9rem; color: var(--muted); }
.bk-title { font-size: 1.3rem; font-weight: 700; margin: 4px 0 8px; }
.bk-place { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.bk-place .icon { flex: none; margin-top: 2px; color: var(--muted); }
.bk-note { display: flex; gap: 14px; align-items: center; background: var(--card-2); border-radius: 8px; padding: 12px 16px; font-size: .9rem; }
.bk-note .icon { flex: none; color: var(--ink-2); }
.bk-actions { display: grid; gap: 10px; }
.bk-actions form { display: grid; }
.bk-actions .countdown { text-align: center; }
@media (max-width: 900px) {
  .bk { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .bk-body { padding-left: 16px; }
  .bk-actions { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .bk-day { font-size: 1.7rem; }
}

/* дашборд */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .value { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .85rem; }
.chart-box { position: relative; height: 260px; }

/* cookie */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(23, 27, 38, .15); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 50; }
.cookie-banner a { color: var(--accent); }
.cookie-banner .cookie-text { flex: 1 1 320px; }
.cookie-banner .cookie-text p { margin: 4px 0 0; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.footer-cookie-settings { color: inherit; font: inherit; text-align: left; }
footer.bottom { background: #eceef2; margin-top: 24px; padding: 36px 0 28px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-grid > div + div { border-left: 1px solid var(--line); padding-left: 36px; }
.footer-brand { display: flex; gap: 18px; align-items: flex-start; }
.footer-brand img { flex: none; height: 52px; width: auto; }
.footer-name { color: var(--ink); font-weight: 700; font-size: .85rem; line-height: 1.35; letter-spacing: .02em; margin-bottom: 6px; }
.footer-title { color: var(--ink); font-weight: 700; margin-bottom: 12px; }
.footer-line { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); margin-bottom: 10px; line-height: 1.45; }
.footer-line .icon { flex: none; margin-top: 1px; color: var(--ink-2); }
.footer-line a { color: var(--ink); text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }
.footer-legal { display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: baseline; justify-content: space-between; padding-top: 20px; }
.footer-legal > span:first-child { flex: 1 1 320px; }
.footer-links { display: flex; gap: 10px 28px; flex-wrap: wrap; }
.footer-legal a { color: var(--ink-2); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div + div { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; gap: 14px; }
  .footer-legal > span:first-child { flex: none; }
  .footer-links { flex-direction: column; gap: 10px; }
}
.inactive-list .booking-item { opacity: .65; }
.nowrap { white-space: nowrap; }
.site-notice { background: var(--amber-soft); color: var(--amber-ink); font-size: .9rem; font-weight: 600; text-align: center; padding: 8px 0; line-height: 1.4; }
@media (max-width: 560px) {
  .bk { grid-template-columns: minmax(0, 1fr); }
  .bk-date { display: flex; gap: 6px; align-items: baseline; justify-content: center; flex-wrap: wrap; padding: 8px 12px; }
  .bk-day { font-size: 1.3rem; }
  .bk-wd, .bk-time { margin-top: 0; }
  .bk-body { border-left: 0; padding-left: 0; }
  .bk-actions .countdown { grid-column: 1 / -1; }
}

/* прошедшие и отменённые записи */
.bk-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.bk-row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bk-row .bk-title { font-size: 1.15rem; margin: 6px 0 10px; }
.bk-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; }
.bk-line .icon { flex: none; margin-top: 2px; color: var(--ink-2); }
.badge.ok, .badge.bad { font-weight: 600; padding: 3px 10px; }
.empty-state { text-align: center; padding: 40px 16px 48px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-icon { display: inline-flex; color: var(--ink-2); margin-bottom: 10px; }
.empty-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.empty-state p { margin: 0 0 18px; }
.btn.dark { display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: #fff; font-weight: 600; }
.btn.dark:hover { background: var(--dark-active); color: #fff; }

/* список мастерских */
.info-panel.compact { padding: 16px 20px; margin-bottom: 20px; }
.ws-group { margin-bottom: 28px; }
.ws-group-title { color: var(--muted); font-size: 1.05rem; margin: 0 0 14px; }
.ws-card { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 28px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ws-photo { position: relative; z-index: 1; cursor: pointer; width: 100%; align-self: center; min-width: 0; display: grid; place-items: center; aspect-ratio: 230 / 146; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #e3e7ef, #d3d9e5); color: #b7c0d0; }
.ws-photo:hover { color: #9aa5b8; }
.ws-photo:focus-visible { outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.ws-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ws-photo:hover img { transform: scale(1.04); }
.ws-photo img, .ws-photo svg { pointer-events: none; }
.ws-photo-empty { width: 45%; height: auto; stroke-width: 1.2; }
.ws-info { padding: 6px 0; min-width: 0; }
.ws-title { font-size: 1.3rem; font-weight: 700; margin: 2px 0 8px; }
.ws-title a { color: var(--ink); text-decoration: none; }
.ws-title a:hover { text-decoration: underline; }
.ws-rank { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--amber-soft); color: var(--accent); font-size: .9rem; font-weight: 500; }
.ws-lines { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 6px; }
.ws-lines .bk-line { color: var(--ink-2); font-size: .95rem; }
.ws-lines a { color: var(--accent); }
.ws-action { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 10px; text-align: center; border-left: 1px solid var(--line); padding: 8px 10px 8px 28px; }
.btn.primary-strong { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: #4f7fe0; color: #fff; border-radius: 10px; padding: 14px 18px; font-weight: 700; }
.btn.primary-strong:hover { background: #3b6bd0; color: #fff; }
.btn.disabled { background: var(--neutral-soft); color: var(--muted); border-radius: 10px; padding: 14px 18px; cursor: default; }
.btn.disabled:hover { background: var(--neutral-soft); color: var(--muted); }
@media (max-width: 1000px) {
  .ws-card { grid-template-columns: 180px minmax(0, 1fr); }
  .ws-action { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 4px; }
}
@media (max-width: 560px) {
  .ws-card { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ws-photo { aspect-ratio: 16 / 9; }
}

/* страница мастерской */
.icon.flip { transform: rotate(180deg); }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.wd-head { display: grid; gap: 24px; align-items: start; margin-bottom: 18px; }
.wd-head.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wd-title { font-size: 2rem; font-weight: 700; margin: 4px 0 10px; }
.wd-photo img#hero { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; border-radius: var(--radius); display: block; }
.hero-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.hero-zoom:focus-visible { outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.lightbox { max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(10, 12, 18, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 12, 18, .6); }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 6px; cursor: zoom-out; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 64px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button.active { border-color: var(--accent-bg); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-info { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.wd-info > .card { margin-bottom: 0; }
.wd-info > .card:only-child { grid-column: 1 / -1; }
.card-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 10px; }
.clamp { max-height: 4.9em; overflow: hidden; }
.clamp.open { max-height: none; }
.clamp > :first-child { margin-top: 0; }
.link-more { background: none; border: 0; padding: 0; margin-top: 10px; font: inherit; font-weight: 500; color: var(--accent); cursor: pointer; }
.wd-contacts .bk-line { margin-bottom: 12px; color: var(--ink-2); }
.btn.small-pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-color: var(--line); color: var(--ink); font-weight: 500; }
.status-bar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--neutral-soft); margin: 16px 0; }
.status-bar .icon { flex: none; }
.status-bar.ok { background: var(--ok-soft); color: var(--ok); }
.status-bar.ok a { color: var(--accent); }
.status-bar.warn { background: var(--warn-soft); color: var(--warn); }
.wd-schedule { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-top: 16px; }
.wd-schedule > .card { margin-bottom: 0; }
.cal-head { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-head p { margin: 0; }
.cal-legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: auto auto; gap: 6px 18px; font-size: .8rem; color: var(--ink-2); }
.cal-legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.mine { background: var(--accent-bg); }
.dot.free { background: #3fae5d; }
.dot.full { background: #f2b33d; }
.dot.off { background: #c9cfdb; }
.cal-nav { display: flex; align-items: center; gap: 6px; margin: 14px 0 10px; }
.cal-nav button { background: none; border: 0; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--ink); display: inline-flex; }
.cal-nav button:hover:not([disabled]) { background: var(--neutral-soft); }
.cal-nav button[disabled] { color: var(--out-ink); cursor: default; }
.cal-title { font-weight: 700; font-size: 1.1rem; margin-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: .85rem; color: var(--ink-2); padding: 4px 0; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 600; color: var(--ink); }
button.cal-day { cursor: pointer; }
button.cal-day:hover { border-color: var(--accent-bg); }
.cal-day i { width: 6px; height: 6px; border-radius: 50%; margin-top: 2px; }
.cal-day.free i { background: #3fae5d; }
.cal-day.full, .cal-day.full_closed { background: #fdf3df; border-color: #fdf3df; }
.cal-day.full i, .cal-day.full_closed i { background: #f2b33d; }
.cal-day.waiting_mine { background: #fdf3df; border-color: #f2b33d; }
.cal-day.waiting_mine i { background: #f2b33d; }
.cal-day.mine { background: #6f95e6; border-color: #6f95e6; color: #fff; }
.cal-day.mine i { background: #fff; }
.cal-day.empty, .cal-day.out, .cal-day.past, .cal-day.not_open, .cal-day.closed { background: var(--card-2); border-color: var(--card-2); color: var(--out-ink); font-weight: 500; }
.cal-day.out { opacity: .6; }
.cal-day.selected { box-shadow: 0 0 0 3px rgba(79, 127, 224, .35); border-color: #4f7fe0; }
.day-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 16px; }
.tour-box + .tour-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.note-box { display: flex; gap: 12px; padding: 14px; border-radius: 10px; background: var(--card-2); font-size: .9rem; margin-bottom: 10px; }
.note-box .icon { flex: none; color: var(--accent); }
.note-box.accent { background: var(--amber-soft); }
.note-box.accent b { color: var(--accent); }
.note-box.warn { background: var(--warn-soft); }
.note-box.warn .icon { color: var(--warn); }
.tour-facts { margin: 0 0 14px; }
.tour-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tour-facts dt { display: flex; gap: 12px; align-items: center; color: var(--ink-2); }
.tour-facts dd { margin: 0; font-weight: 700; font-size: 1.15rem; }
.tour-facts dd .badge { font-size: .85rem; }
.tour-actions { display: grid; gap: 8px; }
.tour-actions .btn { width: 100%; }
.tour-actions-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.btn.outline-bad .icon, .btn.outline .icon { flex: none; }
@media (max-width: 1100px) {
  .wd-schedule { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wd-head.has-photo, .wd-info { grid-template-columns: minmax(0, 1fr); }
  .wd-photo { order: -1; }
  .wd-title { font-size: 1.5rem; }
  .cal-legend { grid-template-columns: 1fr 1fr; }
  .cal-day { height: 40px; }
}

/* фильтры журнала */
.audit-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; margin-bottom: 8px; }
.audit-filters label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); min-width: 0; }
.audit-filters input, .audit-filters select { width: 100%; min-width: 0; font: inherit; }
.audit-filter-actions { display: flex; gap: 8px; }

/* окно подтверждения записи и отмены */
.cdlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 28px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(23, 27, 38, .25); }
.cdlg::backdrop { background: rgba(23, 27, 38, .45); }
.cdlg[open] { display: grid; gap: 20px; }
.cdlg-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.cdlg-icon { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; }
.cdlg-icon.cancel { background: var(--bad-soft); color: var(--bad); }
.cdlg-icon.book { background: var(--amber-soft); color: #4f7fe0; }
.cdlg-title { margin: 0 0 6px; font-size: 1.45rem; font-weight: 700; }
.cdlg-sub { margin: 0; color: var(--muted); }
.cdlg-x { align-self: start; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.cdlg-x:hover { color: var(--ink); }
.cdlg-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.cdlg-date { background: var(--amber-soft); border-radius: 10px; padding: 16px 8px; text-align: center; align-self: start; }
.cdlg-day { font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.cdlg-month { font-weight: 600; line-height: 1.35; margin-top: 4px; }
.cdlg-month span { display: block; }
.cdlg-wd { color: var(--muted); margin-top: 12px; font-size: .95rem; }
.cdlg-label { color: var(--muted); font-size: .85rem; }
.cdlg-name { font-size: 1.15rem; font-weight: 700; margin: 2px 0 8px; }
.cdlg-info hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.cdlg-row { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); margin-top: 8px; }
.cdlg-row .icon { flex: none; color: var(--muted); margin-top: 1px; }
.cdlg-note { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: 12px; }
.cdlg-note b { display: block; margin-bottom: 4px; }
.cdlg-note span { color: var(--ink-2); }
.cdlg-note .icon { flex: none; }
.cdlg-note.warn { background: #fdf3e2; border: 1px solid #f3dfb8; }
.cdlg-note.warn .icon { color: #d39a1e; }
.cdlg-note.ok { background: var(--ok-soft); }
.cdlg-note.ok .icon { color: var(--ok); }
.cdlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cdlg-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; border-radius: 10px; font-weight: 600; width: 100%; }
@media (max-width: 560px) {
  .cdlg { padding: 20px 16px; }
  .cdlg-head { gap: 14px; align-items: start; }
  .cdlg-icon { width: 56px; height: 56px; }
  .cdlg-icon .icon { width: 26px; height: 26px; }
  .cdlg-title { font-size: 1.2rem; }
  .cdlg-card { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .cdlg-date { display: flex; gap: 10px; align-items: baseline; justify-content: center; }
  .cdlg-month span { display: inline; }
  .cdlg-wd { margin-top: 0; }
  .cdlg-actions { grid-template-columns: 1fr; }
  .cdlg-actions .cdlg-go { order: -1; }
}
.bk-note.passed { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.bk-note.passed .icon { color: var(--ok); }

/* внесение результатов прослушивания */
.rs-day { margin-bottom: 22px; }
.rs-day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.rs-day-head h3 { margin: 0; }
.rs-list { display: grid; gap: 8px; }
.rs-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 160px 18px; gap: 16px; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; }
.rs-row:hover { border-color: var(--accent); background: var(--card-2); color: var(--ink); }
.rs-time { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.rs-ws { min-width: 0; }
.rs-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-progress { display: grid; gap: 4px; justify-items: start; }
.rs-progress .bar { width: 100%; }
.bar.pass > span { background: var(--ok); }
.rs-chev { color: var(--muted); }
@media (max-width: 760px) {
  .rs-row { grid-template-columns: 52px minmax(0, 1fr) 18px; }
  .rs-count, .rs-progress { grid-column: 2; }
}
table.data td.check, table.data th.check { width: 44px; text-align: center; }
.rs-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; vertical-align: middle; }
.rs-table input[type=checkbox]:disabled { cursor: not-allowed; }
.rs-table tr.is-passed td { background: var(--ok-soft); }
.rs-table tr.is-changed td { background: var(--warn-soft); }
.rs-kind { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.rs-lock { display: block; font-size: .8rem; color: var(--warn); }
.rs-savebar { position: sticky; bottom: 0; margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 18px; background: var(--dark); color: var(--dark-ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.rs-savebar .muted { color: var(--dark-muted); }
.rs-savebar .btn.ghost { color: var(--dark-ink); border-color: rgba(255, 255, 255, .25); }
.rs-savebar .btn.ghost:hover { background: var(--dark-active); color: var(--dark-ink); }
/* туры у абитуриента */
.rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 0; }
.round-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.round-step .k { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.round-step .v { font-weight: 600; margin-top: 2px; }
.round-step.done { border-color: #bfdcc6; background: var(--ok-soft); }
.round-step.open { border-color: var(--accent-bg); background: var(--amber-soft); }
.round-step .btn { margin-top: 8px; }
.progress-card { margin-bottom: 18px; }
.progress-card h3 { margin: 0; }
.congrats { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--ok-soft); border: 1px solid #bfdcc6; border-radius: var(--radius); margin-bottom: 12px; }
.congrats .icon { flex: none; color: var(--ok); }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; font-weight: 700; }
.mark.yes { background: var(--ok-soft); color: var(--ok); }
.mark.no { background: var(--neutral-soft); color: var(--out-ink); }
.mark.wait { background: var(--warn-soft); color: var(--warn); }
.resend-form [data-resend-timer] { margin: 8px 0 0; }
