/* ============================================================================
   Медресе «7-е поколение» — фирменный стиль
   Палитра из логотипа: глубокий синий #1F4E9D, небесный #63B2FF, белый.
   Акценты: золото звёзд #F2B01E. Подпись дизайна — скошенные элементы,
   перекликающиеся с курсивным начертанием логотипа.
============================================================================ */

:root {
  --brand-900: #123468;
  --brand-800: #174083;
  --brand-700: #1F4E9D;
  --brand-600: #2A63C2;
  --sky: #63B2FF;
  --sky-soft: #E9F2FF;
  --sky-border: #C9DFF8;

  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --line: #E3EAF4;

  --text: #1C2B45;
  --text-soft: #5C6E8C;
  --muted: #8797B0;

  --gold: #F2B01E;
  --gold-soft: #FFF4DC;
  --ok: #1F9D5B;
  --ok-soft: #E6F6EE;
  --danger: #E14D4D;
  --danger-soft: #FDEBEB;
  --warn: #C77A11;
  --warn-soft: #FFF3E0;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 18px rgba(31, 78, 157, 0.08);
  --shadow-hover: 0 8px 26px rgba(31, 78, 157, 0.14);

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Inter', var(--font-body);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
img { max-width: 100%; }
.ic { flex: none; vertical-align: -3px; }

/* ---------------------------------------------------------------- каркас */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 22px 26px 48px; max-width: 1280px; width: 100%; }

/* --------------------------------------------------------------- сайдбар */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: linear-gradient(168deg, var(--brand-800) 0%, var(--brand-900) 68%, #0D2650 100%);
  color: #DCE8FA;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brand img {
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; padding: 2px;
  box-shadow: 0 0 0 2px rgba(99, 178, 255, 0.55);
}
.brand-name { line-height: 1.12; }
.brand-name span {
  display: block; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky); font-weight: 700;
}
.brand-name b {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 17px; color: #fff; letter-spacing: .01em;
}

.nav { padding: 12px 10px; flex: 1; }
.nav-group {
  padding: 14px 12px 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(220, 232, 250, 0.5);
}
.nav-sep { height: 1px; margin: 12px 12px; background: rgba(255,255,255,.12); }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: var(--radius-sm);
  color: #CBDCF6; font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(99, 178, 255, 0.16); color: #fff; }
.nav a.active::before {
  content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 4px;
  background: var(--sky); border-radius: 0 4px 4px 0;
  transform: skewY(-14deg); /* эхо наклона логотипа */
}
.soon {
  margin-left: auto; font-size: 10px; font-weight: 800;
  background: var(--gold); color: #4A3200;
  padding: 2px 7px; border-radius: 999px;
  transform: skewX(-8deg);
}
.sidebar-foot {
  padding: 10px; border-top: 1px solid rgba(255,255,255,.12);
}
.sidebar-foot a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: #CBDCF6; font-weight: 600; font-size: 13.5px;
}
.sidebar-foot a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar-overlay { display: none; }

/* ---------------------------------------------------------------- топбар */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.burger {
  display: none; background: none; border: 0; color: var(--brand-700);
  cursor: pointer; padding: 4px;
}
.page-title {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 21px; color: var(--brand-800);
  position: relative; padding-bottom: 2px;
}
.page-title::after {
  content: ''; position: absolute; left: 1px; bottom: -3px;
  width: 44px; height: 4px; background: var(--sky);
  border-radius: 2px; transform: skewX(-24deg);
}
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.role-chip {
  background: var(--sky-soft); color: var(--brand-700);
  border: 1px solid var(--sky-border);
  font-size: 12px; font-weight: 800; padding: 4px 11px;
  border-radius: 999px; transform: skewX(-8deg);
}
.role-chip, .user-name { white-space: nowrap; }
.user-name { font-weight: 700; color: var(--text-soft); font-size: 14px; }

/* ------------------------------------------------------------------ флэш */
.flash-stack { padding: 14px 26px 0; }
.flash {
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-weight: 600; margin-bottom: 8px;
  border: 1px solid transparent;
  transition: opacity .5s, transform .5s;
}
.flash-success { background: var(--ok-soft); color: #14603A; border-color: #BFE7D2; }
.flash-error { background: var(--danger-soft); color: #9C2727; border-color: #F4C7C7; }
.flash.hide { opacity: 0; transform: translateY(-6px); }

/* --------------------------------------------------------------- карточки */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .table { margin: 0; }
.card-head { border-left: 5px solid var(--sky); }
.card-title {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 16.5px; color: var(--brand-800); margin-bottom: 14px;
}
.card-title.xl { font-size: 23px; margin-bottom: 8px; }
.card-title a { color: inherit; }
.card-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.card-title-row .card-title { margin-bottom: 0; }
.card-title-row.pad { padding: 16px 20px 12px; margin-bottom: 0; }
.pad { padding: 16px 20px; }
.count-badge {
  font-family: var(--font-body); font-style: normal;
  background: var(--sky-soft); color: var(--brand-700);
  font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  vertical-align: 2px;
}

/* ------------------------------------------------------------- stat-cards */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  color: var(--text);
  display: block;
  transition: box-shadow .18s, transform .18s;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: -6px;
  width: 52px; height: 5px; background: var(--sky);
  transform: skewX(-30deg);
}
a.stat-card:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--sky-soft); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  transform: skewX(-6deg); margin-bottom: 10px;
}
.stat-icon .ic { transform: skewX(6deg); }
.stat-value {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: clamp(20px, 2.1vw, 27px);
  color: var(--brand-700); line-height: 1.1;
  white-space: nowrap;
}
.stat-label { color: var(--text-soft); font-weight: 600; font-size: 13px; margin-top: 3px; }
.stat-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-danger .stat-value { color: var(--danger); }
.stat-danger::before { background: var(--danger); }

/* ----------------------------------------------------------------- сетки */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.grid-2 > .card, .grid-side > .card { margin-bottom: 0; }
.grid-2 > div > .card:last-child, .grid-side > div > .card:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- таблицы */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 11px 16px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #FAFCFF;
  white-space: nowrap;
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { background: #FAFCFF; font-weight: 700; border-top: 2px solid var(--line); }
.table-hover tbody tr:hover { background: var(--sky-soft); }
.row-link { cursor: pointer; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.nowrap { white-space: nowrap; }
td .btn { vertical-align: middle; }

/* ------------------------------------------------------------------ формы */
.form label {
  display: block; margin-bottom: 13px;
  font-weight: 700; font-size: 13px; color: var(--text-soft);
}
.form input:not([type="radio"]):not([type="checkbox"]),
.form select, .form textarea {
  display: block; width: 100%; margin-top: 5px;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(99, 178, 255, 0.22);
}
.form textarea { resize: vertical; }
.form small { font-weight: 500; color: var(--muted); }
.req { color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-wide { max-width: 1100px; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 4px; padding-top: 16px;
}
.inline-form { display: inline-block; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { margin-top: 0 !important; }
.subhead {
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-700);
  margin: 14px 0 8px;
}
.subhead:first-child { margin-top: 0; }
.hint {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--sky-soft); border: 1px solid var(--sky-border);
  color: var(--brand-800);
  border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 13px; margin: 12px 0 0;
}
.hint .ic { margin-top: 2px; }

/* ----------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--brand-700);
  font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--sky); background: var(--sky-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  border-color: var(--brand-700); color: #fff;
  box-shadow: 0 3px 10px rgba(31, 78, 157, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #C93B3B; border-color: #C93B3B; }
.btn-danger-ghost { border-color: transparent; color: var(--danger); background: transparent; padding: 6px; }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--sky-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 6px; border-color: transparent; background: transparent; }
.btn-icon:hover { background: var(--sky-soft); }

/* ------------------------------------------------------------------- чипы */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3.5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  background: #EEF2F8; color: var(--text-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-ok { background: var(--ok-soft); color: #14603A; border-color: #BFE7D2; }
.chip-ok-soft { background: var(--ok-soft); color: #14603A; border-color: transparent; }
.chip-danger-soft { background: var(--danger-soft); color: #9B2C2C; border-color: transparent; }
.chip-danger { background: var(--danger-soft); color: #9C2727; border-color: #F4C7C7; }
.chip-warn { background: var(--warn-soft); color: #8A5407; border-color: #F5DEB8; }
.chip-muted { background: #EEF1F5; color: var(--muted); border-color: transparent; }
.chip-info { background: var(--sky-soft); color: var(--brand-700); border-color: var(--sky-border); }
.chips-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }

/* ------------------------------------------------------------- табы/пилюли */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 19px; color: var(--brand-800);
}
.tabs { display: inline-flex; background: #E8EEF7; border-radius: 12px; padding: 4px; gap: 4px; }
.tab {
  padding: 8px 16px; border-radius: 9px;
  font-weight: 700; font-size: 14px; color: var(--text-soft);
}
.tab:hover { text-decoration: none; color: var(--brand-700); }
.tab.active {
  background: #fff; color: var(--brand-700);
  box-shadow: 0 2px 8px rgba(31, 78, 157, 0.14);
}
.tab .count {
  background: var(--sky-soft); color: var(--brand-700);
  font-size: 11.5px; padding: 1px 8px; border-radius: 999px; margin-left: 5px;
}
.tab.active .count { background: var(--brand-700); color: #fff; }
.pill-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; font-size: 13.5px; color: var(--text-soft);
}
.pill b { color: var(--brand-700); }
.pill:hover { text-decoration: none; border-color: var(--sky); color: var(--brand-700); }
.pill.active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pill.active b { color: var(--gold); }

/* ------------------------------------------------------------------ поиск */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.searchbar input {
  border: 0; outline: none; flex: 1;
  font: inherit; font-size: 15px; color: var(--text);
  background: transparent;
}
.searchbar:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(99,178,255,.2); }

/* ------------------------------------------------------------ radio-cards */
.radio-row { display: flex; gap: 18px; margin-bottom: 12px; }
.radio { display: inline-flex; gap: 7px; align-items: center; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; }
.radio input { accent-color: var(--brand-700); width: 16px; height: 16px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.radio-cards-3 { grid-template-columns: repeat(3, 1fr); }
.radio-card {
  position: relative; display: block;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:hover { border-color: var(--sky); }
.radio-card:has(input:checked) {
  border-color: var(--brand-700);
  background: var(--sky-soft);
  box-shadow: 0 0 0 1.5px var(--brand-700) inset;
}
.rc-title { display: block; font-weight: 800; font-size: 14.5px; color: var(--text); }
.rc-sub { display: block; font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.rc-sub.price { font-weight: 800; color: var(--brand-700); font-size: 14px; }
.rc-note { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ------------------------------------------------------------------ звёзды */
.stars { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.stars-track {
  position: relative; font-size: 16px; line-height: 1;
  color: #D5DEEA; letter-spacing: 2px;
}
.stars-fill {
  position: absolute; left: 0; top: 0;
  overflow: hidden; white-space: nowrap;
  color: var(--gold); letter-spacing: 2px;
}
.stars b { font-size: 13.5px; color: var(--text-soft); }

/* ------------------------------------------------------------------ списки */
.dl { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 7px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; }
.dl-inline { margin-top: 12px; grid-template-columns: auto 1fr auto 1fr; }
.link-list { margin: 0; padding-left: 18px; }
.link-list li { margin-bottom: 4px; }
.file-list { list-style: none; margin: 0 0 10px; padding: 0; }
.file-list li { padding: 5px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.file-list li:last-child { border-bottom: 0; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-danger { color: var(--danger); }
.text-ok { color: #14603A; }
.mini-link { font-size: 12px; font-weight: 700; }
.big-money {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 30px; color: var(--brand-700); white-space: nowrap;
}

/* --------------------------------------------------------------- head-row */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----------------------------------------------------------- parent block */
.parent-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.parent-block:last-of-type { border-bottom: 0; }
.parent-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 5px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 7px; }
.clink {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700;
  background: var(--sky-soft); border: 1px solid var(--sky-border);
  padding: 3px 10px; border-radius: 999px;
}
.clink:hover { text-decoration: none; background: #DCEBFD; }
.parent-line { margin-bottom: 6px; }
.comment-list { margin-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.comment {
  background: var(--gold-soft); border: 1px solid #F3E2B8;
  border-radius: var(--radius-sm); padding: 8px 11px; font-size: 13.5px;
}
.comment-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: #8A6A1E; font-weight: 700; margin-bottom: 2px;
}
.rating-help summary { font-size: 12px; color: var(--brand-700); cursor: pointer; font-weight: 700; }
.rating-help p { margin: 6px 0 0; }

/* ---------------------------------------------------------------- details */
.details-form { margin-top: 9px; }
.details-form > summary {
  cursor: pointer; font-weight: 700; font-size: 13px; color: var(--brand-700);
  display: inline-flex; align-items: center; gap: 5px;
  list-style: none;
}
.details-form > summary::-webkit-details-marker { display: none; }
.details-form[open] > summary { margin-bottom: 9px; }
.details-form .form { background: #FAFCFF; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; }
.details-right { position: relative; display: inline-block; text-align: left; }
.add-form { padding-top: 10px; }

/* ------------------------------------------------------------------- шаги */
.steps { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.step {
  padding: 8px 18px; border-radius: 999px;
  background: #E8EEF7; color: var(--text-soft);
  font-weight: 700; font-size: 13.5px;
  transform: skewX(-8deg);
}
.step > * { transform: skewX(8deg); }
.step.active { background: var(--brand-700); color: #fff; }
.step.done { background: var(--ok-soft); color: #14603A; }

/* ---------------------------------------------------------------- баннеры */
.banner {
  display: flex; gap: 11px; align-items: flex-start;
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 18px; font-size: 14px;
  border: 1px solid transparent;
}
.banner .ic { margin-top: 2px; flex: none; }
.banner-info { background: var(--sky-soft); border-color: var(--sky-border); color: var(--brand-800); }
.banner-warn { background: var(--warn-soft); border-color: #F5DEB8; color: #7A4B06; }
.banner-ok { background: var(--ok-soft); border-color: #BFE3CE; color: #14603A; }

/* -------------------------------------------------------------------- бары */
.bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
.bar-label { font-weight: 700; font-size: 13.5px; color: var(--text-soft); }
.bar-label b { color: var(--brand-700); }
.bar-track {
  display: flex; height: 26px; border-radius: 8px; overflow: hidden;
  background: #EEF2F8;
}
.bar-seg {
  display: flex; align-items: center; justify-content: center;
  min-width: 22px; color: #fff; font-size: 12px; font-weight: 800;
}
.seg-monthly { background: var(--sky); }
.seg-half_year { background: var(--brand-700); }
.seg-year { background: var(--gold); color: #4A3200; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* -------------------------------------------------------------- пустышки */
.empty-state {
  background: var(--surface); border: 1px dashed var(--sky-border);
  border-radius: var(--radius);
  padding: 52px 24px; text-align: center;
  color: var(--brand-700);
}
.empty-state h2 {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  margin: 12px 0 6px; color: var(--brand-800);
}
.empty-state p { max-width: 520px; margin: 0 auto; }

/* --------------------------------------------------------------- разное */
.quick-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.month-form input {
  padding: 8px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; background: #fff;
}
.upload-form { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.file-drop {
  flex: 1; min-width: 190px;
  display: flex; align-items: center; gap: 9px;
  border: 1.5px dashed var(--sky-border); border-radius: var(--radius-sm);
  padding: 9px 13px; cursor: pointer; color: var(--brand-700);
  font-weight: 700; font-size: 13.5px; background: var(--sky-soft);
}
.file-drop:hover { border-color: var(--sky); }
.file-drop input { font-size: 12.5px; font-weight: 500; color: var(--text-soft); max-width: 220px; }
.transfer-form { display: flex; gap: 7px; align-items: center; }
.transfer-form select {
  padding: 6px 9px; border: 1.5px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13px;
}
.cred { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.cred-input {
  border: 1px solid var(--line); border-radius: 7px;
  padding: 4px 9px; width: 150px; background: #FAFCFF;
}
.danger-zone { border-color: #F4C7C7; }
.danger-zone .card-title { color: var(--danger); }
.doc-subhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.op-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 13.5px; margin-bottom: 14px;
}

/* ------------------------------------------------------------------ вход */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(99, 178, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at 110% 110%, rgba(242, 176, 30, 0.18), transparent 55%),
    linear-gradient(155deg, var(--brand-800), var(--brand-900) 70%);
  padding: 24px;
}
.login-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  width: min(880px, 100%);
  background: var(--surface);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(6, 20, 46, 0.5);
}
.login-hero {
  background: linear-gradient(160deg, var(--brand-700), var(--brand-900));
  color: #fff; padding: 46px 38px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  position: relative; overflow: hidden;
}
.login-hero::after {
  content: ''; position: absolute; right: -70px; top: -40px;
  width: 230px; height: 340px;
  background: rgba(99, 178, 255, 0.14);
  transform: skewX(-16deg);
}
.login-hero img {
  width: 108px; height: 108px; border-radius: 50%;
  background: #fff; padding: 4px; margin-bottom: 22px;
  box-shadow: 0 0 0 4px rgba(99, 178, 255, 0.4);
  position: relative; z-index: 1;
}
.login-hero h1 {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 27px; line-height: 1.15; position: relative; z-index: 1;
}
.login-hero h1 span {
  display: block; font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--sky); margin-bottom: 4px;
}
.login-hero p { color: #C6D9F6; font-size: 14px; margin: 12px 0 0; position: relative; z-index: 1; }
.login-panel { padding: 46px 40px; display: flex; align-items: center; }
.login-form { width: 100%; }
.login-form h2 {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  color: var(--brand-800); margin-bottom: 20px; font-size: 21px;
}
.login-form label { display: block; font-weight: 700; font-size: 13px; color: var(--text-soft); margin-bottom: 15px; }
.login-form input {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px;
}
.login-form input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(99,178,255,.22); }
.login-form .btn { margin-top: 6px; }
.login-hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 16px 0 0; }

/* ----------------------------------------------------------------- ошибки */
.error-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--brand-800), var(--brand-900));
  font-family: var(--font-body); color: var(--text);
  padding: 24px; margin: 0;
}
.error-box {
  background: #fff; border-radius: 22px; padding: 44px 52px;
  text-align: center; max-width: 440px;
  box-shadow: 0 24px 70px rgba(6, 20, 46, 0.5);
}
.error-box img { width: 76px; height: 76px; border-radius: 50%; }
.error-code {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 58px; color: var(--sky); line-height: 1; margin: 12px 0 4px;
}
.error-box h1 { font-family: var(--font-display); font-style: italic; font-size: 21px; color: var(--brand-800); }
.error-box p { color: var(--text-soft); margin: 10px 0 20px; }

/* ------------------------------------------------------------- адаптивность */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-side { grid-template-columns: 1fr; }
  .dl-inline { grid-template-columns: auto 1fr; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 8px 0 30px rgba(6, 20, 46, 0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 50;
    background: rgba(9, 22, 48, 0.5);
  }
  .sidebar-overlay.show { display: block; }
  .burger { display: inline-flex; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 12px 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr; }
  .card-flush { overflow-x: auto; }
  .card-flush .table { min-width: 620px; }
  .user-name { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 28px; }
  .login-hero img { width: 76px; height: 76px; margin-bottom: 14px; }
  .login-panel { padding: 30px 24px; }
  .radio-cards-3 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 5px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .radio-cards { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { justify-content: center; }
}

/* ==========================================================================
   Дополнения: бейджи навигации, массовый выбор, загрузка файлов
   ========================================================================== */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; margin-left: auto;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 800; font-style: normal;
}
.sidebar nav a { gap: 8px; }

.col-check { width: 34px; }
.col-check input, td input[data-bulk-item] { width: 16px; height: 16px; accent-color: var(--brand-700); cursor: pointer; }

.bulk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 14px; padding: 12px 16px; border: 1px dashed var(--line);
  border-radius: var(--r-md); background: var(--card); flex-wrap: wrap;
}

.upload-status { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; }
.upload-status li { padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.upload-status li.ok { color: var(--ok); font-weight: 600; }
.upload-status li.err { color: var(--danger); font-weight: 600; }

.remark-decide { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.remark-decide input[type=number] { width: 120px; }

.slip-status { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 720px) {
  .bulk-bar { flex-direction: column; align-items: stretch; }
  .bulk-bar .btn { justify-content: center; }
}

/* ==========================================================================
   Модуль учителей: журнал, расписание, статистика
   ========================================================================== */
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-weight: 600; }

.journal-filter { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.journal-filter label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.journal-filter select, .journal-filter input { min-width: 180px; }

.journal-table td { vertical-align: middle; }
.journal-table input[type=text] { min-width: 160px; }
.grade-select { width: 74px; text-align: center; font-weight: 700; }

.att-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); }
.att-opt { position: relative; }
.att-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.att-opt span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 11px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  border-right: 1px solid var(--line); cursor: pointer; user-select: none;
  transition: background .12s, color .12s; min-width: 40px;
}
.att-opt:last-child span { border-right: 0; }
.att-opt input:checked + span { color: #fff; }
.att-present input:checked + span { background: var(--ok); }
.att-late input:checked + span { background: #E8A13C; }
.att-absent input:checked + span { background: var(--danger); }
.att-none input:checked + span { background: var(--muted); }

.lesson-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.lesson-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); text-decoration: none;
}
a.lesson-item:hover { border-color: var(--sky-border); background: var(--sky-soft); }
.lesson-time {
  font-weight: 800; color: var(--brand-700); font-size: 13px;
  background: var(--sky-soft); border-radius: 7px; padding: 3px 8px; white-space: nowrap;
}
.lesson-item .inline-form { margin-left: auto; }

.sched-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; }
.sched-day { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sched-day-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--brand-700); margin: 0 0 4px; font-weight: 800;
}

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.group-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.group-card:hover { border-color: var(--sky-border); }
.group-card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--sky-soft);
  color: var(--brand-700); display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.group-card-name { font-weight: 800; font-size: 15.5px; }
.group-card .btn { margin-left: auto; }

.inline-edit { display: flex; gap: 8px; align-items: center; }
.inline-edit input { max-width: 320px; }

.data-table input[type=number] { width: 120px; }
.data-table input[type=date] { width: 150px; }
.data-table input[type=text] { min-width: 150px; }
.data-table select { min-width: 130px; }

@media (max-width: 720px) {
  .journal-filter select, .journal-filter input { min-width: 140px; }
  .att-opt span { padding: 6px 8px; min-width: 34px; }
}

/* ==========================================================================
   Преподаватели и обнуление базы
   ========================================================================== */
.check-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.check-item {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); cursor: pointer; user-select: none;
}
.check-item input { width: 15px; height: 15px; accent-color: var(--brand-700); cursor: pointer; }
.check-item:has(input:checked) { border-color: var(--sky-border); background: var(--sky-soft); font-weight: 600; }

.danger-zone { border-color: #F4C7C7; margin-top: 18px; }
.danger-zone .card-title { color: var(--danger); }
.reset-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.reset-form input { max-width: 240px; border-color: #F4C7C7; }

@media (max-width: 720px) {
  .reset-form { flex-direction: column; }
  .reset-form input { max-width: none; }
}

/* Русский ввод дат и пары «часы:минуты» */
.date-ru { max-width: 150px; letter-spacing: .5px; }
.time-pair { display: inline-flex; align-items: center; gap: 6px; }
.time-pair select { width: auto; min-width: 64px; }
.pay-extra { margin-top: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg); }

/* Заявки из бота: подсветка новых строк */
.row-new td { background: var(--warn-soft); }

/* Режим выбора учеников: чекбоксы и панель удаления видны только в нём */
[data-bulk-form] .col-check { display: none; }
[data-bulk-form] .bulk-bar { display: none; }
[data-bulk-form].select-mode .col-check { display: table-cell; }
[data-bulk-form].select-mode .bulk-bar { display: flex; }

/* Недоступные периоды оплаты (вне окна платёжного календаря) */
.radio-card.rc-disabled { opacity: .55; cursor: not-allowed; }
.rc-note.rc-locked { color: var(--warn-strong, #9a6b00); display: inline-flex; align-items: center; gap: 4px; }

/* Расшифровка долга по периодам в карточке ученика */
.debt-breakdown { margin-top: 4px; line-height: 1.5; }

/* ---- раунд 12: широкие таблицы прокручиваются внутри карточки ----
   (min-width таблиц не трогаем: мобильное правило 620px из медиазапроса
   должно продолжать работать — иначе таблица сжалась бы вместо скролла) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }


/* раунд 14: журнал обновлений «Что нового» */
.bullets { margin: 8px 0 4px 18px; display: grid; gap: 8px; }
.bullets li { line-height: 1.45; }

/* раунд 15: информационные flash-сообщения (доплата за неполный месяц) */
.flash-info { background: #EAF2FD; color: #1D4E89; border-color: #C9DFF7; }

/* раунд 16: панель сортировки/группировки списка учеников */
.list-controls { gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-top: -6px; }
.inline-select { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.inline-select select { min-width: 190px; }
.group-heading { margin: 18px 2px 8px; display: flex; align-items: center; gap: 8px; }

/* раунд 19: бюджет учебного года */
.budget-table th, .budget-table td { vertical-align: top; font-size: 13px; }
.budget-input { display: block; width: 110px; margin: 4px 0 0 auto; padding: 4px 6px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; text-align: right; }
.budget-note { width: 160px; margin-left: 0; text-align: left; }
.budget-table tr.row-current td { background: #F4F9FF; }
.budget-table tr.row-gap td { background: #FFF3F3; }
.form-tight { min-width: 240px; }
/* раунд 19: «Порядок в данных» у делопроизводителя */
.gap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* раунд 33: кнопки строки списка — сеткой в две колонки, имя ученика шире */
.row-actions { display: inline-grid; grid-template-columns: repeat(2, auto); gap: 5px; }
.row-actions .btn { width: 100%; justify-content: flex-start; white-space: nowrap; padding: 6px 10px; }
.table .col-name { min-width: 220px; }
@media (max-width: 900px) {
  .row-actions { grid-template-columns: 1fr; }
  .table .col-name { min-width: 160px; }
}
.gap-chips .chip { cursor: default; }
/* раунд 19: атрибут hidden должен работать и для label/полей форм —
   иначе «Из них наличными» и блоки выбора покупателя показывались всегда */
[hidden] { display: none !important; }
/* колонки страницы «Обеды» не расширяются под широкие таблицы —
   таблицы прокручиваются внутри .table-scroll */
.lunch-grid > * { min-width: 0; }

/* ------------------------------------------------------------- раунд 28: посещаемость */
.att-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.att-filters label.inline { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.att-filters input, .att-filters select { min-height: 34px; }
.att-grid th.att-day, .att-grid td.att-cell { padding: 6px 4px; min-width: 30px; }
.att-grid th.att-day a { font-weight: 700; }
.att-grid .att-name { position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: nowrap; }

/* ------------------------------------------------------------- раунд 28: график бюджета */
.bud-chart { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; align-items: stretch; margin: 6px 0 10px; }
.bud-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.bud-col.bud-now .bud-label { color: var(--brand-700); font-weight: 800; }
.bud-pos, .bud-neg { display: flex; gap: 3px; justify-content: center; height: 90px; }
.bud-pos { align-items: flex-end; border-bottom: 2px solid var(--line); }
.bud-neg { align-items: flex-start; height: 45px; }
.bud-bar { width: 42%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.bud-bar.bud-minus { border-radius: 0 0 4px 4px; }
.bud-real { background: #1F9D5B; }
.bud-limit { background: #9BB3D9; }
.bud-real.bud-minus { background: var(--danger); }
.bud-limit.bud-minus { background: #F1A7A7; }
.bud-label { text-align: center; font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.bud-val { text-align: center; font-size: 11px; color: var(--text-soft); }
.bud-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.bud-key-real { background: #1F9D5B; }
.bud-key-limit { background: #9BB3D9; }

/* ------------------------------------------------------------- раунд 28: меню с группами */
.nav-fold { margin: 2px 0; }
.nav-fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin: 2px 0; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; color: #E4EEFC; user-select: none;
}
.nav-fold > summary::-webkit-details-marker { display: none; }
.nav-fold > summary::after { content: "▸"; margin-left: auto; font-size: 12px; opacity: .6; transition: transform .15s; }
.nav-fold[open] > summary::after { transform: rotate(90deg); }
.nav-fold > summary:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-fold[open] > summary { color: #fff; }
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > a { flex: 1; min-width: 0; }
.nav-sub > a { padding-left: 41px !important; font-size: 13.5px; font-weight: 500; color: #BBD0F0; }
.nav-star {
  border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 6px 6px; color: rgba(220, 232, 250, 0.55); border-radius: 8px; opacity: 0; transition: opacity .12s;
}
.nav-row:hover .nav-star, .nav-star.on, .nav-star:focus { opacity: 1; }
.nav-star.on { color: #FFC94D; }
.nav-star:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-fav-title { color: #FFD86B !important; }
.nav-fav-empty { font-size: 12px; color: rgba(220, 232, 250, 0.6); padding: 4px 12px 8px; }
@media (hover: none) { .nav-star { opacity: 1; } }

/* раунд 29: отметка выплаты зарплаты с датой выдачи */
.pay-mark { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 8px; }
.pay-mark .btn { flex: 1 1 200px; }
.pay-mark-date { display: flex; flex-direction: column; flex: 0 0 132px;
  font-weight: 700; font-size: 12px; color: var(--text-soft); }
.pay-mark-date input { margin-top: 4px; padding: 8px 10px; width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; color: var(--text); background: #fff; }

/* раунд 29: расходы «Зарплата» без листа — карточки с формой привязки */
.unlinked-item { border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; }
.unlinked-head { font-size: 14px; margin-bottom: 4px; overflow-wrap: anywhere; }
.unlinked-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0 6px; }
.unlinked-form label { flex: 1 1 180px; margin-bottom: 0; min-width: 0; }
.unlinked-form .btn { flex: 0 0 auto; }

/* раунд 31: вид постоянной траты — варианты столбиком */
.radio-col { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.radio-col .radio { font-weight: 600; font-size: 13.5px; }
.year-opts { margin-bottom: 4px; }
.budget-grid > * { min-width: 0; }
/* раунд 31: у списка постоянных трат больше колонок — ему две трети ширины */
@media (min-width: 901px) {
  .budget-grid { grid-template-columns: minmax(280px, 1fr) 2fr; }
}

/* раунд 34: финансовая сводка директора */
.fin-kpis { grid-template-columns: repeat(4, 1fr); align-items: start; }
.fin-details { margin-top: 8px; font-size: 13px; }
.fin-details summary { cursor: pointer; color: var(--brand-800); font-weight: 700; }
.fin-list { list-style: none; margin: 6px 0 0; padding: 0; }
.fin-list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.fin-list li:last-child { border-bottom: 0; }
.debt-days { font-size: 18px; font-weight: 800; color: var(--danger, #C0392B); }
.debt-days-hot { font-size: 20px; }
.debt-sum { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.fin-check { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
/* раунд 36: оплата трат за учебный год частями */
.cost-pay { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--sky-soft, #F2F7FD); }
.cost-pay .fin-list li { align-items: center; }
@media (max-width: 1100px) { .fin-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fin-kpis { grid-template-columns: 1fr; } }

/* раунд 41: «Пенаты оплачены» — строка зелёная; отметки ФИО */
.table tr.row-ok > td { background: var(--ok-soft); }
.mark-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 8px; }
.mark-actions .details-form { margin: 0; }
.list-controls { display: flex; }
.row-actions .inline-form, .row-actions .details-form { margin: 0; }
.row-actions .inline-form .btn, .row-actions .details-form > summary.btn { width: 100%; justify-content: flex-start; white-space: nowrap; padding: 6px 10px; }
.row-actions .details-form[open] { grid-column: 1 / -1; text-align: left; }
.btn-ok { background: var(--ok-soft); color: #14603A; border-color: #BFE7D2; }

/* раунд 44: ключ внешнего API — показывается один раз */
.meta-list code { word-break: break-all; }
.ext-key { font-size: 13px; padding: 8px 10px; background: #EEF1F5; border-radius: 8px; word-break: break-all; user-select: all; }
