/* Келісімшарт — мастер приёма, список договоров, прайс и печатный договор. */

.ct-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; }
.ct-tab {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
}
.ct-tab.is-active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

.ct-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px; margin-bottom: 16px;
}
.ct-h2 { font-size: 16px; margin: 0 0 14px; }
.ct-h3 { font-size: 14px; margin: 18px 0 10px; color: var(--ink-2); }
.ct-lead { margin: 0 0 6px; color: var(--ink-2); }
.ct-hint { color: var(--ink-3); font-size: 13px; margin: 8px 0 0; }
.ct-warn { background: var(--mid-bg); color: var(--mid); padding: 10px 14px; border-radius: var(--r-ctl); font-size: 14px; }
.ct-err { color: var(--low); font-size: 14px; min-height: 1em; margin: 14px 0 0; }

.ct-steps { list-style: none; padding: 0; margin: 0 0 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.ct-steps button {
  font: inherit; font-size: 13px; border: 0; background: transparent; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; color: var(--ink-3);
}
.ct-steps button:hover { color: var(--ink); background: var(--surface-2); }
.ct-steps .is-done button { color: var(--green); }
.ct-steps .is-now button { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }

.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ct-grid .field input[type="tel"],
.ct-grid .field input[type="number"] {
  font: inherit; font-size: 14px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--surface); color: var(--ink);
}
.ct-seg { max-width: 280px; }
.ct-iin { display: flex; gap: 8px; }
.ct-iin input { flex: 1; min-width: 0; }

.ct-subjs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ct-subj {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 11px 13px;
}
.ct-subj.is-on { border-color: var(--green); background: var(--green-soft); }
.ct-subj span { flex: 1; font-weight: 500; }
.ct-subj em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.ct-total-h { margin: 16px 0 0; color: var(--ink-2); }

.ct-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ct-role {
  font: inherit; font-size: 14px; cursor: pointer; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.ct-role.is-filled::after { content: " ✓"; color: var(--green); }
.ct-role.is-active { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); font-weight: 600; }

.ct-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

.ct-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.ct-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ct-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); }
.ct-table tfoot td { font-weight: 600; border-bottom: 0; }
.ct-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-table input, .ct-table select {
  font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); width: 100%; min-width: 90px;
}
.ct-table select[multiple] { padding: 4px; background-image: none; }
.ct-table .ct-n { width: 64px; min-width: 64px; }
.ct-table .ct-money { width: 110px; text-align: right; }

.ct-sum { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 0; }
.ct-sum dt { color: var(--ink-3); font-size: 13px; }
.ct-sum dd { margin: 0; }

.ct-list-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.ct-list-head input {
  font: inherit; font-size: 14px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 999px; min-width: 260px; background: var(--surface);
}
.ct-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.ct-acts .btn { padding: 6px 12px; font-size: 13px; }
.ct-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ct-ok { background: var(--ok-bg); color: var(--ok); }
.ct-mid { background: var(--mid-bg); color: var(--mid); }
.ct-low { background: var(--low-bg); color: var(--low); }
.ct-vio { background: var(--violet-bg); color: var(--violet); }
.ct-modal { position: fixed; inset: 0; z-index: 70; background: rgba(16, 22, 19, .35); display: grid; place-items: center; padding: 16px; }
.ct-modal-box { background: var(--surface); border-radius: var(--r-card); padding: 20px; width: min(520px, 100%); }
.ct-modal-box p { margin: 0 0 12px; line-height: 1.5; }
.ct-link { display: flex; gap: 8px; }
.ct-send { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-send .btn { text-decoration: none; text-align: center; flex: 1; }
.ct-wa { background: #25d366; border-color: #25d366; }
.ct-wa:hover { background: #1ebe5b; border-color: #1ebe5b; }
.ct-link input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.ct-add { margin-top: 12px; max-width: 280px; }
.ct-disc-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ct-disc-add input { font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
.ct-disc-add #ctDiscName { flex: 1 1 240px; min-width: 0; }
.ct-disc-add #ctDiscPct { width: 80px; }
.ct-discounts { max-width: 640px; }
.ct-add select { font: inherit; font-size: 14px; padding: 10px 40px 10px 13px; border: 1px solid var(--line); border-radius: var(--r-ctl); }

@media (max-width: 720px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-card { padding: 16px; }
  .ct-sum { grid-template-columns: 1fr; }
  .ct-list-head input { min-width: 0; width: 100%; }
}

/* ── договор на экране ── */
.ct-doc {
  position: fixed; inset: 0; z-index: 60; overflow: auto;
  background: #e9ecea; padding: 0 0 40px;
}
.ct-doc-bar {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px;
  justify-content: space-between; padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.ct-doc-bar span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-doc-warn { max-width: 210mm; margin: 12px auto 0; }
html.ct-doc-open body { overflow: hidden; }

.cd { font-family: "Times New Roman", Times, serif; color: #000; font-size: 10.5pt; line-height: 1.3; }
.cd-page {
  background: #fff; width: 210mm; max-width: 100%; margin: 16px auto 0; padding: 14mm 14mm 16mm;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.cd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 7mm; text-align: justify; margin-bottom: 4pt; }
.cd-row > div { min-width: 0; }
.cd-title { text-align: center; margin-bottom: 10pt; }
.cd-meta { grid-template-columns: 1fr auto 1fr; }
.cd-c { text-align: center; }
.cd-r { text-align: right; }
.cd-center { text-align: center; }
.cd-h { text-align: center; font-weight: bold; margin: 10pt 0 4pt; }
.cd-party { align-items: start; }
.cd-req p { margin: 0 0 3pt; text-align: left; }
.cd-sign { margin-top: 18pt !important; }
.cd-signs { margin-top: 18pt; text-align: center; }
/* Подпись родителя, нарисованная на экране: над ФИО, как росчерк на бумаге. */
.cd-sig { display: block; margin: 4pt auto 2pt; max-width: 150pt; max-height: 50pt; width: auto; height: auto; }
.cd-sp-t .cd-sig { margin: 4pt 0 0; max-width: 120pt; max-height: 40pt; }
.cd-table { width: 100%; border-collapse: collapse; margin: 6pt 0 8pt; font-size: 10pt; }
.cd-table caption { font-style: italic; border: 1px solid #000; border-bottom: 0; padding: 2pt; }
.cd-table th, .cd-table td { border: 1px solid #000; padding: 2pt 5pt; text-align: center; font-weight: normal; }
.cd-memo { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; }
.cd-memo-title { border: 1px solid #000; text-align: center; font-weight: bold; font-size: 12pt; padding: 5pt; margin: 0 12mm; }
.cd-memo-sub { text-align: center; margin: 3pt 0 6pt; }
.cd-memo-name { border: 1px solid #000; text-align: center; font-weight: bold; font-size: 12pt; padding: 4pt; margin: 0 30mm 8pt; }
.cd-memo-t { width: 70%; margin: 0 auto 8pt; }
.cd-memo-t td:first-child { text-align: center; }
.cd-memo-h { font-weight: bold; margin: 6pt 0 3pt; }
.cd-memo-p { margin: 0 0 3pt; text-align: justify; }
/* Сноски школьного договора (п. 3.3.8, 4.3.5, 4.4) — после раздела 9. */
.cd-notes { margin: 8pt 0 0; padding-top: 4pt; border-top: 1px solid #999; font-size: 8pt; }
.cd-notes p { margin: 0 0 2pt; }
.cd sup { font-size: .7em; line-height: 0; vertical-align: super; }
.cd-pays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6pt; margin-top: 8pt; }
.cd-pay { border: 1px solid #000; text-align: center; padding: 0 0 6pt; break-inside: avoid; }
.cd-pay > div:first-child { border-bottom: 1px solid #000; font-weight: bold; padding: 3pt; font-size: 8pt; }
.cd-pay > div:nth-child(2) { padding: 3pt; }
.cd-pay b { display: block; font-size: 15pt; }

/* лист электронной подписи */
.cd-sp-head { display: flex; gap: 16px; justify-content: space-between; }
.cd-sp-head p { margin: 0 0 4pt; }
.cd-sp-qr svg { width: 34mm; height: 34mm; }
.cd-sp-link { word-break: break-all; font-size: 9pt; }
.cd-sp-t { margin-top: 12pt; }
.cd-sp-hash code { word-break: break-all; font-size: 8.5pt; }

/* ── печать: только договор ── */
@media print {
  /* Поля — у самой страницы, на каждом листе (24.10.2026): раньше margin 0 и
     отступ только у начала раздела; продолжение раздела на следующем листе
     печаталось вплотную к краю, и принтер съедал верхние/нижние строки
     (договор просили для суда — части текста не было). */
  @page { size: A4; margin: 15mm 14mm 15mm 14mm; }
  html.ct-doc-open body > *:not(.ct-doc-host) { display: none !important; }
  html.ct-doc-open .shell { display: none !important; }
  .ct-doc { position: static; overflow: visible; background: none; padding: 0; }
  .ct-doc-bar, .ct-doc-warn { display: none !important; }
  .cd-page { box-shadow: none; margin: 0; width: auto; padding: 0; break-after: page; }
  .cd-page:last-child { break-after: auto; }
  .cd-row, .cd-table tr, .cd-pay, .cd-signs { break-inside: avoid; }
}

.page-head .mt-lead { color: var(--ink-3); margin: 4px 0 0; }

/* прайс — карточка на курс */
.ct-prices { display: grid; gap: 12px; }
.ct-price { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.ct-price-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ct-price-head b { flex: 1; font-size: 15px; }
.ct-money-l { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.ct-price input {
  font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); min-width: 0;
}
.ct-price .ct-money { width: 120px; text-align: right; font-weight: 600; }
.ct-x { padding: 6px 12px; }
.ct-price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ct-main { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.ct-main span { font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.ct-chip {
  font: inherit; font-size: 13px; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.ct-chip.is-on { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.ct-add select { width: 100%; }
@media (max-width: 720px) {
  .ct-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-price-head { flex-wrap: wrap; }
}

/* Оқушылар: список и мастер по карточке */
.ct-who { font-size: 20px; margin: 0 0 10px; }
.ct-who small { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.ct-dim { color: var(--ink-3); }
.ct-mono { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ct-card.is-locked .ct-grid:not(.ct-free) input, .ct-card.is-locked .ct-grid:not(.ct-free) select, .ct-card.is-locked .ct-subjs input, .ct-card.is-locked .seg-btn, .ct-card.is-locked .ct-role[data-payer] { pointer-events: none; opacity: .7; }
.ct-contract-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ct-contract-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ct-modal-wide { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.ct-modal-head { margin-bottom: 14px; }
.ct-modal-head b { display: block; font-size: 16px; }
.ct-modal-head small { color: var(--ink-3); }
.ct-list-head .btn-primary { margin-left: auto; }
.ct-missing { margin: 8px 0 0 18px; color: var(--ink-2); font-size: 14px; }
.ct-free-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 42px; }
.ct-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ct-chk input { accent-color: var(--green); }
tr.is-left td { color: var(--ink-3); }
tr.is-left td b { color: var(--ink-2); font-weight: 500; }
.ct-left { color: var(--low); font-size: 12px; }
.ct-contract-acts a.btn { text-decoration: none; }
.ct-hist { list-style: none; padding: 0; margin: 6px 0 0; font-size: 14px; }
.ct-hist li { padding: 6px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ct-mini { padding: 3px 10px; font-size: 12px; }

/* значок договора — как в eduway */
.ct-sig { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.ct-sig-signed { background: var(--ok-bg); color: var(--ok); }
.ct-sig-client_signed { background: var(--mid-bg); color: #f5b301; }
.ct-sig-sent { background: var(--low-bg); color: var(--low); }
.ct-sig-draft { color: var(--ink-3); }
.ct-sig-terminated, .ct-sig-cancelled { background: var(--low-bg); color: var(--low); }
.ct-sig-none { color: var(--ink-3); }
.ct-list td { padding-top: 8px; padding-bottom: 8px; }
/* Топ, курс и телефоны — в одну строку: справа места хватает (28.11). */
.ct-main tbody td:nth-child(5), .ct-main tbody td:nth-child(6), .ct-main tbody td:nth-child(8), .ct-main tbody td:nth-child(9) { white-space: nowrap; }
.ct-list .ct-acts .btn { padding: 5px 10px; }

/* Кнопки-значки над списком, как в eduway: ⦸ ушедшие, Excel, + ученик. */
.ct-ibtns { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ct-ibtn {
  display: inline-grid; place-items: center; width: 40px; height: 36px; padding: 0;
  border: 1.5px solid currentColor; border-radius: 6px; background: var(--surface); cursor: pointer;
}
.ct-ibtn svg { width: 20px; height: 20px; }
.ct-ibtn:hover { filter: brightness(0.92); }
.ct-ibtn:disabled { opacity: .5; cursor: progress; }
.ct-ibtn-red { color: #d2404d; }
.ct-ibtn-teal { color: #3b9bb0; }
.ct-ibtn-green { color: var(--green); }
.ct-ibtn-round { color: #3b9bb0; border-radius: 50%; width: 38px; height: 38px; }
.ct-more { text-align: center; margin: 12px 0; }

/* Страницы списка учеников: по 100. */
.ct-pager { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; }
.ct-pager .btn { min-width: 38px; padding: 6px 10px; }
.ct-pager .btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.ct-pager .btn:disabled { opacity: .4; cursor: default; }

/* Приложения: жёлтая «Соңғы қосымшаны қайта құру» справа вверху, как в eduway. */
.ct-rebuild { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.ct-btn-warn { border-color: #e0a800; color: #b58100; background: var(--surface); }
.ct-btn-warn:hover { background: #fff8e1; }
.ct-annex-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.ct-disc-tabs { margin-bottom: 8px; }

/* Прежний договор не закрыт — новый не составляется (как в eduway). */
.ct-block { background: var(--low-bg); color: var(--low); border: 1px solid #f3c2bd; border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; text-align: center; }
.ct-prev-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ct-red { color: var(--low); }

/* «Келісімшарт және қосымшалар» — как внизу шага в eduway. */
.ct-docs td { vertical-align: middle; }
.ct-docref { display: inline-flex; align-items: center; gap: 4px; margin-right: 16px; }
.ct-mark { font-size: 15px; line-height: 1; }
.ct-mark-ok { color: var(--ok); }
/* Бір жақ қол қойды — жёлтый карандаш, как text-warning в eduway. */
.ct-mark-mid { color: #f5b301; }
.ct-mark-low { color: var(--low); }
.ct-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-dark); cursor: pointer; }
.ct-link-btn:hover { text-decoration: underline; }
.ct-dd { position: relative; display: inline-block; }
.ct-dd > summary { list-style: none; cursor: pointer; padding: 0 6px; color: var(--ink-2); }
.ct-dd > summary::-webkit-details-marker { display: none; }
.ct-dd-menu { position: absolute; z-index: 20; top: 100%; right: 0; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 4px; }
.ct-dd-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 4px; font: inherit; cursor: pointer; color: inherit; }
.ct-dd-menu button:hover:not(:disabled) { background: var(--surface-2); }
.ct-dd-menu button:disabled { opacity: .45; cursor: default; }
.ct-dd-menu a { display: block; padding: 8px 12px; border-radius: 4px; color: inherit; text-decoration: none; }
.ct-dd-menu a:hover { background: var(--surface-2); }
/* «Жүктеп алу: PDF / Word» — одна строка меню, два формата рядом. */
.ct-dd-dl { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; }
.ct-dd-dl span { flex: 1; color: var(--ink-2); }
.ct-dd-menu .ct-dd-dl button, .ct-dd-menu .ct-dd-dl a { display: inline-block; width: auto; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; }
.ct-doc-bar .ct-doc-acts { display: flex; gap: 8px; flex-shrink: 0; overflow: visible; font-weight: normal; }
.ct-busy { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink, #222); color: var(--surface, #fff); padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* Ақшалай жеңілдік: режим (әр айға / жалпы сомадан / бір айға) и сумма. */
.ct-money-modes { margin: 8px 0; }
.ct-money-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-money-row input { flex: 1 1 140px; }

/* Курстар · Бағалар — таблицы как в eduway, правка прямо в ячейках. */
.ct-courses td { vertical-align: middle; }
.ct-courses input, .ct-plan input, .ct-plan select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; background: var(--surface); color: inherit; max-width: 100%; }
.ct-courses input[type="date"] { width: 140px; }
.ct-num { width: 64px; text-align: right; }
.ct-courses .ct-money, .ct-plan .ct-money { width: 110px; text-align: right; font-weight: 600; }
.ct-sub > td { background: var(--surface-2); padding: 12px; }
.ct-plan { margin: 0; }
.ct-prices-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 760px) { .ct-prices-2 { grid-template-columns: minmax(0, 1fr); } .ct-courses { display: block; overflow-x: auto; } }

/* Окно ухода: кто кому должен после расторжения */
.ct-sum dd.ct-owe b { color: var(--low); }
.ct-sum dd.ct-back b { color: #2f7fc1; }
.ct-sum dd.ct-ok b { color: var(--ok); }

/* Ескерту в списке учеников — правится прямо в строке */
.ct-note { max-width: 220px; font-size: 13px; color: var(--ink-2); }
.ct-note span { white-space: normal; }
.ct-note-btn { border: 0; background: none; color: var(--ink-3, #999); cursor: pointer; padding: 0 4px; font-size: 13px; opacity: .55; }
tr:hover .ct-note-btn, .ct-note-btn:focus-visible { opacity: 1; }
.ct-note-in { width: 100%; min-width: 160px; font: inherit; padding: 4px 6px; border: 1px solid var(--line, #ccc); border-radius: 6px; }
.ct-note-in.is-bad { border-color: #d33; }

/* Поиск по номеру — над колонками «Телефон» и «Ата-ана». */
.ct-table tr.ct-th-find th { border-bottom: 0; padding: 6px 10px 0; }
.ct-th-find input {
  width: 100%; min-width: 220px; font: inherit; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.ct-th-find input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Меню выгрузки ушедших: этот учебный год или все годы. */
.ct-xls-menu {
  position: absolute; z-index: 40; width: 240px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(16, 22, 19, .35);
}
.ct-xls-menu button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  padding: 9px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink); text-align: left;
}
.ct-xls-menu button small { font-size: 12px; color: var(--ink-3); }
.ct-xls-menu button:hover, .ct-xls-menu button:focus-visible { background: var(--green-soft); outline: none; }

/* Черновик регистрации — плашка над списком учеников */
.ct-draft { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff7e0; border: 1px solid #f0d78c; }
.ct-draft .btn { padding: 6px 14px; }

/* «Бұрын оқыған оқушылар»: переключатель «этот год / все годы» и куда перевели. */
.ct-year-btn { white-space: nowrap; }
.ct-moved { color: #b7791f; font-weight: 600; white-space: nowrap; }
.ct-hint-l { font-style: normal; }

/* Окно «Оқушылар қозғалысы» (кнопка с диаграммой у списка учеников). */
.mv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.mv-seg .seg-btn { flex: 0 0 auto; padding: 7px 12px; white-space: nowrap; }
.mv-branch { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.mv-tot { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.mv-n { min-width: 32px; padding: 2px 8px; border: 0; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; background: var(--surface-2); color: var(--ink); }
.mv-n:hover { background: var(--line-2); }
.mv-came { color: var(--green); }
.mv-left { color: #c0392b; }
.mv-in, .mv-out { color: #b7791f; }
.mv-days { max-height: 320px; overflow-y: auto; }
.mv-days .num, .mv-days th.num { text-align: right; }
.mv-h { margin: 16px 0 8px; font-size: 15px; }
.mv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Бір айлық жеңілдік и график шага «Төлем» (26.11.2026) ── */
.ct-one-add {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--green-dark);
  background: var(--surface); border: 1px dashed var(--green-line); border-radius: var(--r-ctl);
  padding: 12px 14px; cursor: pointer; transition: background .15s, border-color .15s;
}
.ct-one-add small { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.ct-one-add:hover { background: var(--green-soft); border-color: var(--green); }
.ct-one { border: 1px solid var(--green-line); border-radius: 16px; padding: 14px 16px; background: var(--surface); }
.ct-one-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ct-one-x { font: inherit; font-size: 13px; color: var(--ink-3); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.ct-one-x:hover { color: var(--ink); text-decoration: underline; }
.ct-one-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ct-one-amt { position: relative; flex: 1 1 160px; display: block; }
.ct-one-amt input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px 34px 10px 13px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
.ct-one-amt input:focus { outline: none; border-color: var(--green); }
.ct-one-amt span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
.ct-one-label { font-size: 12px; color: var(--ink-3); margin: 14px 0 6px; }
.ct-one-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ct-month {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s;
}
.ct-month span { font-size: 13px; text-transform: capitalize; }
.ct-month b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ct-month small { font-size: 11px; color: var(--ink-3); }
.ct-month:hover { border-color: var(--green-line); }
.ct-month:active { transform: scale(.98); }
.ct-month.is-active { border-color: var(--green); background: var(--green-soft); }
.ct-month.is-active small { color: var(--green-dark); }
.ct-one-sum { font-size: 14px; margin: 12px 0 0; }
.ct-one-sum s { color: var(--ink-3); }
.ct-sched td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.ct-sched td:nth-child(2) { text-transform: none; }
.ct-sched .ct-full { color: var(--ink-3); }
.ct-dl { display: inline-block; font-size: 12px; color: var(--ink-2); margin: 1px 8px 1px 0; white-space: nowrap; }
.ct-dl b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ct-dl-one, .ct-dl-one b { color: var(--green-dark); }
.ct-dl-none { font-size: 12px; color: var(--ink-3); }
.ct-sched tr.is-one td { background: var(--green-soft); }
@media (max-width: 640px) {
  .ct-sched th:nth-child(3), .ct-sched td:nth-child(3) { display: none; }
  .ct-sched td, .ct-sched th { padding: 8px 6px; }
  .ct-dl { white-space: normal; }
  .ct-one { padding: 12px; }
}
