/* ─────────────────────────────────────────────────────────────
   VINIRDENT — рабочая панель: «Graphite», чёрная тема 2026–2027

   Подключается ТОЛЬКО на dashboard.html, после style.css и mono.css.
   Каждое правило начинается с body.graphite — главная, вход,
   профиль и админка остаются прежними.

   Ориентиры — Linear, Vercel, Raycast:
   · почти чёрный графит вместо плоского #000 — глубина за счёт
     ступеней поверхности, а не теней и цвета;
   · линии толщиной в пиксель, 4–12 % белого;
   · цвета нет совсем; белое — единственный акцент: активное,
     «сегодня», итог и главная кнопка;
   · Geist для текста, Geist Mono для времени, сумм и дат;
   · движение короткое и тихое, без отскоков и свечения.
   ───────────────────────────────────────────────────────────── */

body.graphite {
  --bg:         #050506;
  --surface:    #0b0b0c;   /* карточки */
  --surface-2:  #111113;   /* поля, вложенные блоки */
  --surface-3:  #18181b;   /* наведение, чипы */
  --surface-4:  #202024;
  --line:       rgba(255, 255, 255, .12);
  --line-soft:  rgba(255, 255, 255, .07);
  --line-faint: rgba(255, 255, 255, .045);

  --text:       #ededef;
  --text-dim:   #b4b4ba;
  --text-mute:  #8b8b93;
  --text-faint: #6f6f78;

  --accent:       #f4f4f5;
  --accent-text:  #050506;
  --accent-soft:  rgba(255, 255, 255, .06);
  --accent-line:  rgba(255, 255, 255, .24);
  --accent-glow:  rgba(255, 255, 255, .10);
  --sheen-line:   rgba(0, 0, 0, .10);
  --ring:         rgba(255, 255, 255, .09);
  --veil:         rgba(0, 0, 0, .72);
  --danger-soft:  rgba(255, 80, 80, .10);
  --danger-text:  #ff6b6b;

  --hairline:    inset 0 1px 0 rgba(255, 255, 255, .045);
  --card-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9);
  --row-hover:   rgba(255, 255, 255, .022);

  --font-ui:   'Geist', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --r-card: 16px;
  --r-ctl:  10px;

  background: var(--bg);
  font-family: var(--font-ui);
  letter-spacing: -.006em;
}

[data-theme='light'] body.graphite {
  --bg:         #f7f7f8;
  --surface:    #ffffff;
  --surface-2:  #f4f4f5;
  --surface-3:  #ececee;
  --surface-4:  #e4e4e7;
  --line:       rgba(0, 0, 0, .12);
  --line-soft:  rgba(0, 0, 0, .075);
  --line-faint: rgba(0, 0, 0, .05);

  --text:       #09090b;
  --text-dim:   #3f3f46;
  --text-mute:  #5f5f68;
  --text-faint: #72727b;

  --accent:       #09090b;
  --accent-text:  #ffffff;
  --accent-soft:  rgba(0, 0, 0, .045);
  --accent-line:  rgba(0, 0, 0, .24);
  --accent-glow:  rgba(0, 0, 0, .08);
  --sheen-line:   rgba(255, 255, 255, .25);
  --ring:         rgba(0, 0, 0, .07);
  --veil:         rgba(10, 10, 12, .35);
  --danger-soft:  rgba(220, 38, 38, .08);
  --danger-text:  #dc2626;

  --hairline:    inset 0 1px 0 rgba(255, 255, 255, .8);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -20px rgba(0, 0, 0, .18);
  --row-hover:   rgba(0, 0, 0, .022);
}

/* ── Фон: точечная сетка, тающая книзу, и еле заметный свет сверху ─*/
body.graphite::before {
  background:
    radial-gradient(70vw 34vw at 50% -14%, rgba(255, 255, 255, .05), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .065) 1px, transparent 1.2px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, .35) 420px, transparent 900px);
          mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, .35) 420px, transparent 900px);
}
[data-theme='light'] body.graphite::before {
  background: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .085) 1px, transparent 1.2px) 0 0 / 24px 24px;
}
body.graphite::after { opacity: .025; }

/* ── Шапка ────────────────────────────────────────────────────*/
body.graphite .site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .site-header.is-stuck { border-bottom-color: var(--line-soft); box-shadow: none; }

body.graphite .logo__mark {
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 9px;
  box-shadow: none;
}
body.graphite .logo__name { font-weight: 600; letter-spacing: .2em; }
body.graphite .logo__sub  { color: var(--text-faint); letter-spacing: .14em; }
body.graphite .site-nav a { color: var(--text-mute); font-weight: 500; }
body.graphite .site-nav a:hover { color: var(--text); }

/* ── Вкладки: сегментный переключатель ────────────────────────*/
body.graphite .tabs-head { margin: 28px 0 22px; }

body.graphite .tabs {
  padding: 4px; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--hairline), 0 10px 30px -20px rgba(0, 0, 0, .9);
}
body.graphite .tab {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-mute);
  font-size: 13.5px; font-weight: 500;
  gap: 8px;
}
body.graphite .tab svg { width: 15px; height: 15px; opacity: .75; transition: opacity .2s var(--ease); }
body.graphite .tab:hover { color: var(--text); background: transparent; }
body.graphite .tab:active { transform: scale(.97); box-shadow: none; }
body.graphite .tab.is-active { color: var(--text); background: none; box-shadow: none; }
body.graphite .tab.is-active svg { opacity: 1; }

body.graphite .tabs__glider {
  border-radius: 8px;
  background: var(--surface-4);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .6);
  transition: transform .4s var(--ease-glide), width .4s var(--ease-glide), height .4s var(--ease-glide);
}
[data-theme='light'] body.graphite .tabs__glider {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04);
}

/* ── Карточки ─────────────────────────────────────────────────*/
body.graphite .list-card,
body.graphite .calendar,
body.graphite .notepad {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--hairline), var(--card-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: graphite-rise .45s var(--ease-glide) both;
}
body.graphite .calendar { animation-delay: .05s; }
body.graphite .notepad  { animation-delay: .1s; }

@keyframes graphite-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Список записей тянется до высоты календаря — без пустого провала под карточкой */
body.graphite .records-grid > .list-card { align-self: stretch; }

body.graphite .list-card__head {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .list-card__title { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
body.graphite .list-card__sub   { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }

/* ── Кнопки ───────────────────────────────────────────────────*/
body.graphite .btn {
  border-radius: var(--r-ctl);
  font-weight: 550;
  letter-spacing: -.01em;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.graphite .btn     { padding: 9px 16px; font-size: 13.5px; }
body.graphite .btn--sm { padding: 6px 12px; font-size: 12.5px; }
body.graphite .btn:active:not(:disabled) { transform: scale(.98); }

body.graphite .btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .5);
}
body.graphite .btn--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 86%, var(--bg));
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .5);
  transform: none;
}
body.graphite .btn--primary::after { display: none; }

body.graphite .btn--ghost {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
}
body.graphite .btn--ghost:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--text);
}

body.graphite .icon-btn { border-radius: 8px; color: var(--text-faint); }
body.graphite .icon-btn:hover { background: var(--surface-3); color: var(--text); }
body.graphite .icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger-text); }

/* ── Поля и поиск ─────────────────────────────────────────────*/
body.graphite .field__input,
body.graphite .search input {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctl);
  box-shadow: none;
  font-size: 14px;
}
body.graphite .search { background: none; border: none; border-radius: var(--r-ctl); }
body.graphite .search input { padding: 9px 14px 9px 36px; }
body.graphite .search svg { left: 12px; width: 15px; height: 15px; color: var(--text-faint); }
body.graphite .field__input:hover,
body.graphite .search input:hover { border-color: var(--line); }
body.graphite .field__input:focus,
body.graphite .search input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--ring);
}
body.graphite .search:focus-within svg { color: var(--text); }
body.graphite .field__label { color: var(--text-faint); letter-spacing: .1em; font-weight: 600; }

/* ── Цифры — моноширинные ─────────────────────────────────────*/
body.graphite .appt__time,
body.graphite .clock__time,
body.graphite .result__total,
body.graphite .result__discount,
body.graphite .estimate__total,
body.graphite .estimate__price,
body.graphite .estimate__qty,
body.graphite .pick__price,
body.graphite .service__price,
body.graphite .qty__num,
body.graphite .day {
  font-family: var(--font-mono);
}

/* ── Часы ─────────────────────────────────────────────────────*/
body.graphite .clock {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: var(--hairline);
}
body.graphite .clock__time {
  font-size: 2rem; font-weight: 500;
  letter-spacing: -.04em;
  color: var(--text);
  text-shadow: none;
}
body.graphite .clock__zone {
  color: var(--text-faint); opacity: 1;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
}
body.graphite .clock__date { color: var(--text-mute); opacity: 1; }

/* ── Календарь ────────────────────────────────────────────────*/
body.graphite .calendar__month { font-weight: 600; font-size: 13.5px; }
body.graphite .calendar__nav {
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
body.graphite .calendar__weekdays span { color: var(--text-faint); font-size: 10.5px; letter-spacing: .06em; }
body.graphite .day {
  border-radius: 8px;
  border-width: 1px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-dim);
}
body.graphite .day:hover { background: var(--surface-3); color: var(--text); transform: none; }
body.graphite .day--weekend { color: var(--text-mute); }
body.graphite .day--today,
body.graphite .day--today:hover {
  background: var(--accent); color: var(--accent-text);
  border-color: transparent; box-shadow: none; font-weight: 600;
}
body.graphite .day--picked,
body.graphite .day--picked:hover {
  background: var(--surface-3); border-color: var(--accent-line); color: var(--text); box-shadow: none;
}
body.graphite .day--picked.day--today,
body.graphite .day--picked.day--today:hover {
  background: var(--accent); color: var(--accent-text);
  box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3px var(--accent-line);
}
body.graphite .minical { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: none; }
body.graphite .calendar__hint { color: var(--text-faint); font-size: 12px; }

/* ── Строки списков ───────────────────────────────────────────*/
body.graphite .appt::before,
body.graphite .entry::before,
body.graphite .pcard::before,
body.graphite .memo::before,
body.graphite .album::before {
  background: var(--accent);
  width: 2px; top: 10px; bottom: 10px;
}
body.graphite .appt:hover,
body.graphite .entry:hover,
body.graphite .pcard:hover,
body.graphite .memo:hover,
body.graphite .album:hover { background: var(--row-hover); }

body.graphite .entry,
body.graphite .memo,
body.graphite .pcard,
body.graphite .album { border-bottom-color: var(--line-faint); }

body.graphite .appt__time {
  min-width: 60px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px; font-weight: 500;
  box-shadow: none;
}
body.graphite .appt:hover .appt__time,
body.graphite .appt.is-open .appt__time {
  background: var(--accent); color: var(--accent-text); border-color: transparent;
}
body.graphite .appt__name { font-weight: 550; }
body.graphite .appt__meta { color: var(--text-faint); }
body.graphite .appt__flag { background: var(--text-dim); box-shadow: none; }

body.graphite .daygroup__head { padding-top: 16px; padding-bottom: 10px; }
body.graphite .daygroup__date {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-mute);
}
body.graphite .daygroup__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
body.graphite .daygroup + .daygroup { border-top-color: var(--line-faint); }
body.graphite .daygroup.is-past { opacity: .45; }

body.graphite .entry__avatar {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 600;
  box-shadow: none;
}
body.graphite .entry__name { font-weight: 550; }
body.graphite .entry__phone,
body.graphite .entry__meta { color: var(--text-mute); }

/* ── Метки ────────────────────────────────────────────────────*/
body.graphite .tag {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text-mute);
  font-size: 11.5px; font-weight: 500;
}
body.graphite .tag--accent {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--text);
  font-family: var(--font-mono);
}
body.graphite mark { background: rgba(255, 255, 255, .14); color: var(--text); box-shadow: none; }
[data-theme='light'] body.graphite mark { background: rgba(0, 0, 0, .1); }

/* ── Карточка пациента и заметки ──────────────────────────────*/
body.graphite .pcard__toggle,
body.graphite .memo__toggle {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text-mute);
}
body.graphite .pcard.is-open .pcard__toggle,
body.graphite .memo.is-open .memo__toggle {
  background: var(--accent); color: var(--accent-text); border-color: transparent; box-shadow: none;
}
body.graphite .pcard__col {
  background: var(--surface-2);
  border: 1px solid var(--line-faint);
  border-radius: 12px;
  box-shadow: none;
}
body.graphite .pcard__col-title { color: var(--text-faint); letter-spacing: .12em; min-height: 24px; }
body.graphite .estimate__row { border-bottom-color: var(--line-faint); }
body.graphite .estimate__foot { border-top-color: var(--line-soft); }
body.graphite .estimate__total { font-weight: 500; letter-spacing: -.03em; color: var(--text); }

/* Кнопки «Изменить» и «Убрать» у расчёта в карточке */
body.graphite .pcard__links { display: inline-flex; align-items: center; gap: 6px; }
body.graphite .mini-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text-dim);
  font: 500 11.5px/1 var(--font-ui);
  letter-spacing: 0; text-transform: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
body.graphite .mini-btn:hover { background: var(--surface-3); border-color: var(--line); color: var(--text); }
body.graphite .mini-btn--danger:hover { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }

body.graphite .memo__area,
body.graphite .appt__area {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: none;
}
body.graphite .memo__area:focus,
body.graphite .appt__area:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring); }

/* Статус сохранения — маленькая моноширинная плашка с точкой */
body.graphite .save-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0;
  padding: 4px 9px; border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--text-faint);
}
body.graphite .save-state::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint); opacity: .6;
}
body.graphite .save-state.is-dirty { color: #e6c46a; border-color: rgba(230, 196, 106, .2); }
body.graphite .save-state.is-dirty::before { background: #e6c46a; opacity: 1; }
body.graphite .save-state.is-saved { color: var(--text-dim); background: var(--surface-2); }
body.graphite .save-state.is-saved::before { background: #4ade80; opacity: 1; }

/* ── Блокнот внизу «Записей» ──────────────────────────────────
   Карточка-документ: шапка, поле без рамки на всю ширину, подвал.
   Рамка у поля лишняя — границы и так задаёт сама карточка. */
body.graphite .notepad--bottom {
  display: flex; flex-direction: column;
  margin-top: 16px; padding: 0;
  min-height: 0;
  overflow: hidden;
}
body.graphite .notepad--bottom .notepad__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .notepad__heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.graphite .notepad__icon {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text-dim);
}
body.graphite .notepad--bottom .notepad__title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
body.graphite .notepad--bottom .notepad__sub {
  margin: 0;
  font-size: 12px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.graphite .notepad__tools { display: flex; align-items: center; gap: 8px; flex: none; }

body.graphite .notepad--bottom .notepad__area {
  flex: none;
  min-height: 240px;
  padding: 16px 20px;
  background: transparent;
  border: none; border-radius: 0;
  box-shadow: none;
  color: var(--text);
  font-size: 14.5px; line-height: 1.75;
  resize: vertical;
}
body.graphite .notepad--bottom .notepad__area:focus {
  border: none; box-shadow: none;
  background-color: rgba(255, 255, 255, .012);
}
body.graphite .notepad--bottom .notepad__area::placeholder { color: var(--text-faint); }

body.graphite .notepad--bottom .notepad__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0;
  padding: 9px 16px;
  border-top: 1px solid var(--line-faint);
}
body.graphite .notepad--bottom .notepad__hint {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-faint);
}
body.graphite .notepad__count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; }

body.graphite kbd {
  display: inline-block;
  min-width: 20px; padding: 1px 6px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-dim);
  font: 500 10.5px/1.5 var(--font-mono);
  text-align: center;
}
body.graphite kbd + kbd { margin-left: -1px; }
body.graphite kbd:last-of-type { margin-right: 4px; }

/* ── Фото ─────────────────────────────────────────────────────*/
body.graphite .shot,
body.graphite .thumb { border-radius: 10px; border-color: var(--line-soft); }
body.graphite .dropzone {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
body.graphite .dropzone:hover,
body.graphite .dropzone.is-over { border-color: var(--accent-line); background: var(--surface-3); transform: none; }

/* ── Окна ─────────────────────────────────────────────────────*/
body.graphite .modal { background: var(--veil); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body.graphite .modal__box {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--hairline), 0 40px 100px -20px rgba(0, 0, 0, .95);
  animation: graphite-modal .32s var(--ease-glide) both;
}
[data-theme='light'] body.graphite .modal__box {
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .04);
}
@keyframes graphite-modal {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
body.graphite .modal__head { border-bottom-color: var(--line-faint); }
body.graphite .modal__title { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
body.graphite .modal__sub { color: var(--text-faint); }

/* Выбор услуг и пациентов */
body.graphite .pick {
  background: var(--surface-2);
  border: 1px solid var(--line-faint);
  border-radius: 10px;
}
body.graphite .pick:hover { border-color: var(--line); transform: none; background: var(--surface-3); }
body.graphite .pick.is-picked { background: var(--surface-3); border-color: var(--accent-line); }
body.graphite .pick__mark { border-radius: 6px; }
body.graphite .pick.is-picked .pick__mark { background: var(--accent); color: var(--accent-text); border-color: transparent; }
body.graphite .qty { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; }
body.graphite .qty__btn { border-radius: 6px; }
body.graphite .qty__btn:disabled { opacity: .3; pointer-events: none; }
body.graphite .chip {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
}
body.graphite .discount-preview { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; }

/* ── Окно расчёта ─────────────────────────────────────────────*/
body.graphite #modal-calc-result .modal__box { max-width: 640px; }
body.graphite .result { padding-top: 30px; }
body.graphite .result__actions [hidden] { display: none; }
body.graphite .result__label {
  padding: 0 44px;
  color: var(--text-faint);
  letter-spacing: .14em; line-height: 1.5;
  overflow-wrap: anywhere;
}
body.graphite .result__total {
  margin: 8px 0 4px;
  font-weight: 500;
  letter-spacing: -.055em;
  text-shadow: none;
}
body.graphite .result__discount { font-size: 13.5px; }
body.graphite .result__badge {
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  font-family: var(--font-mono);
}
body.graphite .result__count {
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-faint);
}

/* Таблица позиций: Услуга · Кол-во · Цена · Сумма · убрать */
body.graphite .rtable {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
body.graphite .rtable__cols,
body.graphite .rrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 108px 96px 26px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 14px;
}
body.graphite .rtable__cols {
  height: 32px;
  border-bottom: 1px solid var(--line-faint);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
}
body.graphite .rtable__cols span:nth-child(3),
body.graphite .rtable__cols span:nth-child(4) { text-align: right; }

body.graphite .rtable__body {
  max-height: min(42vh, 340px);
  overflow-y: auto;
}
body.graphite .rrow {
  min-height: 50px;
  padding-top: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-faint);
  transition: background .2s var(--ease);
}
body.graphite .rrow:hover { background: var(--row-hover); }
body.graphite .rrow.is-entering {
  animation: rrow-in .4s var(--ease-glide) backwards;
  animation-delay: calc(.1s + var(--i, 0) * .04s);
}
@keyframes rrow-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

body.graphite .rrow__name {
  font-size: 13.5px; font-weight: 550;
  color: var(--text);
  overflow-wrap: anywhere;
}
body.graphite .rrow .qty { justify-self: start; padding: 2px; }
body.graphite .rrow .qty__btn { width: 24px; height: 24px; font-size: 14px; }
body.graphite .rrow .qty__num { min-width: 22px; font-size: 12.5px; }

body.graphite .price-edit {
  display: flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  cursor: text;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
body.graphite .price-edit:hover { border-color: var(--line); }
body.graphite .price-edit:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring); }
body.graphite .price-edit__input {
  width: 100%; min-width: 0; padding: 0;
  background: none; border: none; outline: none;
  color: var(--text);
  font: 500 13px/1 var(--font-mono);
  text-align: right;
}
body.graphite .price-edit__cur { color: var(--text-faint); font-size: 12px; }

body.graphite .rrow__sum {
  text-align: right; white-space: nowrap;
  font: 500 13px/1 var(--font-mono);
  color: var(--text-dim);
}
body.graphite .rrow__x {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: none; border: none; border-radius: 7px;
  color: var(--text-faint);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
body.graphite .rrow__x:hover { background: var(--danger-soft); color: var(--danger-text); }
body.graphite .rrow__x:disabled { opacity: .25; pointer-events: none; }

/* «Добавить услугу» — последняя строка таблицы; список раскрывается под ней */
body.graphite .rtable__add[hidden] { display: none; }
body.graphite .rtable__add-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  background: none; border: none;
  color: var(--text-mute);
  font: 500 13px var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
body.graphite .rtable__add-btn:hover,
body.graphite .rtable__add.is-open .rtable__add-btn { background: var(--surface-3); color: var(--text); }
body.graphite .rtable__add-plus {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
body.graphite .rtable__add-btn:hover .rtable__add-plus,
body.graphite .rtable__add.is-open .rtable__add-plus {
  background: var(--accent); color: var(--accent-text); border: 1px solid transparent;
}
body.graphite .rtable__add-chev { margin-left: auto; color: var(--text-faint); transition: transform .3s var(--ease-glide); }
body.graphite .rtable__add.is-open .rtable__add-chev { transform: rotate(180deg); }

body.graphite .svc-pop {
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  animation: svc-pop-in .28s var(--ease-glide) both;
}
body.graphite .svc-pop[hidden] { display: none; }
@keyframes svc-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
body.graphite .svc-pop__search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-faint);
  color: var(--text-faint);
}
body.graphite .svc-pop__search input {
  flex: 1; min-width: 0;
  height: 42px; padding: 0;
  background: none; border: none; outline: none;
  color: var(--text);
  font: 500 13.5px var(--font-ui);
}
body.graphite .svc-pop__search input::placeholder { color: var(--text-faint); }
body.graphite .svc-pop__keys { display: inline-flex; gap: 3px; }
body.graphite .svc-pop__keys kbd { min-width: 18px; padding: 0 5px; font-size: 10px; margin: 0; }

body.graphite .svc-pop__list {
  max-height: 228px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
}
body.graphite .svc-opt {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px;
  background: none; border: none; border-radius: 8px;
  color: var(--text-dim);
  font: 500 13.5px var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
body.graphite .svc-opt.is-active { background: var(--surface-3); color: var(--text); }
body.graphite .svc-opt__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.graphite .svc-opt__title mark { background: rgba(255, 255, 255, .16); color: var(--text); border-radius: 3px; padding: 0 1px; }
[data-theme='light'] body.graphite .svc-opt__title mark { background: rgba(0, 0, 0, .1); }
body.graphite .svc-opt__in {
  flex: none;
  padding: 2px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  font: 500 10.5px var(--font-mono);
  color: var(--text-faint);
}
body.graphite .svc-opt__price {
  flex: none;
  min-width: 86px; text-align: right;
  font: 500 12.5px var(--font-mono);
  color: var(--text-mute);
}
body.graphite .svc-opt.is-active .svc-opt__price { color: var(--text); }
body.graphite .svc-pop__empty { padding: 18px 12px; text-align: center; font-size: 13px; color: var(--text-faint); }

/* Строка, куда только что легла услуга, коротко подсвечивается */
body.graphite .rrow.is-flash { animation: rrow-flash 1.2s var(--ease) both; }
@keyframes rrow-flash {
  0%   { background: rgba(255, 255, 255, .09); }
  100% { background: transparent; }
}

body.graphite .result__hint {
  margin: 12px 0 0;
  font-size: 12px; color: var(--text-faint);
  text-align: center;
}
body.graphite .result__foot { display: flex; gap: 10px; margin-top: 20px; }
body.graphite .result__foot[hidden] { display: none; }
body.graphite .result__foot .btn { flex: 1; }

/* ── Пустые состояния, уведомления, прокрутка ─────────────────*/
body.graphite .empty-state {
  background: none;
  color: var(--text-faint);
  font-size: 13.5px;
}
body.graphite .toast {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .95);
}
body.graphite .toast--error { background: #2a0f10; border-color: rgba(255, 90, 90, .3); color: #ffb3b3; }
[data-theme='light'] body.graphite .toast { background: #09090b; color: #fff; border-color: transparent; }

body.graphite ::-webkit-scrollbar-thumb { background: var(--surface-4); border: none; }
body.graphite ::-webkit-scrollbar-thumb:hover { background: var(--line); }
body.graphite ::selection { background: rgba(255, 255, 255, .2); }
[data-theme='light'] body.graphite ::selection { background: rgba(0, 0, 0, .14); }

/* ── Телефон ──────────────────────────────────────────────────*/
@media (max-width: 720px) {
  body.graphite .tabs { width: 100%; flex-wrap: wrap; }
  body.graphite .tab {
    flex: 1 1 calc(33.333% - 2px);
    justify-content: center;
    padding: 9px 6px; font-size: 12.5px; gap: 6px;
  }
  body.graphite .tabs-head { margin: 20px 0 18px; }
  body.graphite .list-card,
  body.graphite .calendar,
  body.graphite .notepad { border-radius: 14px; }
  body.graphite .list-card__head { padding: 16px 16px 14px; }
  body.graphite .notepad--bottom .notepad__sub { display: none; }
}

/* Таблица расчёта на узком экране: название сверху, управление строкой ниже */
@media (max-width: 600px) {
  body.graphite .rtable__cols { display: none; }
  body.graphite .rrow {
    grid-template-columns: auto 112px minmax(0, 1fr) 26px;
    grid-template-areas:
      'name  name  name x'
      'qty   price sum  .';
    row-gap: 8px;
    padding: 12px 10px 12px 14px;
  }
  body.graphite .rrow__name { grid-area: name; }
  body.graphite .rrow .qty  { grid-area: qty; }
  body.graphite .price-edit { grid-area: price; }
  body.graphite .rrow__sum  { grid-area: sum; }
  body.graphite .rrow__x    { grid-area: x; }
  body.graphite .result__label { padding: 0 36px; }
  body.graphite .modal { padding: 12px; }
  body.graphite #modal-calc-result .modal__box { padding: 22px 16px 18px; }
  body.graphite .rtable__body { overflow-x: hidden; }
  body.graphite .rrow { grid-template-columns: auto 96px minmax(0, 1fr) 26px; column-gap: 6px; padding: 12px 8px 12px 12px; }
  body.graphite .rrow .qty__btn { width: 22px; height: 22px; }
  body.graphite .rrow__sum { font-size: 12px; }
  /* Кнопки в столбик: «Сохранить изменения» на узком экране в ряд не влезает */
  body.graphite .result__foot { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  body.graphite .list-card,
  body.graphite .calendar,
  body.graphite .notepad,
  body.graphite .modal__box,
  body.graphite .rrow.is-entering { animation: none; }
}

/* ═════════════════════════════════════════════════════════════
   ВЕСЬ САЙТ

   Старые страницы держат крупные блоки на «инверсии» — белых плитах
   в тёмной теме. В Graphite плиты становятся графитовыми карточками,
   а белое остаётся только мелким акцентам: им ниже задан --accent явно.
   ═════════════════════════════════════════════════════════════ */
body.graphite {
  --invert-bg:    var(--surface);
  --invert-text:  var(--text);
  --invert-dim:   var(--text-dim);
  --invert-mute:  var(--text-mute);
  --invert-line:  var(--line);
  --invert-hover: var(--surface-3);
  --invert-sheen: transparent;
  --invert-press: rgba(0, 0, 0, .4);
  --glow:         rgba(0, 0, 0, .55);
  --glass-fill:   var(--surface-3);
  --header-bg:    color-mix(in srgb, var(--bg) 82%, transparent);
}

/* ── Логотип: зуб на графитовой плитке — одинаково в обеих темах ─*/
body.graphite .logo { gap: 11px; }
body.graphite .logo__mark {
  width: 36px; height: 36px;
  background: linear-gradient(180deg, #1e1e22, #070708);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 14px -6px rgba(0, 0, 0, .8);
  transition: transform .4s var(--ease-glide), box-shadow .3s var(--ease);
}
body.graphite .logo:hover .logo__mark {
  transform: rotate(-6deg) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 22px -8px rgba(255, 255, 255, .18);
}
body.graphite .logo__img { width: 26px; height: 26px; display: block; }
body.graphite .logo__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 16px; font-weight: 600;
  letter-spacing: .16em;
}
body.graphite .logo__sub { font-size: 9px; letter-spacing: .2em; margin-top: 1px; }

/* ── Шапка: чип пользователя и переключатель темы ─────────────*/
body.graphite .user-chip {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  box-shadow: none;
}
body.graphite .user-chip:hover { transform: none; border-color: var(--line); box-shadow: none; }
body.graphite .user-chip__avatar {
  background: var(--accent); color: var(--accent-text);
  font-family: var(--font-mono); font-weight: 600;
}
body.graphite .theme-toggle {
  width: 36px; height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text-mute);
  box-shadow: none;
}
body.graphite .theme-toggle::before { display: none; }
body.graphite .theme-toggle:hover { color: var(--text); border-color: var(--line); background: var(--surface-3); transform: none; }

body.graphite .site-nav { gap: 26px; }
body.graphite .site-nav a { font-size: 13.5px; }
body.graphite .site-nav a::after { height: 1px; bottom: -5px; }

body.graphite .page-loader { background: var(--bg); }
body.graphite .page-loader__spinner { border-color: var(--line); border-top-color: var(--accent); }

body.graphite .eyebrow { color: var(--text-faint); letter-spacing: .16em; font-size: 10.5px; }
body.graphite .eyebrow--invert { color: var(--text-faint); }
body.graphite .site-footer { border-top-color: var(--line-faint); }
body.graphite .site-footer p { color: var(--text-faint); font-size: 12.5px; }

/* ── Кнопки, которых нет в панели ─────────────────────────────*/
body.graphite .btn--lg { padding: 13px 22px; font-size: 14.5px; border-radius: 12px; }
body.graphite .btn--dark {
  background: var(--accent); color: var(--accent-text);
  border: none; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14);
}
body.graphite .btn--dark:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--bg)); box-shadow: none; }
body.graphite .btn--ghost-invert {
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--line-soft);
}
body.graphite .btn--ghost-invert::before { display: none; }
body.graphite .btn--ghost-invert:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line); color: var(--text); }
body.graphite .btn--danger {
  background: #e5484d; color: #fff; border: none;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .2);
}
body.graphite .btn--danger::before { display: none; }
body.graphite .btn--danger:hover:not(:disabled) { background: #d93d42; box-shadow: none; }

/* Окно подтверждения */
body.graphite .confirm__icon {
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  box-shadow: none;
}
body.graphite .confirm__icon--danger { background: var(--danger-soft); border-color: rgba(229, 72, 77, .25); color: var(--danger-text); }
body.graphite .confirm__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
body.graphite .confirm__text { color: var(--text-mute); font-size: 14px; }

/* ── Вход ─────────────────────────────────────────────────────*/
body.graphite .auth-main { position: relative; }
body.graphite .auth-main::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 520px; height: 520px;
  transform: translate(-50%, -58%);
  background: url('/img/logo-tooth.png') center / contain no-repeat;
  opacity: .028;
  pointer-events: none;
}
[data-theme='light'] body.graphite .auth-main::before { filter: invert(1); opacity: .04; }
body.graphite .auth-box { position: relative; max-width: 410px; }
body.graphite .auth-box::before {
  content: '';
  display: block;
  width: 52px; height: 52px; margin: 0 auto 26px;
  background: url('/img/logo-tooth.png') center / 34px no-repeat, linear-gradient(180deg, #1e1e22, #070708);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px -16px rgba(0, 0, 0, .9);
}
body.graphite .back-link { color: var(--text-faint); font-size: 13px; }
body.graphite .back-link:hover { color: var(--text); }

body.graphite .step-panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: var(--hairline), 0 30px 80px -40px rgba(0, 0, 0, .95);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 32px 30px 28px;
}
body.graphite .step-panel__title { font-size: 1.45rem; font-weight: 600; letter-spacing: -.03em; }
body.graphite .step-panel__text { color: var(--text-mute); font-size: 14px; }

body.graphite .steps-bar__dot {
  width: 26px; height: 26px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  background: var(--surface-2);
  border-color: var(--line-soft);
  color: var(--text-faint);
}
body.graphite .steps-bar__dot.is-active,
body.graphite .steps-bar__dot.is-done { background: var(--accent); border-color: transparent; color: var(--accent-text); }
body.graphite .steps-bar__line { height: 1px; background: var(--line-soft); }
body.graphite .steps-bar__line::after { background: var(--accent); }

body.graphite .field__toggle { border-radius: 8px; color: var(--text-faint); }
body.graphite .field__toggle:hover { background: var(--surface-3); color: var(--text); }
body.graphite .field__hint { color: var(--text-faint); }

body.graphite .code-inputs { gap: 8px; }
body.graphite .code-inputs input {
  height: 56px;
  font-family: var(--font-mono); font-size: 22px; font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
body.graphite .code-inputs input:focus {
  transform: none;
  background: var(--surface-3);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--ring);
}
body.graphite .code-inputs input.is-filled { background: var(--surface-3); color: var(--text); border-color: var(--line); }

body.graphite .mail-badge {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text-dim);
}
body.graphite .mail-badge__icon { background: var(--surface-3); color: var(--text); border-radius: 50%; }
body.graphite .dev-code {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--text-mute);
}
body.graphite .dev-code b { font-family: var(--font-mono); font-weight: 500; }
body.graphite .link-btn { color: var(--text-mute); border-bottom-color: var(--line); }
body.graphite .link-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text); }
body.graphite .form-foot { color: var(--text-faint); font-size: 13px; }
body.graphite .success-mark {
  background: var(--accent); color: var(--accent-text);
  box-shadow: 0 0 0 8px var(--surface-3);
}

/* ── Профиль ──────────────────────────────────────────────────*/
body.graphite .profile-hero {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--hairline), var(--card-shadow);
}
body.graphite .profile-hero::before {
  background: radial-gradient(60% 120% at 0% 0%, rgba(255, 255, 255, .05), transparent 60%);
  opacity: 1;
}
body.graphite .profile-avatar {
  background: var(--accent); color: var(--accent-text);
  border: none; border-radius: 16px;
  font-family: var(--font-mono); font-weight: 600;
  box-shadow: 0 0 0 6px var(--surface-3);
}
body.graphite .profile-hero__name { font-weight: 600; letter-spacing: -.03em; }
body.graphite .profile-hero__meta { color: var(--text-mute); font-size: 13.5px; }

body.graphite .info-card,
body.graphite .admin-cta,
body.graphite .workboard-cta,
body.graphite .stat {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--hairline), var(--card-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.graphite .info-card__title { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
body.graphite .info-card__sub { color: var(--text-faint); font-size: 12.5px; }
body.graphite .info-row { border-bottom-color: var(--line-faint); }
body.graphite .info-row__label { color: var(--text-faint); font-size: 11px; letter-spacing: .1em; }
body.graphite .info-row__value { font-weight: 500; font-size: 14px; }
body.graphite .secret__dots { font-family: var(--font-mono); color: var(--text-mute); }

body.graphite .workboard-cta::before,
body.graphite .admin-cta::before { display: none; }
body.graphite .workboard-cta,
body.graphite .admin-cta { transition: border-color .25s var(--ease), background .25s var(--ease); }
body.graphite .workboard-cta:hover,
body.graphite .admin-cta:hover { transform: none; border-color: var(--line); background: var(--surface-2); box-shadow: var(--hairline), var(--card-shadow); }
body.graphite .workboard-cta h3,
body.graphite .admin-cta h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
body.graphite .workboard-cta p,
body.graphite .admin-cta p { color: var(--text-mute); font-size: 13.5px; }

/* ── Админка ──────────────────────────────────────────────────*/
body.graphite .board-head { background: none; border: none; box-shadow: none; padding: 30px 0 18px; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.graphite .board-head h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; }
body.graphite .stat__value { font-family: var(--font-mono); font-weight: 500; letter-spacing: -.04em; }
body.graphite .stat__label { color: var(--text-faint); font-size: 10.5px; }
body.graphite .stat--accent { background: var(--surface-2); border-color: var(--line); }
body.graphite .stat--accent .stat__value { color: var(--text); }

body.graphite .user-row { border-bottom-color: var(--line-faint); position: relative; }
body.graphite .user-row:hover { background: var(--row-hover); }
body.graphite .user-row__avatar {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
body.graphite .user-row__avatar--admin { background: var(--accent); color: var(--accent-text); border-color: transparent; }
body.graphite .user-row__login { font-weight: 600; font-size: 14px; }
body.graphite .user-row__email,
body.graphite .user-row__position { color: var(--text-faint); }
body.graphite .role-badge {
  border-radius: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .02em;
  border: 1px solid var(--line-soft);
}
body.graphite .role-badge--admin { background: var(--accent); color: var(--accent-text); border-color: transparent; }
body.graphite .role-badge--staff { background: var(--surface-2); color: var(--text-mute); }

body.graphite .switch-row { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; }
body.graphite .switch { background: var(--surface-4); }
body.graphite .switch-row input:checked + .switch { background: var(--accent); }
body.graphite .switch-row input:checked + .switch::after { background: var(--accent-text); }

/* ── 404 ──────────────────────────────────────────────────────*/
body.graphite main > .step-panel > div:first-child {
  font-family: var(--font-mono);
  font-weight: 500 !important;
  letter-spacing: -.06em !important;
  background: linear-gradient(180deg, var(--text), var(--text-faint));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ═════════════════════════════════════════════════════════════
   ГЛАВНАЯ
   ═════════════════════════════════════════════════════════════ */
body.landing { overflow-x: hidden; }
body.landing::before { -webkit-mask-image: none; mask-image: none; background: none; }
body.landing .site-header { position: fixed; left: 0; right: 0; }

/* Появление элементов первого экрана по очереди */
.land-in {
  animation: land-in .9s var(--ease-glide) both;
  animation-delay: calc(.12s + var(--d, 0) * .1s);
}
@keyframes land-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ── Первый экран ─────────────────────────────────────────────*/
.land-hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.land-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* Сетка линий, видимая только в центре */
.land-hero__grid {
  position: absolute; inset: -1px;
  background:
    linear-gradient(to right, var(--line-faint) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(to bottom, var(--line-faint) 1px, transparent 1px) 0 0 / 72px 72px;
  -webkit-mask-image: radial-gradient(60% 55% at 50% 42%, #000 20%, transparent 75%);
          mask-image: radial-gradient(60% 55% at 50% 42%, #000 20%, transparent 75%);
  animation: grid-drift 30s linear infinite;
}
@keyframes grid-drift { to { background-position: 72px 72px, 72px 72px; } }

/* Луч прожектора сверху */
.land-hero__beam {
  position: absolute; left: 50%; top: -30%;
  width: 1100px; height: 900px;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 152deg, rgba(255, 255, 255, .09) 180deg, transparent 208deg);
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 10%, transparent 85%);
  filter: blur(8px);
  animation: beam-breathe 7s ease-in-out infinite;
}
@keyframes beam-breathe { 50% { opacity: .55; } }

/* Мягкое свечение за логотипом */
.land-hero__halo {
  position: absolute; left: 50%; top: 40%;
  width: 640px; height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent);
  filter: blur(20px);
}
[data-theme='light'] .land-hero__beam { background: conic-gradient(from 180deg at 50% 0%, transparent 152deg, rgba(0, 0, 0, .06) 180deg, transparent 208deg); }
[data-theme='light'] .land-hero__halo { background: radial-gradient(closest-side, rgba(0, 0, 0, .05), transparent); }

.land-hero__inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.land-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text-mute);
  font-size: 12.5px; font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--hairline);
}
.land-badge__dot {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
}
.land-badge__dot::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 1px solid #4ade80;
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.land-badge__sep { width: 1px; height: 12px; background: var(--line); }
.land-badge__time { font-family: var(--font-mono); color: var(--text); }
.land-badge__zone { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: .08em; }

/* Логотип с бликом, который пробегает по самим буквам */
.land-logo {
  position: relative;
  width: min(600px, 88vw);
  margin: 38px 0 30px;
  line-height: 0;
}
.land-logo img {
  width: 100%; height: auto;
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, .12));
}
.land-logo__shine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) 0 0 / 300% 100% no-repeat;
  -webkit-mask: url('/img/logo-full.png') center / contain no-repeat;
          mask: url('/img/logo-full.png') center / contain no-repeat;
  mix-blend-mode: overlay;
  animation: logo-shine 6.5s var(--ease) infinite 1.4s;
}
@keyframes logo-shine {
  0%       { background-position: 120% 0; }
  45%, 100% { background-position: -20% 0; }
}
[data-theme='light'] .land-logo img { filter: invert(1); }
[data-theme='light'] .land-logo__shine { display: none; }

.land-lead {
  max-width: 560px;
  font-size: clamp(15px, 1.5vw, 17px); line-height: 1.65;
  color: var(--text-mute);
}
.land-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.land-cta .btn--primary svg { transition: transform .3s var(--ease-glide); }
.land-cta .btn--primary:hover svg { transform: translateX(3px); }
.land-note { margin-top: 18px; font-size: 12.5px; color: var(--text-faint); }

.land-scroll {
  position: absolute; left: 50%; bottom: 28px;
  width: 22px; height: 34px;
  transform: translateX(-50%);
  border: 1px solid var(--line); border-radius: 12px;
}
.land-scroll span {
  position: absolute; left: 50%; top: 7px;
  width: 2px; height: 6px; margin-left: -1px;
  border-radius: 2px; background: var(--text-mute);
  animation: scroll-hint 1.8s var(--ease) infinite;
}
@keyframes scroll-hint { from { transform: translateY(0); opacity: 1; } to { transform: translateY(12px); opacity: 0; } }

/* ── Окно панели ──────────────────────────────────────────────*/
.land-preview { padding: 20px 0 110px; perspective: 1800px; }

.window {
  --tilt: 1;
  max-width: 1020px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .4),
    0 60px 140px -40px rgba(0, 0, 0, .95),
    0 0 120px -60px rgba(255, 255, 255, .2);
  transform: rotateX(calc(var(--tilt) * 22deg)) scale(calc(1 - var(--tilt) * .06)) translateY(calc(var(--tilt) * -30px));
  transform-origin: 50% 0%;
  will-change: transform;
}
[data-theme='light'] .window { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 50px 120px -50px rgba(0, 0, 0, .4); }
.window__bar {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
}
.window__dots { display: flex; gap: 7px; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-4); border: 1px solid var(--line-soft); }
.window__url {
  margin: 0 auto;
  padding: 4px 14px;
  background: var(--surface);
  border: 1px solid var(--line-faint);
  border-radius: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
}
.window__spacer { width: 44px; }
.window__body { padding: 22px; background: var(--bg); }

.mock-tabs {
  display: flex; gap: 2px; width: max-content; margin: 0 auto 20px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.mock-tabs span { padding: 6px 13px; border-radius: 7px; font-size: 12px; color: var(--text-faint); }
.mock-tabs .is-on { background: var(--surface-4); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.mock-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; text-align: left; }
.mock-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 0 8px;
}
.mock-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line-faint);
  font-size: 13px;
}
.mock-btn {
  padding: 5px 10px; border-radius: 7px;
  background: var(--accent); color: var(--accent-text);
  font-size: 11.5px; font-weight: 600;
}
.mock-day {
  padding: 12px 16px 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
}
.mock-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
}
.mock-row b { display: block; font-size: 13px; font-weight: 550; }
.mock-row i { display: block; font-style: normal; font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.mock-time {
  min-width: 50px; padding: 5px 0; text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-family: var(--font-mono); font-size: 12px;
}
.mock-row.is-hot { background: var(--row-hover); }
.mock-row.is-hot::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); border-radius: 2px; }
.mock-row.is-hot .mock-time { background: var(--accent); color: var(--accent-text); border-color: transparent; }

.mock-card--side { padding: 12px; }
.mock-clock {
  padding: 12px; margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  text-align: center;
}
.mock-clock b { display: block; font-family: var(--font-mono); font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
.mock-clock span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--text-faint); }
.mock-cal__title { text-align: center; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.mock-cal__week,
.mock-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mock-cal__week span { font-size: 9px; color: var(--text-faint); padding-bottom: 4px; }
.mock-cal__grid i {
  position: relative;
  aspect-ratio: 1; display: grid; place-items: center;
  font-style: normal; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-dim); border-radius: 6px;
}
.mock-cal__grid i.is-today { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.mock-cal__grid i.is-dot::after { content: ''; position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* ── Разделы ниже ─────────────────────────────────────────────*/
.land-section { padding: 40px 0 110px; }
.land-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.land-kicker {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line-soft); border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mute);
}
.land-title {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 600;
  letter-spacing: -.045em; line-height: 1.05;
}
.land-title span {
  background: linear-gradient(180deg, var(--text-mute), var(--text-faint));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.land-sub { color: var(--text-mute); font-size: 15px; line-height: 1.65; }

/* Bento-сетка */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    'rec   rec   calc'
    'pat   photo calc'
    'note  code  backup';
  gap: 14px;
}
.bento__card--rec    { grid-area: rec; }
.bento__card--calc   { grid-area: calc; }
.bento__card--pat    { grid-area: pat; }
.bento__card--photo  { grid-area: photo; }
.bento__card--note   { grid-area: note; }
.bento__card--code   { grid-area: code; }
.bento__card--backup { grid-area: backup; }

.bento__card {
  --mx: -400px; --my: -400px;
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--hairline);
  transition: border-color .3s var(--ease), transform .5s var(--ease-glide), opacity .7s var(--ease);
}
/* Пятно света под курсором + подсветка рамки рядом с курсором */
.bento__card::before,
.bento__card::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s var(--ease);
}
.bento__card::before {
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .055), transparent 40%);
}
.bento__card::after {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, .35), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.bento:hover .bento__card::before,
.bento:hover .bento__card::after { opacity: 1; }
[data-theme='light'] .bento__card::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 0, 0, .035), transparent 40%); }
[data-theme='light'] .bento__card::after { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(0, 0, 0, .25), transparent 45%); }

.bento__card h3 { margin-top: auto; font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; }
.bento__card p { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--text-mute); }
.bento__visual {
  position: relative;
  min-height: 130px; margin-bottom: 22px;
  display: grid; place-items: center;
}
.bento .reveal:nth-child(2) { transition-delay: .05s; }
.bento .reveal:nth-child(3) { transition-delay: .1s; }
.bento .reveal:nth-child(4) { transition-delay: .15s; }
.bento .reveal:nth-child(5) { transition-delay: .2s; }
.bento .reveal:nth-child(6) { transition-delay: .25s; }
.bento .reveal:nth-child(7) { transition-delay: .3s; }

/* Визуалы в карточках — маленькие кусочки настоящего интерфейса */
.viz-times { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 460px; }
.viz-times span {
  padding: 7px 12px;
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-mute);
}
.viz-times .is-on { background: var(--accent); color: var(--accent-text); border-color: transparent; box-shadow: 0 0 30px -6px rgba(255, 255, 255, .35); }
.viz-week { display: flex; gap: 6px; margin-top: 16px; }
.viz-week i {
  position: relative;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line-faint);
}
.viz-week i.is-dot::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text-mute); }
.viz-week i.is-today { background: var(--accent); }
.viz-week i.is-off { background: repeating-linear-gradient(45deg, var(--surface-3) 0 4px, transparent 4px 8px); }
.bento__card--rec .bento__visual { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.viz-calc { display: block; width: 100%; padding: 6px 4px 0; min-height: 0; }
.viz-calc__label { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); text-align: center; }
.viz-calc__total {
  margin: 10px 0 18px;
  font-family: var(--font-mono); font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 500;
  letter-spacing: -.06em; text-align: center;
}
.viz-calc__rows { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.viz-calc__rows span {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-faint);
  background: var(--surface-2);
  font-size: 12.5px;
}
.viz-calc__rows span:last-child { border-bottom: none; }
.viz-calc__rows b { font-weight: 550; }
.viz-calc__rows i { font-style: normal; font-family: var(--font-mono); color: var(--text-dim); }
.viz-calc__badge {
  width: max-content; margin: 14px auto 0;
  padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute);
}

.viz-people { display: flex; }
.viz-people span {
  width: 46px; height: 46px; margin-left: -10px;
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 2px solid var(--surface);
  border-radius: 14px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim);
}
.viz-people span:first-child { margin-left: 0; background: var(--accent); color: var(--accent-text); }

.viz-photos { grid-template-columns: repeat(3, 44px); gap: 6px; }
.viz-photos i {
  width: 44px; height: 44px; border-radius: 9px;
  background: linear-gradient(135deg, var(--surface-4), var(--surface-2));
  border: 1px solid var(--line-faint);
  position: relative; overflow: hidden;
}
.viz-photos i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: tile-shimmer 3.2s var(--ease) infinite;
}
.viz-photos i:nth-child(2)::after { animation-delay: .2s; }
.viz-photos i:nth-child(3)::after { animation-delay: .4s; }
.viz-photos i:nth-child(4)::after { animation-delay: .6s; }
.viz-photos i:nth-child(5)::after { animation-delay: .8s; }
.viz-photos i:nth-child(6)::after { animation-delay: 1s; }
@keyframes tile-shimmer { 60%, 100% { transform: translateX(100%); } }

.viz-note {
  width: 100%; max-width: 230px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  align-items: flex-start;
  text-align: left;
  justify-self: center;
}
.viz-note span { font-size: 12.5px; color: var(--text-dim); text-align: left; }
.viz-note span::before { content: '— '; color: var(--text-faint); }
.viz-note .is-typing::before { content: none; }
.viz-note .is-typing { width: 2px; height: 14px; background: var(--text); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.viz-code { display: flex; gap: 6px; }
.viz-code span {
  width: 32px; height: 40px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 16px;
}
.viz-code .is-caret { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring); }
.viz-code .is-caret::after { content: ''; width: 1.5px; height: 16px; background: var(--text); animation: caret 1s steps(1) infinite; }

.viz-backup { display: flex; gap: 6px; align-items: flex-end; }
.viz-backup span {
  position: relative;
  padding: 26px 8px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
}
.viz-backup span::before {
  content: ''; position: absolute; left: 50%; top: 9px;
  width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: var(--surface-4);
}
.viz-backup span:last-child { color: var(--text); border-color: var(--line); }
.viz-backup span:last-child::before { background: #4ade80; box-shadow: 0 0 10px #4ade80; }

/* ── Финальный блок ───────────────────────────────────────────*/
.land-final { padding: 0 0 110px; }
.land-final__box {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(48px, 7vw, 80px) 24px;
  text-align: center;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(255, 255, 255, .06), transparent 70%),
    var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--hairline);
}
[data-theme='light'] .land-final__box { background: radial-gradient(60% 100% at 50% 0%, rgba(0, 0, 0, .04), transparent 70%), var(--surface); }
.land-final__tooth {
  width: 64px; height: 64px;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, .25));
  animation: float 6s ease-in-out infinite;
}
[data-theme='light'] .land-final__tooth { filter: invert(1); }
@keyframes float { 50% { transform: translateY(-8px); } }
.land-final__motto {
  margin: 22px 0 10px;
  font-family: 'Forum', 'Cinzel', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--text) 30%, var(--text-faint));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.land-final__text { color: var(--text-mute); font-size: 15px; margin-bottom: 28px; }

.land-footer__brand { display: inline-flex; align-items: center; gap: 10px; }
[data-theme='light'] .land-footer__brand img { filter: invert(1); }

/* ── Телефон и планшет ────────────────────────────────────────*/
@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'rec    rec'
      'calc   calc'
      'pat    photo'
      'note   code'
      'backup backup';
  }
  .mock-grid { grid-template-columns: minmax(0, 1fr); }
  .mock-card--side { display: none; }
  body.landing .site-nav { display: none; }
}
@media (max-width: 600px) {
  .land-hero { padding: 110px 0 80px; }
  .land-badge { font-size: 11.5px; }
  .land-badge__zone { display: none; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'rec' 'calc' 'pat' 'photo' 'note' 'code' 'backup'; }
  .window__body { padding: 12px; }
  .mock-tabs { display: none; }
  .window__url { font-size: 10px; }
  .land-cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .land-in, .land-hero__grid, .land-hero__beam, .land-logo__shine, .land-final__tooth,
  .viz-photos i::after, .land-badge__dot::after, .land-scroll span { animation: none; }
  .window { transform: none; }
}

/* ═════════════════════════════════════════════════════════════
   ЗАСТАВКА (/) — логотип и одна кнопка
   ═════════════════════════════════════════════════════════════ */
body.splash::before { -webkit-mask-image: none; mask-image: none; background: none; }
.splash__main {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 40px 20px 80px;
  overflow: hidden;
  isolation: isolate;
}
.splash__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.splash__inner .land-logo { margin: 0 0 54px; width: min(640px, 88vw); }
.splash__note { margin-top: 22px; font-size: 12.5px; color: var(--text-faint); letter-spacing: .02em; }
.splash__foot {
  position: absolute; left: 0; right: 0; bottom: 26px;
  text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--text-faint);
}

/* Кнопка входа: тёмная капсула, по рамке бежит блик, при наведении — белая */
@property --ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.splash-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 38px 17px 42px;
  border-radius: 999px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, .10), transparent 60%),
    #0b0b0d;
  color: #f4f4f5;
  font: 600 15px var(--font-ui);
  letter-spacing: .14em; text-transform: uppercase;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 1px rgba(255, 255, 255, .10),
    0 20px 50px -18px rgba(0, 0, 0, .9),
    0 0 60px -20px rgba(255, 255, 255, .25);
  transition: background .35s var(--ease), color .35s var(--ease),
              box-shadow .35s var(--ease), transform .45s var(--ease-glide);
}
/* бегущий по рамке блик */
.splash-btn::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--ang), transparent 0 55%, rgba(255, 255, 255, .95) 72%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ring-spin 3.6s linear infinite;
  pointer-events: none;
}
/* мягкое свечение под кнопкой */
.splash-btn::after {
  content: '';
  position: absolute; left: 12%; right: 12%; bottom: -14px;
  height: 22px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent);
  filter: blur(8px);
  z-index: -1;
  opacity: .7;
  transition: opacity .35s var(--ease);
}
@keyframes ring-spin { to { --ang: 360deg; } }
.splash-btn svg { transition: transform .35s var(--ease-glide); }
.splash-btn:hover {
  background: #f4f4f5;
  color: #050506;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .6),
    0 24px 60px -18px rgba(255, 255, 255, .35),
    0 0 90px -20px rgba(255, 255, 255, .5);
}
.splash-btn:hover::after { opacity: 1; }
.splash-btn:hover svg { transform: translateX(4px); }
.splash-btn:active { transform: translateY(0) scale(.98); }
.splash-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255, 255, 255, .6); }

[data-theme='light'] .splash-btn {
  background: #09090b; color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 20px 40px -20px rgba(0, 0, 0, .5);
}
[data-theme='light'] .splash-btn:hover { background: #27272a; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .splash-btn::before { animation: none; }
}

/* ═════════════════════════════════════════════════════════════
   МЕНЮ АККАУНТА (аватар справа вверху)
   ═════════════════════════════════════════════════════════════ */
body.graphite .acct { position: relative; }
body.graphite .acct__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px 3px 3px;
  border-radius: 999px;
  font: inherit; color: var(--text-mute);
  cursor: pointer;
}
body.graphite .acct__chip .user-chip__avatar { width: 30px; height: 30px; font-size: 11.5px; }
body.graphite .acct__chev { display: grid; transition: transform .3s var(--ease-glide); }
body.graphite .acct.is-open .acct__chev { transform: rotate(180deg); }
body.graphite .acct.is-open .acct__chip,
body.graphite .acct__chip:hover { border-color: var(--line); color: var(--text); background: var(--surface-3); }

body.graphite .acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 120;
  width: 268px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--hairline), 0 30px 70px -20px rgba(0, 0, 0, .9);
  transform-origin: top right;
  animation: acct-in .22s var(--ease-glide) both;
}
[data-theme='light'] body.graphite .acct-menu { box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35); }
body.graphite .acct-menu[hidden] { display: none; }
@keyframes acct-in {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

body.graphite .acct-menu__head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 12px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .acct-menu__avatar {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
  border-radius: 10px;
  font: 600 12.5px var(--font-mono);
}
body.graphite .acct-menu__who { min-width: 0; flex: 1; }
body.graphite .acct-menu__who b {
  display: block;
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.graphite .acct-menu__who i {
  display: block; font-style: normal;
  font-size: 12px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Шестерёнка справа от ника — открывает настройки аккаунта */
body.graphite .acct-menu__gear {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--text-mute);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
body.graphite .acct-menu__gear svg { transition: transform .6s var(--ease-glide); }
body.graphite .acct-menu__gear:hover { background: var(--accent); color: var(--accent-text); border-color: transparent; }
body.graphite .acct-menu__gear:hover svg { transform: rotate(90deg); }

body.graphite .acct-menu__links { display: grid; gap: 1px; padding: 2px 0 4px; border-bottom: 1px solid var(--line-faint); margin-bottom: 4px; }
body.graphite .acct-menu__item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  background: none; border: none; border-radius: 8px;
  color: var(--text-dim);
  font: 500 13.5px var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
body.graphite .acct-menu__item svg { color: var(--text-faint); flex: none; }
body.graphite .acct-menu__item:hover { background: var(--surface-3); color: var(--text); }
body.graphite .acct-menu__item:hover svg { color: var(--text); }
body.graphite .acct-menu__item.is-current { color: var(--text); }
body.graphite .acct-menu__item.is-current::after {
  content: ''; margin-left: auto;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
body.graphite .acct-menu__item--exit:hover { background: var(--danger-soft); color: var(--danger-text); }
body.graphite .acct-menu__item--exit:hover svg { color: var(--danger-text); }

/* ═════════════════════════════════════════════════════════════
   ОКНО НАСТРОЕК АККАУНТА
   ═════════════════════════════════════════════════════════════ */
body.graphite .acct-modal .modal__box.acct-box { max-width: 520px; padding: 0; overflow: hidden auto; }
body.graphite .acct-box__head {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 26px 22px 22px 26px;
  background: radial-gradient(80% 140% at 0% 0%, rgba(255, 255, 255, .06), transparent 60%);
  border-bottom: 1px solid var(--line-faint);
}
[data-theme='light'] body.graphite .acct-box__head { background: radial-gradient(80% 140% at 0% 0%, rgba(0, 0, 0, .04), transparent 60%); }
body.graphite .acct-box__avatar {
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
  border-radius: 15px;
  font: 600 17px var(--font-mono);
  box-shadow: 0 0 0 5px var(--surface-3);
}
body.graphite .acct-box__who { flex: 1; min-width: 0; }
body.graphite .acct-box__name {
  font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.graphite .acct-box__meta {
  margin-top: 3px;
  font-size: 13px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.graphite .acct-box__head .icon-btn { align-self: flex-start; }

body.graphite .acct-tabs {
  display: flex; gap: 2px;
  margin: 16px 22px 4px 26px;
  padding: 3px;
  width: max-content;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
body.graphite .acct-tabs button {
  padding: 6px 12px;
  background: none; border: 1px solid transparent; border-radius: 7px;
  color: var(--text-mute);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
body.graphite .acct-tabs button:hover { color: var(--text); }
body.graphite .acct-tabs button.is-on {
  background: var(--surface-4); color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme='light'] body.graphite .acct-tabs button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

body.graphite .acct-pane { padding: 14px 26px 6px; }
body.graphite .acct-pane[hidden] { display: none; }
body.graphite .acct-pane__hint { margin: 2px 0 16px; font-size: 12.5px; color: var(--text-faint); }
body.graphite .acct-pane .modal__foot { margin-top: 6px; margin-bottom: 8px; }

body.graphite .acct-group {
  margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-faint);
  border-radius: 12px;
  overflow: hidden;
}
body.graphite .acct-group__title {
  padding: 10px 14px 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .acct-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-faint);
}
body.graphite .acct-row:last-child { border-bottom: none; }
body.graphite .acct-row span { font-size: 13px; color: var(--text-mute); flex: none; }
body.graphite .acct-row b {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  text-align: right; word-break: break-word;
}
body.graphite .acct-row b.is-empty { color: var(--text-faint); font-weight: 400; }

body.graphite .acct-admin {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--text-dim);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
body.graphite .acct-admin[hidden] { display: none; }
body.graphite .acct-admin:hover { border-color: var(--line); background: var(--surface-3); color: var(--text); }
body.graphite .acct-admin span { flex: 1; min-width: 0; }
body.graphite .acct-admin b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
body.graphite .acct-admin i { display: block; font-style: normal; font-size: 12px; color: var(--text-faint); margin-top: 1px; }

body.graphite .acct-box__foot {
  margin-top: 8px;
  padding: 12px 26px 18px;
  border-top: 1px solid var(--line-faint);
}
body.graphite .acct-logout {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin-left: -10px;
  background: none; border: none; border-radius: 8px;
  color: var(--text-mute);
  font: 500 13px var(--font-ui);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
body.graphite .acct-logout:hover { background: var(--danger-soft); color: var(--danger-text); }

@media (max-width: 560px) {
  body.graphite .acct-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  body.graphite .acct-tabs { margin-left: 18px; margin-right: 18px; width: auto; }
  body.graphite .acct-tabs button { flex: 1; padding: 6px 4px; }
  body.graphite .acct-pane { padding-left: 18px; padding-right: 18px; }
  body.graphite .acct-box__head { padding: 22px 16px 18px 18px; }
}

/* ═════════════════════════════════════════════════════════════
   ОТЧЁТЫ
   ═════════════════════════════════════════════════════════════ */

/* «−» у записи: в покое серый, при наведении горит красным */
body.graphite .icon-btn--minus { color: var(--text-faint); }
body.graphite .icon-btn--minus:hover {
  background: rgba(229, 72, 77, .14);
  color: #ff5c61;
  box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .35), 0 0 18px -4px rgba(229, 72, 77, .55);
}
body.graphite .icon-btn--minus:active { transform: scale(.92); }
[data-theme='light'] body.graphite .icon-btn--minus:hover { color: #dc2626; background: rgba(220, 38, 38, .1); }

body.graphite .appt__paid { font-family: var(--font-mono); color: var(--text-dim); }

/* Переключатель периода */
body.graphite .seg {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
body.graphite .seg button {
  padding: 6px 12px;
  background: none; border: 1px solid transparent; border-radius: 7px;
  color: var(--text-mute);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
body.graphite .seg button:hover { color: var(--text); }
body.graphite .seg button.is-on {
  background: var(--surface-4); color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme='light'] body.graphite .seg button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* Итог за период — крупная моноширинная цифра под шапкой */
body.graphite .report-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-faint);
  background: radial-gradient(60% 140% at 100% 0%, rgba(255, 255, 255, .04), transparent 70%);
}
body.graphite .report-total[hidden] { display: none; }
body.graphite .report-total__label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint);
}
body.graphite .report-total__sum {
  font: 500 clamp(1.6rem, 3vw, 2.1rem)/1 var(--font-mono);
  letter-spacing: -.05em;
  color: var(--text);
}
body.graphite .report-daysum { font-family: var(--font-mono); color: var(--text-dim); }

/* Строка отчёта — как строка записи: время, человек, сумма */
body.graphite .rep-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 16px;
  padding: 10px 22px;
  transition: background .2s var(--ease);
  animation: card-in .4s var(--ease) backwards;
}
body.graphite .rep-row::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleY(0); opacity: 0;
  transition: transform .38s var(--ease-glide), opacity .28s var(--ease);
}
body.graphite .rep-row:hover { background: var(--row-hover); }
body.graphite .rep-row:hover::before { transform: scaleY(1); opacity: .55; }
body.graphite .rep-row__name { font-size: 14.5px; font-weight: 550; overflow-wrap: anywhere; }
body.graphite .rep-row__meta { margin-top: 2px; font-size: 12px; color: var(--text-faint); }
body.graphite .rep-row__sum {
  font: 500 15px var(--font-mono);
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--text);
}
body.graphite .rep-row .icon-btn { opacity: 0; transition: opacity .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
body.graphite .rep-row:hover .icon-btn,
body.graphite .rep-row .icon-btn:focus-visible { opacity: 1; }
@media (hover: none) { body.graphite .rep-row .icon-btn { opacity: 1; } }

/* ── Окно суммы: только поле, без заголовка и кнопок ──────────*/
body.graphite #modal-amount .modal__box.amount-box {
  max-width: 380px;
  padding: 10px;
  border-radius: 18px;
}
body.graphite .amount-field {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  cursor: text;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
body.graphite .amount-field:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring); }
body.graphite .amount-field__input {
  flex: 1; min-width: 0;
  height: 64px; padding: 0;
  background: none; border: none; outline: none;
  color: var(--text);
  font: 500 26px var(--font-mono);
  letter-spacing: -.03em;
}
body.graphite .amount-field__input::placeholder {
  color: var(--text-faint);
  font: 500 17px var(--font-ui);
  letter-spacing: 0;
}
body.graphite .amount-field__input:disabled { opacity: .5; }
body.graphite .amount-field__cur { font: 500 20px var(--font-mono); color: var(--text-faint); }
body.graphite .amount-box.is-wrong .amount-field {
  border-color: rgba(229, 72, 77, .5);
  animation: shake .45s var(--ease);
}

@media (max-width: 600px) {
  body.graphite .rep-row { padding: 10px 16px; gap: 12px; }
  body.graphite .report-total { padding: 16px; }
  body.graphite [data-panel="reports"] .list-card__head { flex-wrap: wrap; }
}
