/* Кабинет VagonERA — мир баннеров бота: тёмно-синий, билет с перфорацией, Manrope. Спокойно, крупно, для пальца. */
@font-face { font-family: Manrope; src: url("fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  --ground: #0b1633; --sheet: #0f1e4a; --sheet-2: #142659; --line: rgba(199, 215, 245, .16);
  --ink: #eef4ff; --ink-2: #c7d7f5; --muted: #a9bce4;
  --brand: #3b82f6; --sky: #60a5fa; --action: #2563eb; --action-hi: #1d4fd8;
  --orange: #f97316; --red: #f87171;
  --radius: 16px; --stub: 6.5rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--sheet-2) var(--ground); }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink);
  font: 500 16px/1.5 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; caret-color: var(--sky); -webkit-tap-highlight-color: transparent;
}
/* свечение баннеров, приглушённое: фон, а не событие */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 0% 0%, rgba(249, 115, 22, .13), transparent 70%),
    radial-gradient(55vmax 50vmax at 100% 100%, rgba(59, 130, 246, .22), transparent 70%),
    radial-gradient(40vmax 35vmax at 60% 70%, rgba(124, 58, 237, .10), transparent 70%);
}
::selection { background: rgba(96, 165, 250, .35); color: var(--ink); }
main { max-width: 32rem; margin: 0 auto; padding: 1.25rem 1rem calc(2rem + env(safe-area-inset-bottom)); }
.glow { position: relative; }
.glow::before {
  content: ""; position: absolute; inset: -1.5rem -1rem; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 60% at 8% 25%, rgba(249, 115, 22, .32), transparent 70%),
    radial-gradient(40% 55% at 60% 95%, rgba(124, 58, 237, .26), transparent 70%),
    radial-gradient(35% 60% at 95% 40%, rgba(59, 130, 246, .28), transparent 70%);
}

h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: .25rem 0 1rem; text-wrap: balance; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; display: flex; gap: .65rem; align-items: center; }
p { margin: .25rem 0 .5rem; }
strong { font-weight: 700; }
.muted { color: var(--muted); }
.warn { color: var(--orange); }
.bad { color: var(--red); }
code { word-break: break-all; font-size: .85rem; color: var(--ink-2); }

/* --- шапка главной --- */
.top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.top h1 { margin: 0; }
.hello { color: var(--muted); font-size: .95rem; }

/* --- билет: фирменный ход. Вырезы — маска, сквозь них виден фон --- */
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr var(--stub); min-height: 11.5rem;
  /* стекло билета, как на баннерах: свечение за ним просвечивает */
  background: linear-gradient(135deg, rgba(37, 64, 140, .42) 0%, rgba(15, 30, 74, .5) 65%);
  -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(199, 215, 245, .22);
  border-radius: 20px; margin: 0 0 1rem; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  --cut: calc(100% - var(--stub));
  -webkit-mask: radial-gradient(circle at var(--cut) 0, transparent 13px, #000 13.5px) top / 100% 51% no-repeat,
                radial-gradient(circle at var(--cut) 100%, transparent 13px, #000 13.5px) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at var(--cut) 0, transparent 13px, #000 13.5px) top / 100% 51% no-repeat,
        radial-gradient(circle at var(--cut) 100%, transparent 13px, #000 13.5px) bottom / 100% 51% no-repeat;
  animation: ticket-in .45s cubic-bezier(.16, 1, .3, 1);
}
@keyframes ticket-in { from { opacity: 0; transform: translateY(10px); } }
.ticket-main { padding: 1.15rem 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ticket-stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  border-left: 2px dotted rgba(199, 215, 245, .32); margin: 1rem 0; padding: 0 .5rem;
}
.ticket-stub svg { width: 2.9rem; height: auto; }
.word { font-weight: 800; font-size: .95rem; letter-spacing: -0.01em; }
.word span { color: var(--sky); }
.days { display: flex; align-items: baseline; gap: .45rem; line-height: 1; margin-top: .15rem; }
.days b { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; }
.days span { font-size: 1.2rem; font-weight: 700; color: var(--ink-2); }
.until { color: var(--ink-2); font-weight: 600; }
.pill { align-self: flex-start; margin: .35rem 0 .1rem; padding: .2rem .65rem; border-radius: 999px;
  background: var(--orange); color: var(--ground); font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.ticket.expired .pill { background: var(--red); }
.ticket.expired .ticket-main { opacity: .92; }
.ticket.expired .days b { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink-2); }
.meter { height: 6px; border-radius: 3px; background: rgba(199, 215, 245, .14); overflow: hidden; margin: .75rem 0 .5rem; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--sky); }
.ticket.soon .meter > span { background: var(--orange); }
.meta { display: flex; align-items: center; gap: .45rem; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.meta svg { width: 1.1rem; height: 1.1rem; color: var(--muted); flex: none; }
.ticket.empty { background: transparent; border: 2px dashed rgba(199, 215, 245, .28); box-shadow: none; }
.ticket.empty .ticket-main { justify-content: center; }
.ticket.empty .title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

/* --- кнопки: крупные, для пальца --- */
button, .btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3.25rem;
  padding: .8rem 1rem; margin: .6rem 0 0; border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem; color: #fff; background: var(--action); text-align: center;
  text-decoration: none; transition: background-color .15s, transform .1s;
}
button:active { transform: scale(.985); background: var(--action-hi); }
button.ghost { background: var(--sheet); color: var(--ink); border: 1px solid var(--line); }
button.ghost:active { background: var(--sheet-2); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
button svg { width: 1.25rem; height: 1.25rem; flex: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.pair button { margin: 0; }
button.back { width: auto; min-height: 2.75rem; margin: 0 0 .25rem; padding: .4rem .25rem; background: none;
  color: var(--sky); font-weight: 700; justify-content: flex-start; }

/* --- список действий --- */
.list { margin: 1.25rem 0 0; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list button { margin: 0; min-height: 3.5rem; border-radius: 0; background: none; color: var(--ink); justify-content: flex-start;
  font-weight: 600; padding: .75rem 1rem; gap: .8rem; }
.list button + button { border-top: 1px solid var(--line); }
.list button:active { background: var(--sheet-2); transform: none; }
.list button svg { width: 1.3rem; height: 1.3rem; color: var(--sky); flex: none; }
.list button .chev { margin-left: auto; color: var(--muted); width: 1.1rem; }

/* --- карточки разделов --- */
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 .75rem; }
.note { margin: .75rem 0; }
.spaced { margin-top: 1.25rem; }

/* --- оплата --- */
.plans { display: grid; gap: .5rem; margin-bottom: .75rem; }
.plan { justify-content: space-between; margin: 0; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.plan strong { font-size: 1.1rem; }
.plan.on { background: var(--action); border-color: var(--action); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; }
.chip { width: auto; min-height: 2.75rem; margin: 0; padding: .5rem 1rem; border-radius: 999px; background: var(--sheet);
  color: var(--ink-2); border: 1px solid var(--line); font-weight: 600; }
.chip.on { background: var(--action); border-color: var(--action); color: #fff; }
.promo { display: flex; gap: .5rem; align-items: stretch; }
.promo input { flex: 1; min-width: 0; min-height: 3.25rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--line);
  background: var(--ground); color: var(--ink); font: inherit; font-weight: 600; }
.promo input::placeholder { color: var(--muted); opacity: .8; }
.promo input[placeholder="Промокод"] { text-transform: uppercase; }
.promo button { width: auto; margin: 0; padding: .8rem 1.1rem; }

/* --- результат действия: состояние цветом и словом --- */
.verdict { margin-top: .75rem; padding: .85rem 1rem; border-radius: 14px; background: var(--sheet-2); border: 1px solid var(--line); }
.verdict p { margin: .3rem 0 0; color: var(--ink-2); }
.verdict.working { border-color: rgba(96, 165, 250, .55); }
.verdict.added_off, .verdict.not_added { border-color: rgba(249, 115, 22, .55); }
.verdict.inactive, .verdict.no_sub { border-color: rgba(248, 113, 113, .55); }

/* --- устройства --- */
.device { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.device .muted { font-size: .9rem; }
button.small { width: auto; min-height: 2.75rem; margin: 0; padding: .5rem .9rem; }

/* --- мастер подключения --- */
.num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; font-size: .9rem; font-weight: 800; }
.step p { color: var(--ink-2); }
.step p.muted { color: var(--muted); }
.step button.ghost { margin-top: .5rem; }

@media (prefers-reduced-motion: reduce) {
  .ticket { animation: none; }
  button { transition: none; }
}
