/* «Статус рейса» — стили из утверждённого макета. Все стили — только в этом файле (CSP без inline). */
body { margin: 0; background: #ffffff; }
/* обновление жестом вниз (ТЗ 10.4): на телефоне — своё (страница тянется вместе с пальцем, сверху — крутящийся значок),
   встроенное в браузер обновление и «пружина» там выключены; на компьютере — встроенное в браузер (решение владельца 19.10.2026) */
@media (pointer: coarse) { html, body { overscroll-behavior-y: none; } }
html.nopull, html.nopull body { overscroll-behavior-y: none; }   /* «Новый рейс» и изменение рейса — и на компьютере (решение владельца 20.10.2026) */
#app { position: relative; z-index: 1; }
#app.pull-anim { transition: transform .2s ease-out; }
.ptr { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 0; height: 56px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ptr:not(.on) { visibility: hidden; }
.spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #e3e3e3; border-top-color: #111; }
.ptr.loading .spin { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
* { box-sizing: border-box; }
input, select, button { font-family: inherit; }
a { color: #111; }
a:hover { color: #000; }

.page { min-height: 100vh; width: 100%; background: #fff; color: #111;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  display: flex; flex-direction: column; align-items: center; }
.col { width: 100%; max-width: 480px; min-height: 100vh; display: flex; flex-direction: column; position: relative; }

/* Поля и кнопки */
.inp { width: 100%; height: 48px; border: 1px solid #c9c9c9; border-radius: 10px; padding: 0 14px; font-size: 16px; color: #111; background: #fff; outline: none; margin-top: 6px; }
.inp:focus { border-color: #111; }
/* iPhone (Safari): поле даты по умолчанию шире строки и вылезает за край — выравниваем как остальные поля */
input[type="date"].inp { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 46px; text-align: left; }
input[type="date"].inp::-webkit-date-and-time-value { text-align: left; margin: 0; }
.sel { -webkit-appearance: none; appearance: none; padding-right: 48px; cursor: pointer; margin-top: 0; }
.selwrap { position: relative; }
.selwrap.top { margin-top: 6px; }
.selwrap svg { position: absolute; right: 16px; top: 16px; pointer-events: none; }
.btn { width: 100%; height: 50px; border: 0; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; color: #fff; }
.btn-black { background: #111; }
.btn-black:hover { background: #000; }
.btn-red { background: #DA3B26; }
.btn-red:hover { background: #c23220; }
.btn-line { background: #fff; color: #111; border: 1px solid #c9c9c9; }
.btn-line:hover { border-color: #111; }
.btn:disabled { background: #d6d6d6; color: #fff; cursor: default; border-color: #d6d6d6; }
.btn-sm { height: 44px; font-size: 15px; }
.btn-auto { width: auto; padding: 0 16px; }
.btn-w120 { width: 120px; flex-shrink: 0; }
.btn-w200 { width: 200px; }
.lnk { background: none; border: 0; padding: 6px 0; font-size: 15px; color: #8a8a8a; cursor: pointer; }
.lnk:hover { color: #111; }
.lnk.start { align-self: flex-start; }
.lnk.small { font-size: 13px; }
.lnk.restore { font-size: 20px; }   /* «Восстановить доступ» на экране входа — крупнее обычной ссылки (решение владельца 13.10.2026) */
.lnk.danger { color: #b42318; }
.lnk.inline { padding: 0; font-size: 14px; color: #111; text-decoration: underline; }
label.f { font-size: 13px; color: #555; display: block; }
.row2 { display: flex; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.endrow { display: flex; gap: 10px; align-items: flex-end; }
.grow { flex-grow: 1; }

/* Вход */
.login { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 24px; gap: 12px; }
.err { font-size: 14px; color: #b42318; }
.fmsg { display: block; margin-top: 4px; font-size: 13px; }
.fmsg.err { font-size: 13px; }
.warnline { color: #8a4b00; }
.btns { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.consent input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: #111; cursor: pointer; }
.consent label { font-size: 13px; color: #666; line-height: 1.4; cursor: pointer; }   /* как строка соглашения (.terms-note) */
.consent .lnk.inline { font-size: 13px; }
.terms-note { font-size: 13px; color: #666; line-height: 1.4; text-align: center; }
.center { display: flex; justify-content: center; }
.center.mt { margin-top: 4px; }

/* Документы */
.doc { padding: 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.doc .h { font-size: 20px; font-weight: 700; }
.doc .b { font-size: 15px; font-weight: 700; margin-top: 4px; }
.doc .p { font-size: 15px; color: #333; line-height: 1.5; }
.doc .li { font-size: 15px; color: #333; line-height: 1.5; margin-top: -8px; padding-left: 22px; position: relative; }
.doc .li::before { content: "—"; position: absolute; left: 0; }

/* Письмо отправлено */
.sent { padding: 40px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.sent .txt { font-size: 17px; line-height: 1.45; }
.devnote { margin: 8px 24px 0; font-size: 12px; color: #767676; text-transform: uppercase; letter-spacing: 0.06em; }
.letter { margin: 8px 24px 24px; border: 1px solid #e3e3e3; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.letter .from { font-size: 13px; color: #767676; }
.letter .subj { font-size: 15px; font-weight: 600; }
.letter .body { font-size: 15px; }

/* Шапка */
.head { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; gap: 8px; height: 68px; padding: 0 4px 0 12px; border-bottom: 1px solid #eee; }
.logo { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-shrink: 0; }
.logo img { width: 44px; height: 44px; }
.sums { flex-grow: 1; min-width: 0; display: flex; justify-content: space-around; gap: 6px; overflow: hidden; }
.sum { display: flex; flex-direction: column; align-items: center; }
.sum .l { font-size: 11px; color: #666; white-space: nowrap; }
.sum .v { font-size: clamp(13px, 3.8vw, 17px); font-weight: 700; white-space: nowrap; }
.burger { width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #111; flex-shrink: 0; }
.burger:hover { background: #f2f2f2; }
.shade { position: fixed; inset: 0; z-index: 6; border: 0; background: rgba(0, 0, 0, 0.12); cursor: default; }
.menu { position: fixed; top: 72px; right: max(8px, calc((100vw - 480px) / 2 + 8px)); z-index: 7; width: 260px; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); overflow: hidden; }
.mi { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #eee; padding: 0 18px; height: 48px; font-size: 16px; color: #111; cursor: pointer; }
.mi:hover { background: #f4f4f4; }
.mi-b { font-weight: 600; }
.mi-end { border-bottom: 0; }
.flash { margin: 12px 16px 0; font-size: 15px; padding: 12px 14px; border-radius: 10px; background: #111; color: #fff; }

/* Разделы */
.sec { padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.sec.g14 { gap: 14px; }
.title { font-size: 20px; font-weight: 700; }
.title.mb { margin-bottom: 4px; }
.sub { font-size: 15px; font-weight: 600; }
.sub.mt4 { margin-top: 4px; }
.sub.mt12 { margin-top: 12px; }
.note { font-size: 15px; padding: 12px 14px; border-radius: 10px; background: #f3f3f3; }
.note.gray { font-size: 14px; color: #555; }
.note.dark { background: #111; color: #fff; }
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; padding: 12px 14px; border-radius: 10px; background: #f3f3f3; }
.bar b { font-weight: 700; white-space: nowrap; }
.listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { font-size: 15px; color: #555; }
.muted.s14 { font-size: 14px; }
.gray14 { font-size: 14px; color: #666; }
.gray14.intro { margin-bottom: 6px; }
.hint { font-size: 13px; color: #666; }
.hr { height: 1px; background: #eee; margin: 10px 0; }
.hr.b { margin: 12px 0 4px; }
.mt8 { margin-top: 8px; }

/* Рейс в списке */
.trip { border: 1px solid #e3e3e3; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.trip-red { border-color: #DA3B26; background: #fff6f4; }
.trow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tname { background: none; border: 0; padding: 0; text-align: left; font-size: 16px; font-weight: 700; color: #111; cursor: pointer; }
.tname:hover { text-decoration: underline; }
.rate { font-size: 15px; font-weight: 600; white-space: nowrap; }
.next { font-size: 14px; color: #555; }
.next.red { color: #b42318; }
.pend { display: flex; flex-direction: column; gap: 10px; }

/* Карточка */
.trackbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #f3f3f3; }
.trackbox .l { font-size: 12px; color: #666; }
.trackbox .v { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; word-break: break-all; }
.kvs { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.kv .k { color: #666; }
.kv .v { text-align: right; font-weight: 600; }
.kv a { font-weight: 600; text-align: right; word-break: break-all; }
.danger-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid #DA3B26; border-radius: 12px; }

/* Открытые страницы политики и согласия, сообщение без JavaScript */
a.lnk { text-decoration: none; display: inline-block; }
.noscript { max-width: 480px; margin: 40px auto; padding: 0 24px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif; font-size: 15px; color: #333; }

/* Админка (ТЗ 10.4): только итоговые числа */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border: 1px solid #e3e3e3; border-radius: 12px; padding: 14px; }
.tile .n { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 13px; color: #666; margin-top: 4px; }

/* Ссылка в строке соглашения — тем же мелким шрифтом, что строка */
.terms-note .lnk.inline { font-size: 13px; }
/* Шапка без входа: логотип (не кнопка) и «Войти» (решение владельца 16.10.2026) */
.head .grow { flex-grow: 1; }
.lnk.enter { font-size: 17px; font-weight: 600; color: #8a8a8a; padding: 10px 12px; }   /* серая, при наведении чёрная (решение владельца 16.10.2026) */
.lnk.enter:hover { color: #111; }
