/* ==========================================================================
   LIKE Оптика — личный кабинет
   Design tokens synced to likeoptika-site.css :root (E8)
   so the account pages read as the same product, not a bolted-on tool.
   ========================================================================== */

@font-face{font-family:Manrope;font-style:normal;font-weight:500 800;font-display:swap;src:url('/static/fonts/manrope-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

@font-face{font-family:Manrope;font-style:normal;font-weight:500 800;font-display:swap;src:url('/static/fonts/manrope-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* Onest @font-face + font files dropped 2026-07-18: verified against the
   live likeoptika.ru CSS — the site's actual body/heading font is the
   system-ui stack (--lo-font), not a self-hosted webfont. Onest on the real
   site is used only inside the .lo-v2 prototype homepage section, which the
   cabinet never references. Manrope is the one self-hosted family the site
   uses outside .lo-v2, for bold display numerals (ratings, stat counters) —
   kept here for the cabinet's equivalent numeral displays (rx values,
   purchase totals, tier prices). Dropping the unused Onest download is also
   a real page-weight win on every cabinet screen. */

:root {
  --lo-blue: #1E4DC8;
  --lo-blue-dark: #163BA0;
  --lo-blue-light: #EEF2FB;
  --lo-red: #E8001C;
  --lo-red-dark: #C0001A;
  --lo-ink: #111827;
  --lo-muted: #5B6472;
  --lo-bg: #FFF;
  --lo-bg-gray: #F8F9FA;
  --lo-soft: #F5F7FB;
  --lo-line: #E5E9F2;
  --lo-star: #FFB800;
  --lo-star-off: #D1D5DB;
  --lo-success: #065F46;
  --lo-success-bg: #D1FAE5;
  --lo-error: #991B1B;
  --lo-error-bg: #FEE2E2;
  --lo-info: #1E40AF;
  --lo-info-bg: #DBEAFE;
  --lo-warn: #92400E;
  /* Исправлено 2026-07-18: предыдущая правка (2026-07-19, см. git-историю)
     заявляла, что сайт использует self-hosted Onest/Manrope как базовый
     шрифт — это было неверно. Реальный likeoptika-site.css:48-49,94,153-159
     держит body/h1-h6 на системном стеке; Onest/Manrope там только для
     точечных акцентов (маленькие bold-подписи / крупные цифры статистики).
     Здесь возвращаем true-to-site системный стек как базовый шрифт и
     оставляем Manrope только для цифровых акцентов кабинета (--lo-font-accent). */
  --lo-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lo-font-accent: 'Manrope', system-ui, -apple-system, "Segoe UI", sans-serif;
  --lo-container: 1180px;
  --lo-radius: 8px;
  --lo-radius-lg: 16px;
  --lo-radius-pill: 999px;
  --lo-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --lo-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --lo-header-h: 73px; /* .lo-header-inner min-height 72px + 1px border-bottom;
    держит второй sticky-слой (.lo-month-divider) ниже шапки, а не под ней */
  --lo-shadow-card: 0 10px 26px rgba(26, 26, 42, 0.055);
  --lo-shadow-blue: 0 8px 28px rgba(30, 77, 200, 0.08);
  --lo-z-base: 1;
  --lo-z-sticky: 100;
  --lo-z-cookie: 9998;
  --lo-z-mobilebar: 9999;
  --lo-z-modal: 10000;
  /* Изобретённые кабинетом токены — чистит E7, здесь не трогаем */
  --lo-radius-sm: 10px;
  --lo-radius-xl: 20px;
  --lo-shadow-sm: 0 1px 2px rgba(26,26,42,.04), 0 2px 6px rgba(26,26,42,.05);
  --lo-shadow-hover: 0 16px 40px rgba(30,77,200,.12);
  --gap: 20px;
  --pad-card: 24px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--lo-ink);
  background: var(--lo-bg);
  font-family: var(--lo-font);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0 0 10px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--lo-ink);
}

h1 { font-size: clamp(26px, 6vw, 36px); }
h2 { font-size: 24px; margin-top: 24px; }
h3 { font-size: 19px; margin-top: 20px; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

a { color: var(--lo-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lo-red); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(30, 77, 200, 0.45);
  outline-offset: 2px;
  border-radius: 2px;
}

/* -------------------------------------------------------------------- */
/* Header                                                                */
/* -------------------------------------------------------------------- */
.lo-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--lo-line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lo-container {
  width: 100%;
  max-width: var(--lo-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.lo-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 72px;
}

.lo-header a.lo-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lo-header a.lo-logo img { width: 160px; height: auto; display: block; }

.lo-header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.1;
}

.lo-header-phone {
  color: var(--lo-blue);
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.lo-header-phone:hover { color: var(--lo-red); }

.lo-header-hours {
  margin-top: 6px;
  color: var(--lo-muted);
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}

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

/* -------------------------------------------------------------------- */
/* Header nav toolbar (cabinet pages only, gated by {% if view %})      */
/* -------------------------------------------------------------------- */
.lo-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--lo-line);
  border-radius: var(--lo-radius);
  background: transparent;
  color: var(--lo-ink);
  cursor: pointer;
}

.lo-nav-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}

.lo-nav-toolbar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  white-space: nowrap;
  border-radius: var(--lo-radius-pill);
  color: var(--lo-ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.lo-nav-toolbar a svg { width: 17px; height: 17px; flex: none; opacity: .85; }

.lo-nav-toolbar a[aria-current="page"] {
  background: var(--lo-blue-light);
  color: var(--lo-blue-dark);
}

.lo-nav-toolbar a[aria-current="page"] svg { opacity: 1; }

@media (hover: hover) {
  .lo-nav-toolbar a:hover { background: var(--lo-soft); color: var(--lo-blue); }
}

@media (width <= 767px) {
  :root { --lo-header-h: 65px; } /* .lo-header-inner min-height 64px + 1px border-bottom */
  .lo-container { padding-left: 16px; padding-right: 16px; }
  .lo-header-inner { min-height: 64px; }
  .lo-header a.lo-logo img { width: 124px; }
  .lo-header-contact { display: none; }

  .lo-nav-toggle { display: inline-flex; order: 3; }

  .lo-nav-toolbar {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 12px;
    padding-bottom: 12px;
  }

  .lo-nav-toolbar.is-open { display: flex; }

  .lo-nav-toolbar a { padding: 0 16px; }
}

/* -------------------------------------------------------------------- */
/* Footer                                                                */
/* -------------------------------------------------------------------- */
.lo-footer {
  background: #0B1B4D;
  color: #fff;
  padding: 28px 0 24px;
}

.lo-footer a,
.lo-footer-logout-btn { color: #fff; text-decoration: none; }
.lo-footer a:hover,
.lo-footer-logout-btn:hover { color: var(--lo-red); text-decoration: underline; }

.lo-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.lo-footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; }
.lo-footer-legal a { font-weight: 700; }

.lo-footer-logout { display: contents; }

.lo-footer-logout-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.lo-footer-copy { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 14px; }

/* Облегчённая версия — auth-экраны (вход/регистрация/сброс): тяжёлый тёмно-синий
   блок без переходной секции-моста перед ним "давит" на лёгкую форму
   (owner-репорт 2026-07-18 + критик-ревью). Тот же контент, светлее тон. */
.lo-footer--light {
  background: var(--lo-bg-gray);
  color: var(--lo-ink);
  border-top: 1px solid var(--lo-line);
  padding: 24px 0;
}

.lo-footer--light a { color: var(--lo-muted); text-decoration: underline; text-decoration-thickness: 1px; }
.lo-footer--light a:hover { color: var(--lo-blue); }
.lo-footer--light .lo-footer-copy { color: var(--lo-muted); }

/* -------------------------------------------------------------------- */
/* Page shell                                                            */
/* -------------------------------------------------------------------- */
main {
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

main.lo-wide { max-width: var(--lo-container); }

.card {
  background: var(--lo-bg);
  border: 1px solid var(--lo-line);
  border-top: 4px solid var(--lo-blue);
  border-radius: var(--lo-radius-lg);
  padding: 32px 28px;
  box-shadow: var(--lo-shadow-card);
}

/* -------------------------------------------------------------------- */
/* Auth screens — split layout (форма + смысловая панель), not a lone   */
/* narrow card floating on white (owner-репорт 2026-07-18).             */
/* -------------------------------------------------------------------- */
main.lo-auth-main { max-width: var(--lo-container); padding: 56px 20px 80px; }

.lo-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 520px);
  gap: 40px;
  align-items: start;
}

/* h1 формы — первый заголовок в DOM (a11y), order возвращает панель
   визуально влево. Панель залита --lo-blue-light (тот же паттерн, что
   .lo-hero-rx/.lo-club-status на дашборде) — не белая рамка+тень (та
   версия читалась как "пустая карточка", design-review 2026-07-18) и не
   фото/border-top/left-border (все три пробовали и откатили тем же днём). */
.lo-auth-panel {
  display: flex;
  flex-direction: column;
  order: 1;
  padding: 36px 40px;
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius-xl);
}

.lo-auth-panel h2 { margin: 0 0 12px; font-size: 24px; }

.lo-auth-benefits {
  counter-reset: lo-step;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.lo-auth-benefits li {
  counter-increment: lo-step;
  position: relative;
  padding: 14px 0 14px 44px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 16px;
  color: var(--lo-ink);
}

.lo-auth-benefits li:first-child { border-top: 0; }

.lo-auth-benefits li::before {
  content: counter(lo-step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lo-blue);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(30, 77, 200, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.lo-auth-contact {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--lo-muted);
}

.lo-auth-contact a { color: var(--lo-blue); font-weight: 700; text-decoration: none; }
.lo-auth-contact a:hover { color: var(--lo-red); }

.lo-auth-form-wrap { order: 2; padding: 8px 0; }

/* Порядок трёх блоков ниже важен: tablet-диапазон (768-1023) объявлен
   раньше общего ≤1023 и ≤767 — при добавлении нового свойства в них
   проверяй, не дублирует ли оно то, что уже задано здесь для tablet,
   иначе более поздний блок молча победит на пересечении (technical-review
   2026-07-18, найдено при повторном ревью). */
@media (768px <= width <= 1023px) {
  .lo-auth-panel { padding: 24px 28px; }
  .lo-auth-benefits { margin-top: 16px; gap: 12px; }
}

@media (width <= 1023px) {
  .lo-auth-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (width <= 767px) {
  .lo-auth-panel { padding: 28px; }
}

/* -------------------------------------------------------------------- */
/* Forms                                                                  */
/* -------------------------------------------------------------------- */
label {
  display: block;
  margin: 24px 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--lo-muted);
}

label:first-of-type { margin-top: 0; }

input[type="text"], input[type="password"], input[type="tel"], input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--lo-line);
  border-radius: var(--lo-radius);
  background: #fff;
  font: inherit;
  font-size: 16px;
  min-height: 50px;
  color: var(--lo-ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

input::placeholder { color: #9AA3B2; }

input:focus {
  border-color: var(--lo-blue);
  background: #fff;
}

button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 26px;
  padding: 15px 28px;
  min-height: 52px;
  border: 2px solid var(--lo-blue);
  border-radius: var(--lo-radius);
  background: var(--lo-blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

@media (width >= 1024px) {
  .lo-auth-form-wrap button[type="submit"] { width: auto; min-width: 280px; }
}

button[type="submit"]:hover { background: var(--lo-blue-dark); border-color: var(--lo-blue-dark); transform: translateY(-1px); }
button[type="submit"]:active { transform: translateY(0); }

.lo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 2px solid var(--lo-blue);
  border-radius: var(--lo-radius);
  background: var(--lo-blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lo-btn:hover { opacity: 0.92; transform: translateY(-1px); color: #fff; }

.lo-btn-primary { background: var(--lo-blue); border-color: var(--lo-blue); color: #fff; }
.lo-btn-primary:hover { background: var(--lo-blue-dark); border-color: var(--lo-blue-dark); }

.lo-btn-red { background: var(--lo-red); border-color: var(--lo-red); color: #fff; }
.lo-btn-red:hover { background: var(--lo-red-dark); border-color: var(--lo-red-dark); }

.lo-btn--outline { background: transparent; color: var(--lo-blue); }
.lo-btn--outline:hover { background: var(--lo-blue); color: #fff; }

.lo-btn-lg { padding: 14px 26px; font-size: 1.05rem; }

/* -------------------------------------------------------------------- */
/* Messages                                                               */
/* -------------------------------------------------------------------- */
.error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--lo-radius);
  background: var(--lo-error-bg);
  color: var(--lo-error);
  font-size: 15px;
  font-weight: 600;
}

.muted { color: var(--lo-muted); font-size: 15px; }

.msg {
  padding: 14px 16px;
  border-radius: var(--lo-radius);
  font-size: 15px;
  line-height: 1.5;
}

.msg + p { margin-top: 14px; }

.msg-success { background: var(--lo-success-bg); color: var(--lo-success); }
.msg-notice  { background: var(--lo-info-bg); color: var(--lo-info); }

a.link { color: var(--lo-blue); font-weight: 700; }

.lo-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--lo-line);
  font-size: 14px;
}

/* -------------------------------------------------------------------- */
/* Cabinet dashboard                                                      */
/* -------------------------------------------------------------------- */
.lo-club-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius);
}

.lo-club-status strong { color: var(--lo-blue); }

.lo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.lo-list li {
  padding: 14px 16px;
  background: var(--lo-soft);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius);
  font-size: 16px;
}

.lo-list li .lo-row-date { color: var(--lo-muted); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; display: block; margin-bottom: 4px; }

/* -------------------------------------------------------------------- */
/* Cabinet — shared components (dashboard/vision/purchases/club)         */
/* -------------------------------------------------------------------- */
.lo-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--lo-blue);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--lo-radius) 0;
}

.lo-skip-link:focus { left: 0; }

.lo-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.lo-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.lo-badge-club {
  background: var(--lo-blue);
  color: #fff;
}

.lo-badge-club--muted {
  background: var(--lo-soft);
  color: var(--lo-muted);
}

.lo-page-subtitle {
  margin: 4px 0 0;
  color: var(--lo-muted);
  font-size: 14.5px;
}

.lo-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.lo-stat {
  background: var(--lo-bg);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius-lg);
  padding: 20px 22px;
  box-shadow: var(--lo-shadow-card);
}

.lo-stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lo-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.lo-stat-label svg { width: 16px; height: 16px; opacity: .8; flex: none; }

.lo-stat-value {
  font-family: var(--lo-font-accent);
  font-weight: 800;
  font-size: 28px;
  color: var(--lo-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.lo-stat-sub { margin-top: 6px; font-size: 13.5px; color: var(--lo-muted); }
.lo-stat-sub a { font-weight: 600; }
.lo-stat-anchor { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--lo-success); }

.lo-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--lo-success-bg);
  color: var(--lo-success);
}
.lo-stat-pill svg { width: 13px; height: 13px; }
.lo-stat-pill--muted { background: var(--lo-soft); color: var(--lo-muted); }

.lo-discount-panel,
.lo-hero-rx {
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius-xl);
  padding: 26px 28px;
  margin-bottom: var(--gap);
}

.lo-discount-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 14px;
}

.lo-discount-head h2 { font-size: 19px; margin: 0; }

.lo-discount-current {
  font-family: var(--lo-font-accent);
  font-weight: 800;
  font-size: 26px;
  color: var(--lo-blue-dark);
  font-variant-numeric: tabular-nums;
}

.lo-progress-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--lo-muted);
  font-variant-numeric: tabular-nums;
}

.lo-discount-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.lo-discount-foot div { flex: 1 1 220px; }
.lo-discount-foot .k { font-size: 12.5px; color: var(--lo-muted); margin-bottom: 3px; }
.lo-discount-foot .v { font-size: 15px; font-weight: 700; color: var(--lo-ink); }
.lo-discount-foot .v.savings { color: var(--lo-success); }

.lo-mid-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.lo-rx-card {
  background: var(--lo-bg);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius-lg);
  padding: 22px;
  box-shadow: var(--lo-shadow-card);
}

.lo-rx-card h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 0 0 12px; }
.lo-rx-card h3 svg { width: 18px; height: 18px; color: var(--lo-blue); }

.lo-rx-values { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 8px; }

.lo-rx-value {
  font-family: var(--lo-font-accent);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--lo-blue-dark);
}

.lo-rx-legend { font-size: 12px; color: var(--lo-muted); margin-bottom: 10px; }
.lo-freshness { font-size: 13.5px; font-weight: 700; margin: 0; }
.lo-freshness--ok { color: var(--lo-success); }

.lo-rx-note {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--lo-blue);
  background: var(--lo-bg);
  border-radius: 0 var(--lo-radius) var(--lo-radius) 0;
  font-size: 16px;
  font-style: italic;
  color: var(--lo-muted);
}

.lo-rx-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lo-rx-date { font-size: 13.5px; color: var(--lo-muted); margin: 0; }
.lo-rx-expiry { font-size: 13px; color: var(--lo-muted); margin: 10px 0 0; }

.lo-rx-legend-details { margin: 14px 0 0; }
.lo-rx-legend-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lo-blue);
}
.lo-rx-legend-details[open] summary { margin-bottom: 6px; }
.lo-rx-legend-details .lo-rx-legend { margin: 6px 0 0; }

.lo-rx-articles { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--lo-line); }
.lo-rx-articles-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--lo-muted); margin: 0 0 10px; }
.lo-rx-articles-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lo-rx-articles-list a { font-size: 13.5px; font-weight: 600; color: var(--lo-blue); }

.lo-rx-history-title { font-size: 15px; font-weight: 700; margin: 28px 0 0; }

.lo-empty-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius);
  padding: 12px 14px;
}

.lo-empty-state svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--lo-blue);
  margin-top: 1px;
}

.lo-empty-copy { font-size: 13.5px; color: var(--lo-ink); line-height: 1.5; margin: 0; }
.lo-empty-copy a { font-weight: 600; color: var(--lo-blue); }

.lo-empty-state--compact {
  padding: 4px 0 0;
  background: none;
  gap: 6px;
}
.lo-empty-state--compact svg { width: 14px; height: 14px; }
.lo-empty-state--compact .lo-empty-copy { font-size: 13px; color: var(--lo-blue); font-weight: 600; }

.lo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.lo-card {
  padding: 20px;
  background: var(--lo-bg);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius-lg);
  box-shadow: var(--lo-shadow-card);
}

.lo-card--blue-top { border-top: 4px solid var(--lo-blue); }
.lo-card--red-top { border-top: 4px solid var(--lo-red); }
.lo-card h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 0 0 10px; }
.lo-card h3 svg { width: 18px; height: 18px; flex: none; }
.lo-card .amount { font-family: var(--lo-font-accent); font-weight: 800; font-size: 17px; color: var(--lo-ink); }

@media (width <= 900px) {
  .lo-stat-grid { grid-template-columns: 1fr; }
  .lo-mid-grid { grid-template-columns: 1fr; }
}

.lo-icon {
  width: 22px;
  height: 22px;
  flex: none;
  margin-inline-end: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -4px;
}

.lo-rx-history { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.lo-rx-history-item {
  padding: 12px 16px;
  background: var(--lo-soft);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.lo-delta-changed { font-size: 12.5px; font-weight: 600; color: var(--lo-muted); margin-left: 6px; }

.lo-purchases-summary {
  font-family: var(--lo-font-accent);
  font-size: 20px;
  font-weight: 800;
  color: var(--lo-ink);
}

.lo-purchases-total { margin-top: 4px; }

.lo-row-total { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Purchases page — card feed (2026-07-20-purchases-redesign)          */
/* ------------------------------------------------------------------ */

.lo-purch-summary {
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius-xl);
  padding: 20px 26px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}
.lo-purch-summary .stat { display: flex; flex-direction: column; gap: 2px; }
.lo-purch-summary .stat .v {
  font-family: var(--lo-font-accent);
  font-weight: 800;
  font-size: 19px;
  color: var(--lo-blue-dark);
  font-variant-numeric: tabular-nums;
}
.lo-purch-summary .stat .k { font-size: 12.5px; color: var(--lo-muted); }
.lo-purch-summary .divider { width: 1px; align-self: stretch; background: rgba(17, 24, 39, 0.08); }

.lo-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.lo-filter-chip {
  appearance: none;
  border: 1px solid var(--lo-line);
  background: var(--lo-bg);
  color: var(--lo-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: var(--lo-radius-pill);
  cursor: pointer;
}
.lo-filter-chip:hover { border-color: var(--lo-blue); color: var(--lo-blue); }
.lo-filter-chip[aria-pressed="true"] { background: var(--lo-blue); border-color: var(--lo-blue); color: #fff; }

.lo-month-divider {
  position: sticky;
  top: var(--lo-header-h);
  z-index: 5;
  background: var(--lo-bg);
  margin: 0 -6px;
  padding: 14px 6px 8px;
  font-family: var(--lo-font-accent);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lo-muted);
}

.lo-feed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.lo-purchase {
  background: var(--lo-bg);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius-lg);
  box-shadow: var(--lo-shadow-card);
  overflow: hidden;
}
.lo-purchase--order { border-left: 3px solid var(--lo-blue); }
.lo-purchase--order:hover { box-shadow: var(--lo-shadow-blue); }
.lo-purchase > summary { list-style: none; cursor: pointer; }
.lo-purchase > summary::-webkit-details-marker { display: none; }
.lo-purchase > summary:focus-visible { outline: 2px solid var(--lo-blue); outline-offset: -2px; }

.lo-purchase-head { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; }

.lo-p-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lo-muted);
  background: var(--lo-soft);
}
.lo-p-icon svg { width: 20px; height: 20px; }
.lo-purchase--order .lo-p-icon { width: 44px; height: 44px; background: var(--lo-blue-light); color: var(--lo-blue-dark); }

.lo-p-body { flex: 1 1 auto; min-width: 0; }
.lo-p-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lo-muted);
  margin-bottom: 3px;
  display: block;
}
.lo-purchase--order .lo-p-eyebrow { color: var(--lo-blue); }
.lo-p-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lo-ink);
  margin-bottom: 4px;
  display: block;
}
.lo-p-meta { font-size: 12.5px; color: var(--lo-muted); }
.lo-p-rx-chip { color: var(--lo-blue); font-weight: 600; }

.lo-p-right { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 108px; }
.lo-p-sum {
  font-family: var(--lo-font-accent);
  font-weight: 700;
  font-size: 16px;
  color: var(--lo-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.lo-p-chevron { width: 18px; height: 18px; color: var(--lo-muted); transition: transform 0.2s ease; flex: none; }
.lo-purchase[open] .lo-p-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .lo-p-chevron { transition: none; } }

.lo-p-detail { padding: 0 18px 18px 18px; }
.lo-p-detail-inner { border-top: 1px solid var(--lo-line); padding-top: 14px; margin-left: 58px; }
.lo-p-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lo-p-items li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--lo-ink); }
.lo-p-items li .col { flex: 1 1 auto; min-width: 0; }
.lo-p-items li .name { display: block; font-weight: 600; }
.lo-p-items li .sub { display: block; font-size: 12.5px; color: var(--lo-muted); margin-top: 2px; }
.lo-p-items li .price { flex: none; font-variant-numeric: tabular-nums; color: var(--lo-muted); white-space: nowrap; padding-top: 1px; }
.lo-p-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--lo-line); font-size: 13.5px; color: var(--lo-muted); }
.lo-p-total b { font-family: var(--lo-font-accent); font-size: 15px; color: var(--lo-ink); font-variant-numeric: tabular-nums; }

.lo-purch-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 20px 56px; }
.lo-purch-empty .ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--lo-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--lo-blue-dark);
}
.lo-purch-empty .ring svg { width: 34px; height: 34px; }
.lo-purch-empty h2 { font-size: 19px; margin: 0 0 8px; }
.lo-purch-empty p { font-size: 14.5px; color: var(--lo-muted); max-width: 360px; margin: 0 auto; }

@media (max-width: 640px) {
  .lo-purch-summary { flex-direction: column; align-items: flex-start; }
  .lo-purch-summary .divider { display: none; }
  .lo-p-title { white-space: normal; }
  .lo-p-detail-inner { margin-left: 0; }
}

.lo-club-hero {
  padding: var(--pad-card);
  margin-bottom: var(--gap);
  text-align: center;
  background: var(--lo-blue-light);
  border-radius: var(--lo-radius-xl);
}

.lo-club-hero .lo-badge-club { padding: 10px 20px; font-size: 18px; }

.lo-club-dates { margin: 10px 0 0; font-size: 15px; color: var(--lo-muted); }

/* Таблица привилегий клуба (портирована 1:1 с likeoptika.ru, /club/) */
.lo-compare-wrap {
  overflow-x: auto;
  margin: var(--gap) 0;
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius-xl);
  box-shadow: 0 12px 32px rgba(14, 21, 38, 0.06);
  background: #fff;
}

.lo-compare-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.lo-compare-table th,
.lo-compare-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--lo-line);
}

.lo-compare-table th:first-child,
.lo-compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  color: var(--lo-ink);
  background: #fff;
}

.lo-compare-table thead th {
  background: var(--lo-blue-light);
  border-bottom: 2px solid var(--lo-blue);
  font-weight: 700;
  color: var(--lo-ink);
}

.lo-compare-table thead th:first-child { background: var(--lo-blue-light); }

.lo-compare-table thead .lo-compare-price {
  display: block;
  margin-top: 2px;
  color: var(--lo-blue);
  font-weight: 700;
  font-size: 12.5px;
}

.lo-compare-table tbody tr:last-child td { border-bottom: none; }
.lo-compare-table td:not(:first-child) { color: var(--lo-muted); }
.lo-compare-table td.lo-compare-yes { color: var(--lo-blue); font-weight: 700; }
.lo-compare-table .lo-compare-group td,
.lo-compare-table .lo-compare-group td:first-child {
  background: var(--lo-soft);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lo-muted);
  text-align: left;
}

.lo-compare-table td.lo-compare-own {
  background: var(--lo-blue-light);
}

.lo-compare-table th.lo-compare-own {
  background: var(--lo-blue);
  color: #fff;
}

.lo-compare-table th.lo-compare-own .lo-compare-price {
  color: #fff;
}

.lo-compare-table th.lo-compare-own .lo-compare-own-tag {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lo-club-perks { list-style: none; margin: var(--gap) 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.lo-club-perks li {
  padding: 12px 16px;
  background: var(--lo-soft);
  border-radius: var(--lo-radius);
  font-size: 16px;
}

.lo-club-progress p {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lo-club-savings { margin-top: 4px; color: var(--lo-success); font-weight: 600; }

.lo-discount-progress { margin: var(--gap) 0; }

.lo-discount-progress-pct {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.lo-progress-bar {
  height: 10px;
  background: var(--lo-soft);
  border-radius: var(--lo-radius-pill);
  overflow: hidden;
}

.lo-progress-bar-fill {
  height: 100%;
  background: var(--lo-blue);
  border-radius: var(--lo-radius-pill);
  transition: width 0.3s ease;
}

.lo-discount-progress-next { margin-top: 8px; color: var(--lo-muted); font-size: 14px; }

.lo-club-offer { text-align: center; }

.lo-club-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--gap);
  margin: var(--gap) 0;
}

.lo-club-tier {
  padding: var(--pad-card);
  background: var(--lo-soft);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius);
}

.lo-club-tier h3 { margin: 0 0 8px; }

.lo-club-tier-price {
  font-family: var(--lo-font-accent);
  font-size: 22px;
  font-weight: 800;
  color: var(--lo-blue);
}

.lo-club-tier-price span { font-size: 14px; font-weight: 500; color: var(--lo-muted); }

@media (hover: hover) {
  .lo-card:hover, .lo-rx-history-item:hover { box-shadow: var(--lo-shadow-hover); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Кнопка "Показать" лежит поверх поля, а не отъедает его ширину — иначе
   поле пароля визуально уже, чем телефон/email (owner-репорт 2026-07-18). */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 88px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  padding: 0; border: none; background: none;
  color: var(--lo-blue); font-size: 14px; cursor: pointer;
  text-decoration: underline;
}
.pw-toggle:hover { color: var(--lo-blue-dark); }
.hint { margin: 4px 0 12px; font-size: 14px; color: var(--lo-muted, #5B6472); }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-success { background: #e8f5e9; color: #1b5e20; }
/* Loading-affordance при переходе по вкладкам кабинета (Шаг 22): класс
   is-loading вешает auth.js на <body> при клике по .lo-nav-toolbar a / .lo-logo.
   Без этого правила класс не даёт видимого эффекта. */
body.is-loading { cursor: progress; }
body.is-loading .lo-nav-toolbar a[aria-current] { opacity: 0.6; }
