/* ── «Явка» (приложение тренера) — дизайн-система «Конструктор» (2026) ────
   Та же система, что в ЛК — чернильная обводка, жёсткая тень у главных действий, Dela Gothic
   в заголовках и цифрах, текст на цвете всегда тёмный. */
@import url("/fonts/fonts.css");

:root {
  --coral: #EC3754; --coral-soft: #FDEAEE; --coral-text: #C21F3D;
  --sky:   #1ABBD2; --sky-soft:   #E3F6F9; --sky-text:   #0A7486;
  --lemon: #FFBB2C; --lemon-soft: #FFF4D9; --lemon-text: #8A5A00;
  --mint:  #2BB673; --mint-soft:  #E2F5EB; --mint-text:  #1B7F52;
  --berry: #EC3754; --berry-soft: #FDEAEE; --berry-text: #C21F3D;

  --ink: #09161D;
  --ink-2: #33434C;
  --ink-3: #4A5A63;
  --muted: #5D6C75;
  --muted-2: #9AA8B0;
  --line: #E1E7EA;
  --line-2: #EDF1F3;
  --paper: #F3F6F7;
  --paper-2: #E8EDF0;
  --card: #FFFFFF;

  /* Исторические имена: «impulse» = фирменный выделитель (лимон, как активная
     вкладка и промо в ките), «champion» = коралловый акцент (точки, метки). */
  --impulse: var(--lemon);
  --impulse-ink: var(--ink);
  --champion: var(--coral);
  --champion-ink: var(--ink);

  --success: var(--mint-text);   --success-bg: var(--mint-soft);
  --warn:    var(--lemon-text);  --warn-bg:    var(--lemon-soft);
  --danger:  var(--berry-text);  --danger-bg:  var(--berry-soft);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --stroke: 2px;
  --hard: 0 2px 8px rgba(9,22,29,.12);
  --hard-lg: 0 2px 8px rgba(9,22,29,.12);

  --font-sans: Manrope, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Atiba Cyrillic", "Arial Black", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  /* legacy aliases для совместимости со старой разметкой */
  --accent: var(--ink);
  --accent-dark: var(--ink-2);
  --accent-soft: var(--paper-2);
  --bg: var(--paper);
  --surface: var(--card);
  --surface-elev: var(--card);
  --text: var(--ink);
  --border: var(--line);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 30px -12px rgba(0,0,0,.25);
  --accent-2: var(--ink-2);
  --accent-text: var(--ink);
  --bg-2: var(--paper-2);
  --surface-2: var(--paper);
  --border-2: var(--line-2);
  --text-2: var(--ink-2);
  --text-3: var(--muted);
  --shadow-lg: 0 12px 30px -12px rgba(0,0,0,0.22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: var(--font-sans);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
#app { min-height: 100%; display: flex; flex-direction: column; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ── Loader ── */
.loader-center { display:flex; justify-content:center; align-items:center; padding:48px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner.lg { width: 36px; height: 36px; border-width: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong, #CBD3D8);
  background: var(--ink); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .08s, background .15s, border-color .15s, color .15s;
  user-select: none; white-space: nowrap;
}
.btn:hover { background: #1F1F1B; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.btn-full, .btn.btn-block { width: 100%; }
.btn.btn-sm {
  height: 34px; padding: 0 14px; font-size: 13px; font-weight: 500;
  border-radius: 18px;
}
.btn.btn-primary, .btn.lime {
  background: var(--impulse);
  border-color: var(--impulse);
  color: var(--impulse-ink);
}
.btn.btn-primary:hover, .btn.lime:hover { background: #F2B50F; }
.btn.btn-ghost {
  background: transparent; color: var(--ink-2);
  border-color: var(--line);
}
.btn.btn-ghost:hover { background: var(--paper-2); }

.icon-btn {
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%;
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s, color .15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }

/* ── Forms ── */
.field { display: block; margin-bottom: 14px; }
.field > label, label.field > span {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 6px; letter-spacing: 0.01em;
}
input, .input, select, textarea {
  width: 100%; height: 52px; padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
  font-family: inherit; font-size: 15px;
  color: var(--ink); outline: none;
  transition: border-color .15s, background .15s;
}
input:focus, .input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.input.input-sm { height: 36px; font-size: 13px; padding: 0 10px; }
.input.input-num { width: 70px; text-align: center; }

/* ── Login (page-login.jsx стиль ЛК) ─────────────────────────────────────── */
.login-page {
  max-width: 480px; margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top)) 24px 24px;
  min-height: 100vh; min-height: 100dvh;
  background: var(--paper);
  display: flex; flex-direction: column;
}
.brand-header { text-align: center; margin-bottom: 32px; }
.login-brand-mark, .brand-logo {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--impulse);
  border-radius: 18px;
  font-weight: 700; font-size: 32px;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
}
.login-title, .brand-title {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.login-sub, .brand-subtitle {
  margin-top: 4px;
  font-size: 13px; color: var(--muted);
}
.login-card.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: none;
}
.login-err {
  display: none;
  margin-top: 12px; padding: 10px 14px;
  background: var(--danger-bg); color: var(--danger);
  border-radius: var(--r-md);
  font-size: 13px; text-align: center;
}
.login-err.show { display: block; }

.ltp-credit {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
}

/* Сегментарный переключатель Телефон/Email — из ЛК */
.seg {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--paper-2);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 16px;
}
.seg > button {
  background: transparent; color: var(--muted);
  height: 38px; padding: 0;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  border: none;
  letter-spacing: 0;
  transition: background .15s, color .15s;
}
.seg > button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.link-btn {
  background: none; border: none;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 4px 0; height: auto;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--muted-2);
}
.link-btn:hover { color: var(--ink); }

/* ── Schedule page (расписание) ──────────────────────────────────────────── */
.schedule-page {
  max-width: 480px; margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.app-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-brand-mark {
  width: 36px; height: 36px;
  background: var(--ink); color: var(--impulse);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.header-title {
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
}
.header-user {
  margin-left: auto;
  font-size: 13px; color: var(--ink-2);
  max-width: 50%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.date-selector {
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.date-label {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--ink);
}
.date-controls {
  display: flex; gap: 8px; align-items: center;
}
.date-controls input[type="date"] {
  height: 38px; padding: 0 12px;
  font-size: 13px;
  background: var(--card);
  border-radius: 12px;
}
.date-controls .btn {
  height: 38px; padding: 0 16px; font-size: 13px;
  border-radius: var(--r-pill);
  border-color: var(--line); background: var(--card);
  color: var(--ink);
}
.date-controls .btn:hover { background: var(--paper-2); }

.lessons-container {
  padding: 16px 16px 100px;
  display: flex; flex-direction: column; gap: 10px;
}
.lessons-empty {
  text-align: center; padding: 60px 24px;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.lessons-empty svg { color: var(--muted-2); }
.lessons-empty p { font-size: 14px; }

.lesson-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.lesson-card.expanded {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.lesson-header {
  display: grid; grid-template-columns: 4px 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 14px 16px;
  cursor: pointer;
}
.lesson-color-bar {
  width: 4px; height: 36px;
  border-radius: 4px;
}
.lesson-info { min-width: 0; }
.lesson-disc {
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lesson-meta {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.lesson-meta-sep { color: var(--muted-2); }
.lesson-badge {
  min-width: 28px; height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--paper-2); color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.lesson-badge.has-visits {
  background: var(--impulse); color: var(--impulse-ink);
}
.lesson-chevron {
  color: var(--muted-2);
  display: inline-flex;
  transition: transform .15s;
}
.lesson-card.expanded .lesson-chevron { transform: rotate(90deg); color: var(--ink); }

/* ── Attendance form ─────────────────────────────────────────────────────── */
.attendance-form {
  border-top: 1px solid var(--line-2);
  background: var(--paper);
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.att-loader { padding: 32px 0; display: flex; justify-content: center; }
.att-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.att-panel-head {
  padding: 12px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border-strong, #CBD3D8);
  display: flex; flex-direction: column; gap: 10px;
}
.att-panel-badges {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.att-panel-days {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.att-panel-days .input { width: 58px; height: 32px; padding: 0 6px; font-size: 13px; background: var(--card); }
.att-panel-actions { display: flex; gap: 8px; }
.att-panel-actions .btn { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px;
  font-size: 11px; font-weight: 600;
  background: var(--card); color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.chip.green {
  background: var(--success-bg);
  color: var(--success);
  border-color: transparent;
}
.chip.orange {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}

.att-clients {
  background: var(--card);
}
/* Строка клиента: без заливки. «Был» говорит галка, источник и тип — подпись и кнопка;
   цвет только на мягкой подложке, текст на цвете тёмный. */
.att-client-row {
  display: grid; grid-template-columns: 36px 36px 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line-2);
}
.att-client-row:last-child { border-bottom: none; }
/* Нужен тип посещения: рамка по всему периметру и красная кнопка типа — без заливки строки и кромки с краю */
.att-client-row.att-error { box-shadow: inset 0 0 0 2px var(--danger); }
.att-client-row.att-error .att-type-btn { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }

.att-check-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--card); color: transparent;
  border: var(--stroke) solid var(--line);
  transition: background .15s, border-color .15s, transform .08s;
}
.att-check-btn:active { transform: scale(.94); }
.att-check-btn.checked {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint-text);
}
.avatar.sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: oklch(0.93 0.04 var(--av-h, 145));
  color: oklch(0.30 0.10 var(--av-h, 145));
  font-size: 13px; font-weight: 600;
  text-transform: uppercase;
}
.att-client-name {
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att-client-sub {
  font-size: 12px; color: var(--ink-3);
  margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center;
}
.att-client-sub .chip { height: 22px; padding: 0 8px; font-size: 11px; }
.att-src-row { display: flex; flex-wrap: wrap; gap: 6px; }
/* Кнопка-метка (источник списания); выбранная — тёмная, как активный сегмент */
.att-chip {
  display: inline-flex; align-items: center; max-width: 100%;
  min-height: 32px; padding: 0 12px;
  font-family: inherit; font-size: 12px; font-weight: 700;
  background: var(--card); color: var(--ink-2);
  border: var(--stroke) solid var(--line); border-radius: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.att-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.att-type-btn {
  height: 36px; padding: 0 12px;
  font-size: 13px; font-weight: 700;
  background: var(--card);
  border: var(--stroke) solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.att-type-btn:hover { background: var(--paper-2); }
/* «Долг» — лимонная подложка (требует внимания); «Пробное»/«Бесплатно» — небесная (справочно) */
.att-type-btn[data-value="debt"]  { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.att-type-btn[data-value="trial"],
.att-type-btn[data-value="free"]  { background: var(--sky-soft); color: var(--sky-text); border-color: transparent; }
.att-type-btn .arr {
  opacity: .55;
  font-size: 10px;
  margin-left: 2px;
}

/* ── Visit-type bottom-sheet (замена нативного select) ─────────────────── */
.vt-sheet {
  background: var(--card);
  width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
  animation: slideUp .2s;
}
.vt-sheet-head {
  padding: 4px 18px 14px;
  border-bottom: 1px solid var(--line-2);
  text-align: center;
}
.vt-sheet-title {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.vt-sheet-sub {
  margin-top: 2px;
  font-size: 12px; color: var(--muted);
}
.vt-sheet-list { padding: 6px 0; }
.vt-sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.vt-sheet-item:hover { background: var(--paper-2); }
.vt-sheet-item .vt-radio {
  width: 22px; height: 22px;
  border: 2px solid var(--muted-2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vt-sheet-item.active .vt-radio {
  border-color: var(--ink);
  background: var(--ink);
}
.vt-sheet-item.active .vt-radio::after {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--impulse);
}
.vt-sheet-item .vt-label { flex: 1; }
.vt-sheet-item .vt-hint {
  font-size: 11px; color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}
.vt-sheet-cancel {
  margin: 8px 16px 0;
  height: 48px;
  border-radius: 14px;
  border: var(--stroke) solid var(--border-strong, #CBD3D8);
  background: var(--card);
  color: var(--ink);
  font-size: 15px; font-weight: 800;
}
.vt-sheet-cancel:hover { background: var(--paper-2); }

.att-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 32px); margin: 12px 16px;
  height: 44px;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  border: 1px dashed var(--muted-2);
  font-size: 14px; font-weight: 500;
}
.att-add-btn:hover {
  background: var(--paper-2);
  border-color: var(--ink-3);
}

.att-footer {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: sticky; bottom: 0;
}
.att-status { flex: 1; font-size: 13px; color: var(--muted); }
.att-status strong { color: var(--ink); font-weight: 600; }
.att-save-btn { flex: 0 0 auto; }

/* ── Search modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 11, 10, 0.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .15s;
}
.modal-sheet {
  background: var(--card);
  width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  max-height: 80vh;
  display: flex; flex-direction: column;
  animation: slideUp .2s;
}
@keyframes slideUp { from { transform: translateY(20%); } to { transform: translateY(0); } }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--muted-2);
  border-radius: 2px;
  margin: 0 auto 8px;
}
.modal-header {
  padding: 6px 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line-2);
}
.modal-title {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
.modal-search-wrap {
  padding: 12px 16px;
  position: relative;
}
.modal-search-icon {
  position: absolute; left: 28px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.modal-search-input {
  height: 44px;
  padding-left: 40px;
  border-radius: 12px;
}

.search-results { padding: 0 8px 8px; overflow-y: auto; flex: 1; }
.search-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted); font-size: 13px;
}
.search-result {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
}
.search-result:hover { background: var(--paper-2); }
.search-name {
  font-size: 14px; font-weight: 500;
  color: var(--ink);
}
.search-sub {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
}
.search-add-btn {
  height: 32px; padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
/* Внизу страницы, как в ЛК клиентов — не перекрывает шапку с именем тренера. */
.toast-wrap {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: 448px; margin: 0 auto;
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  align-items: center;
}
.toast {
  padding: 13px 20px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  max-width: 100%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error   { background: var(--danger); color: #fff; }
.toast.success { background: var(--ink);    color: #fff; }

/* ── Нижнее меню-таббар ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(11,11,10,0.06);
}
.nav-item {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 9px 4px 5px;
  color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: -0.01em; transition: color .15s;
}
.nav-item.active { color: var(--ink); }
.nav-item.active::before {
  content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--impulse);
}

/* ── Экран зарплаты ─────────────────────────────────────────────── */
.salary-page { min-height: 100vh; background: var(--paper); padding-top: env(safe-area-inset-top); }
.salary-seg { grid-template-columns: 1fr 1fr 1fr; margin: 12px 16px 0; }
.salary-custom { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; }
.salary-custom .input { flex: 1; min-width: 0; }
.salary-custom-dash { color: var(--muted); }
.salary-body { padding: 14px 16px calc(88px + env(safe-area-inset-bottom)); }

.sal-hero {
  background: var(--impulse); color: var(--impulse-ink);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 14px;
}
.sal-hero-label { font-size: 13px; font-weight: 600; opacity: 0.85; }
.sal-hero-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-family: var(--font-mono); }

.sal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.sal-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 6px; text-align: center; }
.sal-stat-num { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.sal-stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

.sal-section-title { font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 6px 2px 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.sal-section-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 8px; }
.sal-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 18px; }
.sal-disc-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.sal-disc-row:last-child { border-bottom: none; }
.sal-disc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sal-disc-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-disc-cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sal-disc-sum { font-size: 14px; font-weight: 600; color: var(--ink); font-family: var(--font-mono); }

.sal-date-group { margin-bottom: 12px; }
.sal-date-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.sal-date-sum { color: var(--ink-3); font-family: var(--font-mono); }
.sal-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 6px; }
.sal-item-main { flex: 1; min-width: 0; }
.sal-item-disc { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-item-client { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-item-sum { font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); white-space: nowrap; }

/* последнее занятие расписания не должно прятаться под таббаром */
.schedule-page .lessons-container { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ══ Слой бренда «Конструктор» ═══════════════════════════════════════════ */
.btn { border-radius: 14px; border: 2px solid var(--border-strong, #CBD3D8); font-weight: 800; letter-spacing: 0; }
.btn.btn-sm { border-radius: 10px; font-weight: 800; }
.btn.btn-primary, .btn.lime { background: var(--sky); border-color: #13A6BC; color: var(--ink); box-shadow: 0 1px 2px rgba(9,22,29,.08); }
.btn.btn-primary:hover, .btn.lime:hover { background: #13A6BC; }
.btn.btn-primary:active, .btn.lime:active { filter: brightness(.96); }
.btn.btn-ghost { border: 2px solid var(--border-strong, #CBD3D8); background: var(--card); color: var(--ink); }
.icon-btn { border: 2px solid var(--border-strong, #CBD3D8); }
.login-brand-mark, .brand-logo, .header-brand-mark {
  background: url("/brand/panther-head.png") center/contain no-repeat !important;
  color: transparent !important; font-size: 0 !important; border-radius: 0 !important;
}
.login-title, .brand-title, .header-title { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.app-header { border-bottom: 2px solid var(--border-strong, #CBD3D8); background: var(--card); }
.lesson-card { border: 2px solid var(--border-strong, #CBD3D8); border-radius: 18px; }
.lesson-card.expanded { box-shadow: var(--hard); }
.lesson-color-bar { width: 6px; border-top-left-radius: 8px; }
.lesson-disc { font-weight: 800; }
.card { border: 2px solid var(--border-strong, #CBD3D8); }
.input, input, select, textarea { border-width: 2px; border-color: var(--ink); border-radius: 14px; }
.bottom-nav { border-top: 2px solid var(--border-strong, #CBD3D8); }
.nav-item { font-weight: 700; }
.nav-item.active { color: var(--ink); }
.sal-hero { background: var(--lemon); color: var(--ink); border: 2px solid var(--border-strong, #CBD3D8); box-shadow: var(--hard-lg); }
.sal-hero-value { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.chip { font-weight: 800; }
/* сегменты, дата, зарплата, вход — в тон ките */
.seg { background: var(--card); border: 2px solid var(--border-strong, #CBD3D8); border-radius: 14px; padding: 3px; }
.seg > button { border-radius: 10px; font-weight: 800; color: var(--ink-2); border: 0; box-shadow: none; }
.seg > button.active { background: var(--ink); color: #fff; box-shadow: none; }
.date-controls .btn { border: 2px solid var(--border-strong, #CBD3D8); background: var(--card); color: var(--ink); }
.date-controls .btn:hover { background: var(--lemon-soft); }
.login-card.card { border: 2px solid var(--border-strong, #CBD3D8); }
.sal-stat { border: 2px solid var(--border-strong, #CBD3D8); border-radius: 14px; }
.sal-stat-num { font-family: var(--font-display); font-weight: 400; font-size: 16px; letter-spacing: 0; }
.sal-disc-sum, .sal-date-sum, .sal-item-sum { font-family: var(--font-sans); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Чемпион: мягкие рамки вместо «чернильных» (UI-kit «Щит») */
:root { --border-strong: #CBD3D8; }
[data-theme="dark"], .dark { --border-strong: #2B4655; }
