:root {
  --ink: #10243b;
  --ink-2: #3c516a;
  --muted: #6b7c90;
  --line: #dbe2ea;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #12395f;
  --brand-2: #1d5a92;
  --accent: #f0a500;
  --accent-ink: #3a2700;
  --ok: #138a52;
  --ok-bg: #e6f6ee;
  --warn: #b25b00;
  --warn-bg: #fff3df;
  --bad: #c0352b;
  --bad-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 36, 59, .06), 0 4px 16px rgba(16, 36, 59, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--brand); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.logo { font-weight: 800; letter-spacing: .02em; font-size: 1.1rem; color: #fff; text-decoration: none; }
.logo small { display: block; font-weight: 500; letter-spacing: 0; font-size: .72rem; opacity: .75; }
.langs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.langs a { color: #fff; text-decoration: none; font-size: .85rem; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); }
.langs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* hero */
.hero { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 22px 0 28px; }
.hero h1 { font-size: 1.7rem; }
.hero p { opacity: .92; }
.hero .partner { display: inline-block; background: rgba(255,255,255,.12); border-radius: 10px; padding: 8px 12px; font-size: .9rem; opacity: 1; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.fact { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; }
.fact b { display: block; font-size: 1.05rem; }
.fact span { font-size: .8rem; opacity: .8; }

/* cards / sections */
main { padding: 18px 0 40px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.section-title { margin: 22px 0 10px; }
.vac h3 { margin-bottom: 2px; }
.vac .country { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.vac .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pill { display: inline-block; font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.note { font-size: .9rem; color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 12px 44px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-decoration: none; text-align: center; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--brand); color: #fff; }
.btn-line { background: transparent; color: var(--brand); border: 2px solid var(--line); }
.btn-tg { background: #229ed9; color: #fff; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-row { display: grid; gap: 10px; }
.btn-row.two { grid-template-columns: 1fr 1fr; }
.btn-sm { min-height: 40px; font-size: .92rem; padding: 8px 12px; width: auto; }
.stick { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 16px 0 12px; }

/* forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .req { color: var(--bad); font-weight: 500; font-size: .8rem; }
input, select, textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(29, 90, 146, .2); border-color: var(--brand-2); }
textarea { min-height: 90px; resize: vertical; }
.err input, .err select { border-color: var(--bad); }
.err-text { color: var(--bad); font-size: .88rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.alert.ok { background: var(--ok-bg); color: #0b5b36; }
.alert.warn { background: var(--warn-bg); color: #7a3e00; }
.alert.bad { background: var(--bad-bg); color: #7d1f18; }
.passport-box { border: 2px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.passport-box img { max-width: 100%; max-height: 180px; border-radius: 8px; margin-top: 10px; }
.code-input { font-size: 2rem; text-align: center; letter-spacing: .4em; font-weight: 800; }

/* personal page */
.me-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.me-num { text-align: center; background: var(--brand); color: #fff; border-radius: 12px; padding: 6px 14px; }
.me-num b { display: block; font-size: 1.6rem; line-height: 1.1; }
.me-num span { font-size: .72rem; opacity: .8; }
.status { text-align: center; padding: 22px 16px; }
.status .big { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.status .pos { font-size: 3.4rem; font-weight: 900; line-height: 1; color: var(--brand); margin: 8px 0; }
.status.arrived { background: var(--ok-bg); }
.status.room { background: #e9f1fb; }
.status.turn { background: var(--accent); color: var(--accent-ink); animation: pulse 1s ease-in-out infinite alternate; }
.status.turn .big { font-size: 2.2rem; }
.status.done { background: var(--ok-bg); }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.02); } }
.mini-stats { display: flex; justify-content: center; gap: 18px; margin-top: 10px; color: var(--ink-2); font-size: .9rem; }
.mini-stats b { font-size: 1.1rem; color: var(--ink); }
.net { position: fixed; top: 0; left: 0; right: 0; background: var(--warn); color: #fff; text-align: center; font-size: .85rem; padding: 4px; display: none; z-index: 10; }
.net.on { display: block; }
.hidden { display: none !important; }

footer { color: var(--muted); font-size: .82rem; text-align: center; padding: 10px 0 30px; }

@media (max-width: 360px) {
  .row2, .facts { grid-template-columns: 1fr; }
  .btn-row.two { grid-template-columns: 1fr; }
}
