/* ============ AvtoMaktab ============
   «Чистый продукт»: светлый нейтральный фон, белые карточки с тонкой рамкой, один акцент (индиго).
   Компьютер: боковое меню слева. Телефон: белая шапка сверху и панель разделов внизу.
   Цвет со смыслом: индиго = действие, зелёный = откатал/сдал, красный = неявка/ошибка, янтарный = внимание.
   --blue = акцент для текста и рамок, --fill = заливка под белый текст (в тёмной теме они разные). */

:root {
    color-scheme: light dark;  /* значки полей даты и времени под тему */
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #f7f8fb;
    --ink: #14213d;
    --ink-2: #3a4766;
    --muted: #66728c;
    --line: #e3e7ef;
    --line-strong: #cdd3e0;
    --blue: #3341c4;
    --blue-600: #2834a3;
    --blue-soft: #eef0fc;
    --fill: #3341c4;
    --fill-hover: #2834a3;
    --navy: #14213d;
    --go: #0e8a65;  --go-bg: #e6f5ef;
    --red: #c93838; --red-bg: #fcecec;
    --warn: #9a5b00; --warn-bg: #fff3d9;
    --track: #e8ebf3;
    --r: 14px; --r-sm: 10px;
    --sh: 0 1px 2px rgba(20, 33, 61, .04), 0 2px 8px rgba(20, 33, 61, .04);
    --tap: 48px;
    --side: 252px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1320; --surface: #161c2c; --surface-2: #1c2335; --ink: #e7eaf3; --ink-2: #c3c9d8; --muted: #8f98ae;
        --line: #262e42; --line-strong: #364056; --blue: #8e98f5; --blue-600: #a9b1f8; --blue-soft: #1f2550;
        --fill: #5160e6; --fill-hover: #6371ee; --navy: #161c2c;
        --go: #4cc79a; --go-bg: #0f2a22; --red: #f07575; --red-bg: #3a1618; --warn: #f2b544; --warn-bg: #3a2a0d;
        --track: #262e42; --sh: none;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.warn-text { color: var(--red); font-weight: 600; }

h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 12px; display: flex; gap: 8px; align-items: center; }
h2 .muted { font-weight: 500; font-size: 15px; }
h2 > .ico { width: 20px; height: 20px; color: var(--blue); }
h3 { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--ink-2); }
.label, th, .field > span, .stack label, .add-form label { font-weight: 600; }

/* ---------- логотип (знак «У») ---------- */
.sign { width: 28px; height: 25px; flex: 0 0 auto; display: block; }
.sign-tri { fill: #fff; stroke: #dc2626; stroke-width: 4.5; stroke-linejoin: round; }
.sign-u { fill: #0f172a; font: 700 17px system-ui, sans-serif; }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; display: block; }

/* ---------- каркас: телефон = шапка сверху + панель внизу, компьютер = боковое меню ---------- */
.shell { min-height: 100dvh; }
.main-col { min-width: 0; }
.side {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
    min-height: 56px; padding: 6px 12px 6px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.side-top { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 18px; letter-spacing: -.01em; flex: 0 0 auto; }
.side-school { font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.acc { display: inline-flex; align-items: center; gap: 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; min-width: 0; }
.ava {
    width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
    background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.acc.on .ava { box-shadow: 0 0 0 2px var(--blue); }
.acc-text { display: none; min-width: 0; }
.acc-text b, .acc-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-text b { font-size: 14px; font-weight: 600; }
.acc-text small { font-size: 12px; color: var(--muted); }
.side-foot form.acc-out { display: none; }  /* сильнее form.inline ниже: на телефоне выход в «Аккаунте» */
.side-link {
    display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--r-sm);
    background: none; color: var(--muted); font-size: 14px; font-weight: 600;
}
.side-link .ico { width: 18px; height: 18px; }
.side-link:hover { color: var(--ink); background: var(--surface-2); }
/* язык: кнопка в шапке и пара на входе и в аккаунте */
.lang-sw {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 38px; padding: 0 8px;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 700; text-decoration: none;
}
.lang-sw:hover { border-color: var(--line-strong); color: var(--ink); }
.lang-pair { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-pair a {
    display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none;
}
.lang-pair a:hover { border-color: var(--blue); color: var(--blue); }
.lang-pair a.on { background: var(--fill); border-color: var(--fill); color: #fff; }
form.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }

/* разделы: на телефоне панель внизу экрана */
.tabs {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex;
    padding: 0 0 env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(20, 33, 61, .05);
}
.tabs a {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 58px; padding: 7px 2px 6px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
}
.tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs a .ico { width: 23px; height: 23px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--blue); }
.shell-many .tabs a { font-size: 10.5px; }
/* клавиатура открыта: панель прячем сразу, а возвращаем с задержкой. Иначе нажатие на кнопку снимает
   фокус, панель появляется под пальцем и забирает нажатие: кнопка внизу экрана не срабатывает */
.tabs { transition: visibility 0s linear .3s; }
body:has(input:focus, select:focus, textarea:focus) .tabs { visibility: hidden; transition: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); }

@media (min-width: 1000px) {
    /* белая колонка меню до низа страницы: меню само липкое высотой в экран, фон рисует .shell */
    .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr);
             background: linear-gradient(90deg, var(--surface) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px) var(--side), transparent var(--side)); }
    .side {
        height: 100dvh; flex-direction: column; align-items: stretch; gap: 0; padding: 20px 14px 16px;
        border-bottom: 0; background: none; overflow-y: auto;
    }
    .side-top { flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 0; padding: 0 8px 20px; }
    .side-school { white-space: normal; font-size: 13px; padding-left: 38px; margin-top: -6px; }
    .tabs { position: static; display: grid; gap: 2px; padding: 0; background: none; border: 0; box-shadow: none; transition: none; }
    body:has(input:focus, select:focus, textarea:focus) .tabs { visibility: visible; }
    .tabs a, .shell-many .tabs a {
        flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 10px 12px;
        border-radius: var(--r-sm); color: var(--ink-2); font-size: 15px;
    }
    .tabs a .ico { width: 20px; height: 20px; color: var(--muted); }
    .tabs a:hover { background: var(--surface-2); color: var(--ink); }
    .tabs a.on { background: var(--blue-soft); color: var(--blue); }
    .tabs a.on .ico { color: var(--blue); }
    .side-foot { margin-top: auto; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
    .side-foot .lang-sw { align-self: flex-start; margin: 0 0 6px 8px; }
    .acc { padding: 8px; }
    .acc:hover, .acc.on { background: var(--surface-2); }
    .acc.on .ava { box-shadow: none; }
    .acc-text { display: grid; }
    .side-foot form.acc-out { display: block; }
    .side-link { width: 100%; }
    .wrap { padding: 20px 32px 56px; }
}

/* ---------- заголовок страницы ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 16px 0 20px; }
.page-head h1 { font-size: 26px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: 4px 0 0; font-size: 15px; }
.page-act { display: flex; flex-wrap: wrap; gap: 8px; }
.card-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card-label .ico { width: 18px; height: 18px; color: var(--blue); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.sec-head h2 { margin: 0; }
.sec-head a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; font-weight: 600; text-decoration: none; }
.big { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }

/* ---------- кольцо прогресса ---------- */
.ring { width: 76px; height: 76px; flex: 0 0 auto; display: block; }
.ring-track { fill: none; stroke: var(--track); stroke-width: 7; }
.ring-bar { fill: none; stroke: var(--blue); stroke-width: 7; stroke-linecap: round; }
.ring-go .ring-bar { stroke: var(--go); }
.ring-red .ring-bar { stroke: var(--red); }
.ring text { fill: var(--ink); font: 700 15px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 42px; padding: 8px 16px;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
    font-weight: 600; font-size: 15px; text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary, .btn-ink { background: var(--fill); border-color: var(--fill); color: #fff; }
.btn-primary:hover, .btn-ink:hover { background: var(--fill-hover); border-color: var(--fill-hover); color: #fff; }
.btn-ghost { background: var(--surface); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-wide { width: 100%; min-height: var(--tap); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; }
.btn-icon .ico { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }

/* ---------- поля ---------- */
input, select, textarea {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 8px 12px; min-height: 42px; max-width: 100%;
    font-size: 16px;  /* мельче 16px Safari на iPhone зумит страницу при фокусе */
    font-weight: 400;  /* подпись поля жирная, значение в поле нет */
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
input.num { width: 76px; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; color: var(--ink-2); }

/* ---------- сообщения ---------- */
.flash { margin: 16px 0 4px; padding: 12px 14px; border-radius: var(--r); border: 1px solid; font-weight: 600; }
.flash-ok { color: var(--go); background: var(--go-bg); border-color: color-mix(in srgb, var(--go) 30%, transparent); }
.flash-error { color: var(--red); background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.flash-warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.empty { color: var(--muted); padding: 10px 0; }

/* ---------- карточки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 20px 0; box-shadow: var(--sh); }
.card h2:first-child { margin-top: 0; }
.card h2 { margin-top: 0; }
.narrow { max-width: 540px; }
.stack { display: grid; gap: 16px; }
.stack label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
/* select с длинным именем не распирает колонку: grid-элемент по умолчанию не уже содержимого */
.stack label, .add-form label, .field { min-width: 0; }
.stack input, .stack select, .stack textarea, .add-form input, .add-form select { width: 100%; }
textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.stack label small { font-weight: 400; font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- пакет занятий ученика ---------- */
.talon { margin: 16px 0 6px; padding: 16px; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.talon-count { display: flex; align-items: center; gap: 14px; }
.quota-num { font-size: 48px; font-weight: 700; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.talon-of { color: var(--ink-2); display: flex; flex-direction: column; }
.talon-of .label { order: -1; font-size: 13px; color: var(--muted); }
.punch { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.punch li, .legend i { width: 20px; height: 20px; border: 2px solid var(--blue); border-radius: 5px; display: inline-block; position: relative; }
.punch .p-done, .legend .p-done { background: var(--fill); }
.punch .p-miss, .legend .p-miss { border-color: var(--red); background: linear-gradient(45deg, transparent 42%, var(--red) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--red) 42% 58%, transparent 58%); }
.punch .p-booked::after, .legend .p-booked::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--fill); }
/* пунктир только целой толщины: Safari не рисует боковые стороны дробного */
.punch .p-free, .legend .p-free { border: 2px dashed var(--line-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.legend .p-booked::after { inset: 3px; }

/* ---------- мои занятия ---------- */
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticket { display: grid; grid-template-columns: 68px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.ticket-stub { grid-row: span 2; background: var(--blue-soft); color: var(--blue-600); padding: 8px 6px; text-align: center; display: grid; align-content: center; }
.ticket-stub b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.ticket-stub span { font-size: 12px; font-weight: 600; }
.ticket-body { padding: 10px 14px 4px; min-width: 0; }
.ticket-time { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket-who { color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ticket-act { display: flex; align-items: center; padding: 4px 14px 10px; }
.ticket-act form { margin: 0; }
.ticket-note { font-size: 13px; color: var(--muted); }

/* ---------- номерной знак UZ ---------- */
.car { white-space: nowrap; }
.plate {
    display: inline-flex; align-items: stretch; white-space: nowrap; overflow: hidden;
    font-size: 13px; line-height: 1; letter-spacing: .02em; color: #111; font-variant-numeric: tabular-nums;
    background: #fff; border: 1.5px solid #111; border-radius: 4px;
}
.plate b { font-weight: 600; padding: 3px 5px; border-right: 1.5px solid #111; }
.plate span { padding: 3px 6px; font-weight: 600; }
.plate i { display: flex; align-items: center; padding: 0 4px; font-size: 9px; font-weight: 700; font-style: normal; color: #1d4ed8; border-left: 1px solid #bbb; }

/* ---------- выбор инструктора и дня ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--fill); border-color: var(--fill); color: #fff; }
.days, .week { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; margin: 4px 0 6px; scrollbar-width: thin; }
.day {
    flex: 0 0 auto; min-width: 54px; padding: 6px 4px 8px; text-align: center; text-decoration: none; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; align-items: center;
}
.day span { font-size: 12px; font-weight: 600; color: var(--muted); }
.day b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.day.weekend span { color: var(--red); }
.day:hover { border-color: var(--blue); }
.day.on { background: var(--fill); border-color: var(--fill); color: #fff; }
.day.on span { color: rgba(255, 255, 255, .85); }
.day small {
    margin-top: 3px; min-width: 22px; padding: 0 6px; border-radius: 999px; line-height: 18px;
    font-size: 12px; font-weight: 700; color: var(--blue-600); background: var(--blue-soft);
}
.day.on small { color: #fff; background: rgba(255, 255, 255, .22); }
.day-off { opacity: .55; }
.day-off small, .day-full small { color: var(--muted); background: var(--bg); }
.day.today:not(.on) { border-color: var(--blue); }
.week .day { min-width: 78px; }
.area-book .flash { margin: 8px 0 12px; }
.mine-ins { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.daytitle { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--ink-2); }

/* ---------- слоты: плитки, на телефоне по две в ряд ---------- */
.slots { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.slots:not(:has(li)) { display: none; }  /* все слоты прошли: без пустой сетки */
.slots form { margin: 0; height: 100%; }
.slot {
    width: 100%; height: 100%; min-height: 86px; padding: 12px 14px; display: grid; align-content: start; justify-items: start; gap: 1px;
    text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh);
}
.slot b { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.slot span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot em { margin-top: 6px; font-style: normal; font-size: 14px; font-weight: 600; }
.slot-free { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.slot-free em { color: var(--blue); }
.slot-free:hover { border-color: var(--blue); background: var(--blue-soft); }
.slot-free:active { transform: scale(.98); }
.slot-mine { background: var(--fill); border-color: var(--fill); color: #fff; }
.slot-mine span { color: rgba(255, 255, 255, .8); }
.slot-taken, .slot-clash { background: var(--bg); box-shadow: none; color: var(--muted); }
.slot-taken b { text-decoration: line-through; text-decoration-thickness: 1px; }
.slot-locked b { text-decoration: none; }  /* свободно, но записаться нельзя: время не зачёркиваем */

/* ---------- история ученика ---------- */
.log { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.log li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; }
.log li + li { border-top: 1px solid var(--line); }
.log .when { font-variant-numeric: tabular-nums; font-weight: 600; }
.stamp { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.stamp-done { color: var(--go); background: var(--go-bg); }
.stamp-no_show { color: var(--red); background: var(--red-bg); }
.stamp-booked { color: var(--blue-600); background: var(--blue-soft); }
.stamp-cancelled { color: var(--muted); background: var(--bg); text-decoration: line-through; }

/* ---------- инструктор: день ---------- */
.daynav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.daynav h2 { margin: 0 6px; font-size: 19px; }
.journal { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.j-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; }
.j-row + .j-row { border-top: 1px solid var(--line); }
.j-time { font-size: 19px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.j-time small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.j-name { font-weight: 700; font-size: 17px; }
.j-phone {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; min-height: 40px; padding: 5px 14px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
    color: var(--blue); text-decoration: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.j-phone .ico { width: 16px; height: 16px; }
.j-free, .j-past { padding-block: 8px; }
.j-next { background: var(--blue-soft); box-shadow: inset 4px 0 var(--blue); }
.badge { display: inline-block; margin-bottom: 2px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--fill); }
.j-free .j-body { color: var(--blue); font-weight: 600; font-size: 15px; }
.j-past, .j-blocked { color: var(--muted); }
.j-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.j-act form { margin: 0; }
.mark { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; font-size: 14px; }
.mark:hover { border-color: var(--blue); color: var(--blue); }
.mark-done.on { background: var(--go); border-color: var(--go); color: #fff; }
.mark-no_show.on { background: var(--red); border-color: var(--red); color: #fff; }
.j-no_show { background: var(--red-bg); }

/* ---------- админ: шапка дня ---------- */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 16px 0 4px; }
.cal-head .daynav { margin: 0; }
.stats { display: flex; gap: 8px; }
.stat { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.stat b { font-size: 20px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.days-week { margin: 6px 0 12px; }
.days-week .day { min-width: 58px; }

/* ---------- админ: сетка дня ---------- */
.grid-scroll, .table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.grid { border-collapse: collapse; width: 100%; min-width: 560px; }
.grid th, .grid td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.grid thead th { background: var(--bg); font-size: 15px; position: sticky; top: 0; }
.grid thead th a { color: var(--ink); text-decoration: none; display: block; }
.grid thead .plate { margin-top: 4px; }
.grid thead .car { font-size: 13px; font-weight: 400; color: var(--muted); }
.grid tbody .grid-time { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.grid-time { width: 64px; font-weight: 600 !important; color: var(--muted); border-left: 0 !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell { min-width: 150px; height: 60px; font-size: 14px; }
.cell-name { font-weight: 600; }
.cell-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cell-actions { display: flex; gap: 10px; margin-top: 3px; }
.cell-actions form { margin: 0; }
.cell-booked { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.cell-done { background: var(--go-bg); box-shadow: inset 3px 0 var(--go); }
.cell-no_show { background: var(--red-bg); box-shadow: inset 3px 0 var(--red); }
.cell-free { padding: 0 !important; }
.cell-free a { display: flex; align-items: flex-start; gap: 4px; height: 100%; min-height: 60px; padding: 8px 10px; color: var(--blue); font-weight: 600; font-size: 14px; text-decoration: none; opacity: .75; }
.cell-free a .ico { width: 16px; height: 16px; }
.cell-free:hover { background: var(--blue-soft); }
.cell-free:hover a { opacity: 1; }
.cell-off { color: var(--muted); font-size: 13px; background: var(--bg); }
.cell-none { color: var(--muted); }

/* ---------- таблицы и формы админа ---------- */
.table { border-collapse: collapse; width: 100%; min-width: 760px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { font-size: 13px; color: var(--muted); background: var(--bg); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.add-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px 18px; align-items: end; }
.add-form label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.week-form { display: grid; gap: 6px; }
.week-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.week-day { width: 34px; font-weight: 700; }
.week-form .btn { justify-self: start; margin-top: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.more summary { cursor: pointer; list-style: none; padding: 4px 10px; font-weight: 700; border: 1px solid var(--line); border-radius: var(--r-sm); }
.more summary::-webkit-details-marker { display: none; }
.more[open] { display: grid; gap: 8px; }

/* ---------- админ: день списком по инструкторам (телефон) ---------- */
.agenda { display: none; gap: 12px; }
.ag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.ag-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.ag-head:has(+ .ag-list:not(:has(li))) { border-bottom: 0; }
.ag-head .muted { white-space: nowrap; }
.ag-head a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: none; }
.agenda .link { min-height: 40px; padding: 0 4px; font-size: 14px; }
.ag-list { list-style: none; margin: 0; padding: 0; }
.ag-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; }
.ag-row + .ag-row { border-top: 1px solid var(--line); }
.ag-time { flex: 0 0 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ag-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.ag-meta .cell-actions { margin: 0; }
.ag-free { padding: 0; }
.ag-free a { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; color: var(--blue); text-decoration: none; font-weight: 600; }
.ag-free .ag-time { color: var(--ink); }
.ag-free .ag-body { display: flex; align-items: center; gap: 4px; }
.ag-free .ico { width: 16px; height: 16px; }
.ag-blocked { color: var(--muted); }

/* ---------- админ: люди ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.search { position: relative; flex: 1 1 240px; max-width: 520px; display: flex; align-items: center; }
.search .ico { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 46px; padding-left: 40px; }
.add-card { padding: 0; }
.add-card > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; color: var(--blue); font-weight: 700; }
.add-card > summary::-webkit-details-marker { display: none; }
.add-card[open] > summary { border-bottom: 1px solid var(--line); }
.add-card > form { padding: 18px; }
/* поля другой роли прячем: ученику машина не нужна, инструктору пакет */
.add-form:has(select[name="role"] option[value="student"]:checked) .for-instructor,
.add-form:has(select[name="role"] option[value="admin"]:checked) .for-instructor,
.add-form:has(select[name="role"] option[value="teacher"]:checked) .for-instructor,
.add-form:has(select[name="role"] option[value="manager"]:checked) .for-instructor,
.add-form:has(select[name="role"] option:not([value="student"]):checked) .for-student { display: none; }
.add-more { grid-column: 1 / -1; }
.add-more summary { cursor: pointer; color: var(--blue); font-size: 14px; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.add-more p { margin: 0 0 10px; }
.people { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.person + .person { border-top: 1px solid var(--line); }
.person-row {
    list-style: none; cursor: pointer; display: grid; align-items: center; gap: 4px 16px; min-height: 60px; padding: 10px 16px;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) 100px 110px;
}
.person-row::-webkit-details-marker { display: none; }
.person-row:hover { background: var(--bg); }
details[open] > .person-row { background: var(--blue-soft); }
.person-main { display: grid; min-width: 0; }
.person-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { color: var(--ink-2); min-width: 0; }
.person-quota b { font-size: 18px; font-variant-numeric: tabular-nums; }
a.person-quota { display: inline-flex; align-items: center; min-height: 40px; }
.person-edit { justify-self: end; display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; font-size: 14px; }
.person-edit .ico { width: 16px; height: 16px; transition: transform .15s; }
details[open] > .person-row .person-edit .ico { transform: rotate(180deg); }
.person-body { display: grid; gap: 14px; padding: 14px 16px 18px; border-top: 1px solid var(--line); }
.person-body p { margin: 0; }
.person-danger { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---------- импорт: проверка списка и выданные логины ---------- */
.chk { display: flex; justify-content: space-between; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 10px 16px; }
.chk + .chk { border-top: 1px solid var(--line); }
.chk-main { display: grid; min-width: 0; }
.chk-note { color: var(--go); font-weight: 600; }
.chk-exists { background: var(--bg); }
.chk-exists .chk-note { color: var(--muted); }
.chk-error { background: var(--red-bg); }
.chk-error .chk-note { color: var(--red); }
.chk-go { margin-top: 12px; }
.cred-all { margin: 4px 0 12px; }
.cred { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 16px; }
.cred + .cred { border-top: 1px solid var(--line); }
.cred-main { min-width: 0; display: grid; gap: 4px; }
.cred-pair { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 15px; }
.cred-pair dt { color: var(--muted); }
.cred-pair dd { margin: 0; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; user-select: all; }

/* ---------- раскладки ---------- */
.tg-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 12px 0 0; padding: 14px 16px; }
.tg-card p { margin: 2px 0 0; }
.book-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "talon" "upcoming" "book" "history"; column-gap: 28px; }
.area-talon { grid-area: talon; }
.area-upcoming { grid-area: upcoming; }
.area-book { grid-area: book; }
.area-history { grid-area: history; }
.cols-2 { display: grid; gap: 0 20px; align-items: start; }
.week-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
.week-row input { width: 100%; min-width: 0; }
.week-day.weekend { color: var(--red); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

@media (min-width: 1000px) {
    .book-page { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "book talon" "book upcoming" "book history"; grid-template-rows: auto auto 1fr; align-items: start; }
    .area-book > h2:first-child { margin-top: 18px; }
    .area-book .days { flex-wrap: wrap; overflow: visible; }  /* мышью вбок не листают: все даты сразу */
    .split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 16px; }
    .split .week { position: sticky; top: 16px; flex-direction: column; overflow: visible; margin: 0; padding: 0; }
    .split .week .day { flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; padding: 10px 14px; }
    .split .week .day span { font-size: 15px; }
    .split .week .day b { font-size: 17px; }
    .split .daynav { margin-top: 0; }
    .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .days-week .day { flex: 1 1 0; max-width: 140px; }
}

/* ---------- теория: подготовка к экзамену ---------- */
.bar { display: block; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--fill); border-radius: inherit; }
.theory-page { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; }
.resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 16px; margin: 12px 0 0; }
.resume p { margin: 2px 0 0; }
.resume form { margin: 0; }
.area-exam > p { margin: 0 0 14px; color: var(--ink-2); }
.area-exam form { margin: 0; }
.area-exam .log li > div { flex: 1; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin: 0; }
.tk { min-height: 52px; display: grid; place-content: center; gap: 1px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.tk b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tk small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-pass { background: var(--go-bg); border-color: color-mix(in srgb, var(--go) 45%, var(--line)); }
.tk-pass small { color: var(--go); }
.tk-fail { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.tk-fail small { color: var(--red); }
.topics { display: grid; gap: 8px; }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; text-align: left; padding: 12px 14px; min-height: var(--tap); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh); }
.topic-name { font-weight: 600; }
.topic-n { font-size: 14px; color: var(--muted); }
.topic .bar { grid-column: 1 / -1; height: 6px; }

.quiz, .result, .result ~ .qcard { max-width: 760px; }
.quiz-head, .result-head { display: flex; align-items: center; gap: 10px; }
.quiz-head { margin: 16px 0 8px; }
.quiz-head h2, .result-head h2 { margin: 0; flex: 1; min-width: 0; }
.timer { font-size: 20px; font-weight: 700; padding: 6px 12px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue-600); }
.timer-low { background: var(--red-bg); color: var(--red); }
.qstrip { list-style: none; margin: 0 0 4px; padding: 4px 2px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.qs { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.qs.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.qs-done { background: var(--blue-soft); }
.qs-right { background: var(--go-bg); color: var(--go); border-color: color-mix(in srgb, var(--go) 40%, var(--line)); }
.qs-wrong { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.qcard { margin: 8px 0 14px; }
.qnum { margin-bottom: 8px; }
.qimg { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; margin: 0 auto 14px; border-radius: var(--r-sm); }
.qtext { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 14px; }
.answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.answer { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: var(--tap); padding: 11px 14px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 16px; line-height: 1.35; }
button.answer:active { transform: scale(.99); }
/* подсветка только мышью: на телефоне :hover залипает после нажатия, и на следующем вопросе
   вариант под пальцем выглядел бы уже выбранным */
@media (hover: hover) {
    button.answer:hover { border-color: var(--blue); background: var(--blue-soft); }
    .tk:hover, .topic:hover { border-color: var(--blue); }
}
.answer-k { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.answer-chosen { border-color: var(--blue); background: var(--blue-soft); }
.answer-right { border-color: var(--go); background: var(--go-bg); }
.answer-right .answer-k { background: var(--go); color: #fff; }
.answer-wrong { border-color: var(--red); background: var(--red-bg); }
.answer-wrong .answer-k { background: var(--red); color: #fff; }
.verdict { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--bg); }
.verdict p { margin: 6px 0 0; }
.verdict > p:first-child { margin-top: 0; }
.verdict-ok { background: var(--go-bg); }
.verdict-ok b { color: var(--go); }
.verdict-bad { background: var(--red-bg); }
.verdict-bad b { color: var(--red); }
.quiz-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quiz-nav form { margin: 0; }
.quiz-nav .btn { min-height: var(--tap); }
.result-score { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px; }
.result-score b { font-size: 52px; line-height: 1; color: var(--blue); }
.result-pass .result-score b { color: var(--go); }
.result-fail .result-score b { color: var(--red); }
.result-score span { font-size: 22px; color: var(--muted); }
.result .row { margin-top: 14px; }
.result .row form { margin: 0; }

/* у каждой строки своя сетка: ширины колонок фиксированы, иначе столбцы в строках съезжают */
.rd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px 110px; gap: 8px 16px; align-items: center; padding: 12px 16px; }
.rd + .rd { border-top: 1px solid var(--line); }
.rd-solved { display: grid; gap: 4px; }
.rd-exams { display: flex; gap: 4px; flex-wrap: wrap; }
.ex { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-pass { background: var(--go-bg); color: var(--go); }
.ex-fail { background: var(--red-bg); color: var(--red); }
.rd-state { justify-self: end; text-align: right; }

@media (max-width: 759px) {
    .rd { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
    .rd-solved, .rd-exams { grid-column: 1 / -1; }
    .rd-state { grid-column: 2; grid-row: 1; }
    .qtext { font-size: 17px; }
    .result-score b { font-size: 44px; }
}

/* ---------- вход: синяя панель слева, форма справа ---------- */
.gate { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); background: var(--surface); }
.gate-road { background: var(--navy); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.gate-road .brand { font-size: 24px; }
.gate-road .sign { width: 38px; height: 34px; }
.gate-road h1 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.1; font-weight: 800; margin: 0; max-width: 12ch; }
.gate-road p { color: rgba(255, 255, 255, .85); max-width: 36ch; margin: 14px 0 0; }
.gate-form { align-self: center; justify-self: center; width: 100%; max-width: 380px; padding: 32px 20px; display: grid; gap: 16px; }
.gate-form h2 { margin: 0; font-size: 24px; }
.gate-form input { min-height: var(--tap); font-size: 17px; }

/* ---------- офлайн и документы ---------- */
.gate-single { grid-template-columns: 1fr; }
.btn-light { border-color: #fff; color: #fff; background: transparent; margin-top: 18px; }
.btn-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.doc { max-width: 720px; }
.doc h1 { font-size: 30px; line-height: 1.15; margin: 28px 0 6px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }

@media (max-width: 759px) {
    .gate { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .gate-road { padding: 24px 16px 28px; gap: 22px; }
    .gate-road h1 { font-size: 32px; }
    .gate-form { align-self: start; }
    .j-row { grid-template-columns: 60px 1fr; }
    .j-act { grid-column: 1 / -1; justify-content: flex-start; }
    .quota-num { font-size: 42px; }
    h2 { margin-top: 22px; }
    .daynav h2 { font-size: 18px; }
    .grid-scroll { display: none; }
    .agenda { display: grid; }
    .stats { width: 100%; }
    .stat { flex: 1; padding: 6px 10px; }
    .days-week .day { flex: 1 1 0; min-width: 0; }
    .person-row { grid-template-columns: minmax(0, 1fr) auto; }
    .person-meta { grid-column: 1; grid-row: 2; }
    .person-quota { grid-column: 2; grid-row: 1; justify-self: end; }
    .person-edit { grid-column: 2; grid-row: 2; }
    .person-main > b { white-space: normal; }  /* фамилию не режем многоточием, переносим */
    .add-form > .btn { width: 100%; min-height: var(--tap); }
}

/* ---------- главная для гостя ---------- */
.land { max-width: 1080px; margin: 0 auto; padding: 8px 16px 48px; }
.land h2 { font-size: 26px; margin: 44px 0 16px; }
.land-hero { padding: 36px 0 8px; max-width: 760px; }
.land-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.land-hero .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 22px; max-width: 60ch; }
.land-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.land-cta .btn { min-height: var(--tap); padding-inline: 22px; }
.role-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 14px; display: grid; gap: 10px; align-content: start; grid-template-rows: auto auto 1fr auto; }
/* живой экран телефона, показываем верх: пакет, записи, окна */
.role-card img { width: 100%; height: auto; aspect-ratio: 390 / 430; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.role-card h3 { font-size: 19px; margin: 4px 0 0; color: var(--ink); }
.role-card p { margin: 0; color: var(--ink-2); }
.role-card form { margin: 0; }
.land-note { margin: 12px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps b { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); color: #fff; display: grid; place-items: center; font-size: 18px; }
.steps h3 { margin: 7px 0 2px; font-size: 17px; color: var(--ink); }
.steps p { margin: 0; color: var(--ink-2); }
.land-shot { margin: 26px 0 0; }
.land-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); background: var(--bg); }
.land-shot figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.why { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.why li { padding-left: 30px; position: relative; color: var(--ink-2); }
.why li::before { content: "✓"; position: absolute; left: 4px; top: 0; color: var(--go); font-weight: 700; }
.land-connect { display: grid; gap: 12px; justify-items: start; margin-top: 44px; }
.land-connect h2 { margin: 0; }
.land-connect p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.land-connect .btn { min-height: var(--tap); padding-inline: 22px; }
.land-foot { margin-top: 36px; color: var(--muted); font-size: 14px; }
.land-foot a { display: inline-flex; align-items: center; min-height: 40px; }
/* полоса «это демо» под шапкой */
.demo-bar { background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600; padding: 8px 16px; display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; align-items: center; text-align: center; }
.demo-bar a { color: inherit; white-space: nowrap; }
@media (min-width: 760px) and (max-width: 1099px) { .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 759px) {
    .land h2 { font-size: 22px; margin-top: 34px; }
    .land-hero { padding-top: 22px; }
    .land-cta .btn { flex: 1 1 100%; }
    .role-grid { grid-template-columns: 1fr; }
    .land-shot { display: none; }  /* широкий календарь на телефоне нечитаем, роли выше показаны вживую */
}

/* ============ «Чистый продукт»: новые блоки ============ */

/* ---------- шапка публичных страниц (главная для гостя, конфиденциальность) ---------- */
.road { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.road-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; min-height: 60px; display: flex; align-items: center; gap: 10px; }
.road .lang-sw { margin-left: auto; }

/* ---------- плитки действий и карточки ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles form, .side-cards form { margin: 0; }
.tile {
    width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
    padding: 14px; text-align: left; color: var(--ink); text-decoration: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh);
}
.tile:hover { border-color: var(--line-strong); }
.tile:active { transform: scale(.99); }
.tile-ico { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.tile-ico .ico { width: 21px; height: 21px; }
.tile b { font-size: 15px; font-weight: 650; align-self: end; }
.tile small { font-size: 13px; color: var(--muted); align-self: start; }
.tile-accent { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.tile-red .tile-ico { background: var(--red-bg); color: var(--red); }
.tile-go .tile-ico { background: var(--go-bg); color: var(--go); }

/* ---------- ученик: главная ---------- */
.home { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.home > .card, .home > section { margin: 0; }
.next-when { font-size: 22px; font-weight: 750; letter-spacing: -.015em; line-height: 1.25; }
.next-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--ink-2); }
.next-act { margin-top: 16px; }
.next-act form { margin: 0; }
.next-card > p { margin: 12px 0 0; }
.prog-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: center; }
.prog { display: flex; align-items: center; gap: 12px; padding: 4px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; min-width: 0; }
.prog > span { display: grid; min-width: 0; }
.prog b { font-size: 16px; }
.prog small { font-size: 13px; color: var(--muted); }
.home .tg-card { margin: 0; }
@media (min-width: 1000px) {
    .home { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .tiles, .home .tg-card { grid-column: 1 / -1; }
    .tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 559px) {
    .tiles { grid-template-columns: 1fr; }
    .prog { flex-direction: column; text-align: center; gap: 8px; }
}
@media (max-width: 759px) { .ring { width: 66px; height: 66px; } }

/* ---------- вождение: шапка страницы над раскладкой ---------- */
.book-page .talon, .book-page .area-upcoming > h2:first-child { margin-top: 0; }
.talon { padding: 18px; }

/* ---------- теория ---------- */
.theory-top { display: grid; gap: 16px; }
.theory-top > .card, .theory-top > section { margin: 0; }
.ready-card { display: flex; align-items: center; gap: 18px; }
.ready-text { min-width: 0; }
.ready-num { display: flex; align-items: baseline; gap: 6px; }
.ready-num .muted { font-size: 16px; }
.streak { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.streak i { width: 24px; height: 8px; border-radius: 999px; background: var(--track); }
.streak i.on { background: var(--go); }
.streak small { flex-basis: 100%; }
.exam-card { display: flex; flex-direction: column; }
.exam-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; flex: 1; }
.side-cards { display: grid; gap: 12px; align-content: start; }
.side-cards .tile b .muted { font-weight: 600; }
@media (min-width: 1000px) { .theory-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); align-items: stretch; } }
.exam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.exam-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.exam-list .when { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .lg-pass, .legend .lg-fail { width: 14px; height: 14px; border-radius: 4px; }
.legend .lg-pass { border: 1px solid var(--go); background: var(--go-bg); }
.legend .lg-fail { border: 1px solid var(--red); background: var(--red-bg); }
.tk-new:hover { border-color: var(--blue); }
.tgroups { display: grid; gap: 10px; }
.tgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.tgroup > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 8px 12px; align-items: center; padding: 14px 16px; }
.tgroup > summary::-webkit-details-marker { display: none; }
.tgroup > summary:hover { background: var(--surface-2); }
.tgroup-name { font-weight: 700; }
.tgroup-n { font-size: 14px; color: var(--muted); }
.tgroup > summary .bar { grid-column: 1 / 3; grid-row: 2; height: 6px; }
.tgroup > summary .ico { grid-column: 3; grid-row: 1; width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
.tgroup[open] > summary { border-bottom: 1px solid var(--line); }
.tgroup[open] > summary .ico { transform: rotate(180deg); }
.tgroups .bar i { background: var(--go); }
.tgroup .topics { gap: 0; }
.tgroup .topic { width: 100%; border: 0; border-radius: 0; box-shadow: none; background: none; padding: 12px 16px; color: var(--ink); }
.tgroup .topic + .topic { border-top: 1px solid var(--line); }
.tgroup .topic .topic-name { font-weight: 500; }
@media (hover: hover) { .tgroup .topic:hover { background: var(--surface-2); } }

/* ---------- админ: обзор ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpi { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.kpi span { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi b { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 13px; color: var(--muted); }
.kpi-red b { color: var(--red); }
.kpi-go b { color: var(--go); }
.ov { display: grid; gap: 16px; }
.ov > .card { margin: 0; }
@media (min-width: 1000px) {
    .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ov { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.load, .agenda-list, .mini-list { list-style: none; margin: 0; padding: 0; }
.load li + li, .agenda-list li + li, .mini-list li + li { border-top: 1px solid var(--line); }
.load li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 11px 0; }
.load-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.load-who .car { font-size: 13px; color: var(--muted); }
.load-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.load-off .load-who b { color: var(--muted); }
.agenda-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.agenda-list .when { font-weight: 700; }
.ag-who { display: grid; min-width: 0; }
.ag-who small { font-size: 13px; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.stamp-warn { color: var(--warn); background: var(--warn-bg); }
@media (max-width: 759px) { .load li { grid-template-columns: 1fr; } }

/* ---------- главная для гостя: герой с телефоном, факты, тёмный блок подключения ---------- */
.land-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center; max-width: none; padding: 44px 0 12px; }
.land-hero h1 { letter-spacing: -.025em; }
.pill { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; }
.phone-frame { margin: 0; justify-self: center; width: min(300px, 100%); padding: 10px; border-radius: 34px; background: var(--navy); box-shadow: 0 24px 48px -16px rgba(20, 33, 61, .35); }
.phone-frame img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 640; object-fit: cover; object-position: top; border-radius: 26px; background: var(--bg); }
.facts-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0 0; }
.facts-strip div { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.facts-strip b { font-size: 17px; }
.facts-strip span { font-size: 14px; color: var(--muted); }
.role-card { padding: 16px; }
.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.steps li { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.why { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.land-connect { background: var(--navy); border: 0; color: #fff; padding: 28px; }
.land-connect h2 { color: #fff; }
.land-connect p { color: rgba(255, 255, 255, .8); }
@media (max-width: 899px) {
    .land-hero { grid-template-columns: 1fr; padding-top: 24px; }
    .phone-frame { display: none; }  /* на телефоне те же экраны чуть ниже, в карточках ролей */
    .facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps, .why { grid-template-columns: 1fr; }
}

/* ---------- теория: прогресс учеников (преподаватель, админ, инструктор) ---------- */
/* у преподавателя один раздел: панель внизу на телефоне не нужна */
@media (max-width: 999px) {
    .shell-one .tabs { display: none; }
    .shell-one .wrap { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
}
.chip-n { font-variant-numeric: tabular-nums; opacity: .7; margin-left: 2px; }
.chip.on .chip-n { opacity: .85; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow > a {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr) 150px 96px 20px; gap: 8px 16px;
    align-items: center; padding: 12px 16px; min-height: var(--tap); color: var(--ink); text-decoration: none;
}
@media (hover: hover) { .prow > a:hover { background: var(--surface-2); } }
.prow-who { display: grid; gap: 2px; min-width: 0; }
.prow-who b { overflow-wrap: anywhere; }
.prow-nums { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); }
.prow-nums b { font-variant-numeric: tabular-nums; color: var(--ink); }
.prow-nums .warn-text b { color: inherit; }
.prow-go { color: var(--muted); display: grid; place-items: center; }
.prow-go .ico { width: 18px; height: 18px; }
@media (max-width: 1199px) {
    .prow > a { grid-template-columns: minmax(0, 1fr) auto 20px; padding: 12px 14px; }
    .prow .rd-solved, .prow .prow-nums, .prow .rd-exams { grid-column: 1 / 3; }
    .prow .rd-state { grid-column: 2; grid-row: 1; }
    .prow .prow-go { grid-column: 3; grid-row: 1 / span 4; }
}

.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 8px; font-weight: 600; text-decoration: none; }
.back-link .ico { width: 18px; height: 18px; }
.sp-top { display: grid; gap: 12px; margin: 0 0 16px; }
.sp-main { display: flex; align-items: center; gap: 16px; margin: 0; }
.sp-main-text { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.sp-main-text p { margin: 0; }
.sp-big { font-size: 18px; font-weight: 700; }
.sp-now { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; }
.sp-now .ico { width: 16px; height: 16px; }
.sp-kpis { margin: 0; }
.kpi-of { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sp-score { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sp-weak-name, .sp-g-name { min-width: 0; }
.sp-groups li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 42%); gap: 12px; }
.sp-g-bar { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; align-items: center; text-align: right; }
.sp-tickets { margin-top: 16px; }
.mini-list li > a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; text-decoration: none; }
@media (min-width: 1000px) {
    .sp-top { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; }
    .sp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
    .sp-main { align-items: flex-start; }
    .sp-groups li { grid-template-columns: 1fr; gap: 4px; }
}
.toolbar + .people { margin-top: 14px; }

.quota-log { margin: 0 0 10px; }
.quota-log summary { cursor: pointer; color: var(--blue); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.quota-log .mini-list li { padding: 6px 0; }

/* ---------- панель платформы (только для нас) ---------- */
.plat-top { background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.plat-top-in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.plat-tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); padding: 3px 8px; border-radius: 999px; margin-left: 8px; }
.plat-nav { display: flex; gap: 4px; }
.plat-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 600; }
.plat-nav a.on { background: var(--blue-soft); color: var(--blue); }
.plat-out { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.plat-wrap { padding-bottom: 48px; }
.plat-schools li + li { border-top: 1px solid var(--line); }
.plat-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center;
  padding: 12px 16px; min-height: var(--tap); color: var(--ink); text-decoration: none; }
@media (hover: hover) { .plat-row:hover { background: var(--surface-2); } }
.plat-name { display: grid; gap: 2px; min-width: 0; }
.plat-name b { overflow-wrap: anywhere; }
.plat-nums { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); }
.plat-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.plat-rule { font-size: 24px; }
.plat-log { margin-top: 16px; }
.plat-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); font-size: 15px; }
.plat-secret { display: block; margin: 6px 0 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line);
  font: 600 16px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; color: var(--ink); overflow-wrap: anywhere; }
.plat-audit-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; padding: 10px 16px; align-items: baseline; }
.plat-audit-row + .plat-audit-row { border-top: 1px solid var(--line); }
@media (max-width: 899px) {
  .plat-row { grid-template-columns: minmax(0, 1fr) auto; }
  .plat-row .plat-nums { grid-column: 1 / -1; }
  .plat-audit-row { grid-template-columns: minmax(0, 1fr); }
  .plat-out { margin-left: 0; }
}
.plat-wrap .card form + form, .plat-wrap .card form + p { margin-top: 14px; }

/* постоянная запись: галочка «повторять», дни недели пилюлями, итог серии */
.check { display: flex !important; align-items: center; gap: 10px; min-height: 44px; font-size: 15px !important; color: var(--ink) !important; cursor: pointer; }
.check input { width: 20px !important; height: 20px; flex: none; margin: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--fill); }
.check input:focus { box-shadow: none; }
.check input:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.repeat { display: grid; gap: 12px; padding: 4px 0; }
.repeat-body { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-soft); }
.repeat:has(.check input:not(:checked)) .repeat-body { display: none; }
.wd-picks { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.wd-picks legend { padding: 0; margin-bottom: 8px; width: 100%; }
.wd-pick { position: relative; display: inline-flex !important; }
.wd-pick input { position: absolute; opacity: 0; inset: 0; width: 100% !important; height: 100%; margin: 0; cursor: pointer; }
.wd-pick span { display: grid; place-items: center; min-width: 48px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 15px; }
.wd-pick input:checked + span { background: var(--fill); border-color: var(--fill); color: #fff; }
.wd-pick input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.series-sum { font-weight: 700; margin: 14px 0 6px; }
.ok-text { color: var(--go, var(--blue)); }
.series-skip li { align-items: flex-start; }
.series-card > .row { margin-top: 18px; }
.series-skip li > span:last-child { text-align: right; max-width: 60%; }
.series-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.series-row form { margin: 0; }

/* посещаемость теории: три пилюли на ученика, журнал с прокруткой вбок, сводка у ученика */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg, #fff6e0); color: var(--ink); margin: 0 0 14px; }
.att-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; }
.att-row + .att-row { border-top: 1px solid var(--line); }
.att-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.att-gone .att-name { color: var(--muted); }
.att-picks { display: flex; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; flex-wrap: wrap; }
.att-pick { position: relative; display: inline-flex; }
.att-pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.att-pick span { display: grid; place-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.att-pick input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.att-present input:checked + span { background: var(--go); border-color: var(--go); color: #fff; }
.att-absent input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.att-online input:checked + span { background: var(--fill); border-color: var(--fill); color: #fff; }
.att-actions { margin-top: 14px; }
.att-k b { font-variant-numeric: tabular-nums; }
.att-stamp.att-present, .att-c.att-present { color: var(--go); background: var(--go-bg); }
.att-stamp.att-absent, .att-c.att-absent { color: var(--red); background: var(--red-bg, #fdecec); }
.att-stamp.att-online, .att-c.att-online { color: var(--blue); background: var(--blue-soft); }
.att-stamp.att-none, .att-c.att-none { color: var(--muted); }
.att-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.att-grid { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.att-grid th, .att-grid td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.att-grid th[scope=row], .att-grid thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.att-grid thead a { text-decoration: none; }
.att-c { font-weight: 700; }
.att-recent .att-c { border-radius: 6px; }  /* в таблице без скругления: на стыках ячеек были просветы-«плюсики» */
.att-home-big { margin: 6px 0; }
.att-home-big b { font-size: 26px; }
.att-recent { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.att-recent li { padding: 4px 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pick-list { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.pick-row span { min-width: 0; }
