/* Roboto с нашего сервера (Google Fonts из России грузится медленно и задерживает показ страницы) */
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/roboto-cyrillic-400-normal.3bc33669e3be.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/roboto-latin-400-normal.8eff0b8045fd.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/roboto-cyrillic-500-normal.48d67106bd6c.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/roboto-latin-500-normal.115c2d84727b.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/roboto-cyrillic-700-normal.df38e253b415.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/roboto-latin-700-normal.c83e4437a53d.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* Стрела — стили панели. Цвета и размеры собраны в переменных. */
:root {
  --red: #C62828;
  --red-dark: #8E1B1B;
  --red-soft: #FDECEC;
  --ink: #1C1F24;
  --ink-2: #3A3F47;
  --muted: #5B626C;
  --line: #E2E5EA;
  --field: #D5D9E0;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --side: #1C1F24;
  --side-text: #C9CED6;
  --side-muted: #A7AEB8;
  --green: #1B7F3B;
  --green-soft: #E6F4EA;
  --amber: #8A5A00;
  --amber-soft: #FFF4D6;
  --gray-soft: #EEF0F3;
  --radius: 12px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Manrope, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Каркас ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; text-decoration: none; color: #fff; }
.sidebar-brand img { height: 40px; width: 40px; flex: none; }
.sidebar-brand span { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.25; }
.sidebar-brand small { display: block; color: var(--side-muted); font-weight: 400; font-family: var(--font); font-size: 12px; }
.nav { list-style: none; margin: 8px 0; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--side-text); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav a.active { background: var(--red); color: #fff; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav a.active .count { background: #fff; color: var(--red); }
.nav .soon { margin-left: auto; font-size: 11px; color: var(--side-muted); border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; padding: 0 6px; }
.nav a.active .soon { color: #fff; border-color: rgba(255,255,255,0.5); }
.sidebar-foot { margin-top: auto; padding: 16px 20px; font-size: 12px; color: var(--side-muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topbar .school { font-weight: 600; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.user-chip small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.menu-toggle { display: none; }
.content { padding: 28px; max-width: 1280px; width: 100%; }

/* ---------- Элементы ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; }
.page-head .spacer { flex: 1; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.stat .value { font-family: var(--font-head); font-size: 32px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--red); color: #fff;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--field); }
.btn.secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--gray-soft); }
.btn svg { width: 18px; height: 18px; }
.btn.block { width: 100%; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--red); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters > input[type=search] { flex: 1 1 260px; }
.filters > select { flex: 0 1 220px; }
.filters .field { flex-direction: column; }
.filters .field[style*="row"] { align-items: flex-end; }
.filters .btn { flex: none; }

.table-wrap { position: relative; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; font-weight: 600; color: var(--muted); background: #FAFBFC; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFBFC; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
td a.row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
td a.row-link:hover { color: var(--red); }
.person { display: flex; align-items: center; gap: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--ink-2); }
.badge.studying, .badge.recruiting, .badge.registered { background: var(--green-soft); color: var(--green); }
.badge.paused { background: var(--amber-soft); color: var(--amber); }
.badge.licensed, .badge.graduated { background: #E8EEFB; color: #1F4FAF; }
.badge.expelled { background: var(--red-soft); color: var(--red-dark); }
.badge.cat { background: var(--ink); color: #fff; }

dl.props { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 10px 16px; margin: 0; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; }

/* ---------- Формы ---------- */
label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--field); border-radius: 10px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(198,40,40,0.15); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field .help { font-size: 13px; color: var(--muted); }
.field .errors, .form-errors { color: var(--red-dark); font-size: 14px; }
.form-errors { background: var(--red-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.form-section + .form-section { margin-top: 24px; }
.form-section h3 { margin-bottom: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 24px; font-size: 15px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }

.messages { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 500; }
.messages li.error { background: var(--red-soft); color: var(--red-dark); }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 14px 16px; }
.notice code { font-size: 18px; font-weight: 700; color: var(--ink); background: #fff; padding: 2px 8px; border-radius: 6px; }

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }

/* ---------- Вход ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand {
  flex: 1 1 380px; background: var(--side); color: #fff; padding: 48px 56px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 48px; position: relative; overflow: hidden;
}
.auth-brand .bg-mark { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; opacity: 0.08; }
.auth-brand img { height: 128px; width: auto; display: block; position: relative; align-self: flex-start; }
.auth-brand .pitch { position: relative; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand h1 { font-size: 40px; line-height: 1.15; }
.auth-brand p { font-size: 17px; line-height: 1.55; color: var(--side-text); }
.auth-brand .domain { font-size: 13px; color: var(--side-muted); position: relative; }
.auth-form-wrap { flex: 999 1 520px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg); }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card); border-radius: 16px; padding: 40px 36px;
  box-shadow: 0 1px 2px rgba(28,31,36,0.06), 0 8px 24px rgba(28,31,36,0.08); display: flex; flex-direction: column; gap: 20px;
}
.auth-card h2 { font-size: 28px; }
.auth-card .row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-card .row a { font-size: 14px; text-decoration: none; }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw button { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.pw svg { width: 20px; height: 20px; }
.auth-card .foot { font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Телефон ---------- */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.4); }
  .menu-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink); margin-left: -10px; }
  .menu-toggle svg { width: 24px; height: 24px; }
  .topbar { padding: 0 16px; }
  .topbar .school { display: none; }
  .user-chip .name { display: none; }
  .content { padding: 20px 16px; }
  .auth-brand { padding: 32px 24px; gap: 24px; }
  .auth-brand img { height: 88px; }
  .auth-brand h1 { font-size: 28px; }
  .auth-card { padding: 28px 20px; }
  dl.props { grid-template-columns: 1fr; gap: 2px 0; }
  dl.props dd { margin-bottom: 10px; }
}

/* ---------- Разделы ---------- */
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
input[type=file] { font: inherit; padding: 8px 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { padding: 12px 0; border-top: 1px solid var(--line); }
.list-plain > li:first-child { border-top: 0; padding-top: 0; }
.meta { font-size: 13px; color: var(--muted); }
.post { white-space: pre-line; line-height: 1.6; }
.pin { color: var(--red); font-weight: 600; font-size: 13px; }
.kpi-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.kpi-row .kpi strong { display: block; font-family: var(--font-head); font-size: 22px; }
.kpi-row .kpi span { color: var(--muted); font-size: 14px; }
.overdue { color: var(--red-dark); font-weight: 600; }
.badge.high { background: var(--red-soft); color: var(--red-dark); }
.badge.done, .badge.passed { background: var(--green-soft); color: var(--green); }
.badge.failed, .badge.missed { background: var(--red-soft); color: var(--red-dark); }
.badge.in_progress, .badge.planned, .badge.contacted, .badge.consult { background: #E8EEFB; color: #1F4FAF; }
.badge.new, .badge.thinking { background: var(--amber-soft); color: var(--amber); }
.badge.enrolled { background: var(--green-soft); color: var(--green); }
.badge.lost, .badge.cancelled { background: var(--gray-soft); color: var(--muted); }
.badge.free { background: var(--green-soft); color: var(--green); }

/* Неделя расписания */
.week { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 10px; overflow-x: auto; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 140px; }
.day.today { border-color: var(--red); box-shadow: inset 0 3px 0 var(--red); }
.day h3 { font-size: 14px; margin-bottom: 10px; }
.day h3 span { color: var(--muted); font-weight: 500; }
.slot { display: block; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: var(--gray-soft); color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.35; border-left: 0; }
.slot:hover { color: var(--ink); outline: 2px solid var(--field); }
.slot strong { display: block; font-size: 14px; }
.slot.free { background: var(--green-soft); }
.slot.past.free { background: var(--gray-soft); color: var(--muted); }
.slot.done { background: #E8EEFB; }
.slot.missed { background: var(--red-soft); }
.slot.cancelled { opacity: .55; text-decoration: line-through; }
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.week-nav .label { font-weight: 600; }

/* Тесты */
.question { padding: 18px 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: 0; }
.question h3 { font-family: var(--font); font-weight: 600; font-size: 16px; line-height: 1.45; margin-bottom: 12px; white-space: pre-line; }
.question img { max-width: 100%; max-height: 320px; border-radius: 8px; margin-bottom: 12px; display: block; }
.answers { display: flex; flex-direction: column; gap: 8px; }
.answer { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--field); border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 400; color: var(--ink); }
.answer:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.answer input { margin-top: 3px; accent-color: var(--red); width: 18px; height: 18px; flex: none; }
.answer.correct { border-color: var(--green); background: var(--green-soft); }
.answer.wrong { border-color: var(--red); background: var(--red-soft); }
.timer { position: sticky; top: 72px; z-index: 3; align-self: flex-start; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.explain { margin-top: 10px; font-size: 14px; color: var(--ink-2); background: var(--gray-soft); padding: 10px 12px; border-radius: 8px; white-space: pre-line; }

/* Переписка */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: var(--gray-soft); white-space: pre-line; line-height: 1.45; }
.bubble.mine { align-self: flex-end; background: var(--red-soft); }
.bubble .meta { display: block; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.chat-form textarea { min-height: 52px; }

/* Аналитика */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 20px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 44px; background: var(--red); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars .bar span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bars .bar b { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.hbar { height: 8px; border-radius: 4px; background: var(--gray-soft); overflow: hidden; min-width: 80px; }
.hbar i { display: block; height: 100%; background: var(--red); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .ok { color: var(--green); font-weight: 700; }
.checklist .no { color: var(--red-dark); font-weight: 700; }

@media print {
  .sidebar, .topbar, .no-print, .messages { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}
@media (max-width: 900px) {
  .week { grid-template-columns: 1fr; }
  .bubble { max-width: 92%; }
}

/* Сетка билетов ПДД */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.ticket { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 10px; border: 1px solid var(--field); background: var(--card); color: var(--ink); font-weight: 600; text-decoration: none; }
.ticket:hover { border-color: var(--ink-2); color: var(--ink); }
.ticket.ok { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.ticket.bad { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.ticket.draft { opacity: .5; }

/* Контрольные точки в списке и карточке */
.cps { display: inline-flex; gap: 3px; flex-wrap: wrap; min-width: 168px; max-width: 220px; }
.cp { display: inline-block; min-width: 30px; padding: 1px 5px; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: center; border: 1px solid var(--line); color: var(--muted); background: var(--card); }
.cp.passed { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.cp.failed { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.cp-big { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-big a { text-decoration: none; }
.cp-big .cp { font-size: 14px; padding: 6px 10px; min-width: 52px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge.inst-paid { background: var(--green-soft); color: var(--green); }
.badge.inst-overdue { background: var(--red-soft); color: var(--red-dark); }
.badge.inst-partial { background: var(--amber-soft); color: var(--amber); }
.badge.inst-upcoming { background: #E8EEFB; color: #1F4FAF; }
.skill-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.skill-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.skill-dots i.s1 { background: #E57373; } .skill-dots i.s2 { background: #FFB74D; } .skill-dots i.s3 { background: #FFD54F; }
.skill-dots i.s4 { background: #9CCC65; } .skill-dots i.s5 { background: #43A047; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 8px; font-weight: 700; background: var(--gray-soft); }
.score.s1 { background: #FDE2E2; color: #B71C1C; } .score.s2 { background: #FFF0DB; color: #A35A00; } .score.s3 { background: #FFF6D6; color: #7A5D00; }
.score.s4 { background: #EAF5DC; color: #3B6E12; } .score.s5 { background: #DDF2E1; color: #1B6B2A; }
.timesheet td, .timesheet th { padding: 6px 2px; text-align: center; font-size: 13px; min-width: 26px; }
.timesheet td:first-child, .timesheet th:first-child { text-align: left; min-width: 130px; padding-left: 12px; position: sticky; left: 0; background: var(--card); }
.timesheet th.we, .timesheet td.we { background: var(--gray-soft); }
.skill-rate { display: grid; gap: 6px; }
.skill-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 0; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }
.skill-row legend { float: left; flex: 1 1 260px; padding: 0; font-size: 15px; }
.seg { display: inline-flex; gap: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--field); border-radius: 10px; font-weight: 700; cursor: pointer; background: var(--card); }
.seg input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg input:checked + span.s1 { background: #FDE2E2; } .seg input:checked + span.s2 { background: #FFF0DB; }
.seg input:checked + span.s3 { background: #FFF6D6; } .seg input:checked + span.s4 { background: #EAF5DC; } .seg input:checked + span.s5 { background: #DDF2E1; }
.seg input:focus-visible + span { outline: 3px solid rgba(198,40,40,0.35); outline-offset: 1px; }
.seg.att span { width: auto; padding: 0 12px; font-weight: 600; font-size: 14px; }
.seg input:checked + span.a-present { background: var(--green-soft); }
.seg input:checked + span.a-absent { background: var(--red-soft); }
.seg input:checked + span.a-excused { background: var(--amber-soft); }
.badge.att-present { background: var(--green-soft); color: var(--green); }
.badge.att-absent { background: var(--red-soft); color: var(--red-dark); }
.badge.att-excused { background: var(--amber-soft); color: var(--amber); }
.seg input:checked + span.x-passed { background: var(--green-soft); }
.seg input:checked + span.x-failed { background: var(--red-soft); }
.seg input:checked + span.x-absent { background: var(--gray-soft); }
.menu-more { position: relative; }
.menu-more > summary { list-style: none; }
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column; }
.menu-pop a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu-pop a:hover, .menu-pop a:focus-visible { background: var(--gray-soft); }
.doc-menu { max-height: 70vh; overflow-y: auto; min-width: 320px; color: var(--ink); text-transform: none; letter-spacing: normal; text-align: left; font-weight: 400; }
.doc-menu a, .doc-menu summary, .page-head .doc-menu a:not(.btn) { color: var(--ink); font-size: 14px; }
.doc-menu summary { padding: 10px 12px; border-radius: 8px; cursor: pointer; list-style: none; font-weight: 600; }
.doc-menu summary::after { content: " ›"; color: var(--muted); }
.doc-menu details[open] > summary::after { content: " ⌄"; }
.doc-menu details > a { display: block; padding: 8px 12px 8px 26px; }
.badge.blank-stock { background: #E8EEFB; color: #1F4FAF; }
.badge.blank-issued { background: var(--green-soft); color: var(--green); }
.badge.blank-spoiled, .badge.blank-lost { background: var(--red-soft); color: var(--red-dark); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--gray-soft); padding: 1px 5px; border-radius: 5px; }
.seg span { white-space: nowrap; }
.badge.st-blue { background: #E8EEFB; color: #1F4FAF; }
.badge.st-amber { background: var(--amber-soft); color: var(--amber); }
.badge.st-green { background: var(--green-soft); color: var(--green); }
.badge.st-red { background: var(--red-soft); color: var(--red-dark); }
.badge.st-gray { background: var(--gray-soft); color: var(--muted); }
.dist { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.dist-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.dist-col i { display: block; width: 100%; min-height: 2px; background: var(--red); border-radius: 4px 4px 0 0; opacity: .8; }
.dist-col b { font-size: 12px; } .dist-col span { font-size: 12px; color: var(--muted); }
.survey-q { border: 0; margin: 0 0 22px; padding: 0; }
.survey-q legend { font-weight: 600; margin-bottom: 10px; font-size: 16px; }
.seg.nps { flex-wrap: wrap; }
.seg.nps span { width: 38px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: 15px; }
.month { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.month-head, .month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head span { padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--gray-soft); }
.month-day { min-height: 112px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-day:nth-child(7n+1) { border-left: 0; }
.month-day.other { background: #FAFAFA; } .month-day.other .num a { color: var(--muted); }
.month-day.today .num a { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; }
.month-day .num { font-weight: 600; font-size: 13px; } .month-day .num a { color: var(--ink); text-decoration: none; }
.ev { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink); }
span.ev { display: inline-block; }
.ev.task { background: #E8EEFB; } .ev.call { background: var(--amber-soft); } .ev.exam { background: var(--red-soft); } .ev.group { background: var(--green-soft); }
.ev.done { text-decoration: line-through; opacity: .6; }
@media (max-width: 760px) { .month-day { min-height: 70px; } .ev { font-size: 11px; padding: 1px 3px; } }
.pairs { display: flex; align-items: flex-end; gap: 8px; height: 180px; margin: 14px 0 8px; }
.pair { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.pair .cols { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.pair .cols i { display: block; width: 42%; min-height: 2px; border-radius: 4px 4px 0 0; }
.pair .cols i.in, .dot.in { background: var(--green); } .pair .cols i.out, .dot.out { background: var(--red); opacity: .85; }
.pair span { font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }

/* =====================================================================
   Вид «как в Автошкола-Контроль»: плотная вёрстка, тёмное меню-дерево,
   верхняя панель с поиском, панели с цветной шапкой, компактные таблицы.
   Фирменный цвет «Стрелы» — красный (вместо бирюзового АК).
   ===================================================================== */
:root {
  --font: Roboto, "Segoe UI", Arial, sans-serif;
  --font-head: Roboto, "Segoe UI", Arial, sans-serif;
  --side: #2C3A47; --side-2: #243240; --side-3: #1F2A35; --side-text: #D7DEE5; --side-muted: #9AA8B5;
  --bg: #E8ECF0; --line: #DDE3E9; --field: #C9D1D9; --radius: 3px;
  --head-a: #B71C1C; --head-b: #E0453F;
}
body { font-size: 13px; line-height: 1.4; background: var(--bg); }
h1 { font-size: 17px; font-weight: 500; }
h2 { font-size: 15px; font-weight: 500; }
h3 { font-size: 13px; font-weight: 700; }

/* меню */
.sidebar { width: 250px; background: var(--side); }
.side-logo { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--side-3); color: #fff; text-decoration: none; flex: none; }
.side-logo img { height: 28px; width: 28px; }
.side-logo span { font-weight: 700; letter-spacing: .06em; font-size: 15px; line-height: 1; }
.side-logo small { display: block; font-weight: 400; letter-spacing: .02em; font-size: 11px; color: var(--side-muted); margin-top: 2px; }
.side-user { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px 12px; text-decoration: none; color: #fff;
  background: radial-gradient(circle at 50% 0, rgba(229,57,53,.35), transparent 70%), linear-gradient(180deg, #3B2B33, var(--side)); flex: none; }
.side-user .avatar { width: 56px; height: 56px; font-size: 18px; background: #fff; color: var(--red); border: 2px solid rgba(255,255,255,.7); margin-bottom: 6px; }
.side-user .who { font-weight: 700; font-size: 13px; }
.side-user .role { font-size: 11px; color: #F3B5B3; }
.side-user .org { font-size: 11px; color: var(--side-muted); }
.side-search { padding: 6px 8px; background: var(--side-2); flex: none; }
.side-search input { width: 100%; min-height: 26px; padding: 3px 8px; font-size: 12px; background: #3A4957; border: 1px solid #46566A; color: #fff; border-radius: 2px; }
.side-search input::placeholder { color: var(--side-muted); font-style: italic; }
.nav { margin: 0; padding: 0; gap: 0; }
.nav a, .nav-parent { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 12px; border-radius: 0; color: var(--side-text); text-decoration: none;
  font: 400 13px var(--font); width: 100%; background: none; border: 0; cursor: pointer; text-align: left; border-bottom: 1px solid rgba(0,0,0,.12); }
.nav svg { width: 16px; height: 16px; opacity: .85; }
.nav a:hover, .nav-parent:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav > li > a.active { background: var(--red); color: #fff; }
.nav-parent.active-parent { color: #fff; }
.nav .t { flex: 1; }
.nav .chev { width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; transition: transform .15s; }
.nav li.open > .nav-parent .chev { transform: rotate(-45deg); }
.nav .sub { list-style: none; margin: 0; padding: 0; display: none; background: var(--side-2); }
.nav li.open > .sub { display: block; }
.nav .sub a { min-height: 30px; padding-left: 38px; padding-top: 5px; padding-bottom: 5px; line-height: 1.3; font-size: 12.5px; color: #C3CDD6; border-bottom: 0; }
.nav .sub a.active { background: var(--red); color: #fff; }
.nav .count { height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }

/* верхняя панель */
.topbar { height: 44px; padding: 0 10px; gap: 6px; background: #22303D; border: 0; color: #fff; }
.topbar .school { color: #fff; }
.global-search { display: flex; flex: 0 1 560px; background: #fff; border-radius: 2px; }
.global-search input { flex: 1; min-height: 28px; border: 0; padding: 4px 10px; font-size: 12px; border-radius: 2px 0 0 2px; }
.global-search input:focus { box-shadow: none; }
.global-search button { border: 0; background: #fff; padding: 0 8px; cursor: pointer; color: #556; border-radius: 0 2px 2px 0; }
.global-search svg { width: 15px; height: 15px; }
.top-link { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; color: #E3E9EF; text-decoration: none; background: none; border: 0;
  font: 500 12px var(--font); letter-spacing: .03em; cursor: pointer; position: relative; }
.top-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.top-link svg { width: 17px; height: 17px; }
.top-link .dot { position: absolute; top: 6px; left: 20px; background: var(--red); color: #fff; font-size: 10px; border-radius: 999px; min-width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.menu-toggle { color: #fff; background: none; border: 0; }

/* содержимое */
.content { padding: 10px; max-width: none; }
.crumbs { font-size: 12px; margin: 2px 0 6px; }
.page-head { background: linear-gradient(90deg, var(--head-a), var(--head-b)); color: #fff; padding: 6px 12px; margin: 0 0 10px; border-radius: 2px; min-height: 40px; gap: 8px 10px; }
.page-head h1 { color: #fff; font-size: 16px; }
.page-head .muted, .page-head p, .page-head .head-note { color: rgba(255,255,255,.85); font-size: 12px; }
.page-head a:not(.btn) { color: #fff; }
.page-head .badge { background: rgba(255,255,255,.2); color: #fff; }
.page-head .btn { background: #fff; color: var(--red-dark); border-color: #fff; min-height: 28px; }
.page-head .btn:hover { background: #FFECEC; color: var(--red-dark); }
.page-head .btn.secondary, .page-head .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.page-head .btn.secondary:hover, .page-head .btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.page-head .avatar { background: #fff; }
.page-head .row-actions .btn { min-height: 26px; }
.block-title { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }

.card { border-radius: 2px; padding: 12px; border-color: var(--line); }
.card + .card { margin-top: 10px; }
.grid { gap: 10px; }
.grid.stats { margin-bottom: 10px; }
.card-head { margin-bottom: 8px; }
.stat .value { font-size: 22px; font-weight: 500; }
.stat .label { font-size: 12px; }
.kpi-row .kpi strong { font-size: 18px; font-weight: 500; }
.kpi-row .kpi span { font-size: 12px; }

.btn { min-height: 30px; padding: 0 12px; border-radius: 2px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; gap: 6px; }
.btn.sm { min-height: 24px; padding: 0 8px; font-size: 11px; }
.btn.secondary { border-color: var(--field); }
label { font-size: 12px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  min-height: 30px; padding: 4px 8px; font-size: 13px; border-radius: 2px; }
textarea { min-height: 60px; }
.form-grid { gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { gap: 3px; }
.filters { gap: 6px; margin-bottom: 8px; }

.tabs { margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; gap: 0; }
.tabs a { padding: 8px 12px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }

.table-wrap { border-radius: 2px; border-color: var(--line); }
th, td { padding: 5px 8px; font-size: 12.5px; border-bottom-color: #E7ECF0; }
th { font-size: 12px; font-weight: 500; color: #44505C; background: #F1F4F7; white-space: normal; vertical-align: bottom; }
tbody tr:nth-child(even) { background: #FBFCFD; }
tbody tr:hover { background: #FFF3F2; }
td a.row-link { font-weight: 500; }
.filter-row th { padding: 3px 4px; background: #F7F9FA; }
.filter-row input { width: 100%; min-height: 22px; padding: 1px 6px; font-size: 11.5px; min-width: 50px; font-style: italic; }
.rowcount { font-size: 12px; color: var(--red-dark); padding: 5px 10px; border-top: 1px solid var(--line); background: #fff; }
.empty { padding: 24px 12px; }
.badge { padding: 1px 6px; border-radius: 2px; font-size: 11px; font-weight: 500; }
.avatar { width: 28px; height: 28px; font-size: 11px; }
.list-plain > li { padding: 7px 0; }
.messages { margin-bottom: 10px; }
.pager { margin-top: 8px; }
.meta { font-size: 12px; }

@media (max-width: 900px) {
  .menu-toggle { color: #fff; margin-left: 0; width: 36px; height: 36px; }
  .top-link .lbl { display: none; }
  .topbar { padding: 0 6px; }
  .content { padding: 8px; }
  .global-search { flex: 1 1 auto; }
}
/* Учебные группы (навигатор) */
.nav2 { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; align-items: start; }
.groups-col { background: #fff; border: 1px solid var(--line); border-radius: 2px; position: sticky; top: 54px; max-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; height: 40px; background: linear-gradient(90deg, #E08A1E, #F2A33A); color: #fff; font-size: 15px; font-weight: 500; }
.col-head a { color: #fff; text-decoration: none; font-size: 18px; }
.col-filter { display: grid; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.col-filter select, .col-filter input { min-height: 26px; font-size: 12px; }
.group-cards { overflow-y: auto; }
.gcard { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.gcard:hover { background: #F6F8FA; }
.gcard.active { background: #FDECEC; box-shadow: inset 3px 0 0 var(--red); }
.gcard strong { font-size: 13px; font-weight: 500; }
.gcard .st { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.gcard .mt { font-size: 11px; color: var(--muted); }
.gcard .tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.tag { font-size: 11px; padding: 1px 5px; border-radius: 2px; color: #fff; background: #607D8B; }
.tag.cat { background: #26A0B5; font-weight: 700; }
.tag.br { background: var(--red); }
.contracts-col .card.pick { padding: 60px; text-align: center; color: var(--muted); }
.wcol { text-align: center; }
.wtag { display: inline-block; min-width: 28px; padding: 1px 4px; border-radius: 2px; color: #fff; font-size: 11px; font-weight: 700; background: hsl(var(--h), 55%, 40%); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.neg { color: var(--red-dark); font-weight: 700; }
.meta.st-studying { color: #1B7F3B; } .meta.st-expelled { color: var(--red-dark); } .meta.st-licensed { color: #1F4FAF; }
@media (max-width: 900px) { .nav2 { grid-template-columns: 1fr; } .groups-col { position: static; max-height: 320px; } }

/* Рабочий стол руководителя — плитки как в АК */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; padding: 12px 14px;
  color: #fff !important; text-decoration: none !important; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tile:hover { filter: brightness(1.06); }
.tile-value { font-size: 24px; font-weight: 500; line-height: 1.1; }
.tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; opacity: .92; }
.tile-blue { background: linear-gradient(135deg, #3c8dbc, #2f6f96); }
.tile-green { background: linear-gradient(135deg, #3fa45a, #2d8045); }
.tile-teal { background: linear-gradient(135deg, #17a2b8, #11808f); }
.tile-orange { background: linear-gradient(135deg, #f39c12, #d6820a); }
.tile-red { background: linear-gradient(135deg, #e04848, #b52b2b); }
.tile-purple { background: linear-gradient(135deg, #7a5cc0, #5d439c); }
.board { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 10px; margin-bottom: 10px; align-items: start; }
.board-side { display: grid; gap: 10px; }
.board .card { padding: 10px 12px; }
.warn-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.warn-list li { padding: 6px 8px; margin-bottom: 4px; border-left: 3px solid #ccc; background: #fafafa; }
.warn-list li.warn-red { border-color: #d33; background: #fdeeee; }
.warn-list li.warn-orange { border-color: #f39c12; background: #fff6e6; }
.neg { color: var(--red-dark); }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }

/* Вкладки карточки курсанта */
.card-tabs { display: flex; flex-wrap: wrap; gap: 0; background: #fff; border: 1px solid var(--line, #dde2e8); border-bottom: 2px solid var(--red); margin: 0 0 10px; }
.card-tabs a { padding: 9px 14px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; color: #445 !important; text-decoration: none !important; border-right: 1px solid #eef0f3; }
.card-tabs a:hover { background: #f5f6f8; }
.card-tabs a.active { background: var(--red); color: #fff !important; }
.tab-pane > .card { margin-bottom: 10px; }
.tab-pane .grid.two { margin-bottom: 10px; }
@media (max-width: 700px) { .card-tabs { flex-wrap: nowrap; overflow-x: auto; } .card-tabs a { white-space: nowrap; } }

/* Сетка расписания вождения (как в АК) */
.sched-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1px solid #dde2e8; padding: 6px 8px; margin-bottom: 6px; }
.sched-bar .label { font-weight: 500; padding: 0 6px; }
.sched-bar select { height: 30px; max-width: 170px; }
.seg { display: inline-flex; border: 1px solid var(--red); border-radius: 3px; overflow: hidden; margin-right: 6px; }
.seg a { padding: 5px 10px; font-size: 12px; text-transform: uppercase; color: var(--red) !important; text-decoration: none !important; }
.seg a.on { background: var(--red); color: #fff !important; }
.sched-stats { font-size: 12px; color: var(--muted); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 12px; }
.legend { display: inline-flex; gap: 6px; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 6px; }
.lg-free { background: #e8f6ec; border: 1px dashed #3fa45a; } .lg-planned { background: hsl(210 70% 88%); border-left: 3px solid hsl(210 60% 45%); }
.lg-done { background: #e6e8eb; } .lg-missed { background: #fde3e3; }
.tgrid-wrap { overflow-x: auto; background: #fff; border: 1px solid #dde2e8; }
.tgrid { display: grid; position: relative; min-width: 100%; }
.tg-corner, .tg-head { position: sticky; top: 0; z-index: 3; background: #f3f5f7; border-bottom: 1px solid #dde2e8; height: 32px; }
.tg-head { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; border-left: 1px solid #e5e8ec; }
.tg-head a { color: inherit !important; text-decoration: none !important; }
.tg-head span { font-weight: 400; color: var(--muted); }
.tg-head.today { background: var(--red); color: #fff; } .tg-head.today span { color: #fde; }
.tg-hours { position: relative; }
.tg-hours span { display: block; height: var(--hour); font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-6px); }
.tg-hours span:first-child { transform: none; }
.tg-col { position: relative; border-left: 1px solid #e5e8ec;
  background-image: repeating-linear-gradient(to bottom, #eceff2 0, #eceff2 1px, transparent 1px, transparent calc(var(--hour) / 2)),
    repeating-linear-gradient(to bottom, #dfe3e7 0, #dfe3e7 1px, transparent 1px, transparent var(--hour)); }
.tg-col.today { background-color: #fffaf3; }
.tg-ev { position: absolute; overflow: hidden; padding: 2px 5px; font-size: 11px; line-height: 1.25; border-radius: 2px;
  background: hsl(var(--h) 70% 90%); border-left: 3px solid hsl(var(--h) 55% 42%); color: #1d2733 !important; text-decoration: none !important; z-index: 1; }
.tg-ev:hover { z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.tg-ev b { font-weight: 600; } .tg-ev .code { font-size: 10px; font-weight: 700; background: rgba(0,0,0,.08); padding: 0 3px; border-radius: 2px; }
.tg-ev .who, .tg-ev .ins { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.tg-ev .ins { color: #566; }
.tg-ev.free { background: #e8f6ec; border: 1px dashed #3fa45a; border-left-width: 3px; }
.tg-ev.done { background: #e6e8eb; border-left-color: #8a939c; }
.tg-ev.missed { background: #fde3e3; border-left-color: #d33; }
.tg-ev.cancelled { background: #f4f4f4; border-left-color: #bbb; text-decoration: line-through !important; }
.tg-ev.past.free { opacity: .55; }
.tg-add { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%;
  background: #fff; border: 1px solid #ccd; color: var(--red) !important; text-decoration: none !important; opacity: 0; z-index: 2; }
.tg-col:hover .tg-add { opacity: 1; }
.board .list-plain li { justify-content: space-between; gap: 10px; }
.board .block-title { margin-top: 0; }
.sched-bar select { max-width: 150px; }
.tab-pane > .card#sales { margin-bottom: 10px; }
.copy-box { display: flex; gap: 8px; align-items: flex-start; background: #f5f6f8; border: 1px solid #e3e6ea; border-radius: 3px; padding: 8px; }
.copy-box code { flex: 1; min-width: 0; word-break: break-all; font-size: 12px; white-space: pre-wrap; }
.steps-plain { padding-left: 18px; margin: 6px 0 10px; } .steps-plain li { margin-bottom: 6px; }
.shifts { font-size: 11.5px; }
.shifts th, .shifts td { padding: 2px 1px !important; text-align: center; min-width: 30px; }
.shifts th[scope=row] { text-align: left; min-width: 120px; padding: 4px 6px !important; white-space: nowrap; }
.shifts .off { background: #fbeaea; }
.shifts th.today { background: var(--red); color: #fff; }
.shifts td.on { background: #e1f1e5; }
.shifts .sh { width: 100%; min-height: 24px; border: 0; background: none; font: inherit; cursor: pointer; color: #1f6b36; font-weight: 600; }
.shifts .sh:hover { outline: 1px solid #9aa3ab; }
table.compact th, table.compact td { padding: 4px 6px; font-size: 12.5px; }
.tickets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.tickets-grid form { margin: 0; } .tickets-grid .btn { width: 100%; }
.a-link-btn { background: none; border: 0; padding: 2px 0; color: var(--red, var(--red)); font: inherit; cursor: pointer; text-align: left; }
.a-link-btn:hover { text-decoration: underline; }
.pivot th[scope=row] { text-align: left; font-weight: 500; white-space: nowrap; }
.pivot tfoot td, .pivot tfoot th { border-top: 2px solid #c9ced4; }
[hidden] { display: none !important; }
.filters { align-items: center; }
.filters > label, .filters label { display: inline-flex; align-items: center; gap: 4px; margin: 0; width: auto; font-size: 12.5px; color: #4c5660; }
.filters > input[type=date], .filters > input[type=time], .filters > input[type=number], .filters input[type=date], .filters input[type=time] { flex: 0 0 auto; width: auto; min-width: 0; }
.filters > input[type=file] { flex: 0 1 auto; width: auto; }

/* Итоги над списками — одной строкой, как подвал таблицы в АК, а не крупными плитками */
.card:has(> .kpi-row:only-child) { padding: 4px 2px; margin-bottom: 8px !important; background: transparent; border: 0; box-shadow: none; }
.card > .kpi-row:only-child { gap: 4px 22px; }
.card > .kpi-row:only-child .kpi { display: flex; gap: 6px; align-items: baseline; }
.card > .kpi-row:only-child .kpi strong { display: inline; font-size: 15px; font-weight: 600; font-family: inherit; }
.card > .kpi-row:only-child .kpi span { font-size: 13px; }

/* =====================================================================
   Палитра и панели АК (бирюзовая). Логотип «Стрелы» остаётся красным,
   красный цвет — только для долгов, ошибок и просрочек, как в АК.
   ===================================================================== */
:root {
  --red: #22A8C6; --red-soft: #FDECEC; --red-dark: #D9363E;
  --accent-dark: #17829C; --accent-soft: #E3F6FA;
  --head-a: #1C97B3; --head-b: #3BC7DA;
  --side: #2E3B48; --side-2: #26323E; --side-3: #22303D;
  --bg: #E9EDF1;
}
a { color: #1593B3; }
a:hover { color: var(--accent-dark); }
.btn { background: var(--red); }
.btn:hover { background: var(--accent-dark); }
.avatar { background: var(--accent-soft); color: var(--accent-dark); }
.side-user { background: linear-gradient(180deg, rgba(20,30,40,.15), rgba(20,30,40,.55)), linear-gradient(160deg, #6E8BA3 0%, #4A6479 45%, #34495B 100%); }
.side-user .avatar { color: #3A4A58; background: #F2F4F6; }
.side-user .role { color: #8FDCEC; }
.side-user .org { color: #E6ECF1; }
.nav > li > a.active, .nav .sub a.active { background: #2CBAD6; color: #fff; }
.nav-parent.active-parent { background: rgba(255,255,255,.04); }
.tag.br { background: #E23B3B; }
.tag.cat { background: #19A7C2; }
.wtag { background: hsl(var(--h), 60%, 42%); }
tbody tr:hover { background: #EAF7FA; }
.rowcount { color: #1593B3; }
.card-tabs { border-bottom-color: var(--red); }
.gcard.active { background: #E3F4F8; box-shadow: inset 3px 0 0 var(--red); }

/* ---- Экран = одна панель: бирюзовая шапка, панель кнопок, таблица ---- */
.content > .page-head, .contracts-col > .page-head {
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom: 0;
  padding: 0 8px; margin: 0; border-radius: 2px 2px 0 0; min-height: 0; gap: 6px; align-items: center;
}
.content > .page-head > :first-child, .contracts-col > .page-head > :first-child {
  flex: 1 0 100%; margin: 0 -8px; padding: 9px 12px; min-height: 40px;
  background: linear-gradient(90deg, var(--head-a), var(--head-b)); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
}
.content > .page-head > :first-child h1 { color: #fff; font-size: 17px; font-weight: 400; }
.content > .page-head > h1:first-child { font-size: 17px; font-weight: 400; }
.content > .page-head > :first-child .muted, .content > .page-head > :first-child p, .content > .page-head > :first-child .crumbs,
.content > .page-head > :first-child .crumbs a { color: rgba(255,255,255,.88); margin: 0; }
.content > .page-head > :first-child .crumbs { flex-basis: 100%; font-size: 11.5px; }
.content > .page-head > :first-child .badge { background: rgba(255,255,255,.22); color: #fff; }
.content > .page-head > .spacer, .contracts-col > .page-head > .spacer { display: none; }
.content > .page-head:has(> :nth-child(2):not(.spacer)), .contracts-col > .page-head:has(> :nth-child(2):not(.spacer)) { padding-bottom: 6px; }
.content > .page-head > :not(:first-child), .contracts-col > .page-head > :not(:first-child) { margin-top: 6px; }
.content > .page-head > a:not(.btn), .content > .page-head > span:not(.spacer):not(.badge) { color: var(--ink-2); }
.content > .page-head .muted { color: var(--muted); }

/* кнопки панели как в АК: основная — бирюзовая «+ ДОБАВИТЬ», остальные — плоские */
.page-head .btn, .filters .btn, .toolbar .btn { min-height: 32px; border-radius: 2px; font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.page-head .btn:not(.secondary):not(.ghost), .toolbar .btn:not(.secondary):not(.ghost) { background: #2BB4D2; color: #fff; border-color: #2BB4D2; }
.page-head .btn:not(.secondary):not(.ghost):hover { background: var(--accent-dark); color: #fff; }
.page-head .btn.secondary, .page-head .btn.ghost, .filters .btn.secondary, .filters .btn.ghost, .toolbar .btn.secondary, .toolbar .btn.ghost,
.page-head .menu-more > .btn {
  background: transparent; color: #33414E; border-color: transparent; }
.page-head .btn.secondary:hover, .page-head .btn.ghost:hover, .filters .btn.secondary:hover, .filters .btn.ghost:hover,
.toolbar .btn.secondary:hover, .toolbar .btn.ghost:hover { background: #EEF2F5; color: #111; }
.page-head .btn.danger, .toolbar .btn.danger { color: var(--red-dark); }

/* фильтры под шапкой — продолжение панели */
.content > .page-head + .filters, .content > .page-head + form > .filters:first-child, .content > .page-head + .card.kpi-only + .filters,
.contracts-col > .page-head + .filters {
  background: #fff; border: 1px solid var(--line); border-top: 0; border-bottom: 0; padding: 4px 8px 8px; margin: 0;
}
.content > .page-head + .filters + .table-wrap, .content > .page-head + .table-wrap, .content > .page-head + form + .table-wrap,
.contracts-col > .page-head + .table-wrap, .contracts-col > .page-head + .filters + .table-wrap { border-radius: 0 0 2px 2px; }
.content > .page-head + .table-wrap, .content > .page-head + .filters + .table-wrap, .contracts-col > .page-head + .table-wrap { border-top: 1px solid var(--line); }
.content > .page-head + .card, .content > .page-head + .grid, .content > .page-head + .card-tabs { margin-top: 10px; }
.content > .page-head:not(:has(+ .filters)):not(:has(+ .table-wrap)):not(:has(+ form)) { margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.content > .page-head + .filters:not(:has(+ .table-wrap)) { margin-bottom: 10px; border-bottom: 1px solid var(--line); }

/* таблицы: строки в одну строку, как в АК */
.table-wrap > table th { background: #fff; color: #2F3B46; font-weight: 500; font-size: 12.5px; text-align: center; border-bottom: 1px solid #E1E6EA; border-right: 1px solid #EEF1F4; }
.table-wrap > table td { border-right: 1px solid #F1F3F5; white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding: 5px 8px; }
.table-wrap > table td.wrap, .table-wrap > table.wrap td { white-space: normal; }
.table-wrap > table td .meta { overflow: hidden; text-overflow: ellipsis; }
.table-wrap > table tbody tr:nth-child(even) { background: transparent; }
.table-wrap > table tbody tr:hover { background: #EAF7FA; }
.filter-row th { background: #fff; border-bottom: 1px solid #E1E6EA; }
.filter-row input { font-style: normal; border-color: #DCE2E7; }
.filter-row input::placeholder { color: #9AA5AF; }
.rowcount { border-top: 1px solid var(--line); color: #1593B3; font-size: 13px; }
td a.row-link { color: #26323D; font-weight: 400; }
td a.row-link:hover { color: #1593B3; }
.badge { border-radius: 2px; }

/* ---- Рабочий стол как в АК ---- */
.tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: grid; grid-template-rows: auto auto 26px; min-height: 0; padding: 0; border-radius: 2px; overflow: hidden; color: #fff; box-shadow: none; }
.tile-ico { position: absolute; left: 8px; top: 6px; width: 46px; height: 46px; opacity: .28; }
.tile-ico svg { width: 100%; height: 100%; fill: #fff; }
.tile-value { text-align: right; font-size: 25px; font-weight: 400; padding: 8px 10px 0; }
.tile-label { text-align: right; font-size: 14.5px; text-transform: none; letter-spacing: 0; padding: 2px 10px 8px; opacity: 1; }
.tile-foot { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff !important; text-decoration: none !important; background: rgba(0,0,0,.08); }
.tile-foot:hover { background: rgba(0,0,0,.16); }
.tile:hover { filter: none; }
.tile-teal { background: #36C1D3; } .tile-orange { background: #F7A623; } .tile-purple { background: #A98DE6; }
.tile-blue { background: #36C1D3; } .tile-green { background: #36C1D3; } .tile-red { background: #F7A623; }
.board { grid-template-columns: minmax(0, 1fr) 400px; gap: 10px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 2px; display: flex; flex-direction: column; min-width: 0; }
.panel-head { height: 32px; display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: 14px; background: linear-gradient(90deg, var(--head-a), var(--head-b)); }
.panel-head.green { background: linear-gradient(90deg, #4CAF50, #7ACB6B); }
.panel-head.red { background: linear-gradient(90deg, #E2454B, #F07B7B); }
.panel-head.orange { background: linear-gradient(90deg, #E8901E, #F5AE45); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; background: #fff; }
.toolbar select { min-height: 30px; width: auto; min-width: 150px; }
.tool-ico { display: inline-flex; color: #1FA3C0; padding: 4px; }
.tool-ico svg { width: 18px; height: 18px; }
.table-wrap.flat { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.board-main .table-wrap { max-height: calc(100vh - 250px); overflow: auto; }
.board-main td:last-child { max-width: 0; width: 100%; }
.board-main table { table-layout: fixed; }
.board-side .warn-list { max-height: calc(100vh - 250px); overflow: auto; padding: 0 6px 6px; }
.warn-list li { padding: 5px 10px; margin: 0; border: 0; background: none; }
.warn-list li a { display: block; color: #E53935; text-decoration: none; font-size: 13.5px; }
.warn-list li a:hover { text-decoration: underline; }
.warn-list li span { display: block; color: #3D4752; font-size: 12.5px; padding-left: 8px; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .board { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { grid-template-columns: 100%; margin: 0; }
.tile-foot { width: 100%; justify-self: stretch; }

/* ---- Учебные группы (навигатор) как в АК ---- */
.nav2 { grid-template-columns: 198px minmax(0, 1fr); gap: 4px; }
.groups-col { top: 54px; }
.col-head { height: 40px; font-size: 18px; font-weight: 400; background: linear-gradient(90deg, #EE9A1C, #F6B23F); }
.col-icons { display: flex; gap: 12px; }
.col-icons a { font-size: 18px; }
.gcard { position: relative; padding: 8px 10px 8px 12px; gap: 0; }
.gcard strong { font-size: 16px; font-weight: 400; color: #33414E; text-transform: none; }
.gcard .st { font-size: 12px; font-weight: 500; color: #33414E; }
.gcard .mt { font-size: 12px; color: #33414E; }
.gcard .ok { position: absolute; right: 10px; top: 14px; width: 16px; height: 16px; border-radius: 50%; background: #22A8C6; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.gcard.active { background: #EEF1F4; box-shadow: inset 3px 0 0 #EE9A1C; }
.tag { font-size: 12px; padding: 2px 6px; }
.tag.cat { background: #19A7C2; min-width: 22px; text-align: center; }
.contracts-col.panel .panel-head { height: 40px; font-size: 18px; font-weight: 400; padding: 0 14px; }
.contracts-col .toolbar { padding: 8px; gap: 8px; }
.contracts-col .toolbar .btn { min-height: 34px; }
.toolbar .btn:not(.secondary):not(.ghost) { background: #2BB4D2; border-color: #2BB4D2; color: #fff; }
.toolbar .btn[aria-disabled] { color: #9AA5AF; background: #EEF1F4; pointer-events: auto; cursor: default; }
.toolbar .btn.secondary { background: #EEF1F4; }
table.contracts td { vertical-align: top; padding: 6px 8px; }
table.contracts td .meta { font-size: 11px; color: #4C5864; }
table.contracts .stage { font-size: 12px; color: #1BA2C6; }
table.contracts .hint { font-size: 12px; font-style: italic; color: #9AA5AF; }
table.contracts td.calc { font-size: 13px; color: #2F3B46; line-height: 1.5; }
table.contracts td.calc .neg { color: #E53935; font-weight: 400; }
table.contracts td.num { text-align: center; }
table.contracts td:first-child { text-align: center; }
tbody tr.sel, tbody tr.sel:hover { background: #D7F0F6; }
.wtag { min-width: 32px; padding: 3px 4px; font-size: 11px; background: hsl(var(--h), 70%, 42%); }
.table-wrap td .avatar { display: none; }
.tile-value { font-size: 24px; padding-left: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Онлайн-занятия ---- */
.alert.warn { background: #FFF6E5; border: 1px solid #F5C977; color: #7A4B00; padding: 10px 14px; margin-bottom: 10px; border-radius: 2px; }
.section-title { font-size: 15px; font-weight: 500; margin: 16px 0 8px; }
.room { background: #fff; border: 1px solid var(--line); border-top: 0; }
.room-bar { border-bottom: 1px solid var(--line); }
.room-bar .btn.on { background: #DDF3F8; color: #0F6E86; }
.room-bar .btn.secondary.danger { color: var(--red-dark); }
.room-status { font-size: 13px; }
.room-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 60vh; }
.room-stage { position: relative; background: #1E2A35; display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.room-stage video { width: 100%; height: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.room-empty { color: #B8C4CE; font-size: 14px; padding: 20px; text-align: center; }
.room-cap { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 2px; }
.room-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-height: 0; }
.room-side .panel-head { height: 30px; font-size: 13px; }
.room-people { list-style: none; margin: 0; padding: 4px 0; max-height: 34vh; overflow: auto; }
.room-people li { display: flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 13px; }
.room-people li.speaking .who { color: #0F8FAE; font-weight: 500; }
.room-people .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-people .mic { opacity: .6; font-size: 12px; } .room-people .mic.on { opacity: 1; }
.room-chat { list-style: none; margin: 0; padding: 6px 10px; flex: 1; overflow: auto; font-size: 13px; min-height: 120px; }
.room-chat li { margin-bottom: 4px; word-wrap: break-word; } .room-chat li.mine b { color: #0F8FAE; }
.room-say { display: flex; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.room-say input { flex: 1; min-width: 0; }
.room-strip { display: flex; gap: 6px; padding: 6px; overflow-x: auto; background: #F4F6F8; border-top: 1px solid var(--line); }
.room-strip:empty { display: none; }
.room-tile { margin: 0; position: relative; width: 180px; flex: none; }
.room-tile video { width: 180px; height: 110px; object-fit: cover; background: #000; display: block; }
.room-tile figcaption { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 1px 6px; }
.rec-player { width: 100%; max-height: 72vh; background: #000; display: block; margin-bottom: 10px; }
.seg button.on { background: #DDF3F8; }
@media (max-width: 900px) { .room-body { grid-template-columns: 1fr; } .room-side { border-left: 0; border-top: 1px solid var(--line); } }
.table-wrap > table td.empty, .table-wrap > table td[colspan] { max-width: none; white-space: normal; text-align: center; color: var(--muted); }

/* ---- Карточка окном поверх списка (как в АК) ---- */
body.modal-open { overflow: hidden; }
.modal-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(30, 40, 50, .45); display: flex; align-items: flex-start; justify-content: center; padding: 3vh 16px; }
.modal-win { background: #fff; width: min(1040px, 100%); height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); border-top: 3px solid #2BB4D2; }
.modal-head { display: flex; align-items: center; height: 46px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.modal-title { flex: 1; text-align: center; font-size: 17px; color: #2F3B46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-x { background: none; border: 0; font-size: 26px; line-height: 1; color: #1FA3C0; cursor: pointer; width: 36px; height: 36px; }
.modal-x:hover { color: var(--accent-dark); }
.modal-frame { flex: 1; width: 100%; border: 0; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 1100; background: #2F3B46; color: #fff; padding: 10px 16px; border-radius: 2px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
/* содержимое внутри окна: без меню, шапки и крошек; заголовок — в шапке окна */
body.in-modal { background: #fff; }
body.in-modal .sidebar, body.in-modal .topbar, body.in-modal .crumbs { display: none !important; }
body.in-modal .app { display: block; }
body.in-modal .main, body.in-modal .content { margin: 0 !important; padding: 12px 16px !important; max-width: none; }
body.in-modal .content > .page-head > :first-child { display: none; }
body.in-modal .content > .page-head:not(:has(> :nth-child(2):not(.spacer))) { display: none; }
body.in-modal .content > .page-head { border: 0; padding: 0; }
body.in-modal .content form.card, body.in-modal .content > .card { max-width: none !important; border: 0; box-shadow: none; padding: 4px 0; }
body.in-modal .form-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 0; margin-top: 16px; justify-content: flex-end; }
body.in-modal .form-actions .btn.ghost { order: -1; }

/* ---- Кассы и счета (как в АК) ---- */
.boxes { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-top: 0; padding: 6px 8px 10px; }
.box { border: 0; }
.box-head { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: #fff; font-size: 13px; background: linear-gradient(90deg, #5DBB4F, #7BD06A 70%, #5DBB4F); }
.box.account .box-head { background: linear-gradient(90deg, #8E6BD8, #A98DE6 70%, #8E6BD8); }
.box.is-hidden { opacity: .6; }
.box-kind { opacity: .85; }
.box-body { display: flex; flex-wrap: wrap; gap: 6px 48px; padding: 8px 8px 4px; font-size: 14px; }
.box-num .lbl { color: #9AA5AF; font-size: 12.5px; }
.box-num strong { font-weight: 400; font-size: 15px; color: #2F3B46; }
.box-num strong.in { color: #4CAF50; } .box-num strong.out { color: #F5A623; } .box-num strong.neg { color: var(--red-dark); }
.box-actions { display: flex; align-items: center; gap: 14px; padding: 2px 8px 6px; border-bottom: 1px solid #EEF1F4; }
.box-actions .ico { color: #1FA3C0; font-size: 17px; text-decoration: none; min-width: 20px; text-align: center; }
.box-actions .ico:hover { color: var(--accent-dark); }
.box-actions .link { font-size: 12px; text-transform: uppercase; color: #33414E; text-decoration: none; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sum-badge { display: inline-block; min-width: 76px; padding: 1px 6px; border-radius: 2px; color: #fff; text-align: right; font-size: 12.5px; background: #6FC35F; }
.sum-badge.out { background: #E85A5A; } .sum-badge.transfer { background: #A98DE6; }

/* ---- Распределение на вождение (лента по неделям, как в АК) ---- */
.gantt { background: #fff; border: 1px solid var(--line); font-size: 12px; overflow-x: auto; }
.g-head, .g-row { display: grid; grid-template-columns: 170px minmax(900px, 1fr); }
.g-head { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid #DCE2E7; }
.g-label { padding: 6px 8px; border-right: 1px solid #E1E6EA; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 2px; }
.g-label .car { color: #1593B3; font-size: 11.5px; text-transform: uppercase; }
.g-months, .g-weeks { display: flex; }
.g-months span { border-left: 1px solid #E1E6EA; text-align: center; padding: 3px 0; color: #4C5864; font-size: 11px; text-transform: capitalize; }
.g-weeks span { flex: 1; border-left: 1px solid #E1E6EA; border-top: 1px solid #EEF1F4; text-align: center; padding: 3px 0; color: #4C5864; }
.g-row { border-bottom: 1px solid #DCE2E7; }
.g-row.free { background: #FFFBD6; }
.g-lanes { position: relative; padding: 3px 0; min-height: 26px;
  background-image: linear-gradient(90deg, #EEF1F4 1px, transparent 1px); background-size: calc(100% / var(--weeks)) 100%; }
.g-lane { position: relative; height: 15px; margin: 1px 0; }
.g-bar { position: absolute; top: 0; height: 14px; line-height: 14px; padding: 0 4px; background: #3EB3BD; color: #fff !important; font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; border-radius: 1px; }
.g-bar:hover { background: #17829C; z-index: 1; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #F5A623; opacity: .7; z-index: 1; }

/* Учебные группы: экран целиком в окне, прокручиваются только список групп и таблица договоров (как в АК) */
@media (min-width: 901px) {
  .content:has(> .nav2) { padding-bottom: 0; }
  .nav2 { height: calc(100vh - 64px); align-items: stretch; }
  .nav2 > .groups-col { position: static; max-height: none; height: 100%; min-height: 0; }
  .nav2 > .contracts-col.panel { height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .nav2 > .contracts-col .table-wrap { flex: 1; min-height: 0; overflow: auto; }
  .nav2 > .contracts-col .table-wrap thead { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: 0 1px 0 #E1E6EA; }
}
table.contracts .cps { display: flex; flex-wrap: wrap; gap: 2px; max-width: 150px; }
table.contracts td:last-child { max-width: none; overflow: visible; }
.tile-value.long { font-size: 19px; padding-top: 12px; }
table.contracts td.wcell { line-height: 1.15; }
table.contracts td.wcell small { display: block; color: #1BA2C6; font-size: 11px; }
table.contracts .cps .cp.passed { background: #4CAF50; color: #fff; border-color: #4CAF50; }
table.contracts .cps .cp.failed { background: #E53935; color: #fff; border-color: #E53935; }

/* ---- Показатели автошколы ---- */
.filters .inl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.seg-tabs { display: inline-flex; border: 1px solid #2BB4D2; border-radius: 2px; overflow: hidden; }
.seg-tabs a { padding: 5px 10px; font-size: 13px; color: #1593B3; text-decoration: none; }
.seg-tabs a.on { background: #2BB4D2; color: #fff; }
.ind-chart { padding: 12px 16px; }
.ind-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ind-bars { display: flex; align-items: stretch; gap: 10px; height: 56vh; min-height: 300px; border-bottom: 1px solid #C9D1D8; padding-top: 18px;
  background-image: linear-gradient(#EEF1F4 1px, transparent 1px); background-size: 100% 12.5%; }
.ind-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.ind-stack { width: 78%; display: flex; flex-direction: column-reverse; min-height: 0; }
.ind-stack span { display: block; width: 100%; }
.ind-val { font-size: 11px; color: #2F3B46; white-space: nowrap; margin-bottom: 2px; }
.ind-lbl { position: absolute; bottom: -20px; font-size: 11.5px; color: #4C5864; white-space: nowrap; }
.ind-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 30px; font-size: 12.5px; }
.ind-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
/* дерево с папками (Сотрудники и т. п.) */
table.tree tr.folder td { background: #F7F9FA; padding: 3px 6px; }
table.tree .fold { background: none; border: 0; cursor: pointer; font: inherit; color: #2F3B46; display: inline-flex; gap: 6px; align-items: center; }
table.tree .fold .sign::before { content: "−"; display: inline-block; width: 13px; height: 13px; line-height: 11px; text-align: center; border: 1px solid #9AA5AF; font-size: 12px; }
table.tree tbody.closed .fold .sign::before { content: "+"; }
table.tree tbody.closed tr.leaf { display: none; }
table.tree tr.leaf td:first-child { padding-left: 36px; }
.ok { color: #1FA3C0; font-weight: 700; }
table.tree tr.folder td { text-align: left !important; }
.ctag { display: inline-block; min-width: 30px; padding: 2px 5px; color: #fff; font-size: 11.5px; font-weight: 500; text-align: center; border-radius: 1px; }
.prog-body { padding: 10px 14px; overflow: auto; }
.props { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: 13.5px; }
.props dt { color: var(--muted); } .props dd { margin: 0; }
.prog-tree { width: 100%; max-width: 900px; border: 1px solid var(--line); }
.prog-tree th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 500; }
.prog-tree td { padding: 4px 8px; border-bottom: 1px solid #F1F3F5; }
/* расписание вождения: вид «Курсанты» */
table.stud-week td { vertical-align: top; white-space: normal; min-width: 110px; }
table.stud-week th.today { background: #E3F6FA; }
table.stud-week .sl { display: block; font-size: 12px; padding: 2px 4px; margin-bottom: 2px; border-left: 3px solid #5DBB4F; background: #F2FAF0; color: #2F3B46; text-decoration: none; }
table.stud-week .sl.planned { border-color: #2BB4D2; background: #EAF7FA; } table.stud-week .sl.missed { border-color: #E53935; background: #FDECEC; }
table.stud-week .sl span { color: var(--muted); }
/* таблица с прокруткой внутри (см. app.js) */
.table-wrap.fit { overflow: auto; }
.table-wrap.fit > table > thead { position: sticky; top: 0; z-index: 3; background: #fff; box-shadow: 0 1px 0 #E1E6EA; }
.table-wrap.fit > .rowcount, .nav2 .table-wrap > .rowcount { position: sticky; left: 0; bottom: 0; background: #fff; z-index: 3; }
/* «Сохранить» карточки (как в АК) — всегда внизу */
.card-save { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); margin-top: 12px; }
tbody tr.editable { cursor: default; } tbody tr.editable:hover td { background: #EAF7FA; }
.ptree { width: 100%; max-width: none; }
.ptree td { white-space: nowrap; }
.ptree td:nth-child(2) { white-space: normal; }
.ptree .ind { display: inline-block; }
.ptree .tw { width: 15px; height: 15px; line-height: 12px; padding: 0; border: 1px solid #9AA5AF; background: #fff; font-size: 12px; cursor: pointer; margin-right: 4px; }
.ptree .tw-sp { display: inline-block; width: 19px; }
.ptree tr.lv-cycle td { font-weight: 600; background: #F7F9FA; }
.ptree tr.lv-subject td { font-weight: 500; }
.ptree tr.sel td { background: #D7F0F6 !important; }
.ptree tfoot td { border-top: 2px solid var(--line); }
.ptree .ctag { min-width: 18px; padding: 0 4px; margin-left: 4px; font-size: 10px; }

/* производственный календарь */
.wcal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.wcal-m { background: var(--surface, #fff); border: 1px solid var(--line, #d9e1e6); border-radius: 6px; padding: 8px; }
.wcal-m h3 { margin: 0 0 6px; font-size: 14px; display: flex; justify-content: space-between; }
.wcal-m table { width: 100%; border-collapse: collapse; }
.wcal-m th { font-size: 11px; font-weight: 500; color: var(--muted, #6b7a86); padding: 2px; }
.wcal-m th.off { color: #d33; }
.wcal-m td { padding: 1px; text-align: center; }
.wcal-m form { margin: 0; }
.wcal .wd { width: 100%; min-width: 26px; padding: 3px 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer; font: inherit; font-size: 12px; color: inherit; position: relative; }
.wcal .wd:hover { background: #e3f4f8; }
.wcal .wd.off { color: #d33; background: #fdeeee; font-weight: 500; }
.wcal .wd.man::after { content: ""; position: absolute; right: 2px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: #1C97B3; }
.menu-pop .menu-status { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 14px; font: inherit; color: #e07b00; cursor: pointer; }
.menu-pop .menu-status:hover { background: #fff4e5; }
.menu-pop form { margin: 0; }

/* Учебные группы: меню группы, фильтр, папки (как в АК) */
.groups-col .col-icons { display: flex; gap: 2px; align-items: center; }
.gf-pop { position: relative; }
.gf-pop > summary { list-style: none; cursor: pointer; padding: 2px 6px; border-radius: 3px; color: #fff; font-size: 17px; line-height: 1; display: flex; align-items: center; }
.gf-pop > summary::-webkit-details-marker { display: none; }
.gf-pop > summary.on { background: rgba(0,0,0,.2); }
.gf-pop > .menu-pop, .gf-pop > .gf-form { position: absolute; left: 0; top: 26px; z-index: 50; background: #fff; color: #333; box-shadow: 0 6px 24px rgba(0,0,0,.2); border-radius: 4px; min-width: 250px; font-size: 13px; }
.gf-pop > .menu-pop a, .gf-pop > .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 14px; color: #333; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.gf-pop > .menu-pop a:hover, .gf-pop > .menu-pop button:hover { background: #eef7fa; }
.gf-form { padding: 12px 14px; width: 320px; display: grid; gap: 4px; }
.gf-form > label { font-size: 12px; color: #777; margin-top: 6px; }
.gf-form > label.check { color: #333; font-size: 13px; }
.gf-checks { display: grid; gap: 2px; max-height: 140px; overflow: auto; }
.gf-checks label { font-size: 13px; color: #333; }
.gf-dates { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #777; }
.gf-dates input { flex: 1; min-width: 0; }
.gf-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.gwrap { position: relative; }
.gwrap .gcard { padding-right: 30px; }
.gmenu { position: absolute; right: 8px; top: 9px; z-index: 5; }
.gmenu > summary { list-style: none; width: 18px; height: 18px; border-radius: 50%; background: #1C97B3; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; cursor: pointer; padding-bottom: 3px; }
.gmenu > summary::-webkit-details-marker { display: none; }
.gmenu[open] > summary { background: #13788f; }
.gmenu > .menu-pop { position: absolute; left: 22px; top: 0; z-index: 60; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.2); border-radius: 4px; min-width: 290px; padding: 4px 0; font-size: 13px; }
.gmenu > .menu-pop a, .gmenu > .menu-pop button { display: block; width: 100%; text-align: left; padding: 7px 14px; color: #333; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.gmenu > .menu-pop a:hover, .gmenu > .menu-pop button:hover { background: #eef7fa; }
.gmenu > .menu-pop .menu-status { color: #e07b00; }
.gmenu > .menu-pop form { margin: 0; }
.gcard.folder strong { font-size: 14px; }
.gcard.folder.up { background: #f4f8fa; }
.gcard.is-hidden { opacity: .55; }
.gcard.drop-on { background: #d8f1f6 !important; outline: 2px dashed #1C97B3; }
.tag.br.c-red { background: #E23B3B; } .tag.br.c-blue { background: #3a3ae0; } .tag.br.c-violet { background: #6a2ee0; }
.tag.br.c-green { background: #3aa655; } .tag.br.c-amber { background: #e0a21c; } .tag.br.c-grey { background: #8a96a0; }
.gcard .ok { display: none; }
/* календарь начала групп */
.gstarts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gstarts section { background: #fff; border: 1px solid #d9e1e6; border-radius: 6px; padding: 8px; }
.gstarts h3 { margin: 0 0 6px; font-size: 14px; }
.gstarts table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.gstarts th { font-size: 11px; color: #6b7a86; font-weight: 500; }
.gstarts td { vertical-align: top; height: 34px; border: 1px solid #eef2f4; padding: 1px; font-size: 11px; }
.gstarts td .d { color: #999; font-size: 10px; }
.gstarts td a { display: block; color: #fff; border-radius: 2px; padding: 0 2px; margin-top: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.gf-actions .btn.ghost { font-size: 12px; }
.gmenu > .menu-pop { right: auto; width: max-content; }

/* Карточка договора как в АК */
.sc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0 10px; }
.sc-head h1 { font-size: 18px; margin: 0 4px; font-weight: 500; }
.sc-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 3px; color: #1C97B3; font-weight: 700; text-decoration: none; }
.sc-ico:hover { background: #e3f4f8; }
.sc-ico .dot-off { position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border-radius: 50%; background: #e05a5a; }
.tag.gr { background: #3aa655; color: #fff; } .tag.pr { background: #19A7C2; color: #fff; text-transform: uppercase; } .tag.ins { background: #eef2f4; color: #333; }
.ak-main { display: grid; grid-template-columns: 1fr 170px; gap: 16px; }
.ak-fields { display: grid; gap: 8px; }
.ak-row { display: grid; gap: 8px 14px; align-items: end; }
.ak-row.c2 { grid-template-columns: 1fr 2fr; } .ak-row.c3 { grid-template-columns: 1fr 1fr 1fr; } .ak-row.c4 { grid-template-columns: repeat(4, 1fr); } .ak-row.c4h { grid-template-columns: 1fr 1fr 1fr 2fr; }
.ak-row.c5 { grid-template-columns: repeat(4, 1fr) auto; } .ak-row.c6 { grid-template-columns: 1fr 1.2fr 50px 1fr .6fr 1fr; }
.ak-row.c-addr { grid-template-columns: 3fr 1fr 1fr; } .ak-row.c-addr2 { grid-template-columns: 4fr 1fr; }
.ak-row .span2 { grid-column: span 2; }
.ak-row + .ak-row { margin-top: 4px; }
.ak-photo { border: 1px dashed #c9d3d9; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; color: #b5c0c6; font-size: 48px; overflow: hidden; }
.ak-photo img { max-width: 100%; max-height: 200px; object-fit: cover; }
.ak-photo label.btn { font-size: 11px; cursor: pointer; } .ak-photo input[type=file] { display: none; }
.seg { display: inline-flex; border: 1px solid #19A7C2; border-radius: 3px; overflow: hidden; }
.seg label { padding: 7px 12px; font-size: 12px; font-weight: 500; color: #19A7C2; cursor: pointer; text-transform: uppercase; }
.seg label.on { background: #19A7C2; color: #fff; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg.big label { padding: 8px 18px; text-transform: none; font-size: 13px; }
.panel-sub { background: linear-gradient(90deg, #1C97B3, #3BC7DA); color: #fff; padding: 6px 10px; margin: -4px -4px 8px; font-weight: 500; border-radius: 2px; }
.doc-grid td input { width: 100%; min-width: 70px; }
.pf-row { display: grid; grid-template-columns: 60px 1.3fr 1.3fr 1fr; gap: 10px; align-items: end; margin-bottom: 6px; }
.pf { display: inline-flex; align-items: center; justify-content: center; height: 32px; align-self: end; color: #fff; font-weight: 500; border-radius: 3px; font-size: 12px; }
.pf.plan { background: #8c7ae6; } .pf.fact { background: #f0932b; }
.ops .acc { background: #8c7ae6; color: #fff; padding: 1px 6px; border-radius: 3px; } .ops .pd { background: #3aa655; color: #fff; padding: 1px 6px; border-radius: 3px; }
.ops-total { padding: 10px 4px; display: grid; gap: 3px; font-size: 13px; } .ops-total .neg { color: #e23b3b; }
@media (max-width: 900px) { .ak-main { grid-template-columns: 1fr; } .ak-row.c4, .ak-row.c5, .ak-row.c6, .ak-row.c3, .ak-row.c-addr, .ak-row.c-addr2, .pf-row { grid-template-columns: 1fr 1fr; } }
.cp-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cp-col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; border: 1px solid #e3e9ec; border-radius: 3px; text-decoration: none; min-width: 64px; }
.cp-col .meta { font-size: 11px; }
#acts .menu-pop { min-width: 300px; z-index: 80; }
#acts .menu-pop button { display: block; width: 100%; text-align: left; padding: 7px 14px; background: none; border: 0; font: inherit; color: #333; cursor: pointer; }
#acts .menu-pop button:hover { background: #eef7fa; }
#acts .menu-pop button:disabled { color: #aaa; cursor: default; }
#acts .menu-pop .menu-status { color: #e07b00; }
#acts .acts-hint { padding: 6px 14px; margin: 0; }
.btn.danger { color: #e23b3b; }
dialog.akdlg { border: 0; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.3); padding: 18px 20px; min-width: 360px; }
dialog.akdlg h3 { margin: 0 0 12px; font-size: 16px; font-weight: 500; }
dialog.akdlg label { display: grid; gap: 4px; font-size: 12px; color: #666; margin-bottom: 10px; }
dialog.akdlg::backdrop { background: rgba(0,0,0,.35); }
.contracts-col .toolbar [data-bulk-delete] { margin-left: auto; }
/* Журналы-списки как в АК: заголовок-полоса, панель инструментов, таблица во всю высоту */
.ak-list { display: flex; flex-direction: column; min-height: 0; }
.ak-list > .toolbar { border-bottom: 1px solid #e3e9ec; }
.ak-list > .toolbar input[type=search] { max-width: 220px; }
.ak-list > .toolbar .per-custom { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: #777; }
.ak-list > .toolbar .per-custom[hidden] { display: none; }
.ak-list tfoot td { background: #f7fafb; font-size: 12px; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: auto; cursor: default; }
.filters .per-custom[hidden] { display: none; }
.pay-nav { display: flex; gap: 10px; align-items: stretch; } .pay-nav tr.sel td { background: #e3f4f8; }
.box.sel { outline: 2px solid #1C97B3; } .box { cursor: pointer; }
/* контекстное меню слота */
.ctx-menu { position: fixed; z-index: 200; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); border-radius: 4px; padding: 4px 0; min-width: 230px; font-size: 13px; }
.ctx-menu > a, .ctx-menu > button, .ctx-sub > span, .ctx-subpop button { display: block; width: 100%; text-align: left; padding: 7px 14px; background: none; border: 0; font: inherit; color: #333; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ctx-menu > a:hover, .ctx-menu > button:hover, .ctx-sub:hover > span, .ctx-subpop button:hover { background: #eef7fa; }
.ctx-menu .danger { color: #e23b3b; }
.ctx-sub { position: relative; }
.ctx-subpop { display: none; position: absolute; left: 100%; top: 0; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); border-radius: 4px; padding: 4px 0; min-width: 220px; }
.ctx-sub:hover .ctx-subpop { display: block; }
.tg-ev.reserved { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0 4px, transparent 4px 8px); }
.tg-repl { border: 0; background: none; color: #1C97B3; cursor: pointer; font-size: 14px; padding: 0 2px; }
.sched-tools { margin: 6px 0; }
#pick-t tr.sel td { background: #e3f4f8; }
.mth { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.mth h3 { font-size: 14px; margin: 0 0 6px; }
.mth select { width: 100%; }
.mth-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.g-lanes.drop{outline:2px dashed var(--accent,#2563eb);outline-offset:-2px}.g-weeks span.we{color:#c0392b}
.mon{display:grid;grid-template-columns:1fr 420px;gap:12px}.mon-map{height:70vh;min-height:360px;border:1px solid var(--line,#ddd);border-radius:6px}@media(max-width:900px){.mon{grid-template-columns:1fr}}
.scale-tg{display:inline-flex}.scale-tg .btn{border-radius:0;background:var(--card,#fff);color:var(--ink,#333);border:1px solid #2bb6d6}.scale-tg .btn.on{background:#2bb6d6;color:#fff}
.tcal-title{margin:0 8px;white-space:nowrap}
.tcal{border-top:1px solid #e3e7ea}
.tc-head{display:grid;grid-template-columns:56px repeat(var(--cols),1fr);background:#f5f7f8;font-size:13px;font-weight:600}
.tc-head span{padding:6px;text-align:center;border-left:1px solid #e3e7ea}.tc-head .today{color:#2bb6d6}.tc-head .we{color:#c0392b}
.tc-body{display:grid;grid-template-columns:56px repeat(var(--cols),1fr);height:900px;position:relative}
.tc-hours{display:flex;flex-direction:column}.tc-hours span{flex:1;font-size:11px;color:#888;padding:2px 4px;border-top:1px solid #eef1f3}
.tc-col{position:relative;border-left:1px solid #e3e7ea;background:repeating-linear-gradient(#fff 0,#fff calc(100%/14 - 1px),#eef1f3 calc(100%/14 - 1px),#eef1f3 calc(100%/14))}
.tc-col.today{background-color:#f3fbfd}.tc-col.drop,.tm-day.drop{outline:2px dashed #2bb6d6;outline-offset:-2px}
.tc-ev{position:absolute;left:2px;right:2px;background:var(--c);border-radius:4px;padding:2px 4px;font-size:12px;line-height:1.25;overflow:hidden;cursor:pointer;color:#1d2b33;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.tc-ev span{display:block}.tc-ev a{font-weight:600;margin-right:6px}
.tc-ev.done{background:#cfd8dc;color:#555}.tc-ev.mine{outline:2px solid #2e7d32}
.tcal-month .tm-head,.tcal-month .tm-week{display:grid;grid-template-columns:repeat(7,1fr)}
.tm-head span{padding:6px;text-align:center;font-weight:600;font-size:13px;background:#f5f7f8}
.tm-day{min-height:110px;border:1px solid #eef1f3;padding:2px;position:relative}.tm-day.other{background:#fafafa;color:#aaa}.tm-day.today{background:#f3fbfd}
.tm-num{font-size:12px;color:inherit}.tm-day .tc-ev{position:static;margin-top:2px}
.att-head{padding:10px 14px;border-bottom:1px solid #eef1f3}
form.inl{display:inline}
.att-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:8px;padding:10px}
.att-card{display:flex;align-items:center;gap:10px;border:1px solid #e3e7ea;border-radius:6px;padding:6px 8px;position:relative}
.att-ind{width:22px;height:22px;border-radius:50%;border:0;background:#b0bec5;cursor:pointer;flex:none}.att-ind.present{background:#43a047}.att-ind.absent{background:#e53935}
.att-ph{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#e3e7ea;display:inline-flex;align-items:center;justify-content:center;font-weight:600;flex:none}
.att-who{flex:1;display:flex;flex-direction:column;min-width:0}
.att-menu{position:relative}.att-menu>div{position:absolute;right:0;top:100%;z-index:20;background:#fff;border:1px solid #ddd;border-radius:6px;padding:8px;width:260px;display:flex;flex-direction:column;gap:6px;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.pick-list{max-height:320px;overflow:auto;display:flex;flex-direction:column;gap:2px;margin:8px 0}
.jm.ok{color:#43a047;font-weight:700}.jm.no{color:#e53935;font-weight:700}.jm.ex{color:#f9a825;font-weight:700}.jm.op{color:#90a4ae}.jcol summary{cursor:pointer;list-style:none;font-size:12px}.jcol>div{text-align:left;font-weight:normal}
.th-prog .bar{height:8px;background:#eceff1;border-radius:4px;overflow:hidden}.th-prog .bar i{display:block;height:100%;background:#43a047}
.toolbar .scale-tg .btn:not(.on),.filters .scale-tg .btn:not(.on){background:#fff;color:#2BB4D2}.tc-body{height:700px}
.panel-head.ph-acts{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ph-btns{margin-left:auto;display:flex;gap:14px;flex-wrap:wrap}.ph-btns a,.ph-btns button{color:#fff;font-size:12.5px;font-weight:500;text-transform:uppercase;background:none;border:0;cursor:pointer;text-decoration:none;padding:0}
.tc-br{display:inline-block!important;background:#3f51b5;color:#fff;border-radius:3px;padding:0 4px;margin-top:2px;font-size:11px}
.sc-pane { padding: 4px 14px 10px; }
.sc-save { padding: 0 14px 12px; }
.perm-matrix input[type=number] { width: 70px; }
.perm-matrix th { font-size: 12px; vertical-align: bottom; }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.gallery figure { margin: 0; width: 180px; } .gallery img { width: 180px; height: 120px; object-fit: cover; border: 1px solid #dde2e8; }
.gallery figcaption { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.ph-inline { display: inline-flex; gap: 10px; align-items: center; margin-left: 14px; font-size: 13px; }
.ph-inline select { min-width: 200px; }
.tk-days { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); border-top: 1px solid #dde2e8; }
.tk-day { border-right: 1px solid #eef0f3; min-height: 360px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.tk-day.today { background: #f3fbfd; }
.tk-dh { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 2px 6px; border-bottom: 1px solid #eef0f3; margin-bottom: 4px; }
.tk-day .ev { white-space: normal; }
.tg-staff { max-height: 300px; overflow: auto; border: 1px solid #dde2e8; padding: 6px; margin-top: 6px; }
.tg-staff label { display: block; padding: 3px 0; font-size: 13px; }
dialog.akdlg.wide { width: min(900px, 96vw); }
@media (max-width: 700px) { .tk-days { grid-template-columns: 1fr; } .tk-day { min-height: 0; } }
.ph-inline .switch { white-space: nowrap; color: #fff; }
.tk-day .ev { white-space: normal; margin-bottom: 2px; }
.tr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 10px 14px 16px; }
.tr-cards.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tr-card { width: 100%; text-align: left; border: 1px solid #dde2e8; border-left: 4px solid #b8c2cc; background: #fff; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.tr-card span { font-size: 12px; color: var(--muted); }
.tr-card.ok { border-left-color: #3fa45a; background: #f1faf3; } .tr-card.bad { border-left-color: #d9534f; background: #fdf3f2; } .tr-card.part { border-left-color: #f0ad4e; }
.tr-card:hover { border-color: #2fb5d2; }
.fav-btn { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #c9a200; }
body.projector .ex-text { font-size: 30px; line-height: 1.35; } body.projector .ex-choice { font-size: 24px; } body.projector .ex-img { max-height: 55vh; }
.lib { display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid #dde2e8; min-height: 300px; }
.lib-tree { border-right: 1px solid #dde2e8; padding: 6px 0; display: flex; flex-direction: column; }
.lib-tree a { padding: 5px 10px; font-size: 13px; color: var(--ink); text-decoration: none; }
.lib-tree a.on { background: #e5f6fa; font-weight: 600; }
.lib-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 12px; }
.lib-ic { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--ink); text-decoration: none; padding: 8px; border: 1px solid transparent; }
.lib-ic:hover { border-color: #2fb5d2; background: #f3fbfd; }
.lib-ext { width: 56px; height: 66px; display: grid; place-items: center; background: #eef3f7; border: 1px solid #cdd6df; font-weight: 700; font-size: 11px; color: #3c6f8c; }
@media (max-width: 700px) { .lib { grid-template-columns: 1fr; } .lib-tree { flex-direction: row; flex-wrap: wrap; border-right: 0; } }
.pc .pc-head { padding: 10px 14px 0; grid-template-columns: 1fr 1fr 2fr; }
.pc-list { margin: 0 14px; border: 1px solid #dde2e8; }
.pc-list-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: #2fb5d2; color: #fff; }
.pc-list-head .ph-btns button { color: #fff; }
.pc .form-actions { padding: 12px 14px; }
.pc td select { min-width: 120px; }
.gmenu details > a, .menu-pop details > a { padding-left: 26px !important; }
.gchart { overflow: auto; } .gchart th.dcol, .gchart td.dcol { min-width: 52px; text-align: center; font-size: 12px; }
.gchart th.we { background: #fbecec; } .gchart .sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 200px; }
.flt-dates td { border: 0; padding: 2px 4px; font-size: 13px; white-space: nowrap; }
