/* simEsim — дизайн-система. Без сборки: CSS-переменные + утилиты + компоненты. Mobile-first. */

:root {
  --navy: #12163f;
  --navy-700: #1c2260;
  --navy-100: #e9ebf7;
  --mint: #34d399;
  --mint-100: #d9f7ea;
  --mint-200: #b7efd4;
  /* сине-серые (палитра «мятная + сине-серые»): нейтральные поверхности, инфо-плашки, тёмный подвал.
     slate-400 — только для линий, рамок и декора: на белом контраст 3:1, текстом им не писать */
  --slate-100: #dce8f2;
  --slate-400: #8099ad;
  --slate-800: #273849;
  --slate-50: #e3edf5; /* 80 % slate-100 — подложка полосы выбора типа: заметна, но без резкого края */
  --cream: #f6f4ee;
  --bg: #f4f8fb; /* светлый сине-серый оттенок (30 % slate-100): белые карточки на нём читаются чётче */
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --info-bg: var(--slate-100);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); background: var(--navy-100); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.mono { font-family: var(--mono); font-size: .92em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 720px; }
.section { padding: 2.5rem 0; }
@media (min-width: 768px) { .section { padding: 4rem 0; } }
.section-title { margin-bottom: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: .5rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--navy); letter-spacing: -.02em; display: flex; align-items: center; gap: .4rem; }
.logo span { color: var(--mint); }
.nav { display: none; gap: 1.25rem; align-items: center; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--navy-700); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.burger { display: inline-flex; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: 1.1rem; cursor: pointer; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: .5rem 1rem 1rem; }
.mobile-nav a { display: block; padding: .6rem 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); font-weight: 500; }
.mobile-nav.open { display: block; }
.nav-actions .btn-ghost, .nav-actions .btn-outline { display: none; }
@media (min-width: 900px) { .nav { display: flex; } .burger { display: none; } .mobile-nav.open { display: none; } .nav-actions .btn-ghost, .nav-actions .btn-outline { display: inline-flex; } }
.announce { background: var(--slate-800); color: #fff; text-align: center; font-size: .9rem; padding: .45rem 1rem; }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; line-height: 1.2; transition: transform .08s, box-shadow .15s, background .15s; font-family: inherit; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn-accent { background: var(--mint); color: var(--navy); }
.btn-accent:hover { background: #2fc48e; }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy-100); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy-100); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card-hover { transition: box-shadow .15s, transform .15s; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--slate-400); }
.card-link { text-decoration: none; color: inherit; display: block; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* hero */
.hero { background: linear-gradient(180deg, var(--mint-100) 0%, var(--bg) 100%); padding: 2.5rem 0 2rem; }
@media (min-width: 768px) { .hero { padding: 4rem 0 2.5rem; } }
.section-tight { padding-top: 1.75rem; }
@media (min-width: 768px) { .section-tight { padding-top: 2.25rem; } }
.hero h1 { max-width: 760px; }
/* главная: заголовок слева, плитки преимуществ справа */
/* Тёмная шапка (главная, «eSIM с номером»): navy + мятное свечение справа сверху и сине-серое слева снизу.
   Текст: белый 17:1, вводный #c7cbe6 10.8:1, подписи плиток #b9c3d6 — всё на navy */
.hero-split { background: radial-gradient(900px 420px at 85% -10%, rgba(52, 211, 153, .30), transparent 60%), radial-gradient(700px 380px at -5% 110%, rgba(128, 153, 173, .35), transparent 60%), linear-gradient(180deg, var(--navy) 0%, var(--navy-700) 100%); color: #fff; }
.hero-split .hero-title, .hero-split h1 { color: #fff; }
.hero.hero-split .lead { color: #c7cbe6; } /* выше по специфичности, чем .hero .lead ниже */
.hero-split .eyebrow { color: var(--mint-200); }
.hero-split .stat-card { background: rgba(255, 255, 255, .06); border-color: rgba(183, 239, 212, .25); color: #fff; box-shadow: none; }
.hero-split a.stat-card:hover { background: rgba(255, 255, 255, .1); box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.hero-split .stat-card .lbl { color: #b9c3d6; }
.hero-split .stat-card .ico { color: var(--mint); }
.hero-split .chip-outline { color: var(--mint-200); border-color: rgba(52, 211, 153, .55); background: rgba(255, 255, 255, .04); }
.hero-split .chip-outline:hover { background: rgba(52, 211, 153, .14); }
.hero-split .search input, .hero-split .search input[type=search] { border-color: transparent; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.hero-split .search input:focus { box-shadow: 0 0 0 4px rgba(52, 211, 153, .45); }
.hero-grid { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; } }
.hero-title { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: .45em; }
.hero-title .accent { display: block; background: linear-gradient(90deg, var(--mint) 0%, var(--mint-200) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-main .lead { margin-bottom: 1.4rem; }
.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.stat-card { display: flex; flex-direction: column; gap: .15rem; padding: 1.05rem 1.15rem 1.15rem; border-radius: 18px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(52, 211, 153, .35); box-shadow: 0 10px 30px rgba(18, 22, 63, .06); color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(18, 22, 63, .1); }
.stat-card .ico { color: #16a34a; margin-bottom: .55rem; line-height: 0; }
.stat-card .ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-card b { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.1; letter-spacing: -.015em; }
.stat-card .lbl { font-size: .84rem; color: var(--muted); line-height: 1.35; }
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip-outline { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem; border-radius: 999px; border: 1.5px solid #22c55e; color: #166534; background: rgba(255, 255, 255, .65); font-size: .84rem; font-weight: 600; text-decoration: none; }
.chip-outline svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chip-outline:hover { background: var(--ok-bg); }
@media (max-width: 420px) { .stat-card { padding: .9rem .95rem 1rem; } .stat-card .lbl { font-size: .8rem; } }
.hero .lead { font-size: 1.1rem; color: #334155; max-width: 640px; }
.search { position: relative; max-width: 620px; }
.search input, .search input[type=search] { width: 100%; padding: 1rem 1.1rem 1rem 3.3rem; border-radius: 999px; border: 2px solid var(--navy); font-size: 1.05rem; background: #fff; font-family: inherit; }
.search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(18, 22, 63, .12); }
.search .icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; pointer-events: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 30; overflow: hidden; }
.search-results:empty { display: none; }
.search-results a { display: flex; justify-content: space-between; padding: .75rem 1rem; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--navy-100); }
.search-results .empty { padding: .75rem 1rem; color: var(--muted); }

/* trust bar */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust > * { color: var(--text); background: #fff; border: 1.5px solid var(--mint-200); border-radius: var(--radius-sm); padding: .75rem .9rem; font-size: .92rem; font-weight: 700; display: flex; gap: .55rem; align-items: center; box-shadow: 0 2px 10px rgba(18,22,63,.04); }
.trust > * .em { font-size: 1.25rem; line-height: 1; flex: none; }
.trust a:hover { border-color: var(--mint); }

/* country cards */
.country-card { display: flex; align-items: center; gap: .9rem; padding: 1rem; }
.country-card .flag { line-height: 1; display: inline-flex; flex: none; }
.country-card .name { font-weight: 600; }
.country-card .from { color: var(--muted); font-size: .9rem; }
.country-list a { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.country-list a:hover { background: var(--navy-100); }
.country-list .flag { margin-right: .5rem; }

/* packages */

/* badges & status */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--navy-100); color: var(--navy); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: #166534; }
.badge-warn { background: var(--warn-bg); color: #92400e; }
.badge-bad { background: var(--bad-bg); color: #991b1b; }
.badge-info { background: var(--slate-100); color: var(--slate-800); }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.badge-mint { background: var(--mint-100); color: #065f46; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #cbd5e1; }
.dot-ok { background: var(--ok); } .dot-unstable { background: var(--warn); } .dot-fail { background: var(--bad); } .dot-unknown { background: #cbd5e1; }

/* progress */
.progress { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--mint); border-radius: 999px; }
.progress.low > span { background: var(--warn); }
.progress.empty > span { background: var(--bad); }

/* forms */
.form { display: grid; gap: 1rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.input, input[type=text], input[type=email], input[type=number], input[type=search], input[type=tel], textarea, select { width: 100%; padding: .7rem .9rem; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; background: #fff; color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: var(--slate-400); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 22, 63, .12); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.check input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.help { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.field-error { color: var(--bad); font-size: .85rem; }
.code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-family: var(--mono); }
.inline-form { display: inline; }

/* alerts / flash */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; font-size: .95rem; }
.site-banner { margin-bottom: 1.5rem; } /* баннер на главной (Настройки) — над шапкой с плитками */
.site-banner .alert { margin-bottom: 0; box-shadow: 0 10px 30px rgba(18, 22, 63, .06); }
.alert-info { background: var(--slate-100); border-color: rgba(128, 153, 173, .45); color: var(--slate-800); }
.alert-success { background: var(--ok-bg); border-color: #bbf7d0; color: #14532d; }
.alert-error { background: var(--bad-bg); border-color: #fecaca; color: #7f1d1d; }
.alert-warn { background: var(--warn-bg); border-color: #fde68a; color: #78350f; }
.flashes { position: sticky; top: 64px; z-index: 40; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--slate-100); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-800); }
.table tr:hover td { background: #fafbff; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step { position: relative; padding-left: 3.2rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--mint); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; }
@media (min-width: 768px) { .steps.horizontal { grid-template-columns: repeat(3, 1fr); } .steps.horizontal .step { padding-left: 0; padding-top: 3rem; } .steps.horizontal .step::before { top: 0; } }
/* шаги с иллюстрацией телефона (страница «Как установить») */
.steps-shots { gap: 1.25rem; }
.steps-shots .step { display: grid; grid-template-columns: 1fr; gap: .75rem; align-items: start; }
.steps-shots .shot { margin: 0; justify-self: center; }
.steps-shots .shot img { width: 150px; height: auto; border-radius: 22px; box-shadow: var(--shadow); background: #fff; }
@media (min-width: 640px) { .steps-shots .step { grid-template-columns: 1fr 150px; } .steps-shots .shot { justify-self: end; } }

/* feature rows */
.feature { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 768px) { .feature { grid-template-columns: 1fr 1fr; gap: 3rem; } .feature.reverse > :first-child { order: 2; } }
.illustration { background: var(--navy-100); border-radius: var(--radius); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.illustration.mint { background: linear-gradient(135deg, var(--mint-100) 0%, var(--mint-200) 100%); }
.illustration.cream { background: var(--cream); }
.illustration.slate { background: linear-gradient(135deg, #eef4f9 0%, var(--slate-100) 100%); }

/* accordion */
details.faq { border-bottom: 1px solid var(--line); padding: .8rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq .answer { padding-top: .6rem; color: #334155; }

/* CTA band */
.band { background: radial-gradient(520px 220px at 88% 0%, rgba(52, 211, 153, .28), transparent 70%), radial-gradient(420px 200px at 8% 100%, rgba(128, 153, 173, .3), transparent 70%), var(--navy); color: #fff; border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; }
.band h2 { color: #fff; }
.band .muted { color: #c7cbe6; }
.partner { background: var(--mint-100); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; align-items: center; }
@media (min-width: 768px) { .partner { grid-template-columns: 1fr auto; } }
.partner .btn { white-space: normal; text-align: center; max-width: 100%; }

/* footer — тёмный сине-серый, вместе с тёмной шапкой обрамляет страницу: текст slate-100 9.6:1, заголовки mint-200 9.3:1 */
.site-footer { background: var(--slate-800); color: var(--slate-100); padding: 2.5rem 0 2rem; margin-top: 3rem; font-size: .92rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mint-200); margin-bottom: .6rem; }
.site-footer a { display: block; text-decoration: none; color: var(--slate-100); padding: .2rem 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo { color: #fff; }
.site-footer .muted { color: #c3d1de; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(128, 153, 173, .35); color: #c3d1de; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* account layout */
.account { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .account { grid-template-columns: 220px 1fr; } }
.side-nav { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .25rem; }
@media (min-width: 900px) { .side-nav { flex-direction: column; overflow: visible; position: sticky; top: 76px; } }
.side-nav a { text-decoration: none; color: var(--text); padding: .55rem .8rem; border-radius: var(--radius-sm); white-space: nowrap; font-weight: 500; }
.side-nav a.active, .side-nav a:hover { background: var(--navy-100); color: var(--navy); }
.esim-card { display: grid; gap: .75rem; }
.esim-card .head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.esim-card .country { font-size: 1.15rem; font-weight: 700; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: inline-block; }
.qr-box img { width: 220px; height: 220px; }
.kv { display: grid; grid-template-columns: 1fr; gap: .35rem .75rem; font-size: .95rem; }
@media (min-width: 640px) { .kv { grid-template-columns: max-content 1fr; } }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .15rem .5rem; font-size: .8rem; margin-left: .4rem; font-family: inherit; }
.copy:hover { background: var(--navy-100); }

/* monitoring matrix */
.mon-table td, .mon-table th { text-align: center; }
.mon-table td:first-child, .mon-table th:first-child { text-align: left; }
.mon-cell { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 84px; }
.mon-cell .badge { font-size: .72rem; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* admin */
.admin-nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-nav a { text-decoration: none; padding: .4rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.admin-nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat .num { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.msg { border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: .75rem; max-width: 80%; }
.msg-user { background: var(--slate-100); }
.msg-admin { background: var(--mint-100); margin-left: auto; }
.msg .who { font-size: .78rem; color: var(--muted); margin-bottom: .2rem; }

/* misc */
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #cbd5e1; border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.print-only { display: none; }
@media print { .site-header, .site-footer, .no-print { display: none !important; } .print-only { display: block; } }

/* Флаги: SVG-картинки (эмодзи-флаги на Windows показываются буквами) */
.flag-img { display: inline-block; vertical-align: -0.2em; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); object-fit: cover; }
.flag-emoji { display: inline-block; line-height: 1; vertical-align: -0.1em; }
.flag-xs { width: 20px; height: 15px; font-size: 1rem; }
.flag-sm { width: 24px; height: 18px; font-size: 1.2rem; }
.flag-md { width: 32px; height: 24px; font-size: 1.6rem; }
.flag-lg { width: 40px; height: 30px; font-size: 2rem; }
.flag-xl { width: 56px; height: 42px; font-size: 2.8rem; }

/* Направления: компактные карточки и живой фильтр */
.catalog-toolbar { position: sticky; top: var(--header-h, 60px); z-index: 20; background: var(--bg, #f8fafc); padding: .5rem 0 .75rem; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.catalog-toolbar .search { max-width: 520px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: .3rem .75rem; font-size: .85rem; font-family: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; line-height: 1.2; }
.chip:hover { border-color: var(--navy); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.catalog-popular { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .25rem 0 1rem; }
.catalog-region-title { font-size: 1.15rem; margin: 1.25rem 0 .6rem; display: flex; align-items: baseline; gap: .5rem; }
.catalog-grid { gap: .6rem; }
.country-card.compact { padding: .6rem .75rem; gap: .65rem; }
.country-card.compact .name { font-size: .95rem; display: block; line-height: 1.25; }
.country-card.compact .from { font-size: .8rem; display: block; }
.country-card.compact .grow { min-width: 0; }
[hidden] { display: none !important; }

/* Мониторинг: панель фильтров */
.mon-toolbar { position: sticky; top: var(--header-h, 60px); z-index: 20; background: var(--bg, #f8fafc); padding: .5rem 0 .75rem; }
.mon-toolbar .search { max-width: 420px; }
.mon-table tr[hidden] { display: none; }
.mon-cat[hidden] { display: none; }

/* карточка докупки (кабинет) */
.pkg { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; }
.pkg .data { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.pkg .meta { color: var(--muted); font-size: .9rem; }
.pkg .price { font-size: 1.25rem; font-weight: 800; text-align: right; }
.pkg .price small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.pkg .actions { grid-column: 1 / -1; }
.pkg .actions select { width: auto; padding: .35rem .5rem; margin-left: .4rem; }

/* Страница страны: карточки объёма с выбором срока и модальное окно заказа */
:root { --header-h: 60px; }
.tier-grid { gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .tier-grid { grid-template-columns: repeat(3, 1fr); } }
.tier { position: relative; min-width: 0; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.tier.highlight { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-100); }
.tier-badge { position: absolute; top: -.7rem; left: .9rem; background: var(--mint); color: var(--navy); font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.tier-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.tier-head .data { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.tier-head .price { font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.tier-select { display: block; }
.tier-select select { width: 100%; min-width: 0; padding: .45rem .6rem; font-size: .9rem; margin-top: .15rem; }
.tier-meta { min-height: 1.1em; }
.guide-card ol, .guide-card ul { padding-left: 1.3rem; } .guide-card p { margin: 0 0 .6em; }
.tier-eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #047857; margin-bottom: .1rem; }
.tier-term { font-size: .92rem; padding: .2rem 0; }
.tier [data-tier-choose] { margin-top: auto; }
.tier-grid-featured .tier-head .data { font-size: 1.6rem; }
.tier-grid-featured .tier-head .price { font-size: 1.3rem; }
@media (min-width: 900px) { .tier-grid-featured { grid-template-columns: repeat(3, 1fr); } }
.tier-hk { color: #b45309; font-weight: 600; cursor: help; }
/* переключатель «Нужен IP не из Гонконга» */
.ip-toggle { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); line-height: 1.4; scroll-margin-top: calc(var(--header-h) + 1rem); }
.ip-toggle:hover { border-color: var(--navy); }
.ip-toggle .small { display: block; }
.ip-toggle .switch { flex: none; position: relative; width: 40px; height: 22px; margin-top: .1rem; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.ip-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.ip-toggle.on { border-color: var(--mint); background: var(--mint-100); }
.ip-toggle.on .switch { background: #059669; }
.ip-toggle.on .switch::after { left: 21px; }
/* регион: выбор набора стран */
.cover-picker { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.cover-picker .chips { margin-top: .5rem; }
.cover-list summary { cursor: pointer; }
/* сценарии поездки: заметная панель с плитками */
.trip-picker { background: linear-gradient(180deg, var(--mint-100) 0%, #fff 100%); border: 1.5px solid var(--mint-200); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.trip-picker-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; }
.trip-picker-head h2 { font-size: 1.3rem; }
.trip-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.trip-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .65rem .8rem; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); line-height: 1.25; box-shadow: 0 2px 8px rgba(18, 22, 63, .04); transition: border-color .15s, box-shadow .15s; }
.trip-tile .ico { font-size: 1.4rem; line-height: 1; margin-bottom: .25rem; }
.trip-tile b { font-size: .95rem; }
.trip-tile .tiny { color: var(--muted); }
.trip-tile:hover { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-100); }
.trip-tile.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.trip-tile.active .tiny { color: rgba(255, 255, 255, .75); }
.trip-picker [data-plan-fallback] { color: var(--warn); }
@media (max-width: 760px) { .trip-tiles { grid-template-columns: repeat(2, 1fr); } .trip-tile:first-child { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: .5rem; } .trip-tile:first-child .ico { margin: 0; } }
.tier.plan-best { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-100); }
.tier-badge-plan { background: var(--navy); color: #fff; }
.plan-tiles .card { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: inherit; }
.plan-tiles .card .icon { font-size: 1.6rem; }
.plan-tiles .card .name { font-weight: 700; font-size: 1.05rem; }
.plan-tiles .card .short { color: var(--muted); font-size: .85rem; }
/* узкие экраны: одна колонка, но карточка компактная — срок и кнопка в одной строке */
@media (max-width: 479px) {
  .tier-grid { grid-template-columns: 1fr; }
  .tier { display: grid; grid-template-columns: 1fr auto; gap: .4rem .6rem; align-items: center; padding: .8rem .9rem; }
  .tier-head { grid-column: 1 / -1; grid-row: 1; }
  .tier-select { grid-column: 1; grid-row: 2; }
  .tier [data-tier-choose] { grid-column: 2; grid-row: 2; width: auto; align-self: end; }
  .tier-meta { grid-column: 1 / -1; grid-row: 3; }
}
.modal { border: 0; border-radius: var(--radius); padding: 0; max-width: min(92vw, 440px); width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(18, 22, 63, .45); backdrop-filter: blur(2px); }
.modal-card { position: relative; padding: 1.25rem 1.25rem 1.1rem; margin: 0; }
.modal-card .kv { grid-template-columns: max-content 1fr; }
.modal-close { position: absolute; top: .6rem; right: .6rem; border: 0; background: var(--navy-100, #eef0f7); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .9rem; color: var(--navy); }

/* --- пошаговый мастер оформления номера --- */
.wizard { padding: 1.25rem; }
.wizard-head { margin-bottom: .75rem; }
.wizard-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: .4rem; }
.wizard-bar > span { display: block; height: 100%; background: var(--mint, #10b981); border-radius: 999px; transition: width .3s; }
.wizard-nav { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .85rem; color: var(--muted); }
.wizard-nav li { display: flex; align-items: center; gap: .35rem; }
.wizard-nav .n { display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--line); font-size: .75rem; font-weight: 700; color: var(--text); }
.wizard-nav li.is-done { color: var(--text); }
.wizard-nav li.is-done .n { background: var(--mint-100); color: #065f46; }
.wizard-nav li.is-current { color: var(--text); font-weight: 600; }
.wizard-nav li.is-current .n { background: var(--navy, #12163f); color: #fff; }
.wizard-step h2 { margin: .25rem 0 .5rem; font-size: 1.35rem; }
.wizard-step .prose p { margin: 0 0 .6rem; }
.wizard-code { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin: .75rem 0; padding: .9rem; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.wizard-code .qr-box { padding: .5rem; }
.wizard-code .qr-box img { width: 240px; height: 240px; display: block; }
.wizard-code-text { font-size: .95rem; word-break: break-all; }
.wizard-actions { margin-top: 1rem; display: grid; gap: .75rem; }
.wizard-actions .flex.wrap { flex-wrap: wrap; gap: .5rem; }
.wizard-stuck { border-top: 1px solid var(--line); padding-top: .6rem; }
.wizard-stuck > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.wizard-tips { background: var(--warn-bg); border-radius: 10px; padding: .6rem .8rem; margin-top: .5rem; color: #78350f; }
.wizard-tips ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.wizard-number { display: flex; gap: .5rem; flex-wrap: wrap; }
.wizard-number input { flex: 1 1 220px; font-size: 1.15rem; letter-spacing: .02em; }
.wizard-done h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.wizard-faq details { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; margin-bottom: .5rem; background: #fff; }
.wizard-faq summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.wizard-faq summary .n { display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--mint-100); color: #065f46; font-size: .75rem; font-weight: 700; }
.wizard-faq .prose { margin-top: .5rem; }
.number-how .step-num { width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy, #12163f); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .5rem; }
@media (max-width: 560px) {
  .wizard { padding: 1rem; }
  .wizard-code { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .wizard-code .qr-box img { width: min(280px, 72vw); height: auto; aspect-ratio: 1; }
  .wizard-actions .btn-lg { width: 100%; }
}

/* --- вкладки по стране на странице «eSIM с номером» (плитки как «С чего начать?») --- */
.country-tabs { margin: .5rem 0 1.25rem; }
.country-tabs .tab { position: relative; display: flex; flex-direction: column; gap: .35rem; text-align: left; font-family: inherit; color: inherit; cursor: pointer; border: 2px solid var(--line); background: #fff; }
.country-tabs .tab .icon { line-height: 1; margin-bottom: .2rem; }
.country-tabs .tab .name { font-weight: 700; font-size: 1.05rem; }
.country-tabs .tab .short { color: var(--muted); font-size: .85rem; }
.country-tabs .tab .check { position: absolute; top: .8rem; right: .9rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--line); color: #fff; font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.country-tabs .tab.is-active { border-color: var(--navy); box-shadow: 0 8px 24px rgba(18,22,63,.10); }
.country-tabs .tab.is-active .check { background: var(--mint); color: #065f46; }
.country-tabs .tab-note { font-size: .75rem; font-weight: 600; color: #92400e; background: var(--warn-bg); border-radius: 999px; padding: .15rem .5rem; }
.pay-icon { width: 2.6rem; height: 2.6rem; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; line-height: 1; }
.pay-icon img { width: 2.6rem; height: 2.6rem; object-fit: contain; border-radius: 10px; } /* знак СБП и др.: квадратные файлы с фоном — скругляем, как плашки */
.pay-badge { width: 2.6rem; height: 2.6rem; border-radius: 10px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #5b57d1 0%, #1d1d8a 60%); }
.pay-badge.btc { background: #f7931a; font-size: 1.5rem; border-radius: 50%; }
/* мини-плитки «что входит / чем не является» — как «С чего начать?» */
.mini-tiles { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-top: .6rem; }
@media (min-width: 640px) { .mini-tiles { grid-template-columns: repeat(2, 1fr); } }
.mini-tile { border: 1.5px solid var(--mint-200); border-radius: var(--radius-sm); padding: .75rem .9rem; background: #fff; font-size: .88rem; color: var(--muted); }
.mini-tile .em { font-size: 1.3rem; line-height: 1; display: block; margin-bottom: .3rem; }
.mini-tile b { display: block; color: var(--text); margin-bottom: .15rem; }
.mini-tile.warn { border-color: #fcd34d; }
.op-compare { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .op-compare { grid-template-columns: repeat(2, 1fr); } }
.op-compare .net { display: inline-flex; gap: .35rem; flex-wrap: wrap; margin: .4rem 0; }
.op-compare .net span { font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--navy-100); color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.number-hero { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem; }
.number-hero h2 { margin: .25rem 0 .5rem; font-size: 1.45rem; }
.number-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .9rem; }
@media (min-width: 640px) { .number-badges { grid-template-columns: repeat(4, 1fr); } }
.number-badges .chip { background: #fff; border: 1.5px solid var(--mint-200); border-radius: var(--radius-sm); color: var(--text); font-weight: 700; font-size: .88rem; padding: .6rem .75rem; cursor: default; display: flex; align-items: center; gap: .5rem; line-height: 1.2; }
.number-badges .chip .em { font-size: 1.2rem; line-height: 1; flex: none; }
.number-price { background: var(--bg); border-radius: var(--radius); padding: 1rem 1.1rem; text-align: center; align-self: start; }
.number-price .price { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.number-price .btn { white-space: normal; }
.list { margin: .25rem 0 0; padding-left: 1.1rem; }
.list li { margin-bottom: .4rem; }
@media (min-width: 760px) { .number-hero { grid-template-columns: 1fr 220px; } }

/* --- «Мой мониторинг» --- */
.mon-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mon-number { font-size: 1.15rem; display: flex; align-items: center; gap: .4rem; }
.mon-list { display: flex; flex-direction: column; gap: .4rem; }
.mon-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.mon-row.is-marked { background: var(--mint-100); border-color: var(--mint-200); }
.mon-name { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.mon-icon { font-size: 1.25rem; width: 1.6rem; text-align: center; }
.mon-status { display: block; margin-top: .1rem; }
.mon-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.mon-btns { display: flex; gap: .35rem; flex-wrap: wrap; }
.mon-mine { font-weight: 600; }
.mon-group { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; margin-bottom: .5rem; background: #fff; }
.mon-group > summary { cursor: pointer; }
.mon-group .mon-list { margin-top: .6rem; }
.chip.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.quick-marks { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.quick-mark { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.quick-mark.is-marked { background: var(--mint-100); border-color: var(--mint-200); }
@media (max-width: 560px) { .mon-row { align-items: flex-start; } .mon-actions { width: 100%; } }

/* Инструкции: вкладки по ОС и скриншоты */
.os-tabs { margin: .6rem 0 .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.os-tabs-bar { display: flex; gap: .25rem; padding: .3rem; border-bottom: 1px solid var(--line); background: var(--bg, #f8fafc); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.os-tab { flex: 1 1 0; border: 0; background: transparent; padding: .5rem .75rem; border-radius: 6px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; }
.os-tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(18, 22, 63, .12); }
.os-tab:hover { color: var(--navy); }
.os-pane { padding: .75rem .9rem .2rem; }
.os-pane[hidden] { display: none; }
.guide-img { margin: .6rem 0 .9rem; }
.guide-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .9rem; }
.guide-btns .btn { text-decoration: none; }
.guide-img img { display: block; max-width: min(100%, 360px); height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 14px rgba(18, 22, 63, .08); }
.guide-img figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.wizard-number-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; background: var(--mint-100); border: 1px solid var(--mint-200); border-radius: 999px; padding: .3rem .4rem .3rem .8rem; margin: 0 0 .6rem; }
.stock-import { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; padding: .6rem .75rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fff; }
.stock-import [data-stock-decode-status] { flex-basis: 100%; }
.stock-rows { display: grid; gap: .4rem; margin-top: .6rem; }
.stock-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(130px, 1fr) minmax(0, 1.4fr) auto; gap: .4rem; align-items: center; }
.stock-row input { min-width: 0; padding: .35rem .5rem; font-size: .88rem; }
.stock-row input.mono { font-size: .8rem; }
.stock-row input.is-missing { border-color: var(--warn); background: var(--warn-bg); }
.stock-row-head { padding: 0 .1rem; }
@media (max-width: 700px) { .stock-row { grid-template-columns: 1fr auto; } .stock-row-head { display: none; } .stock-row [data-row-code] { grid-column: 1 / -1; } }
.stock-import [data-stock-decode-status]:empty { display: none; }

/* «Где номер принимает SMS за границей» (partials/roaming.html) */
.roam-search { margin: .75rem 0 .5rem; }
.roam-table td { font-size: .9rem; }
.roam-table .roam-country { font-weight: 600; }
@media (min-width: 561px) { .roam-table .roam-country { white-space: nowrap; } }
.roam-table .flag-img { vertical-align: -2px; margin-right: .2rem; }
.roam-ok { color: var(--ok); font-weight: 600; }
.roam-auto { font-weight: 500; }
.roam-maybe { color: var(--warn); }
.roam-no { color: var(--muted); }
.roam-tested { color: var(--muted); font-size: .8rem; font-weight: 400; cursor: help; }
.roam-empty { background: var(--warn-bg); color: #78350f; padding: .6rem .8rem; border-radius: 10px; margin: .5rem 0; }
.roam-sum h3 { font-size: 1rem; }
.op-compare .net-abroad { margin-top: 0; }
.op-compare .net-abroad span { background: var(--mint-100); color: #065f46; }
.wizard-roam { border-top: 1px solid var(--line); padding-top: .6rem; }
.wizard-roam > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 560px) { .roam-table th, .roam-table td { padding: .5rem .35rem; } .roam-table td { font-size: .82rem; } .roam-table:not(.roam-one) .roam-auto { display: none; } .roam-table .roam-tested { display: block; } }

/* Установка в один тап: на iPhone прячем Android-кнопку и наоборот (html[data-os] ставит app.js) */
html[data-os="ios"] [data-install-os="android"], html[data-os="android"] [data-install-os="ios"] { display: none !important; }

/* «eSIM с номером» — шапка в формате главной, общие блоки, карточки пакетов, сервисы по центру */
.number-top .hero-title { font-size: clamp(2rem, 4.6vw, 3rem); }
.stat-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; grid-auto-rows: auto; }
.stat-cards-3 .stat-card { height: auto; min-height: 0; overflow: visible; }
.stat-cards-3 .stat-card b { font-size: clamp(1rem, 1.5vw, 1.2rem); hyphens: auto; }
@media (min-width: 960px) { .number-top-3 .hero-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }
.stat-cards-3 .stat-card .lbl { font-size: .82rem; }
@media (max-width: 560px) { .stat-cards-3 { grid-template-columns: 1fr 1fr; } .stat-cards-3 .stat-card:last-child { grid-column: 1 / -1; } }
.number-price .btn-ghost { color: var(--navy); }
.op-compare .net, .op-single .net { align-items: center; }
.net-btn { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: var(--mint-100); color: #065f46; text-decoration: none; border: 1px solid var(--mint-200); }
.net-btn:hover { background: var(--mint-200); }
.op-single .net span { font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--navy-100); color: var(--navy); }
.op-single .net { display: inline-flex; gap: .35rem; flex-wrap: wrap; margin: .4rem 0; }
@media (min-width: 768px) { .mini-tiles-3 { grid-template-columns: repeat(3, 1fr); } }
/* карточки пакетов одной высоты, кнопки — по нижнему краю */
.pkg-number { grid-template-rows: 1fr auto; align-items: start; }
.pkg-number .price { align-self: start; }
.pkg-number .actions { display: grid; gap: .4rem; align-self: end; }
.pkg-soldout { text-align: center; font-size: .85rem; color: var(--warn); font-weight: 600; }
.number-common { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.roam-search { display: flex; align-items: center; gap: .5rem; max-width: 460px; }
.roam-search-ico { font-size: 1.1rem; line-height: 1; }
.roam-search input { flex: 1; }
.roam-sum-card h3 { font-size: 1rem; }
@media (min-width: 768px) and (max-width: 1023px) { .roam-sum.grid-3 { grid-template-columns: 1fr 1fr; } .roam-sum .roam-sum-card:last-child { grid-column: 1 / -1; } }

/* FAQ → раздел «eSIM с номером» */
.faq-steps { padding-left: 1.2rem; margin: .2rem 0 0; }
.faq-steps li { margin-bottom: .4rem; }
details.faq .answer .roam-sum { margin: .8rem 0; }
details.faq .answer .roam-sum-card { padding: .9rem 1rem; }
details.faq .answer .roam-sum-card h3 { font-size: .95rem; margin-bottom: .3rem; }
.narrow .roam-sum.grid-3 { grid-template-columns: 1fr; }

/* Админка → Склад: подсказка «как занести» */
.stock-howto h4 { font-size: .95rem; margin-bottom: .3rem; }
.stock-howto ol { padding-left: 1.1rem; margin: 0; }
.stock-howto li { margin-bottom: .35rem; }

/* ряд ссылок на вопросы FAQ под пакетами и ссылки в плитках */
.faq-links { margin: .6rem 0 0; line-height: 1.8; }
.faq-links a { color: var(--navy); text-decoration: none; border-bottom: 1px dashed currentColor; }
.mini-tile a { color: var(--navy); text-decoration: none; border-bottom: 1px dashed currentColor; white-space: nowrap; }

/* Пополнение номера: пресеты сумм и итог калькулятора */
#balance-presets .btn.is-active { background: var(--navy); color: #fff; }
#balance-presets .btn.is-active .muted { color: rgba(255,255,255,.75); }
.calc-box { background: var(--bg); box-shadow: none; }
/* карточка eSIM: вся карточка кликабельна через «растянутую» ссылку заголовка, кнопки действий — поверх неё */
.esim-card { position: relative; }
.esim-card-link { color: inherit; text-decoration: none; }
.esim-card-link::after { content: ""; position: absolute; inset: 0; }
.esim-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; z-index: 1; }
.esim-page-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .25rem 0 1rem; }

/* Главная: «Выберите свой тип eSIM» — сине-серая полоса сразу под тёмной шапкой (переход из тёмного в светлое),
   внизу уходит градиентом; тип читается сразу: мятные иконка, бейдж и полоска у интернета, сине-серые — у номера */
.esim-types { background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-50) 74%, rgba(227, 237, 245, 0) 100%); padding: 3.25rem 0 3.5rem; }
.esim-types h2 { color: var(--slate-800); margin-bottom: .35rem; }
.types-lead { color: var(--slate-800); margin-bottom: 1.4rem; max-width: 720px; }
.type-card { display: flex; flex-direction: column; border-color: rgba(128, 153, 173, .25); border-top-width: 4px; box-shadow: 0 14px 34px -22px rgba(39, 56, 73, .4); }
.type-card-data { border-top-color: var(--mint); }
.type-card-number { border-top-color: var(--slate-400); }
.type-card .type-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.type-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.type-ico { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; flex: none; }
.type-ico svg { width: 34px; height: 34px; }
.type-ico-data { background: var(--mint-100); color: #065f46; border: 1px solid var(--mint-200); }
.type-ico-number { background: var(--slate-100); color: var(--slate-800); border: 1px solid rgba(128, 153, 173, .4); }
.type-badge { display: inline-flex; align-items: center; padding: .42rem 1rem; border-radius: 999px; font-size: .92rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.type-data { background: var(--mint-100); color: #065f46; border: 1px solid var(--mint-200); }
.type-number { background: var(--slate-100); color: var(--slate-800); border: 1px solid rgba(128, 153, 173, .45); }

/* мягкие полосы-секции: цвет проявляется и уходит градиентом вместо жёсткой границы */
.soft-band-white { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 20%, #fff 80%, rgba(255, 255, 255, 0) 100%); }
.pay-disabled { opacity: .55; background: var(--bg); } /* способ оплаты недоступен для суммы заказа */

/* Админка → Настройки: разделы с оглавлением и поиском, переключатели, зависимые поля, закреплённая кнопка сохранения */
.settings-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin-bottom: 1.25rem; }
.settings-layout { display: grid; gap: 1.25rem; }
.settings-layout [hidden] { display: none !important; }
@media (min-width: 960px) {
  .settings-layout { grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
  .settings-nav { position: sticky; top: 1rem; }
}
.settings-nav input[type=search] { margin-bottom: .75rem; }
.settings-nav nav { display: flex; flex-direction: column; gap: .15rem; }
.settings-nav nav a { display: flex; gap: .55rem; align-items: center; padding: .45rem .7rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: .93rem; }
.settings-nav nav a:hover { background: var(--slate-50); }
.settings-nav nav a.active { background: var(--mint-100); color: #065f46; font-weight: 600; }
@media (max-width: 959px) {
  .settings-nav nav { flex-direction: row; flex-wrap: wrap; gap: .4rem; }
  .settings-nav nav a { border: 1px solid var(--line); background: #fff; padding: .35rem .65rem; font-size: .86rem; }
}
.settings-group { margin-bottom: 1.25rem; scroll-margin-top: 1rem; padding: 1.25rem 1.4rem 1.4rem; }
.settings-group-head { border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1.1rem; }
.settings-group-head h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.settings-grid { display: grid; gap: 1.1rem 1.25rem; align-items: start; }
@media (min-width: 720px) {
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .set-wide, .settings-sub { grid-column: 1 / -1; }
}
.settings-sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: .6rem 0 -.3rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.settings-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.set-field > label:not(.switch-row) { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.set-field .help { margin-top: .3rem; }
.set-dep { padding-left: 1rem; border-left: 2px solid var(--slate-100); transition: opacity .15s; }
.set-dep.is-off { opacity: .45; }
.switch-row { display: flex; gap: .85rem; align-items: flex-start; cursor: pointer; margin: 0; font-weight: 400; font-size: .95rem; }
.switch-text { display: flex; flex-direction: column; gap: .1rem; }
.switch-text b { font-weight: 600; font-size: .95rem; }
.switch-text .help { margin-top: 0; }
input.switch { -webkit-appearance: none; appearance: none; flex: none; width: 42px; height: 24px; margin: .05rem 0 0; border: 0; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
input.switch:checked { background: var(--mint); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 3px solid rgba(52, 211, 153, .45); outline-offset: 2px; }
.settings-savebar { position: sticky; bottom: .75rem; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: .75rem 1rem; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px -14px rgba(18, 22, 63, .3); }
#settings-dirty { color: #92400e; font-weight: 600; }
.settings-form.is-dirty .settings-savebar { border-color: var(--warn); }

/* --- мини-приложение Telegram (бот-магазин): без шапки и подвала, вкладки внизу --- */
body.app-mode { --header-h: 0px; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
body.app-mode main > .section:first-child, body.app-mode main > section:first-child { padding-top: 1rem; }
.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.app-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem 0 .5rem; font-size: .75rem; color: var(--muted, #64748b); text-decoration: none; }
.app-tabs a.active { color: var(--navy, #0f2a44); font-weight: 600; }
.app-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-start { text-align: center; padding: 3rem 0; }
.app-start .spinner { width: 28px; height: 28px; border-width: 3px; margin-bottom: .75rem; }

/* вкладки разделов в админке (Журнал: События · Мини-приложение) */
.admin-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: .25rem 0 1rem; flex-wrap: wrap; }
.admin-tabs a { padding: .5rem .9rem; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted, #64748b); font-weight: 600; text-decoration: none; }
.admin-tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }
.admin-tabs a:hover { color: var(--navy); }
