/* ИЗИ ТАКСИ — приложение водителя (в стиле Яндекс Такси, цвета ИЗИ ТАКСИ) */
:root {
  --navy: #0F1E3D;
  --navy-2: #1A2B4F;
  --yellow: #EBD439;
  --yellow-2: #F4E99A;
  --yellow-soft: #FFF8D6;
  --bg: #F2F3F5;
  --map: #EEEBE4;
  --muted: #6B7280;
  --line: #EEEFF2;
  --green: #1F8A4C;
  --red: #A61B1B; --red-bg: #FDECEC;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--map); color: var(--navy); font-family: Inter, system-ui, sans-serif; font-size: 16px; overflow: hidden; }
#root { position: relative; height: 100%; max-width: 520px; margin: 0 auto; overflow: hidden; background: var(--map); }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1 { margin: 0; font-size: 26px; font-weight: 700; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }

/* Кнопки */
.btn { height: 56px; border: none; border-radius: 16px; background: var(--bg); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn.primary { background: var(--yellow); font-weight: 700; font-size: 18px; height: 62px; border-radius: 18px; }
.btn.dark { background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); height: 48px; }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn:disabled { opacity: .5; }
.round { width: 48px; height: 48px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.14); display: flex; align-items: center; justify-content: center; flex: none; }
.pill { min-width: 0; overflow: hidden; height: 40px; padding: 0 12px 0 6px; border-radius: 20px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.14); display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.pill .muted { font-weight: 500; font-size: 13px; }
.switch { white-space: nowrap; height: 40px; padding: 0 6px 0 12px; font-size: 13px !important; border-radius: 20px; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.14); display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.switch .knob { width: 28px; height: 28px; border-radius: 50%; background: #CBD2DA; }
.switch.on { background: var(--green); color: #fff; }
.switch.on .knob { background: #fff; }

/* Карта */
.map { position: absolute; inset: 0; background: var(--map); }
.map-fallback { position: absolute; inset: 0; overflow: hidden; }
.map-fallback svg { width: 100%; height: 100%; }
.topbar { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 5; }
.banner { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 14px; right: 14px; background: var(--navy); color: #fff; border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; z-index: 5; }
.banner b { font-size: 18px; }
.banner .sub { font-size: 14px; color: #C7CFDD; }

/* Нижняя панель */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -4px 16px rgba(0,0,0,.1); padding: 8px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; max-height: 78%; overflow-y: auto; z-index: 6; }
.grip { width: 36px; height: 4px; border-radius: 2px; background: #D9D9D9; align-self: center; flex: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price { font-size: 40px; font-weight: 700; letter-spacing: -.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { white-space: nowrap; background: var(--bg); padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.chip.y { background: var(--yellow-soft); }
.chip.dark { background: var(--navy); color: var(--yellow); }
.route { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.route div { display: flex; align-items: center; gap: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--navy); flex: none; }
.dot.b { border-color: var(--yellow); background: var(--navy); }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.act { border: none; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; font-size: 12px; text-decoration: none; color: var(--navy); }
.act span.ic { width: 56px; height: 56px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.accept { position: relative; overflow: hidden; background: var(--yellow-2); }
.accept .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--yellow); transition: width 1s linear; }
.accept span.t { position: relative; }
.meter { display: flex; align-items: center; gap: 10px; background: var(--yellow-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.order-card { border: 2px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-card .price { font-size: 26px; }
.empty-state { text-align: center; padding: 18px 8px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pulse { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); opacity: .5; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }

/* Формы и экраны на весь экран */
.screen { position: absolute; inset: 0; background: #fff; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; z-index: 10; }
.screen.navy { background: var(--navy); color: #fff; }
.screen .head { display: flex; align-items: center; gap: 12px; }
.logo { width: 84px; height: 84px; display: block; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input { height: 56px; border: 2px solid transparent; border-radius: 14px; background: var(--bg); padding: 0 14px; font: inherit; font-size: 18px; color: var(--navy); width: 100%; }
input:focus { outline: none; border-color: var(--yellow); background: #fff; }
.code { letter-spacing: .5em; text-align: center; font-size: 26px; font-weight: 700; }
.err { color: var(--red); font-weight: 600; min-height: 20px; font-size: 14px; margin: 0; }
.hint { background: var(--yellow-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--navy); }
.card { background: var(--bg); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.list { display: flex; flex-direction: column; }
.list .item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.list .item:first-child { border-top: none; }
.plus { color: var(--green); font-weight: 700; white-space: nowrap; }
.minus { color: var(--red); font-weight: 700; white-space: nowrap; }
.tabs { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; height: 42px; border: none; border-radius: 11px; background: transparent; font-weight: 600; font-size: 14px; }
.tabs button.on { background: var(--navy); color: #fff; }
.menu-link { display: flex; align-items: center; justify-content: space-between; height: 56px; border: none; background: transparent; border-top: 1px solid var(--line); font-size: 17px; font-weight: 600; padding: 0; text-align: left; width: 100%; color: var(--navy); text-decoration: none; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 72px); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 50; max-width: 90vw; text-align: center; }
.toast.err { background: var(--red); }
.gps-warn { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 14px; right: 14px; background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; z-index: 5; }

.lang-switch { height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-weight: 600; font-size: 14px; z-index: 11; }
.screen:not(.navy) .lang-switch { color: var(--navy); border-color: var(--line); }

/* ---------- Заставка ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; transition: opacity .35s ease; }
.splash.out { opacity: 0; pointer-events: none; }
.splash video, .splash .splash-img, .splash .splash-lottie { width: min(100vw, 520px); max-height: 100vh; object-fit: contain; }
.splash-logo { position: relative; width: 150px; height: 150px; animation: splashIn .9s cubic-bezier(.2,1.4,.4,1) both; }
.splash-logo img { position: absolute; inset: 0; width: 100%; height: 100%; animation: splashPulse 1.6s ease-in-out .9s infinite; }
.splash-logo .ring { position: absolute; inset: -14px; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--yellow); border-right-color: var(--yellow); animation: splashSpin 1.1s linear infinite; opacity: .9; }
.splash-title { font-size: 30px; font-weight: 700; letter-spacing: .04em; animation: splashUp .6s ease .35s both; }
.splash-sub { font-size: 16px; color: #C7CFDD; animation: splashUp .6s ease .55s both; }
@keyframes splashIn { from { transform: scale(.3) rotate(-90deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes splashPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Стикеры на экране входа ---------- */
.stickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stickers img { width: 72px; height: 72px; object-fit: contain; animation: stickerBob 2.4s ease-in-out infinite; }
@keyframes stickerBob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .splash *, .stickers img { animation: none !important; } }

/* ===== Анимированная заставка (логотип + герой с телефоном) ===== */
.splash.scene-mode { background: #000; gap: 10px; overflow: hidden; }
.scene { position: relative; width: min(94vw, 560px); aspect-ratio: 2 / 1.08; }
.sc-item { position: absolute; top: 0; width: 49%; aspect-ratio: 1; }
.sc-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sc-logo { left: 0; z-index: 2; animation: scLogo 1.7s cubic-bezier(.2,.9,.25,1) both; }
.sc-logo img { animation: scPulse 2.2s ease-in-out 1.8s infinite; }
.sc-hero { right: 0; animation: scHero .9s cubic-bezier(.2,1.25,.4,1) 1.05s both; }
.sc-hero img { animation: scBob 2.4s ease-in-out 2s infinite; }
.sc-glow { display: none; } /* картинки на чёрном фоне — подсветку даёт сама картинка */
.sc-title { color: #FFD60A; font-size: 30px; font-weight: 800; letter-spacing: .06em; animation: splashUp .6s ease 1.9s both; }
.sc-sub { color: #E5E7EB; font-size: 16px; animation: splashUp .6s ease 2.15s both; }
@keyframes scLogo {
  0% { transform: translateX(52%) scale(.15) rotate(-220deg); opacity: 0; filter: brightness(2.2); }
  38% { transform: translateX(52%) scale(1.08) rotate(8deg); opacity: 1; filter: brightness(1.4); }
  50% { transform: translateX(52%) scale(1) rotate(0); filter: brightness(1); }
  64% { transform: translateX(52%) scale(1); }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes scHero {
  0% { transform: translateX(30%) scale(.6); opacity: 0; filter: brightness(2); }
  70% { opacity: 1; filter: brightness(1.15); }
  100% { transform: none; opacity: 1; filter: none; }
}
@keyframes scBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2.5%) rotate(-1deg); } }
@keyframes scPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
@keyframes scGlow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 45% { opacity: 1; } 100% { opacity: .8; transform: translate(-50%, -50%) scale(1); } }
.tabs[style*="font-size:13px"] button { font-size: 13px; padding: 0 4px; }
