/* ==========================================================================
   Такси Аналитика · Design System v2
   Светлая тема · чёрный + жёлтый · лёгкость и глубина в духе iOS
   ========================================================================== */

:root {
  /* Цвета */
  --bg: #f4f4f6;
  --card: #ffffff;
  --ink: #0b0b0f;
  --ink-2: #6e6e73;
  --ink-3: #aeaeb2;
  --yellow: #ffb000;
  --yellow-hi: #ffc61a;
  --yellow-deep: #f59e00;
  --yellow-soft: #fff3de;
  --yellow-mist: #fffaf0;
  --line: rgba(0, 0, 0, 0.065);
  --green: #1fae53;
  --red: #ff4530;

  /* Тени — слоистые, мягкие */
  --sh-sm: 0 1px 2px rgba(16,16,20,.05);
  --sh-card: 0 1px 2px rgba(16,16,20,.04), 0 10px 28px -6px rgba(16,16,20,.10);
  --sh-lift: 0 2px 4px rgba(16,16,20,.05), 0 16px 40px -8px rgba(16,16,20,.16);
  --sh-yellow: 0 6px 18px -4px rgba(255,190,0,.55);
  --sh-dark: 0 14px 34px -8px rgba(10,10,14,.5);

  /* Геометрия */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  /* Анимации */
  --spring: cubic-bezier(.34, 1.45, .5, 1);
  --out: cubic-bezier(.22, .8, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  overscroll-behavior: none;
  background-color: #f4f4f6;
  background-attachment: fixed;
}

/* ==========================================================================
   Варианты фона — «туманка» (фон задаётся напрямую в каждой теме)
   ========================================================================== */
/* Утренний туман: холодный светлый, мягкие белые дымки */
body:not([data-bg]),
body[data-bg="mist"] {
  background-image:
    radial-gradient(620px 340px at 90% -8%, rgba(255,182,0,.12), transparent 62%),
    radial-gradient(520px 420px at -15% 18%, rgba(255,255,255,.95), transparent 58%),
    radial-gradient(460px 320px at 65% 42%, rgba(255,255,255,.6), transparent 66%),
    radial-gradient(720px 420px at 8% 108%, rgba(255,198,26,.09), transparent 62%);
  background-color: #f4f4f6;
}
/* Янтарный закат: тёплый кремовый, сильная янтарная дымка сверху */
body[data-bg="sunset"] {
  background-image:
    radial-gradient(760px 380px at 80% -10%, rgba(255,166,0,.25), transparent 60%),
    radial-gradient(560px 400px at -10% 30%, rgba(255,214,120,.3), transparent 60%),
    radial-gradient(500px 340px at 60% 55%, rgba(255,255,255,.5), transparent 64%),
    radial-gradient(820px 460px at 15% 112%, rgba(255,150,0,.14), transparent 62%);
  background-color: #faf0e0;
}
/* Графит: прохладный серый, глубокая белая дымка */
body[data-bg="graphite"] {
  background-image:
    radial-gradient(600px 360px at 85% -8%, rgba(110,110,135,.14), transparent 62%),
    radial-gradient(520px 400px at -12% 25%, rgba(255,255,255,.85), transparent 58%),
    radial-gradient(700px 420px at 30% 110%, rgba(80,80,105,.1), transparent 62%);
  background-color: #edeff3;
}

/* ==========================================================================
   Регламент ТО — полосы остаточного ресурса
   ========================================================================== */
.todo-item { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: none; }
.todo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.todo-name { font-weight: 600; font-size: 14px; letter-spacing: -.2px; }
.todo-bar { height: 7px; border-radius: 99px; background: #efeff2; margin: 9px 0 7px; overflow: hidden; }
.todo-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffc61a, #ffb000); transition: width .6s var(--out); }
.todo-fill.warn { background: linear-gradient(90deg, #ff9f0a, #ff8a00); }
.todo-fill.danger { background: linear-gradient(90deg, #ff5e3a, #ff4530); }
.todo-sub { font-size: 12px; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.todo-pct { font-weight: 700; }
.todo-pct.warn { color: #c98a00; }
.todo-pct.danger { color: var(--red); }

#app { max-width: 460px; margin: 0 auto; padding: 14px 14px 110px; }
.spacer { height: 10px; }

/* ==========================================================================
   Анимации появления
   ========================================================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.92); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.page { display: none; }
.page.active { display: block; animation: pageIn .32s var(--out) both; }
.page.active .card,
.page.active .quick-card,
.page.active .stat-card,
.page.active .segmented { animation: rise .55s var(--out) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* Нажатия — пружинный отклик */
.pressable { transition: transform .18s var(--spring), box-shadow .25s ease, filter .2s ease, background-color .2s ease; cursor: pointer; }
.pressable:active { transform: scale(.955); filter: brightness(.97); }

/* ==========================================================================
   Типографика и заголовки
   ========================================================================== */
.home-header { display: flex; align-items: center; gap: 12px; padding: 6px 2px 18px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(150deg, #232329, var(--ink) 60%);
  color: var(--yellow-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 0 0 2.5px var(--yellow), var(--sh-sm);
}
.avatar.big { width: 68px; height: 68px; font-size: 27px; margin: 4px auto 0; }
.home-title { flex: 1; }
.hello {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .8px;
}
.name { font-size: 26px; font-weight: 700; letter-spacing: -.6px; margin-top: 1px; }

.page-header { padding: 6px 2px 18px; }
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -.7px; }
.page-sub { color: var(--ink-2); font-size: 14px; margin-top: 3px; }

.section-title { font-size: 19px; font-weight: 700; letter-spacing: -.3px; margin: 22px 4px 12px; }

/* ==========================================================================
   Чипы
   ========================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: -.1px;
  background: var(--card); box-shadow: var(--sh-card);
}
.chip svg { width: 15px; height: 15px; }
.chip-yellow { background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep)); color: var(--ink); box-shadow: var(--sh-yellow); }

/* ==========================================================================
   Карточки
   ========================================================================== */
.card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-card);
  padding: 18px; margin-bottom: 14px; border: 1px solid rgba(255,255,255,.6);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.card-sub { font-size: 12px; color: var(--ink-2); font-weight: 500; text-align: right; }

/* Стат-карточки */
.cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.stat-card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-card);
  padding: 16px; border: 1px solid rgba(255,255,255,.6);
  position: relative; overflow: hidden;
  animation: rise .55s var(--out) both;
}
.stat-card .s-label {
  font-size: 11px; color: var(--ink-2); font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
}
.stat-card .s-value { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat-card .s-value.yellow { color: var(--ink); }
.stat-card .s-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }

/* Тёмная hero-карточка */
.stat-card.dark {
  background: linear-gradient(155deg, #232329 0%, #0b0b0f 70%);
  color: #fff; border: none; box-shadow: var(--sh-dark);
}
.stat-card.dark::after {
  content: ""; position: absolute; right: -34px; top: -34px; width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(255,214,10,.35), transparent 68%);
  pointer-events: none;
}
.stat-card.dark .s-label { color: rgba(255,255,255,.55); }
.stat-card.dark .s-sub { color: rgba(255,255,255,.5); }
.stat-card.dark .s-value { color: var(--yellow-hi); text-shadow: 0 0 22px rgba(255,214,10,.35); }

/* ==========================================================================
   Быстрые действия
   ========================================================================== */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.quick-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.6); border-radius: var(--r-md);
  box-shadow: var(--sh-card); padding: 13px 4px 11px;
  font-size: 11px; font-weight: 600; color: var(--ink); letter-spacing: -.1px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: inherit; text-align: center;
}
.quick-ico {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(160deg, var(--yellow-mist), var(--yellow-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,190,0,.25);
}
.quick-ico svg { width: 21px; height: 21px; }

/* ==========================================================================
   Формы
   ========================================================================== */
.form-card { padding-bottom: 10px; }
.form-sec { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.field { display: block; margin-bottom: 12px; flex: 1; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: -.1px; }
.field input, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid transparent; border-radius: 14px;
  font-size: 16px; font-family: inherit; background: #f1f1f4; color: var(--ink);
  transition: border-color .2s ease, box-shadow .25s ease, background .25s ease;
  outline: none; appearance: none;
}
.field input:focus, .field select:focus {
  background: #fff; border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255,204,0,.22);
}
.field input[readonly] { background: #eaeaee; color: var(--ink-2); }
.field-row { display: flex; gap: 10px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; border-radius: 18px;
  padding: 17px; font-size: 16px; font-weight: 700; font-family: inherit; letter-spacing: -.2px;
  margin-bottom: 14px;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep));
  color: var(--ink); box-shadow: var(--sh-yellow);
}
.btn-ghost { background: #ececef; color: var(--ink); }
.btn-ghost.danger { color: var(--red); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-bottom: 0; }

/* ==========================================================================
   Сводки и строки
   ========================================================================== */
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; font-size: 14px; }
.sum-row span:first-child { color: var(--ink-2); font-weight: 500; }
.sum-row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 18px; }
.sum-row.total span:first-child { color: var(--ink); font-weight: 700; }
.sum-row.total span:last-child { color: var(--ink); font-weight: 700; font-size: 19px; }

.summary-card {
  background: linear-gradient(155deg, #232329 0%, #0b0b0f 75%);
  color: #fff; border: none; box-shadow: var(--sh-dark); position: relative; overflow: hidden;
}
.summary-card::after {
  content: ""; position: absolute; left: -30px; bottom: -40px; width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,214,10,.22), transparent 70%); pointer-events: none;
}
.summary-card .sum-row span:first-child { color: rgba(255,255,255,.6); }
.summary-card .sum-row span:last-child { color: #fff; }
.summary-card .sum-row.total { border-top-color: rgba(255,255,255,.14); }
.summary-card .sum-row.total span:first-child { color: #fff; }
.summary-card .sum-row.total span:last-child { color: var(--yellow-hi); text-shadow: 0 0 20px rgba(255,214,10,.35); font-size: 21px; }

/* ==========================================================================
   Списки (смены, операции)
   ========================================================================== */
.shift-list { display: flex; flex-direction: column; gap: 8px; }
.shift-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: #f7f7f9; border-radius: var(--r-md); border: 1px solid var(--line);
  animation: rise .4s var(--out) both;
}
.si-ico {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(160deg, var(--yellow-mist), var(--yellow-soft));
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(255,190,0,.22);
}
.si-ico svg { width: 20px; height: 20px; }
.si-body { flex: 1; min-width: 0; }
.si-title { font-weight: 700; font-size: 14px; letter-spacing: -.2px; }
.si-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; font-weight: 500; font-variant-numeric: tabular-nums; }
.si-sum { font-weight: 700; font-size: 15px; white-space: nowrap; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.si-sum.plus { color: var(--green); }
.si-sum.minus { color: var(--red); }
.si-del {
  border: none; background: none; color: var(--ink-3); font-size: 15px;
  padding: 8px 4px 8px 8px; font-family: inherit;
}
.si-del:active { color: var(--red); }

/* ==========================================================================
   Сегментed-контрол (iOS-style с плавающим бегунком)
   ========================================================================== */
.segmented {
  display: flex; background: #e9e9ed; border-radius: 13px; padding: 3px; margin-bottom: 14px;
  position: relative;
}
.seg-btn {
  flex: 1; position: relative; border: none; background: transparent;
  padding: 9px 4px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); font-family: inherit;
  cursor: pointer; z-index: 1;
  transition: color .25s ease;
}
.seg-btn::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px; background: #fff;
  box-shadow: 0 2px 8px rgba(16,16,20,.14);
  opacity: 0; transform: scale(.75);
  transition: opacity .28s var(--out), transform .32s var(--spring);
  z-index: -1;
}
.seg-btn.active { color: var(--ink); }
.seg-btn.active::before { opacity: 1; transform: scale(1); }

#history-stats, #car-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

/* ==========================================================================
   Прибытия
   ========================================================================== */
.transport-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.transport-item:last-child { border-bottom: none; }
.t-ico {
  width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.t-ico svg { width: 19px; height: 19px; }
.t-ico.plane { background: linear-gradient(160deg, var(--yellow-mist), var(--yellow-soft)); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,190,0,.22); }
.t-ico.train { background: #e9f1ff; color: #0a66d0; box-shadow: inset 0 0 0 1px rgba(10,102,208,.15); }
.t-time { font-weight: 700; font-size: 15px; width: 50px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.t-body { flex: 1; min-width: 0; }
.t-from { font-weight: 700; font-size: 14px; letter-spacing: -.2px; }
.t-num { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.t-badge {
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  background: #f0f0f3; color: var(--ink-2); white-space: nowrap;
}
.t-badge.hot { background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep)); color: var(--ink); box-shadow: 0 3px 10px -2px rgba(255,190,0,.5); }

/* ==========================================================================
   Профиль
   ========================================================================== */
.profile-card { text-align: center; padding: 24px 16px 20px; }
.profile-name { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin-top: 12px; }
.profile-city { color: var(--ink-2); font-size: 14px; margin-top: 3px; font-weight: 500; }

.sub-card {
  background: linear-gradient(150deg, #1b1b21 0%, #0b0b0f 65%);
  color: #fff; border: none; box-shadow: var(--sh-dark); position: relative; overflow: hidden;
}
.sub-card::before {
  content: ""; position: absolute; right: -40px; top: -50px; width: 190px; height: 190px;
  background: radial-gradient(circle, rgba(255,214,10,.3), transparent 68%); pointer-events: none;
}
.sub-card .card-title { color: #fff; }
.sub-price { font-size: 32px; font-weight: 700; color: var(--yellow-hi); margin: 10px 0 2px; letter-spacing: -1px; text-shadow: 0 0 26px rgba(255,214,10,.3); }
.sub-price span { font-size: 14px; color: rgba(255,255,255,.45); font-weight: 600; letter-spacing: 0; }
.sub-list { list-style: none; margin: 14px 0 18px; }
.sub-list li { padding: 5px 0; font-size: 14px; color: rgba(255,255,255,.78); }
.sub-list li::before { content: "✓ "; color: var(--yellow-hi); font-weight: 700; }
.sub-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.65);
}
.sub-badge.active { background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep)); color: var(--ink); }

.footer-note { text-align: center; color: var(--ink-3); font-size: 12px; line-height: 1.7; margin-top: 22px; font-weight: 500; }

/* ==========================================================================
   Графики
   ========================================================================== */
.chart { width: 100%; display: block; }

/* ==========================================================================
   Таб-бар — плавающий «остров» с жёлтой подсветкой
   ========================================================================== */
.tabbar {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: min(432px, calc(100% - 24px));
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-radius: 26px; box-shadow: 0 10px 34px rgba(10,10,16,.18);
  display: flex; padding: 7px; z-index: 50;
  border: 1px solid rgba(255,255,255,.7);
}
.tab {
  flex: 1; position: relative; border: none; background: none; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: 18px; color: var(--ink-3);
  cursor: pointer; z-index: 1;
  transition: color .25s ease;
}
.tab::before {
  content: ""; position: absolute; inset: 2px 3px; border-radius: 17px;
  background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep));
  box-shadow: 0 4px 14px -2px rgba(255,190,0,.55);
  opacity: 0; transform: scale(.7);
  transition: opacity .28s var(--out), transform .34s var(--spring);
  z-index: -1;
}
.tab svg { width: 21px; height: 21px; transition: transform .28s var(--spring); }
.tab-label { font-size: 10px; font-weight: 700; letter-spacing: -.1px; }
.tab.active { color: var(--ink); }
.tab.active::before { opacity: 1; transform: scale(1); }
.tab.active svg { transform: translateY(-1px) scale(1.08); }

/* ==========================================================================
   Тост
   ========================================================================== */
.toast {
  position: fixed; bottom: 104px; left: 50%; transform: translate(-50%, 18px) scale(.92);
  background: rgba(14,14,18,.94); color: #fff; padding: 13px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; z-index: 99;
  transition: all .3s var(--spring); box-shadow: 0 10px 30px rgba(10,10,16,.35);
  max-width: 90%; text-align: center;
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

::-webkit-scrollbar { width: 0; height: 0; }


/* ==========================================================================
   Заставка DriveMoney
   ========================================================================== */
#splash {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(160deg, #1a1408 0%, #0b0b0f 70%);
  transition: opacity .45s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
#splash img {
  width: 104px; height: 104px; border-radius: 26px;
  box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,182,0,.18);
  animation: splashPop .6s var(--spring) both;
}
.splash-name { font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.6px; animation: rise .5s var(--out) .12s both; }
.splash-name span { color: var(--yellow); }
.splash-tag { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.45); letter-spacing: .4px; animation: rise .5s var(--out) .22s both; }
@keyframes splashPop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* Баннер-логотип в профиле */
.brand-banner { display: block; width: 230px; max-width: 82%; margin: 2px auto 10px; }


/* ==========================================================================
   Подписка: тарифы, промокоды, рефералка
   ========================================================================== */
.sub-status { font-size: 14px; color: rgba(255,255,255,.85); padding: 4px 0 2px; }
.sub-status b { color: var(--yellow-hi); }
.sub-status.warn { color: #ff6b5e; }
.sub-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sub-plan {
  border: none; border-radius: 16px; padding: 13px 8px 11px; font-family: inherit;
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer; text-align: center;
}
.sub-plan span { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; }
.sub-plan b { display: block; font-size: 19px; color: var(--yellow-hi); margin-top: 3px; letter-spacing: -.4px; }
.sub-note { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 12px; line-height: 1.5; }

.promo-row { display: flex; gap: 10px; }
.promo-row input {
  flex: 1; min-width: 0; padding: 13px 15px; border: 1.5px solid transparent; border-radius: 14px;
  background: #f1f1f4; font-size: 15px; font-family: inherit; outline: none; text-transform: uppercase;
  transition: border-color .2s ease, box-shadow .25s ease, background .25s ease;
}
.promo-row input:focus { background: #fff; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,176,0,.2); }
.promo-row .btn { width: auto; margin: 0; padding: 13px 20px; font-size: 14px; }

.ref-stats { text-align: center; font-size: 13px; color: var(--ink-2); font-weight: 600; margin: 2px 0 10px; }

/* ===== Пейволл ===== */
#paywall {
  position: fixed; inset: 0; z-index: 150; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, rgba(26,20,8,.97), rgba(11,11,15,.98));
}
#paywall.show { display: flex; animation: pageIn .3s ease both; }
.pw-box { width: 100%; max-width: 400px; max-height: 94vh; overflow-y: auto; text-align: center; color: #fff; padding: 8px 0; }
.pw-logo { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(255,182,0,.2); }
.pw-title { font-size: 26px; font-weight: 700; margin-top: 14px; letter-spacing: -.5px; }
.pw-title span { color: var(--yellow); }
.pw-status { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 8px; line-height: 1.55; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 16px; }
.pw-plan {
  position: relative; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 18px 10px 14px; color: #fff; font-family: inherit; cursor: pointer;
}
.pw-plan.featured { background: linear-gradient(160deg, rgba(255,198,26,.22), rgba(255,176,0,.08)); border-color: rgba(255,198,26,.55); }
.pw-plan-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.65); }
.pw-plan-price { font-size: 24px; font-weight: 700; margin-top: 4px; color: var(--yellow-hi); letter-spacing: -.5px; }
.pw-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep));
  color: var(--ink); font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .5px;
  white-space: nowrap;
}
.pw-promo { display: flex; gap: 8px; margin-bottom: 16px; }
.pw-promo input {
  flex: 1; min-width: 0; padding: 13px 15px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07);
  color: #fff; font-size: 15px; font-family: inherit; outline: none; text-transform: uppercase;
}
.pw-promo input::placeholder { color: rgba(255,255,255,.3); }
.pw-promo input:focus { border-color: var(--yellow); }
.pw-promo button {
  border: none; border-radius: 14px; padding: 0 20px; font-family: inherit; font-weight: 700; font-size: 14px;
  background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep)); color: var(--ink); cursor: pointer;
}
.pw-ref { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 14px; }
.pw-ref-title { font-size: 14px; color: rgba(255,255,255,.85); }
.pw-ref-title b { color: var(--yellow-hi); }
.pw-ref .btn { margin: 12px 0 8px; }
.pw-ref-count { font-size: 12px; color: rgba(255,255,255,.5); }
.pw-note { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 16px; line-height: 1.6; }


/* ==========================================================================
   Переключатели (iOS-style switch)
   ========================================================================== */
.switch-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.switch-row:last-child { border-bottom: none; }
.switch { position: relative; width: 48px; height: 29px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px; background: #e4e4e8;
  transition: background .25s ease; pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.22);
  transition: transform .28s var(--spring);
}
.switch input:checked + i { background: linear-gradient(160deg, var(--yellow-hi), var(--yellow-deep)); }
.switch input:checked + i::after { transform: translateX(19px); }


/* ==========================================================================
   Заглушка: приложение работает только внутри Телеграма
   ========================================================================== */
#tg-gate {
  position: fixed; inset: 0; z-index: 180; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(160deg, #1a1408 0%, #0b0b0f 70%);
}
#tg-gate.show { display: flex; animation: pageIn .3s ease both; }
.tg-gate-box { text-align: center; color: #fff; max-width: 360px; }
.tg-gate-box img {
  width: 96px; height: 96px; border-radius: 24px;
  box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,182,0,.18);
  animation: splashPop .6s var(--spring) both;
}
.tg-gate-title { font-size: 30px; font-weight: 700; margin-top: 16px; letter-spacing: -.5px; }
.tg-gate-title span { color: var(--yellow); }
.tg-gate-text { color: rgba(255,255,255,.6); font-size: 15px; margin: 10px 0 22px; line-height: 1.55; }
.tg-gate-box .btn { text-decoration: none; margin-bottom: 0; }
.tg-gate-note { margin-top: 14px; color: rgba(255,255,255,.4); font-size: 13px; font-weight: 600; letter-spacing: .5px; }
