/* ============================================================
   Дизайн-токены «Ваше Право» — по утверждённому прототипу.
   Три темы как наборы CSS-переменных: classic (дефолт) / modern / editorial.
   ============================================================ */

:root,
:root[data-theme="classic"] {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #1F3864;
  --ink-2: #3a4a66;
  --muted: #7a8699;
  --line: #e4e9f1;
  --brand: #1F3864;
  --brand-2: #16294a;
  --on-brand: #ffffff;
  --accent: #1f8a4c;
  --accent-2: #19733e;
  --on-accent: #ffffff;
  --chip: #eaf0f8;
  --chip-ink: #1F3864;
  --client-statusink: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 80, .06), 0 8px 26px rgba(20, 40, 80, .05);
  --shadow-cta: 0 6px 18px rgba(20, 40, 80, .12);
  --font-head: "Helvetica Neue", Arial, sans-serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;

  /* статусы */
  --paid-bg: #e6f4ec;   --paid-fg: #1f8a4c;
  --pend-bg: #fdf1dd;   --pend-fg: #9a6b15;
  --exp-bg:  #fbe9e7;   --exp-fg:  #b0392b;
}

:root[data-theme="modern"] {
  --bg: #f2f3f0;
  --surface: #ffffff;
  --surface-2: #f9f8f5;
  --ink: #16243a;
  --ink-2: #3b4658;
  --muted: #828b97;
  --line: #e8e7e1;
  --brand: #1b2a44;
  --brand-2: #111d31;
  --on-brand: #f5f3ee;
  --accent: #15795a;
  --accent-2: #0f6149;
  --on-accent: #ffffff;
  --chip: #e8efe9;
  --chip-ink: #15795a;
  --client-statusink: #f5f3ee;
  --radius: 13px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 14px 44px rgba(0, 0, 0, .07);
  --shadow-cta: 0 10px 26px rgba(0, 0, 0, .1);
  --font-head: "Helvetica Neue", Arial, sans-serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="editorial"] {
  --bg: #efece4;
  --surface: #fbfaf6;
  --surface-2: #f4f1e9;
  --ink: #1c1b18;
  --ink-2: #403c34;
  --muted: #8a8377;
  --line: #e2ddd0;
  --brand: #23463a;
  --brand-2: #193429;
  --on-brand: #f3efe6;
  --accent: #27684a;
  --accent-2: #1f5640;
  --on-accent: #fbfaf6;
  --chip: #e6e1d4;
  --chip-ink: #23463a;
  --client-statusink: #f3efe6;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 3px 12px rgba(0, 0, 0, .05);
  --shadow-cta: 0 4px 14px rgba(0, 0, 0, .08);
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.3px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; outline: none; }
textarea { resize: vertical; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 130, 150, .32); border-radius: 8px; }

.link { color: var(--accent-2); font-weight: 600; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, transform .08s, box-shadow .15s, border-color .15s;
  background: var(--surface-2); color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-cta); }
.btn--primary:hover { background: var(--brand-2); }
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px rgba(31, 138, 76, .22); }
.btn--accent:hover { background: var(--accent-2); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 24px; font-size: 15px; }
.btn--wa { background: #25d366; color: #fff; }
.btn--tg { background: #2aabee; color: #fff; }

/* Поля */
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.field__hint { color: var(--muted); font-weight: 400; }
.field__input {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2); font-size: 14px; color: var(--ink);
}
.field__input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--chip); }
select.field__input { cursor: pointer; }

/* Бейджи статусов */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge--paid { background: var(--paid-bg); color: var(--paid-fg); }
.badge--pending { background: var(--pend-bg); color: var(--pend-fg); }
.badge--expired { background: var(--exp-bg); color: var(--exp-fg); }

/* Аватар-инициалы */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--chip); color: var(--chip-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }

/* Лого-звезда */
.logo-star { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; flex: none; }

/* Алерты */
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.alert--error { background: var(--exp-bg); color: var(--exp-fg); }
.alert--success { background: var(--paid-bg); color: var(--paid-fg); }

.demo-badge { display: inline-block; background: var(--pend-bg); color: var(--pend-fg); font-weight: 600; font-size: 12px; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
.demo-badge--inline { background: var(--chip); color: var(--chip-ink); }

@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes qrPulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
