:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --primary: #0d9488;
  --primary-strong: #0f766e;
  --primary-soft: #ccfbf1;
  --accent: #6366f1;
  --danger: #e11d48;
  --danger-soft: #ffe4e6;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok: #047857;
  --ok-soft: #d1fae5;
  --info: #0369a1;
  --info-soft: #e0f2fe;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px -16px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1120;
    --surface: #111a2b;
    --surface-2: #162033;
    --text: #e6edf6;
    --muted: #93a3b8;
    --faint: #6b7c93;
    --border: #223047;
    --primary: #2dd4bf;
    --primary-strong: #5eead4;
    --primary-soft: #113c39;
    --accent: #818cf8;
    --danger: #fb7185;
    --danger-soft: #3b1220;
    --warn: #fbbf24;
    --warn-soft: #3a2a08;
    --ok: #34d399;
    --ok-soft: #0d3327;
    --info: #60a5fa;
    --info-soft: #0d2740;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
  }
}

/* Ручной выбор темы перекрывает системную */
html[data-theme="dark"] {
  --bg: #0a1120;
  --surface: #111a2b;
  --surface-2: #162033;
  --text: #e6edf6;
  --muted: #93a3b8;
  --faint: #6b7c93;
  --border: #223047;
  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --primary-soft: #113c39;
  --accent: #818cf8;
  --danger: #fb7185;
  --danger-soft: #3b1220;
  --warn: #fbbf24;
  --warn-soft: #3a2a08;
  --ok: #34d399;
  --ok-soft: #0d3327;
  --info: #60a5fa;
  --info-soft: #0d2740;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { min-height: 100dvh; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.boot {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Каркас ---------- */
.app-shell { min-height: 100dvh; }

.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  flex: none;
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 16px 12px 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; }
.nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
  background: var(--danger);
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who-role { font-size: 11.5px; color: var(--muted); }

.main {
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
  max-width: 1180px;
  margin: 0 auto;
  min-width: 0;
}

@media (min-width: 920px) {
  .app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar { display: flex; }
  /* сайдбар fixed и выпадает из сетки — контент ставим во вторую колонку вручную */
  .main { grid-column: 2; padding: 26px 30px 60px; width: 100%; }
  .tabbar { display: none !important; }
}

/* ---------- Нижняя навигация ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 25;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  border-radius: 10px;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--primary-strong); }
.tab.active svg { stroke-width: 2.2; }

/* ---------- Страница ---------- */
.page { display: flex; flex-direction: column; gap: 14px; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 160px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  transition: transform 0.06s ease, filter 0.15s ease, background 0.15s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-soft { background: var(--primary-soft); color: var(--primary-strong); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon-only { padding: 9px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 15px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 14px 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { gap: 8px; }
}

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.kpi-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-label { font-size: 12px; color: var(--muted); padding-right: 34px; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 3px; }
.kpi-hint { font-size: 11.5px; color: var(--faint); }
.kpi-hint.up { color: var(--ok); }
.kpi-hint.down { color: var(--danger); }

/* ---------- Списки ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
  width: 100%;
  color: inherit;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); text-decoration: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.row-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-chevron { color: var(--faint); flex: none; }
.row-chevron svg { width: 18px; height: 18px; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  letter-spacing: 0.02em;
}
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.avatar-lg { width: 62px; height: 62px; border-radius: 18px; font-size: 21px; }

/* ---------- Бейджи ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Формы ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .col-2 { grid-column: 1 / -1; } }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 11.5px; color: var(--faint); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--text);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.input::placeholder { color: var(--faint); }
.textarea { resize: vertical; min-height: 72px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.search { position: relative; flex: 1; min-width: 180px; }
.search input { padding-left: 38px; }
.search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .search-icon svg { width: 18px; height: 18px; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
table.table tr:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Вкладки ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 560px) {
  /* На телефоне вкладки переносим, иначе последняя обрезается */
  .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
  .tab-btn { padding: 10px 9px; font-size: 13.5px; }
}
.tab-btn {
  border: 0;
  background: none;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn.active { color: var(--primary-strong); border-bottom-color: var(--primary); }

/* ---------- Пустое состояние ---------- */
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px;
  background: var(--surface-2); display: grid; place-items: center; color: var(--faint);
}
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty-title { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.empty-sub { font-size: 13px; }

/* ---------- Модальные окна ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 30, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
  animation: fade 0.15s ease-out;
}
@media (min-width: 700px) { .modal-overlay { align-items: center; padding: 20px; } }

.modal {
  background: var(--surface);
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.3);
  animation: slideup 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes slideup { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .modal { border-radius: 18px; max-width: 560px; animation: fade 0.15s ease-out; }
  .modal-wide { max-width: 760px; }
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.modal-head h3 { flex: 1; font-size: 17px; }
.modal-body { padding: 4px 18px 16px; overflow-y: auto; }
.modal-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot .btn { flex: 1; }
@media (min-width: 560px) { .modal-foot .btn { flex: 0 0 auto; } }

/* ---------- Тосты ---------- */
.toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
@media (min-width: 920px) { .toast-root { bottom: 24px; } }
.toast {
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: toastin 0.18s ease-out;
  max-width: 100%;
}
.toast-error { background: #9f1239; }
.toast-ok { background: #065f46; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- График ---------- */
.chart { width: 100%; overflow: visible; }
.chart text { fill: var(--faint); font-size: 10px; }

/* ---------- Расписание ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 7px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--muted);
}
.day-name { font-size: 10.5px; text-transform: capitalize; }
.day-num { font-size: 16px; font-weight: 700; color: var(--text); }
.day.active { background: var(--primary); border-color: var(--primary); }
.day.active .day-name, .day.active .day-num { color: #fff; }
.day.today .day-num { color: var(--primary-strong); }
.day.active.today .day-num { color: #fff; }

.class-card { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.class-card:last-child { border-bottom: 0; }
.class-time { font-weight: 700; font-size: 14px; width: 46px; flex: none; font-variant-numeric: tabular-nums; }
.class-time small { display: block; font-weight: 500; font-size: 11px; color: var(--faint); }
.class-info { flex: 1; min-width: 0; }
.class-title { font-weight: 600; }
.class-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.bookings { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.booking {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--muted);
}
.booking.attended { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* ---------- Прочее ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }

.hero {
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #4a0b12 0%, #8f1019 55%, #1a1a1f 130%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.hero h2 { font-size: 19px; }
.hero p { opacity: 0.85; font-size: 13px; margin-top: 3px; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 0;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -6px rgba(13, 148, 136, 0.55);
  z-index: 20;
}
.fab svg { width: 24px; height: 24px; }
@media (min-width: 920px) { .fab { right: 28px; bottom: 28px; } }

.progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 6px; }

.note { font-size: 13px; background: var(--surface-2); border-left: 3px solid var(--border); padding: 8px 10px; border-radius: 6px; color: var(--muted); white-space: pre-wrap; }

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13.5px;
  font-weight: 500;
}
.banner .btn { margin-left: auto; }

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
  radial-gradient(700px 400px at 100% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.login-logo { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; margin-bottom: 14px; box-shadow: var(--shadow); }
.login-logo svg { width: 30px; height: 30px; }
.login-card h1 { font-size: 21px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 3px 0 18px; }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 4px; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--faint); text-align: center; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

@media (max-width: 520px) {
  .hide-sm { display: none !important; }
}

.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-cell {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 0;
  padding: 0;
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cell .pick {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
}
.photo-date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 5px;
  font-size: 10.5px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}
.photo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-compare figure { margin: 0; }
.photo-compare img { width: 100%; border-radius: 12px; display: block; }
.photo-compare figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Кабинет клиента: всегда мобильная компоновка, без сайдбара */
.app-shell.is-client { display: block; }
.app-shell.is-client .main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px calc(88px + env(safe-area-inset-bottom));
}
@media (min-width: 920px) {
  .app-shell.is-client .main { padding: 26px 24px 60px; }
  .app-shell.is-client .tabbar { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* ---------- График (столбики) ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; width: 100%; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ff4d5a, #a8071a);
  min-height: 2px;
  transition: filter 0.15s;
}
.bar-empty { background: var(--border); }
.bar-col:hover .bar { filter: brightness(1.12); }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 8px; }

.brand-mark svg { width: 21px; height: 21px; }
.avatar svg { width: 17px; height: 17px; }
.empty-icon svg { width: 26px; height: 26px; }
.row > svg { width: 18px; height: 18px; color: var(--faint); flex: none; }


/* ������ ������� */
.av-pic { display: inline-flex; width: 92px; height: 92px; border-radius: 50%; overflow: hidden; flex: none; }
.av-pic svg { display: block; width: 100%; height: 100%; }
.av-pic-sm { width: 44px; height: 44px; }
.av-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.av-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.av-option { background: none; border: 2px solid transparent; border-radius: 18px; padding: 3px; cursor: pointer; line-height: 0; }
.av-option.active { border-color: var(--primary); }

/* �������� ������� */
.av-live .av-body { animation: av-breathe 3.8s ease-in-out infinite; transform-origin: 60px 112px; }
.av-live .av-eyes { animation: av-blink 5.4s infinite; transform-origin: 60px 59px; }
.av-live.mood-happy .av-body { animation: av-bounce 1.1s ease-in-out infinite; }
.av-live .av-aura { animation: av-pulse 4.2s ease-in-out infinite; }
.av-live.mood-hungry .av-bubble { animation: av-pop 2.4s ease-in-out infinite; transform-origin: 99px 26px; }
.av-live.mood-happy .av-bubble { animation: av-pop 1.6s ease-in-out infinite; transform-origin: 99px 26px; }
@keyframes av-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 0.985); } }
@keyframes av-blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.12); } }
@keyframes av-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes av-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.75; } }
@keyframes av-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ��������� */
.onb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 12, 22, .72); backdrop-filter: blur(6px); padding: 16px; }
.onb-card { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.onb-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.onb-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.onb-dots span.on { background: var(--primary); width: 18px; border-radius: 4px; }
.onb-title { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.onb-text { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.onb-ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.onb-actions { display: flex; gap: 8px; margin-top: 16px; }
.onb-actions .btn { flex: 1; }
.av-live.mood-message .av-arm { animation: av-wave 1s ease-in-out infinite; transform-origin: 92px 98px; }
.av-live.mood-message .av-bubble { animation: av-pop 1.6s ease-in-out infinite; transform-origin: 99px 26px; }
@keyframes av-wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(16deg); } }
.av-option.is-locked { position: relative; opacity: .45; cursor: not-allowed; }
.av-option.is-locked::after { content: '??'; position: absolute; right: 4px; bottom: 2px; font-size: 13px; }

/* ������ ���������� */
.update-bar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 150;
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--primary); box-shadow: var(--shadow); }
.update-bar .update-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.update-bar .update-text span { color: var(--muted); }
@media (min-width: 920px) { .update-bar { left: auto; right: 20px; bottom: 20px; max-width: 420px; } }

/* ������ ���������: 4 ������� */
.shot { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; }
.shot-stage { position: relative; flex: 1; overflow: hidden; }
.shot-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.shot-frame svg { height: 78%; width: auto; max-width: 70%; }
.shot-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: linear-gradient(#000a, transparent); color: #fff; }
.shot-top .icon-btn { color: #fff; }
.shot-step { font-weight: 700; }
.shot-hint { position: absolute; bottom: 150px; left: 0; right: 0; text-align: center; color: #fff;
  font-size: 14px; text-shadow: 0 1px 6px #000; padding: 0 20px; }
.shot-bottom { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shot-dots { display: flex; gap: 8px; }
.shot-dots span { width: 8px; height: 8px; border-radius: 50%; background: #ffffff66; }
.shot-dots span.on { background: #fff; width: 20px; border-radius: 4px; }
.shot-dots span.done { background: #34d399; }
.shot-btn { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: #ffffff33; }
.shot-btn:active { background: #ffffff55; }
.shot-review { position: absolute; inset: 0; display: none; background: #0a1120f2; padding: calc(20px + env(safe-area-inset-top)) 16px 20px;
  overflow-y: auto; }
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot-thumb { position: relative; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); padding: 0; color: var(--text); }
.shot-thumb img { width: 100%; height: 180px; object-fit: cover; display: block; }
.shot-thumb span { display: block; height: 180px; line-height: 180px; }
.shot-thumb b { display: block; padding: 8px; font-size: 13px; }
.shot-actions { display: flex; gap: 10px; margin-top: 16px; }
.shot-actions .btn { flex: 1; }
.shot-frame svg { height: 92%; width: auto; max-width: 94%; filter: drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
.shot-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%); }

/* QR ��� ������� � ���� */
.qr-box { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 16px; }
.qr-box img { display: block; }

/* ����� �� ������� */
.report-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-grid > div { display: flex; flex-direction: column; gap: 2px; }
.report-grid b { font-size: 18px; line-height: 1.1; }
@media (max-width: 700px) { .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ������ QR */
.qr-scanner { position: relative; }
.qr-scanner-frame {
  position: absolute; inset: 18% 22%;
  border: 3px solid rgba(45, 212, 191, 0.9);
  border-radius: 20px;
  box-shadow: 0 0 0 9999px rgba(3, 8, 18, 0.35);
  pointer-events: none;
}
.checkin-card .checkin-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(45, 212, 191, 0.14); color: var(--primary);
}

/* ������������� ������� */
.checkin-success {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(6px);
  animation: checkin-in 0.18s ease-out;
}
.checkin-success.is-hiding { opacity: 0; transition: opacity 0.5s ease; }
.checkin-success-card {
  max-width: 380px; margin: 0 20px; padding: 28px 26px;
  border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, #0f2033, #0b1522);
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.checkin-success-badge {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(45, 212, 191, 0.16); color: var(--primary);
}
.checkin-success-badge svg { width: 32px; height: 32px; }
.checkin-success-title { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.checkin-success-text { margin-top: 8px; font-size: 24px; font-weight: 700; line-height: 1.25; }
@keyframes checkin-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* ����������� ����������� */
.bell-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 0 5px; line-height: 16px;
}
.row.is-new .row-title { color: var(--primary); }

/* ��������� */
.support-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .support-layout { grid-template-columns: 1fr; } }
.support-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.support-list-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.support-list-body { max-height: 62vh; overflow: auto; }
.support-thread-btn { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: transparent; color: inherit; border-bottom: 1px solid var(--line); cursor: pointer; }
.support-thread-btn:hover { background: rgba(45, 212, 191, 0.06); }
.support-thread-btn.is-active { background: rgba(45, 212, 191, 0.12); }
.support-thread-top { display: flex; align-items: center; gap: 8px; }
.support-thread-last { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-thread-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.support-pane { border: 1px solid var(--line); border-radius: 16px; background: var(--card); display: flex; flex-direction: column; min-height: 420px; }
.support-pane-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.support-pane-empty { display: grid; place-items: center; gap: 8px; padding: 60px 20px; color: var(--muted); }
.support-thread { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 52vh; }
.support-empty { display: grid; place-items: center; gap: 8px; padding: 50px 20px; color: var(--muted); text-align: center; }
.support-msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; }
.support-msg.is-user { align-self: flex-start; background: rgba(148, 163, 184, 0.14); }
.support-msg.is-agent { align-self: flex-end; background: rgba(45, 212, 191, 0.16); }
.support-msg-time { font-size: 10px; color: var(--muted); margin-top: 4px; }
.support-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.support-compose .textarea { flex: 1; resize: none; }
.support-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 10px 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }

.support-empty svg, .support-pane-empty svg { width: 44px; height: 44px; opacity: 0.6; }
.support-empty { flex-direction: column; }
.support-list-body .support-thread-btn .badge { font-size: 11px; }

/* ������� ��������� */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stat-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 24px; line-height: 1.1; }
.stat-value.is-ok { color: var(--ok, #34d399); }
.stat-value.is-warn { color: #fbbf24; }
.stat-value.is-danger { color: #f87171; }
.stat-hint { font-size: 12px; color: var(--muted); }

/* ---------- ����� ����: OLD SCHOOL GYM ---------- */
:root, html[data-theme="light"] {
  --primary: #c81e2b;
  --primary-strong: #a8071a;
  --primary-soft: #fde8e8;
  --accent: #8a6d3b;
}
html[data-theme="dark"], :root:not([data-theme="light"]) {
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1b1b21;
  --text: #f3f3f5;
  --muted: #a3a3ad;
  --faint: #73737f;
  --border: #2a2a31;
  --primary: #e11d2e;
  --primary-strong: #ff4d5a;
  --primary-soft: #3a1114;
  --accent: #c9a227;
}
.brand-name { letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; }
.brand-sub { letter-spacing: 0.22em; text-transform: uppercase; font-size: 10px; }
.login-card h1 { letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; }
.brand-mark { background: linear-gradient(160deg, #e11d2e, #7f0f18); }

.chip.is-active { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* ������ ���� �� ��������: ����� ������� � ����� ��� ������� */
.tabbar { padding-bottom: env(safe-area-inset-bottom); min-height: 56px; }
.tab { min-width: 0; padding: 6px 1px; }
.tab svg { width: 20px; height: 20px; flex: 0 0 auto; }
.tab span {
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 420px) {
  .tab span { font-size: 9px; }
  .tab svg { width: 18px; height: 18px; }
}
.app-shell.is-client .main { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }

/* Нижнее меню на телефоне: место под подписи и под контент */
.tabbar {
  padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
  min-height: 62px;
}
.tab { min-width: 0; padding: 4px 0; gap: 4px; }
.tab svg { width: 22px; height: 22px; flex: 0 0 auto; }
.tab span {
  font-size: 10.5px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 420px) {
  .tab span { font-size: 10px; }
  .tab svg { width: 20px; height: 20px; }
}
.app-shell.is-client .main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
/* ������ ���������: ������ ������� �� ����� ������� */
.tabbar,
.app-shell.is-client .tabbar {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}
.tab { width: 100%; min-width: 0; }
.tab span {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- ����� Old School: ���������� ���� ---------- */
:root, html[data-theme="light"] {
  --primary: #7c3aed;
  --primary-strong: #6d28d9;
  --primary-soft: #ede9fe;
  --accent: #a855f7;
}
html[data-theme="dark"], :root:not([data-theme="light"]) {
  --bg: #0b0910;
  --surface: #15121c;
  --surface-2: #1c1826;
  --border: #2b2438;
  --text: #f4f1fa;
  --muted: #a79fb8;
  --faint: #7d7590;
  --primary: #a855f7;
  --primary-strong: #c084fc;
  --primary-soft: #2a1b3d;
  --accent: #8b5cf6;
}
.brand-mark { background: linear-gradient(160deg, #a855f7, #5b21b6); }
.hero, .welcome, .dashboard-hero { background: linear-gradient(135deg, #2a0f4d 0%, #6d28d9 60%, #1a1a1f 130%); }
.bar, .chart-bar { background: linear-gradient(180deg, #c084fc, #7c3aed); }

/* ������� ���� ������ ������ */
.login-logo.has-logo { background: transparent; box-shadow: none; width: 140px; height: 116px; }
.login-logo.has-logo img { border-radius: 0; object-fit: contain; }
.brand-mark.has-logo { background: transparent; }


/* Кликабельные виджеты показателей */
.kpi[data-stat] {
  cursor: pointer;
  position: relative;
  padding-bottom: 34px;
  transition: border-color .15s ease, transform .15s ease;
}
.kpi[data-stat]:hover { border-color: var(--primary); transform: translateY(-1px); }
.kpi[data-stat]::after {
  content: 'Расшифровка';
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 11px;
  color: var(--primary);
  opacity: .75;
}
.kpi[data-stat]:hover::after { opacity: 1; }

.stat-formula {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.stat-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 16px;
}
.stat-total strong { font-size: 20px; }
.empty-inline { padding: 18px 0; color: var(--muted); font-size: 14px; }


/* Календарь выбора даты */
.cal-wrap { padding: 4px 0 8px; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cal-title { font-weight: 600; font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekday { text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.cal-day {
  padding: 10px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background .12s ease;
}
.cal-day:hover:not([disabled]) { background: var(--surface-2); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--primary); }
.cal-day.is-selected { background: var(--primary); color: #fff; font-weight: 600; }
.cal-day.is-muted { opacity: .28; cursor: default; }
.cal-hint { margin-top: 12px; text-align: center; }


/* Подсказка: чем закрыть дефицит */
.recipe {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}


/* Экран обязательного согласия клиента */
.consent-page {
  display: flex;
  justify-content: center;
  padding: 10px 0 40px;
}
.consent-card {
  width: 100%;
  max-width: 680px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px 18px;
}
.consent-head h2 { margin: 8px 0 6px; font-size: 22px; }
.consent-head p { margin: 0 0 14px; }
.consent-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft, rgba(168,85,247,.16));
  color: var(--primary);
}
.consent-icon svg { width: 22px; height: 22px; }
.consent-summary {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.consent-line { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.consent-line .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin-top: 8px; flex: 0 0 auto; }
.consent-doc { border-top: 1px solid var(--border); padding: 10px 0; }
.consent-doc summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.consent-text { max-height: 260px; overflow-y: auto; padding: 10px 2px 0; }
.consent-text p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 8px; }
.consent-check {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0 12px; font-size: 14px; cursor: pointer;
}
.consent-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 auto; }
