/* ═══════════════════════════════════════════════════════════════════════
   SAPA КАБИНЕТІ: Telegram Mini App (08.10)

   Сайттың дизайн тілі (app/styles/tokens.css, shell.css, dash.css):
   көк градиент шапка + әрең көрінетін «SAPA», лайм екпін, ақ карточкалар.
   Түс тек мағына береді: қызыл мәселе, сары жақындап қалды, жасыл бітті.

   Тақырып: <html data-theme="light|dark">, cabinet.js Telegram-нан қояды.
   Ен: 360-430 px. Safe-area: Telegram айнымалылары + env().
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 22px;

  --blue-950: #071046;
  --blue-900: #14239e;
  --blue-700: #1c3ed9;
  --blue-600: #2e6bde;
  --blue-400: #579ee3;

  --lime: #d8f24b;
  --lime-ink: #0b1a08;

  --hero: linear-gradient(150deg, #0e1a7a 0%, #14239e 28%, #1c3ed9 62%, #2e6bde 100%);
  --hero-top: #0e1a7a;

  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e3e9f2;
  --ink: #0b1220;
  --ink-2: #5b6b80;
  --ink-3: #8e9cb0;
  --ink-mute: #c3ccd8;

  --blue-tint: #e8eefd;
  --blue-text: #1c3ed9;
  --lime-tint: #edf7c6;
  --lime-text: #5a6b12;

  --danger: #e5484d;
  --danger-bg: #fde7e8;
  --danger-border: #f6cfd2;
  --danger-text: #c32c36;
  --danger-grad: linear-gradient(150deg, #f0555a 0%, #e5484d 45%, #c32c36 100%);

  --warn: #f0a92e;
  --warn-bg: #fdf1d8;
  --warn-text: #9a6a0b;

  --ok: #3fb36b;
  --ok-bg: #e6f5ec;
  --ok-text: #2d7a4a;

  --t1-bg: #e6f5ee; --t1-ink: #1f5c48;
  --t2-bg: #fff1d6; --t2-ink: #8a5a00;
  --t3-bg: #f3f0ff; --t3-ink: #4b3a99;
  --t4-bg: #e4f0fa; --t4-ink: #14239e;
  --t5-bg: #fde7ef; --t5-ink: #9b2c5a;

  --shadow-card: 0 1px 2px rgba(11, 18, 32, .04), 0 10px 26px -20px rgba(11, 18, 32, .35);
  --shadow-sheet: 0 -20px 50px -20px rgba(2, 6, 38, .45);
  --tabbar-bg: rgba(255, 255, 255, .86);
  --scrim: rgba(7, 12, 30, .45);

  --r-card: 22px;
  --r-row: 18px;
  --r-tile: 18px;
  --r-pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Roboto, "Segoe UI", Arial, sans-serif;
  --font-display: "Montserrat", var(--font);

  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 62px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --hero: linear-gradient(150deg, #060b3d 0%, #0f1b80 32%, #1733b8 68%, #2556c4 100%);
  --hero-top: #060b3d;

  --bg: #0a0f1d;
  --surface: #121a2e;
  --surface-2: #182139;
  --border: #232e49;
  --ink: #edf2fa;
  --ink-2: #a3b0c6;
  --ink-3: #6f7d96;
  --ink-mute: #3c4863;

  --blue-tint: rgba(87, 158, 227, .16);
  --blue-text: #8fb6ff;
  --lime-tint: rgba(216, 242, 75, .13);
  --lime-text: #d8f24b;

  --danger-bg: rgba(229, 72, 77, .17);
  --danger-border: rgba(229, 72, 77, .38);
  --danger-text: #ff8b90;

  --warn-bg: rgba(240, 169, 46, .16);
  --warn-text: #f5c46e;

  --ok-bg: rgba(63, 179, 107, .17);
  --ok-text: #74d79a;

  --t1-bg: rgba(63, 179, 107, .18); --t1-ink: #8fe0b0;
  --t2-bg: rgba(240, 169, 46, .18); --t2-ink: #f5c46e;
  --t3-bg: rgba(140, 120, 255, .2); --t3-ink: #c3b6ff;
  --t4-bg: rgba(87, 158, 227, .2); --t4-ink: #9cc6ee;
  --t5-bg: rgba(229, 90, 140, .2); --t5-ink: #ff9cc2;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 28px -22px rgba(0, 0, 0, .8);
  --tabbar-bg: rgba(18, 26, 46, .88);
  --scrim: rgba(0, 0, 0, .55);

  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; }
a { color: var(--blue-text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Беттің қаңқасы ── */
.cab {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}
.cab-main { padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.cab-main > *, .section > *, .rows > * { min-width: 0; }

/* ── Көк шапка (сайттағы .nx-hero-sapa) ── */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--hero);
  color: #eaf2fa;
  padding: calc(var(--safe-top) + 18px) 20px 30px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 30px 60px -42px rgba(2, 6, 38, .8), inset 0 -1px 0 rgba(255, 255, 255, .12);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 300px; height: 300px; right: -80px; top: -140px;
  background: radial-gradient(circle, rgba(216, 242, 75, .24) 0%, transparent 66%);
}
.hero-mark {
  position: absolute; z-index: -1; right: 14px; bottom: -20px;
  pointer-events: none; user-select: none;
  font-family: var(--font-display); font-weight: 500;
  font-size: 92px; line-height: 1; letter-spacing: -.04em;
  color: rgba(255, 255, 255, .07);
}
.hero-top { display: flex; align-items: center; gap: 10px; }
.hero-eyebrow {
  flex: 1; min-width: 0;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(232, 241, 250, .7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-title {
  margin: 10px 0 0;
  font-family: var(--font-display); font-weight: 500;
  font-size: 27px; line-height: 1.12; letter-spacing: -.03em;
  color: #fff;
}
.hero-lede { margin: 8px 0 0; font-size: var(--fs-sm); line-height: 1.45; color: rgba(232, 241, 250, .78); }

.icon-btn {
  flex: none;
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.icon-btn:active { transform: scale(.94); background: rgba(255, 255, 255, .2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.is-spinning svg { animation: spin .9s linear infinite; }

/* Рөл ауыстырғыш: шапканың ішіндегі шыны сегмент. */
.role-switch {
  display: inline-flex; gap: 3px; margin-top: 16px; padding: 3px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
}
.role-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 13px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 600; color: rgba(232, 241, 250, .78);
}
.role-switch button.is-active { background: #fff; color: var(--blue-900); }

/* Шапкадағы шыны чиптер (курстар, апта). */
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-chip {
  font-size: var(--fs-xs); line-height: 1.2; padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #eaf2fa;
}
.hero-chip.is-lime { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 700; }

/* ── Үлкен сандар: шапканың шетіне мінеді ── */
.kpis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: -22px 16px 0; position: relative;
}
.kpi {
  min-width: 0; padding: 12px 12px 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tile); box-shadow: var(--shadow-card);
  text-align: left; cursor: pointer;
  transition: transform .12s ease;
}
.kpi:active { transform: scale(.97); }
.kpi-label {
  font-size: var(--fs-2xs); font-weight: 600; line-height: 1.25; color: var(--ink-2);
  min-height: 28px;
}
.kpi-value {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 30px; line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.kpi-value small { font-family: var(--font); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.kpi-sub { margin-top: 6px; font-size: var(--fs-2xs); line-height: 1.3; color: var(--ink-3); }
.kpi.is-bad { background: linear-gradient(180deg, var(--danger-bg) 0%, var(--surface) 80%); border-color: var(--danger-border); }
.kpi.is-bad .kpi-value { color: var(--danger-text); }
/* Қазір қызыл: қанық, өйткені дәл қазір әрекет керек. */
.kpi.is-hot {
  background: var(--danger-grad); border-color: transparent;
  box-shadow: 0 16px 30px -18px rgba(229, 72, 77, .9);
}
.kpi.is-hot .kpi-label, .kpi.is-hot .kpi-sub { color: rgba(255, 255, 255, .86); }
.kpi.is-hot .kpi-value, .kpi.is-hot .kpi-value small { color: #fff; }
.kpi.is-calm .kpi-value { color: var(--ok-text); }

/* ── Бөлім ── */
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.section-title { margin: 0; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.section-note { font-size: var(--fs-xs); color: var(--ink-3); }
.section-link {
  margin-left: auto; border: 0; background: none; cursor: pointer; padding: 4px 0;
  font-size: var(--fs-sm); font-weight: 600; color: var(--blue-text);
}
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700;
  background: var(--blue-tint); color: var(--blue-text);
}
.count.is-bad { background: var(--danger-bg); color: var(--danger-text); }
.count.is-ok { background: var(--ok-bg); color: var(--ok-text); }
.count.is-idle { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }

/* ── Жолдар (сайттағы .nx-row) ── */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-row);
  box-shadow: var(--shadow-card); cursor: pointer; color: inherit; text-decoration: none;
  transition: transform .12s ease, border-color .15s ease;
}
.row:active { transform: scale(.985); }
.row.is-hot { box-shadow: inset 4px 0 0 var(--danger), var(--shadow-card); }
.row.is-plain { cursor: default; }
.row.is-plain:active { transform: none; }
.row-body { flex: 1; min-width: 0; }
.row-name {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; color: var(--ink);
}
.row-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta {
  margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-meta b { font-weight: 600; }
.row-meta .is-bad { color: var(--danger-text); font-weight: 600; }
.row-meta .is-warn { color: var(--warn-text); font-weight: 600; }
.row-meta .is-ok { color: var(--ok-text); font-weight: 600; }
.row-side { flex: none; display: flex; align-items: center; gap: 8px; }
.row-chev { flex: none; width: 16px; height: 16px; color: var(--ink-mute); }

/* Бас әріптер: атына байланысты тұрақты реңк. */
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .02em;
  background: var(--t4-bg); color: var(--t4-ink);
}
.avatar.is-t1 { background: var(--t1-bg); color: var(--t1-ink); }
.avatar.is-t2 { background: var(--t2-bg); color: var(--t2-ink); }
.avatar.is-t3 { background: var(--t3-bg); color: var(--t3-ink); }
.avatar.is-t4 { background: var(--t4-bg); color: var(--t4-ink); }
.avatar.is-t5 { background: var(--t5-bg); color: var(--t5-ink); }
.avatar.is-hot { background: var(--danger-grad); color: #fff; }

/* Курс белгісі (сайттағы .nx-track). */
.tag {
  flex: none; display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .02em;
  background: var(--blue-tint); color: var(--blue-text);
}
.tag.is-ok { background: var(--ok-bg); color: var(--ok-text); }
.tag.is-warn { background: var(--warn-bg); color: var(--warn-text); }
.tag.is-bad { background: var(--danger-bg); color: var(--danger-text); }
.tag.is-idle { background: var(--surface-2); color: var(--ink-2); }

/* Балл белгісі (сайттағы .nx-dash-score). */
.score {
  display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 9px;
  border-radius: 10px; font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--ink-2);
}
.score.is-bad { background: var(--danger-bg); color: var(--danger-text); }
.score.is-good { background: var(--ok-bg); color: var(--ok-text); }
.score.is-wait { background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; }
/* Ескі тексерудің балы (13.10): апталық санаққа кірмейді, сондықтан түссіз, бірақ көрінеді. */
.score.is-old { background: var(--surface-2); color: var(--ink-2); }

/* Қызыл тапсырма саны. */
.redcount {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: var(--r-pill); background: var(--danger-grad); color: #fff;
  font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 16px -10px rgba(229, 72, 77, .9);
}
.pct { min-width: 40px; text-align: right; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.pct small { display: block; font-size: var(--fs-2xs); font-weight: 500; color: var(--ink-3); }
.pct.is-bad { color: var(--danger-text); }
.pct.is-ok { color: var(--ok-text); }

/* Таныстым белгісі. */
.ack { display: inline-flex; align-items: center; gap: 3px; }
.ack svg { width: 13px; height: 13px; }
.ack.is-yes { color: var(--ok-text); }
.ack.is-no { color: var(--warn-text); }

/* Мерзім тақтайшасы (бүгін жабылады). */
.due {
  flex: none; width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-content: center; text-align: center;
  background: var(--blue-tint); color: var(--blue-text);
}
.due b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.due span { display: block; margin-top: 3px; font-size: var(--fs-2xs); font-weight: 600; }
.due.is-warn { background: var(--warn-bg); color: var(--warn-text); }
.due.is-hot { background: var(--danger-grad); color: #fff; box-shadow: 0 10px 20px -12px rgba(229, 72, 77, .9); }
.due.is-done { background: var(--ok-bg); color: var(--ok-text); }
.due.is-time b { font-size: 15px; letter-spacing: -.01em; }

/* ── Бос күй: «бәрі жақсы» сезімі, бос тор емес ── */
.empty {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--r-row);
  background: var(--surface); border: 1px dashed var(--border);
}
.empty-icon {
  flex: none; width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink);
}
.empty-icon svg { width: 20px; height: 20px; }
.empty-text { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.empty-sub { margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-3); }

/* ── Сүзгі мен іздеу ── */
.toolbar {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -16px; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: var(--glass, blur(14px)); backdrop-filter: var(--glass, blur(14px));
  display: grid; gap: 10px;
}
.search {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
}
.search svg { flex: none; width: 17px; height: 17px; color: var(--ink-3); }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: var(--fs-md); color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
/* Браузердің өз «×» белгісі: өзіміздікі тұр, екеуі қатар шықпасын. */
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-clear { border: 0; background: none; cursor: pointer; padding: 4px; color: var(--ink-3); display: none; }
.search.has-value .search-clear { display: inline-grid; }
.search-clear svg { width: 16px; height: 16px; }

.segmented {
  display: flex; gap: 3px; padding: 3px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  padding: 8px 12px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
}
.segmented button em { font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); }
.segmented button.is-active { background: var(--blue-700); color: #fff; }
.segmented button.is-active em { color: rgba(255, 255, 255, .78); }

/* ── Тексеру: үш топтың жоғарғы тақтасы ── */
.split {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.split-cell {
  padding: 12px; border-radius: var(--r-tile); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.split-cell b {
  display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600;
  line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.split-cell span { display: block; margin-top: 6px; font-size: var(--fs-2xs); font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.split-cell.is-bad { background: var(--danger-grad); border-color: transparent; color: #fff; box-shadow: 0 16px 30px -18px rgba(229, 72, 77, .9); }
.split-cell.is-bad span { color: rgba(255, 255, 255, .86); }
.split-cell.is-ok b { color: var(--ok-text); }
.split-cell.is-idle b { color: var(--ink-2); }
.split-cell.is-zero.is-bad { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-card); }
.split-cell.is-zero.is-bad span { color: var(--ink-2); }
.split-cell:disabled { cursor: default; }
.split-cell.is-active { outline: 2px solid var(--blue-700); outline-offset: 2px; }
.filter-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--blue-tint); color: var(--blue-text); font-size: var(--fs-sm); font-weight: 600; }
.filter-note .btn { flex: none; }

/* Аптаның аяқталуы. */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--ok)); }
.progress-row { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-xs); color: var(--ink-3); }
.progress-row b { color: var(--ink); font-weight: 600; }

/* ── Карточка ── */
.card {
  padding: 16px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.card.is-alert { background: linear-gradient(180deg, var(--danger-bg) 0%, var(--surface) 70%); border-color: var(--danger-border); }

/* Курс карточкалары: көлденең айналады, бояуы қанық. */
.courses { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.courses::-webkit-scrollbar { display: none; }
.course {
  flex: 0 0 76%; max-width: 300px; scroll-snap-align: start;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 16px; border-radius: var(--r-card); color: #fff; text-align: left; cursor: pointer; border: 0;
  background: var(--hero); box-shadow: 0 18px 34px -22px rgba(2, 6, 38, .8);
}
.course::after {
  content: ""; position: absolute; z-index: -1; right: -50px; bottom: -60px; width: 170px; height: 170px;
  border-radius: 50%; background: radial-gradient(circle, rgba(216, 242, 75, .28) 0%, transparent 65%);
}
.course.is-bad { background: var(--danger-grad); }
.course:only-child { flex-basis: 100%; max-width: none; }
.course.is-selected { box-shadow: 0 0 0 3px var(--lime) inset, 0 18px 34px -22px rgba(2, 6, 38, .8); }
.course-name { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.course-sub { margin-top: 3px; font-size: var(--fs-xs); color: rgba(255, 255, 255, .78); }
.course-stats { display: flex; gap: 16px; margin-top: 16px; }
.course-stats div { min-width: 0; }
.course-stats b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.course-stats span { display: block; margin-top: 4px; font-size: var(--fs-2xs); color: rgba(255, 255, 255, .78); }

/* ── Скелет пен қате ── */
.skel { display: grid; gap: 8px; }
.skel i {
  display: block; height: 66px; border-radius: var(--r-row);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite;
  border: 1px solid var(--border);
}
.skel i.is-short { height: 22px; width: 40%; border: 0; }
.error {
  padding: 18px; border-radius: var(--r-card); text-align: center;
  background: var(--surface); border: 1px solid var(--danger-border);
}
.error-title { font-weight: 700; color: var(--ink); }
.error-sub { margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-3); }

/* ── Батырмалар ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 13px; border: 0; cursor: pointer;
  font-size: var(--fs-md); font-weight: 700; text-decoration: none;
  background: var(--lime); color: var(--lime-ink);
  transition: transform .12s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.is-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); }
.btn.is-small { height: 34px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 11px; }
.btn.is-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.link-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 11px; border-radius: 10px; border: 0; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 700;
  background: var(--blue-tint); color: var(--blue-text);
}
.link-btn svg { width: 14px; height: 14px; }
.link-btn[disabled] { background: var(--surface-2); color: var(--ink-3); cursor: default; }

/* ── Төменгі навигация ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 6px 10px calc(6px + var(--safe-bottom));
  background: var(--tabbar-bg);
  -webkit-backdrop-filter: var(--glass, blur(18px) saturate(160%)); backdrop-filter: var(--glass, blur(18px) saturate(160%));
  border-top: 1px solid var(--border);
}
.tabbar-inner { max-width: 560px; margin: 0 auto; display: flex; gap: 4px; }
.tab {
  flex: 1; min-width: 0; position: relative;
  display: grid; justify-items: center; gap: 3px; padding: 6px 2px 4px;
  border: 0; background: none; cursor: pointer; border-radius: 14px;
  color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 600;
}
.tab-icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background .2s ease; }
.tab-icon svg { width: 22px; height: 22px; }
.tab.is-active { color: var(--blue-text); }
.tab.is-active .tab-icon { background: var(--blue-tint); }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-badge {
  position: absolute; top: 2px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ── Төменнен шығатын парақ (егжей-тегжей) ── */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 40; background: var(--scrim);
  opacity: 0; transition: opacity .2s ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto; max-height: 86vh; overflow-y: auto;
  padding: 10px 16px calc(20px + var(--safe-bottom));
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-sheet);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .7, .2, 1);
}
.sheet-open .sheet-scrim { opacity: 1; }
.sheet-open .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--ink-mute); }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head .avatar { width: 48px; height: 48px; border-radius: 16px; font-size: var(--fs-md); }
.sheet-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.sheet-sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.sheet-body { display: grid; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 12px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); }
.fact b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 4px; font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-3); }
.fact.is-bad b { color: var(--danger-text); }
.fact.is-ok b { color: var(--ok-text); }
.fact.is-warn b { color: var(--warn-text); }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.list li {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm);
}
.list li .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.list li .dot.is-warn { background: var(--warn); }
.list li .grow { flex: 1; min-width: 0; }
.list li small { color: var(--ink-3); }
.sheet-label { margin: 4px 4px 0; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ── Қозғалыс ── */
.rise { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.cab.is-calm .rise { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rise, .skel i { animation: none; }
  .sheet, .sheet-scrim { transition: none; }
}

@media (max-width: 370px) {
  .hero-title { font-size: 24px; }
  .kpi { padding: 11px 10px 12px; }
  .kpi-value { font-size: 26px; }
  .split-cell b { font-size: 23px; }
  .avatar { width: 36px; height: 36px; border-radius: 12px; }
}

/* ═══ Көру режимі: басшы не менеджер кураторды оның көзімен ашқанда ═══ */
.viewas {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 6px 6px 6px 12px; border-radius: 14px;
  background: rgba(216, 242, 75, .16); border: 1px solid rgba(216, 242, 75, .45);
  font-size: var(--fs-xs); color: #eaf2fa;
}
.viewas span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewas svg { width: 15px; height: 15px; flex: none; color: var(--lime); }
.viewas b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.viewas button {
  flex: none; border: 0; cursor: pointer; padding: 6px 12px; border-radius: 10px;
  background: var(--lime); color: var(--lime-ink); font-size: var(--fs-xs); font-weight: 700;
}

/* ═══ ФИРМАЛЫҚ ЖҮКТЕЛУ ЭКРАНЫ: сайттағы «Талдау» экраны (AnalysisOverlay, brand.css) ═══
   Аспан градиенті, жұлдыздар, тұман, нүктелі глобус. Күткен сайын глобус лайм толқын жібереді. */
.splash {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #071046 0%, #14239e 18%, #1c3ed9 38%, #2e6bde 58%, #579ee3 74%, #9cc6ee 88%, #e4f0fa 100%);
  color: #eaf2fa; text-align: center;
  transition: opacity .45s ease, visibility .45s ease;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-stars {
  position: absolute; inset: -20% -20% 0;
  background-image:
    radial-gradient(1.4px 1.4px at 40px 60px, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 180px 320px, rgba(255,255,255,.40), transparent),
    radial-gradient(1.6px 1.6px at 520px 140px, rgba(255,255,255,.30), transparent),
    radial-gradient(1px 1px at 90px 200px, rgba(255,255,255,.35), transparent);
  background-size: 420px 420px, 610px 610px, 830px 830px, 260px 260px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 72%);
  animation: starDrift 120s linear infinite;
}
.splash-nebula {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(38% 30% at 22% 26%, rgba(87,158,227,.45), transparent 70%),
    radial-gradient(30% 26% at 78% 18%, rgba(216,242,75,.16), transparent 72%);
  filter: blur(48px);
  animation: nebula 26s ease-in-out infinite alternate;
}
.splash-globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.splash-body {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-top) + 24px) 28px calc(12vh + var(--safe-bottom)); max-width: 100%;
}
@media (max-width: 599px) {
  .splash { align-items: flex-end; }
  .splash-body { padding-bottom: calc(14vh + var(--safe-bottom)); }
}
.splash-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 15px 6px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: var(--glass-chip, blur(8px)); backdrop-filter: var(--glass-chip, blur(8px));
  font-size: 12.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  animation: riseIn .8s cubic-bezier(.2,.7,.2,1) both;
}
/* Жыпылықтайтын лайм нүкте. */
.splash-dot {
  width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 rgba(216,242,75,.7);
  animation: blink 1.1s ease-in-out infinite;
}
.splash-title {
  margin: 22px 0 0; font-family: var(--font-display); font-weight: 500;
  font-size: 30px; line-height: 1.15; letter-spacing: -.03em; color: #fff;
  max-width: 14ch; text-wrap: balance;
  animation: riseIn .9s cubic-bezier(.2,.7,.2,1) .08s both;
}
.splash-lede {
  margin: 12px 0 0; max-width: 30ch; font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,.92); text-shadow: 0 1px 14px rgba(3,10,48,.6); text-wrap: pretty;
  animation: riseIn .9s cubic-bezier(.2,.7,.2,1) .16s both;
}
.splash-track {
  position: relative; overflow: hidden; margin-top: 28px; width: 220px; max-width: 70vw;
  height: 3px; border-radius: 2px; background: rgba(255,255,255,.22);
  animation: riseIn .9s cubic-bezier(.2,.7,.2,1) .24s both;
}
.splash-track i {
  position: absolute; top: 0; bottom: 0; width: 38%; border-radius: 2px; background: var(--lime);
  animation: indeterminate 1.4s cubic-bezier(.4,0,.2,1) infinite;
}

/* Бет ішіндегі кіші нұсқасы: скелеттің үстінде, «әлі жүктеліп жатыр» деп жыпылықтайды. */
.loading-note {
  display: inline-flex; align-items: center; gap: 8px; justify-self: center;
  padding: 6px 14px 6px 10px; border-radius: var(--r-pill);
  background: var(--blue-tint); color: var(--blue-text); font-size: var(--fs-xs); font-weight: 600;
}
.loading-note .splash-dot { width: 7px; height: 7px; flex-basis: 7px; background: var(--blue-600); animation-name: blinkBlue; }

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(216,242,75,.65); }
  50% { opacity: .35; box-shadow: 0 0 0 7px rgba(216,242,75,0); }
}
@keyframes blinkBlue {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(46,107,222,.45); }
  50% { opacity: .35; box-shadow: 0 0 0 6px rgba(46,107,222,0); }
}
@keyframes indeterminate { from { left: -40%; } to { left: 102%; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes starDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-420px,210px,0); } }
@keyframes nebula { from { transform: translate3d(-2%,-1%,0) scale(1); } to { transform: translate3d(3%,2%,0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .splash-stars, .splash-nebula, .splash-chip, .splash-title, .splash-lede, .splash-track, .splash-track i, .splash-dot { animation: none; }
}

/* ═══ Оқушыға WhatsApp (08.10): жолдың өзінде, бір басумен ═══ */
.wa-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border: 0; border-radius: 12px; cursor: pointer;
  background: #25d366; color: #fff; font-size: var(--fs-sm); font-weight: 700;
  box-shadow: 0 10px 20px -12px rgba(37, 211, 102, .9);
  transition: transform .12s ease;
}
.wa-btn:active { transform: scale(.95); }
.wa-btn svg { width: 17px; height: 17px; }
.wa-btn.is-done { background: var(--ok-bg); color: var(--ok-text); box-shadow: none; }
.wa-none { font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-3); }
.row.is-sent { opacity: .62; }
.row.is-sent .row-name { text-decoration: line-through; text-decoration-color: var(--ink-mute); }

/* ═══ Есеп панелі: боттың «Ашу →» сілтемесі мен «Чат тексеру» тізімі (сайттың ?embed=1 беті) ═══ */
.rsheet {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column;
  background: var(--bg); animation: rise .22s ease-out both;
}
.rsheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 12px 10px;
  background: var(--hero); color: #fff;
}
.rsheet-head .is-back { transform: rotate(180deg); }
.rsheet-title { min-width: 0; display: grid; }
.rsheet-title b { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.rsheet-title span { font-size: var(--fs-2xs); color: rgba(232, 241, 250, .75); }
.rsheet-load { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-2xs); color: rgba(232, 241, 250, .85); }
.rsheet-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* ═══ Менеджер: «Шолу» (08.10) ═══ */
.hero .hero-chips .hero-chip { cursor: pointer; font: inherit; font-size: var(--fs-xs); }
.hero .hero-chips .hero-chip:active { background: rgba(255, 255, 255, .24); }

/* 1. Апта торы: курс түсімен қанық карточкалар. */
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cell {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0;
  display: grid; gap: 4px; padding: 13px 13px 12px; border: 0; border-radius: var(--r-tile);
  text-align: left; color: #fff; cursor: pointer;
  background: linear-gradient(150deg, color-mix(in srgb, var(--cc) 82%, #fff) 0%, var(--cc) 55%, color-mix(in srgb, var(--cc) 70%, #000) 100%);
  box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--cc) 90%, #000);
  transition: transform .12s ease;
}
.cell:active { transform: scale(.97); }
.cell::after {
  content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, transparent 65%);
}
.cell-top { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.cell-top b { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cell-red {
  flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: #fff; color: var(--danger-text); font-size: var(--fs-xs); font-weight: 800;
}
.cell-sub { font-size: var(--fs-2xs); color: rgba(255, 255, 255, .8); }
.cell-big { margin-top: 6px; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.cell-big small { margin-left: 5px; font-family: var(--font); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, .78); }
.cell-bar { margin-top: 6px; height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .25); overflow: hidden; }
.cell-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.cell-foot { font-size: var(--fs-2xs); font-weight: 600; color: rgba(255, 255, 255, .9); }

/* 2. Динамика. */
.trend { display: block; width: 100%; height: auto; }
.tr-bar { fill: var(--blue-600); opacity: .85; }
.tr-val { fill: var(--ink); font: 700 10.5px var(--font); text-anchor: middle; }
.tr-week { fill: var(--ink-3); font: 600 10px var(--font); text-anchor: middle; }
.tr-line { fill: none; stroke: #ff3d9a; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.tr-dot { fill: #fff; stroke: #ff3d9a; stroke-width: 2; }
.trend-legend { display: flex; gap: 14px; margin-top: 8px; font-size: var(--fs-2xs); color: var(--ink-2); }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 3px; }
.trend-legend i.is-bar { background: var(--blue-600); }
.trend-legend i.is-line { height: 3px; border-radius: 2px; background: #ff3d9a; }

/* 5. Тексеру сапасы: курс сайын жолақ. */
.qbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.qbar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); }
.qbar-head b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qbar-head span { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.qbar-head .is-bad, .qbar-note .is-bad { color: var(--danger-text); }
.qbar-head .is-warn { color: var(--warn-text); }
.qbar-head .is-ok { color: var(--ok-text); }
.qbar { margin-top: 5px; height: 7px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.qbar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.qbar.is-warn span { background: var(--warn); }
.qbar.is-bad span { background: var(--danger); }
.qbar-note { margin-top: 4px; font-size: var(--fs-2xs); color: var(--ink-3); }
.facts .fact span { line-height: 1.3; }

/* ═══ Координатор: өз кураторларын таңдау (08.10) ═══ */
.scope-open { justify-self: start; }
.row.pick { gap: 10px; }
.pick-box {
  flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  border: 2px solid var(--ink-mute); background: var(--surface); color: transparent;
  transition: background .15s ease, border-color .15s ease;
}
.pick-box svg { width: 15px; height: 15px; }
.row.pick.is-on { border-color: var(--blue-600); background: color-mix(in srgb, var(--blue-tint) 70%, var(--surface)); }
.row.pick.is-on .pick-box { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.row.pick .avatar { width: 34px; height: 34px; border-radius: 11px; font-size: var(--fs-xs); }

/* Сақтау жолағы: навигацияның үстінде, әрдайым көрінеді. */
.savebar {
  position: fixed; left: 0; right: 0; z-index: 21;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  max-width: 560px; margin: 0 auto; padding: 0 16px;
  display: flex; gap: 8px;
}
.savebar .btn { height: 48px; box-shadow: 0 14px 30px -16px rgba(11, 18, 32, .55); }
.savebar .btn.is-grow { flex: 1; }
.savebar .btn[disabled] { opacity: .65; }
body:has(.savebar) .cab { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 84px); }

/* Қысқа хабар («Сақталды»). */
.toast {
  position: fixed; left: 50%; z-index: 80; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 70px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg);
  font-size: var(--fs-sm); font-weight: 700; transition: opacity .2s ease, transform .2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ═══ Координатордың жұмыс жазбасы (08.10) ═══ */
.fu-note { padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: var(--blue-tint); display: grid; gap: 4px; }
.fu-note b { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-text); }
.fu-note p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.fu-note small { font-size: var(--fs-2xs); color: var(--ink-3); }
.fu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fu-act {
  min-height: 46px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: var(--fs-sm); font-weight: 700; text-align: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.fu-act.is-on { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.fu-text {
  width: 100%; resize: vertical; min-height: 96px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-md); line-height: 1.45;
}
.fu-text:focus { outline: 2px solid var(--blue-600); outline-offset: 1px; }
.fu-photo { display: grid; gap: 8px; cursor: pointer; }
.fu-photo-btn {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  padding: 9px 13px; border-radius: 12px; border: 1px dashed var(--ink-mute);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
}
.fu-photo-btn svg { width: 15px; height: 15px; }
.fu-photo-prev { max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--border); object-fit: contain; justify-self: start; }
.fu-link-input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm);
}
.fu-link-input:focus { outline: 2px solid var(--blue-600); outline-offset: 1px; }
.fu-evidence { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fu-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--blue-text); font: inherit; font-size: var(--fs-2xs); font-weight: 700; cursor: pointer;
}
.fu-link svg { width: 12px; height: 12px; }
.fu-note.is-result { background: var(--ok-bg, #e7f3ea); }
.fu-error { padding: 10px 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger-text); font-size: var(--fs-sm); font-weight: 600; }

/* Төменгі навигация: ұзын жазу кішірек, ал өте тар экранда қысқа нұсқасы (08.10, бот: «Координато...»). */
.tab-label.is-long { font-size: 10px; letter-spacing: -.02em; }
.tab-short { display: none; }
@media (max-width: 374px) {
  .tab:has(.tab-short) .tab-label:not(.tab-short) { display: none; }
  .tab-short { display: block; }
}
/* Координатордың көзімен: ішкі қойындылар. */
.coord-views { margin-bottom: 2px; }
