/* ─────────────────────────────────────────────────────────────
   VINIR DENT — полировка панелей «Graphite»

   Последний слой поверх graphite.css. Раскладку не меняет: те же
   карточки, вкладки и поля — только красивее в тёмной теме.

   · Фон — настоящий чёрный, карточки на ступень светлее.
   · У карточек светлая грань сверху, которая тает к низу, и мягкий
     свет в левом верхнем углу — панель выглядит «подсвеченной».
   · Лёгкое свечение — только у активного: вкладка, «сегодня»,
     время записи, часы, итоги.

   Всё под :root:not([data-theme='light']) — светлая тема как была.
   ───────────────────────────────────────────────────────────── */

:root:not([data-theme='light']) body.graphite {
  --bg: #000000;
  --glow: 0 0 22px -4px rgba(255, 255, 255, .38);
  --glow-text: 0 0 26px rgba(255, 255, 255, .35);
  --card-fill: linear-gradient(180deg, #0e0e10 0%, #08080a 60%, #070708 100%);
  --card-edge: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, .07));
  --card-light: radial-gradient(90% 70% at 0% 0%, rgba(255, 255, 255, .045), transparent 55%);
}

/* ── Карточки: грань света сверху и мягкий свет в углу ────────*/
:root:not([data-theme='light']) body.graphite .list-card,
:root:not([data-theme='light']) body.graphite .calendar,
:root:not([data-theme='light']) body.graphite .notepad,
:root:not([data-theme='light']) body.graphite .info-card,
:root:not([data-theme='light']) body.graphite .stat,
:root:not([data-theme='light']) body.graphite .step-panel,
:root:not([data-theme='light']) body.graphite .profile-hero,
:root:not([data-theme='light']) body.graphite .admin-cta,
:root:not([data-theme='light']) body.graphite .workboard-cta,
:root:not([data-theme='light']) body.graphite .bento__card,
:root:not([data-theme='light']) body.graphite .land-final__box {
  border: 1px solid transparent;
  background:
    var(--card-light) padding-box,
    var(--card-fill) padding-box,
    var(--card-edge) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 0 0 1px rgba(0, 0, 0, .9),
    0 30px 70px -36px rgba(0, 0, 0, 1);
}

/* Окна и всплывающие меню — та же подсвеченная грань, плюс свет вокруг */
:root:not([data-theme='light']) body.graphite .modal__box,
:root:not([data-theme='light']) body.graphite .acct-menu {
  border: 1px solid transparent;
  background:
    var(--card-light) padding-box,
    var(--card-fill) padding-box,
    var(--card-edge) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px rgba(0, 0, 0, .9),
    0 40px 100px -24px rgba(0, 0, 0, 1),
    0 0 120px -50px rgba(255, 255, 255, .22);
}
:root:not([data-theme='light']) body.graphite .modal { background: rgba(0, 0, 0, .78); }

/* Шапка — чистый чёрный со стеклом */
:root:not([data-theme='light']) body.graphite .site-header { background: rgba(0, 0, 0, .78); }

/* ── Вкладки: подсвеченный бегунок ────────────────────────────*/
:root:not([data-theme='light']) body.graphite .tabs {
  border: 1px solid transparent;
  background: linear-gradient(180deg, #0e0e10, #08080a) padding-box, var(--card-edge) border-box;
}
:root:not([data-theme='light']) body.graphite .tabs__glider {
  background: linear-gradient(180deg, #2a2a2f, #1c1c20);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 18px -6px rgba(255, 255, 255, .3);
}
:root:not([data-theme='light']) body.graphite .tab.is-active { text-shadow: 0 0 14px rgba(255, 255, 255, .35); }

/* ── Свечение активного ───────────────────────────────────────*/
:root:not([data-theme='light']) body.graphite .day--today,
:root:not([data-theme='light']) body.graphite .appt:hover .appt__time,
:root:not([data-theme='light']) body.graphite .appt.is-open .appt__time,
:root:not([data-theme='light']) body.graphite .seg button.is-on,
:root:not([data-theme='light']) body.graphite .acct-tabs button.is-on,
:root:not([data-theme='light']) body.graphite .appt-found__day.is-today,
:root:not([data-theme='light']) body.graphite .pick.is-picked .pick__mark { box-shadow: var(--glow); }

:root:not([data-theme='light']) body.graphite .btn--primary:hover:not(:disabled) {
  box-shadow: 0 0 26px -4px rgba(255, 255, 255, .45);
}

:root:not([data-theme='light']) body.graphite .clock {
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, .06), transparent 60%), #0a0a0c;
  border-color: rgba(255, 255, 255, .1);
}
:root:not([data-theme='light']) body.graphite .clock__time,
:root:not([data-theme='light']) body.graphite .result__total,
:root:not([data-theme='light']) body.graphite .report-total__sum,
:root:not([data-theme='light']) body.graphite .estimate__total,
:root:not([data-theme='light']) body.graphite .amount-field__input,
:root:not([data-theme='light']) body.graphite .stat--accent .stat__value { text-shadow: var(--glow-text); }

/* Линия слева у строк — светится, когда строка выбрана */
:root:not([data-theme='light']) body.graphite .appt::before,
:root:not([data-theme='light']) body.graphite .entry::before,
:root:not([data-theme='light']) body.graphite .pcard::before,
:root:not([data-theme='light']) body.graphite .memo::before,
:root:not([data-theme='light']) body.graphite .album::before,
:root:not([data-theme='light']) body.graphite .rep-row::before { box-shadow: 0 0 10px rgba(255, 255, 255, .55); }

/* Итог в «Отчётах» — с мягким светом сверху, как у часов */
:root:not([data-theme='light']) body.graphite .report-total {
  background: radial-gradient(70% 160% at 0% 0%, rgba(255, 255, 255, .05), transparent 65%);
}

/* ── Найденное в поиске: без плашки и разрыва — светится и подчёркнуто ─*/
:root body.graphite mark {
  padding: 0; margin: 0;
  background: none;
  color: var(--text);
  border-radius: 0;
  box-shadow: inset 0 -1px 0 currentColor;
}
:root:not([data-theme='light']) body.graphite mark { text-shadow: 0 0 14px rgba(255, 255, 255, .5); }
:root body.graphite .appt__label { display: inline; }

@media (prefers-reduced-motion: reduce) {
  :root body.graphite .tabs__glider { transition: none; }
}
