/* ============================================================
   ЛК VOLS.SU — Личный Кабинет Родителя
   Дизайн-система совместима с основным сайтом vols.su
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Переменные (в точности как на основном сайте) ───────────────────── */
:root {
  --bg:              #f8fafc;
  --surface:         #ffffff;
  --surface-soft:    #f1f5f9;
  --text:            #0f172a;
  --text-muted:      #64748b;
  --muted:           #94a3b8;
  --line:            #e2e8f0;
  --line-strong:     #cbd5e1;
  --accent:          #1e6091;
  --accent-strong:   #184e77;
  --accent-soft:     #eef5fb;

  --success:         #16883a;
  --success-soft:    #e6f7ed;
  --warning:         #c17a00;
  --warning-soft:    #fff7e0;
  --danger:          #c0392b;
  --danger-soft:     #fde8e6;

  --shadow-sm:       0 1px 3px 0 rgb(0 0 0/.10), 0 1px 2px -1px rgb(0 0 0/.10);
  --shadow:          0 10px 15px -3px rgb(0 0 0/.10), 0 4px 6px -4px rgb(0 0 0/.10);
  --shadow-md:       0 20px 25px -5px rgb(0 0 0/.10), 0 8px 10px -6px rgb(0 0 0/.10);

  --radius-2xl:      32px;
  --radius-xl:       24px;
  --radius-lg:       16px;
  --radius-md:       12px;
  --radius-sm:       8px;
  --radius-full:     9999px;

  --max-width:       1240px;
  --header-h:        80px;

  --font-body:       'Manrope', system-ui, sans-serif;
  --font-heading:    'Exo 2', system-ui, sans-serif;
  --transition:      0.2s ease;
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-width: 320px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--text); margin: 0; }
button, input, select, textarea { font: inherit; }

/* ── Layout: Page Shell ──────────────────────────────────────────────── */
.page-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

/* ── Header (pill style, идентично основному сайту) ─────────────────── */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-radius: 20px;
  min-height: var(--header-h);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

/* ── Brand ──────────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy { display: flex; flex-direction: column; gap: 1px; }

.brand-note {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

/* ── Nav / back link ────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }
.back-link svg { transition: transform var(--transition); }
.back-link:hover svg { transform: translateX(-4px); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lk-user-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Кнопки (идентично основному сайту) ─────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition),
              background-color var(--transition), color var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 93, 156, 0.14);
}

.button-secondary { background: var(--surface-soft); }

.button-danger {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.button:hover { transform: translateY(-1px); }
.button-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.button:disabled { opacity: 0.65; cursor: default; transform: none; box-shadow: none; }
.button-full { width: 100%; }
.button-lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.button-sm { min-height: 34px; padding: 0 14px; font-size: 0.8rem; }

.form-button { width: 100%; margin-top: 6px; min-height: 52px; font-size: 1rem; }

/* ── Формы (идентично основному сайту) ──────────────────────────────── */
.field {
  display: grid;
  gap: 8px;
}

.field span, .field label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 1rem;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(22, 93, 156, 0.45);
  box-shadow: 0 0 0 4px rgba(22, 93, 156, 0.09);
}

.field input:disabled, .field input[readonly] {
  background: var(--surface-soft);
  color: var(--text-muted);
  cursor: not-allowed;
}

.field textarea { min-height: 100px; resize: vertical; }

.field-hint { font-size: 0.8rem; color: var(--text-muted); }
.field-error { font-size: 0.8rem; color: var(--danger); font-weight: 600; }

/* ── Auth страницы ──────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 70% 20%, rgba(30,96,145,.05) 0%, transparent 60%);
}

.auth-shell {
  width: min(520px, 100%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  margin-top: 28px;
}

.auth-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-head .eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-head h1 {
  font-size: clamp(1.75rem, 6vw, 2.2rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.auth-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.auth-form { display: grid; gap: 16px; }

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--accent); font-weight: 700; }

/* Подтверждённые данные в форме регистрации */
.confirmed-block {
  background: var(--accent-soft);
  border: 1px solid rgba(30,96,145,.15);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 4px;
}
.confirmed-block .card-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ── Шаги регистрации ─────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--line-strong);
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--transition);
}

.step.active .step-num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step.done .step-num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: none;
}
@media (min-width: 400px) { .step-label { display: block; } }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line-strong);
  margin: 0 4px;
}

/* ── Alert ──────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-error   { background: var(--danger-soft);  color: var(--danger);  border: 1px solid #f5c6c2; }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid #b7e4c7; }
.alert-info    { background: var(--accent-soft);  color: var(--accent);  border: 1px solid #bee3f8; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }

/* ── Logout button ─────────────────────────────────────────────────── */
.lk-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  transition: background var(--transition), color var(--transition);
}
.lk-logout:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

/* ── Основной контент ЛК ─────────────────────────────────────────────── */
.lk-main {
  padding: 28px 0 0;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 16px;
  color: var(--text);
}

/* ── Карточки ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

/* ── Карточка ребёнка ────────────────────────────────────────────────── */
.child-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition);
}

.child-card:hover { box-shadow: var(--shadow); }

.child-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.child-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Статус оплаты ──────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-paid    { background: var(--success-soft); color: var(--success); }
.status-expired { background: var(--danger-soft);  color: var(--danger);  }
.status-none    { background: var(--surface-soft); color: var(--text-muted); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Пустое состояние ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 44px;
  height: 44px;
  color: var(--line-strong);
  margin: 0 auto 14px;
}

.empty-state h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text);
}

/* ── Тарифная карточка (страница оплаты) ─────────────────────────────── */
.tariff-card {
  background: linear-gradient(135deg, var(--accent) 0%, #1d70c0 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #fff;
  margin-bottom: 20px;
}

.tariff-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.75;
  margin-bottom: 6px;
}

.tariff-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tariff-period { font-size: 0.85rem; opacity: 0.8; margin-bottom: 14px; }

.tariff-price {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
}

.tariff-price-sub { font-size: 0.88rem; opacity: 0.75; }

/* ── Брелоки ────────────────────────────────────────────────────────── */
.fob-counter {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.fob-counter-info { flex: 1; }
.fob-counter-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.fob-counter-sub { font-size: 0.8rem; color: var(--text-muted); }

.fob-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fob-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.fob-btn:hover { border-color: var(--accent); color: var(--accent); }

.fob-count {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  min-width: 32px;
  text-align: center;
}

/* ── Итоговая строка ────────────────────────────────────────────────── */
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.total-label { font-size: 0.95rem; font-weight: 700; }

.total-amount {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
}

/* ── Secure badge ───────────────────────────────────────────────────── */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 14px;
}

/* ── Spinner ────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.spinner-dark {
  border-color: rgba(30, 96, 145, 0.2);
  border-top-color: var(--accent);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── История платежей ───────────────────────────────────────────────── */
.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.payment-row:last-child { border-bottom: none; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.footer-brand img { width: 30px; height: 30px; object-fit: contain; }

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Адаптив ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-card { padding: 28px 22px; }
  .lk-main { padding: 20px 0 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .child-card { padding: 18px; }
  .page-title { font-size: 1.45rem; }
}

@media (max-width: 420px) {
  .site-header { padding: 10px 16px; border-radius: 14px; top: 12px; }
  .brand-name { font-size: 1.1rem; }
}
