/* ============ Yoobi Курьер — дизайн-система: ТОЧНАЯ КОПИЯ приложения ============
   Токены 1:1 из мобильного приложения (lib/theme.dart YColors + ui/kit.dart).
   Правило синхронизации: меняешь палитру в theme.dart → меняй ЗДЕСЬ (и наоборот). */
@font-face {
  font-family: "Manrope"; /* variable ttf из приложения (assets/fonts) — все веса одним файлом */
  src: url("assets/fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --brand: #ffc907;        /* YColors.brand */
  --gold: #b8860b;         /* YColors.gold */
  --on-accent: #231900;    /* YColors.onAccent — тёмный текст/иконки на жёлтом */
  --accent-soft: #fff3cc;  /* YColors.accentSoft */
  --brand-soft: #fff6d6;   /* YColors.brandSoft — «ожидание/инфо» */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #eef1f6;
  --field: #f1f5f9;
  --card: #ffffff;
  --page: #ffffff;
  --line: #e2e8f0;
  --hair: #e9ecf1;         /* тонкая граница карточек (KCard) */
  --green: #22c55e;        /* СТАТУСНЫЙ зелёный (в сети/успех), не кнопки */
  --green-dark: #16a34a;
  --ok-soft: #eefaf2;
  --ok-border: #b6e7cc;
  --danger-soft: #fff1f2;
  --red: #f43f5e;
  --blue: #3b82f6;
  --nav-active: #f7b500;   /* активная вкладка навбара (main_shell) */
  --nav-idle: #8a9099;
  --shadow-card: 0 6px 16px rgba(15,23,42,.05);  /* тень KCard (светлая тема) */
  --shadow-lg: 0 18px 50px rgba(15,23,42,.18);
  --shadow-md: 0 6px 20px rgba(15,23,42,.10);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.08);
  --r-lg: 20px; --r-md: 14px; --r-btn: 16px; /* KCard 20 / KPrimaryButton 16 */
}
/* ===== Тёмная тема — нейтральный premium near-black (theme.dart dark, БЕЗ синевы) ===== */
[data-theme="dark"] {
  --brand-soft: rgba(255,201,7,.15);
  --accent-soft: rgba(255,201,7,.20);
  --ink: #f4f3f1; --ink-2: #cac8c3; --muted: #918e88; --muted-2: #625f5a;
  --bg: #090909; --field: #1e1e1c; --card: #161615; --page: #090909; --line: #2c2b28; --hair: #242320;
  --ok-soft: rgba(34,197,94,.15); --ok-border: #1f5c3a; --danger-soft: #2a1719;
  --shadow-card: none; /* KCard в тёмной — без тени, только hair-граница */
  --shadow-lg: 0 18px 50px rgba(0,0,0,.62); --shadow-md: 0 10px 26px rgba(0,0,0,.5); --shadow-sm: 0 2px 10px rgba(0,0,0,.4);
}
[data-theme="dark"] #map { background: #090909; }
[data-theme="dark"] .top { background: linear-gradient(180deg, rgba(9,9,9,.95), rgba(9,9,9,0)); }
[data-theme="dark"] .field:focus-within, [data-theme="dark"] .otp-box:focus { background: var(--field); }
[data-theme="dark"] .btn:disabled { background: var(--field); color: var(--muted-2); box-shadow: none; }
[data-theme="dark"] .ac-primary:disabled { background: var(--field); color: var(--muted-2); }
[data-theme="dark"] .err { background: var(--danger-soft); border-color: rgba(244,63,94,.4); color: #fda4af; }
[data-theme="dark"] .up.done, [data-theme="dark"] .prof-verified { background: var(--ok-soft); border-color: var(--ok-border); }
[data-theme="dark"] .prof-verified.no { background: var(--field); border-color: var(--line); }
[data-theme="dark"] .ac-sos, [data-theme="dark"] .logo.small.danger { background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.4); }
[data-theme="dark"] .dev { background: rgba(255,201,7,.12); }
[data-theme="dark"] .vhead { background: rgba(255,201,7,.12); }
[data-theme="dark"] .vhead .ic { color: var(--brand); }
[data-theme="dark"] .veh-badge { background: rgba(255,201,7,.16); }
[data-theme="dark"] .earn-card { border: 1px solid var(--line); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(22,22,21,.88) !important; color: #918e88 !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: #cac8c3 !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Manrope", -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
input { font-family: inherit; }
/* Нативное ощущение: плавный инерционный скролл, без «прыжка» PTR.
   touch-action: pan-y — ГАРАНТИЯ тач-скролла экранов (карта глушит жесты только у себя) */
.sheet.scroll, .tab-panel { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.ic { width: 20px; height: 20px; display: block; }
.hidden { display: none !important; }

#map { position: fixed; inset: 0; z-index: 0; background: #dde3ec; }
.leaflet-control-attribution { font-size: 9px; opacity: .6; }
.mbtn { position: fixed; right: 16px; top: calc(env(safe-area-inset-top) + 66px); z-index: 30; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-md); transition: transform .12s; }
.mbtn:active { transform: scale(.92); }
.mbtn .ic { width: 24px; height: 24px; }

/* ===== Общие листы (вход/верификация/проверка) ===== */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); }
/* Flex-центрирование надёжнее grid place-items в встроенных webview (Babilon и т.п.) */
.sheet.center { display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.sheet.scroll { overflow-y: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.box { width: min(380px, 100%); max-width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 13px; text-align: center; }
.box.wide { max-width: 460px; margin: 0 auto; text-align: left; }
/* Вход — аккуратная карточка по центру (форма не сливается с фоном) */
#screenAuth .box { background: var(--card); padding: 32px 22px 24px; border-radius: 26px; box-shadow: var(--shadow-lg); max-width: 380px; }
.logo { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: var(--ink); display: grid; place-items: center; margin: 0 auto; box-shadow: 0 8px 22px rgba(255,201,7,.45); }
.logo.pending { background: var(--brand-soft); color: #b45309; }
.logo.logo-app { background: none; overflow: hidden; }
.logo.logo-app img { width: 100%; height: 100%; display: block; object-fit: cover; }
.logo .ic { width: 32px; height: 32px; }
.h1 { font-family: "Manrope", sans-serif; letter-spacing: -.3px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 24px; text-align: center; }
.h1 span { color: #b8860b; }
.sub { font-size: 14px; color: var(--muted); text-align: center; }

.field { display: flex; align-items: center; gap: 6px; background: var(--field); border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 15px; transition: border-color .15s, background .15s; }
.field:focus-within { border-color: var(--ink); background: #fff; }
.field.col { flex-direction: column; align-items: stretch; gap: 3px; }
.field.col label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.field .pfx { font-size: 17px; font-weight: 700; }
.field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--ink); font-size: 16px; font-weight: 600; }
.field input::placeholder { color: var(--muted-2); font-weight: 400; }
/* отступы внутри форм входа и кода (между полем и кнопкой, кодом, именем, «Войти») */
#authPhoneStep, #authCodeStep { display: flex; flex-direction: column; gap: 12px; }
/* профессиональное поле телефона: флаг + код страны + номер */
.phone-field { gap: 10px; }
.phone-field .cc { display: flex; align-items: center; gap: 6px; padding-right: 10px; border-right: 1.5px solid var(--line); flex: none; }
.phone-field .flag-tj { width: 22px; height: 22px; border-radius: 50%; flex: none; background: linear-gradient(#cc0000 0 30%, #fff 30% 70%, #006600 70% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.phone-field .cc-caret { width: 13px; height: 13px; color: var(--muted-2); flex: none; }
.phone-field .pfx { font-size: 16px; font-weight: 700; }
.phone-field input { letter-spacing: .4px; }

.otp { display: flex; gap: 10px; justify-content: center; }
.otp-box { width: 56px; height: 64px; text-align: center; font-size: 26px; font-weight: 800; background: var(--field); border: 1.5px solid var(--line); border-radius: 14px; outline: none; color: var(--ink); }
.otp-box:focus { border-color: var(--ink); background: #fff; }
.otp-box.filled { border-color: var(--brand); background: var(--brand-soft); }
.dev { background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 10px; padding: 10px; font-size: 13px; }
.dev b { font-size: 18px; letter-spacing: 3px; }
.err { background: #fef2f2; border: 1px solid #fecdd3; color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* KPrimaryButton: ЖЁЛТАЯ (бренд-акцент), тёмный текст, h54, r16 — как в приложении */
.btn { width: 100%; min-height: 54px; padding: 15px 18px; border: none; border-radius: var(--r-btn); background: var(--brand); color: var(--on-accent); font-size: 15.5px; font-weight: 800; transition: .15s; box-shadow: var(--shadow-md); }
.btn:hover { background: #ffd633; }
.btn:active { transform: scale(.985); }
.btn:disabled { background: #cbd5e1; color: #fff; box-shadow: none; }
.link { width: 100%; border: none; background: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px; }
.link:hover { color: var(--ink); }
.btn-danger { width: 100%; padding: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--red); border-radius: 14px; font-size: 15px; font-weight: 700; }

/* ===== Верификация ===== */
.vhead { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-soft); border-radius: var(--r-md); padding: 14px; margin-bottom: 4px; }
.vhead .ic { width: 26px; height: 26px; color: #b8860b; flex: none; }
.vhead b { display: block; font-size: 15px; }
.vhead span { font-size: 12.5px; color: var(--ink-2); }
.sec-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 20px 2px 9px; }
#screenProfile .sec-label:first-child { margin-top: 14px; }
.uploads { display: flex; flex-direction: column; gap: 8px; }
.up { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--r-md); padding: 13px 14px; cursor: pointer; transition: .15s; position: relative; }
.up:hover { border-color: var(--muted-2); }
.up.done { border-style: solid; border-color: var(--green); background: #f0fdf4; }
.up .ic { width: 22px; height: 22px; color: var(--muted); flex: none; }
.up.done > .ic:first-child { color: var(--green); }
.up span { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.up .up-ok { display: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; place-items: center; }
.up .up-ok .ic { width: 15px; height: 15px; color: #fff; }
.up.done .up-ok { display: grid; }

.veh-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.veh { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; color: var(--muted); }
.veh .ic { width: 24px; height: 24px; }
.veh span { font-size: 11px; font-weight: 600; }
.veh.active { border-color: var(--ink); color: var(--ink); background: var(--brand-soft); }

/* ===== Главный экран ===== */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(180deg, rgba(238,241,246,.96), rgba(238,241,246,0)); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.brand .ic { color: #b8860b; width: 22px; height: 22px; }
.brand img.brand-ic { width: 28px; height: 28px; border-radius: 8px; display: block; }
.brand b { font-family: "Manrope", sans-serif; letter-spacing: -.3px; font-variant-numeric: tabular-nums; font-weight: 800; }
.brand span { color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm); }

.bottom-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--card); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; }
.status-row { display: flex; align-items: center; gap: 12px; }
.conn-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.conn-dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: pulse 1.6s infinite; }
.conn-dot.off { background: var(--muted-2); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)} 70%{box-shadow:0 0 0 10px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }
.status-text { flex: 1; min-width: 0; }
.status-text b { display: block; font-size: 16px; }
.status-text span { font-size: 12.5px; color: var(--muted); }
.veh-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; color: var(--ink); }
.online-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 18px; border: none; border-radius: 16px; font-size: 17px; font-weight: 800; transition: .15s; }
.online-btn .ic { width: 22px; height: 22px; }
.online-btn.off { background: var(--green); color: #fff; }
.online-btn.on { background: var(--red); color: #fff; }
.online-btn:active { transform: scale(.985); }
/* Кнопка «Перерыв» */
.break-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 14px; font-size: 14px; font-weight: 700; transition: .15s; }
.break-btn .ic { width: 18px; height: 18px; }
.break-btn.active { background: #fff7e6; border-color: #f0b429; color: #9a6500; }
[data-theme="dark"] .break-btn.active { background: rgba(255,201,7,.16); border-color: rgba(255,201,7,.5); color: #ffd24a; }
/* Геймификация: бейдж уровня + прогресс-бар (используются в профиле и модалке) */
.lvl-badge { font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px; color: #5b4300; background: linear-gradient(135deg, #f0c14b, #e0a82e); white-space: nowrap; flex: none; }
.lvl-badge[data-lvl="bronze"] { background: linear-gradient(135deg, #d9a36a, #b87333); color: #fff; }
.lvl-badge[data-lvl="silver"] { background: linear-gradient(135deg, #e8edf2, #b9c2cc); color: #41505e; }
.lvl-badge[data-lvl="gold"] { background: linear-gradient(135deg, #ffdf6e, #e0a82e); color: #5b4300; }
.lvl-badge[data-lvl="platinum"] { background: linear-gradient(135deg, #e6f7ff, #9fd6e8); color: #185a73; }
.lvl-prog { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lvl-prog-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #e0a82e); border-radius: 999px; transition: width .4s; }
.hist-row.cancelled .hr-ic { color: var(--red); }
.hist-row.cancelled .hr-amt { color: var(--muted); text-decoration: line-through; }
.wake-note { font-size: 12px; color: var(--muted); text-align: center; }

/* ===== Профиль ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: grid; place-items: end center; }
/* «О приложении» — центрированный диалог (не донная шторка, как остальные .modal-backdrop) */
#aboutBackdrop { place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 480px; background: var(--card); border-radius: 22px 22px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; position: relative; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.modal-close { position: absolute; top: 14px; left: 14px; }
/* ===== Профиль — макет 1:1 как profile_screen.dart приложения ===== */
#screenProfile.tab-panel { background: var(--page); } /* в приложении профиль на белом (тёмная — свой фон) */
.prof-title-row { display: flex; align-items: center; justify-content: space-between; }
.prof-title-row .tp-title { margin-bottom: 0; font-size: 26px; }
.prof-bell { width: 40px; height: 40px; border: none; background: none; color: var(--ink); display: grid; place-items: center; }
.prof-bell .ic { width: 24px; height: 24px; }
.prof-head2 { display: flex; align-items: center; gap: 16px; margin: 14px 0 4px; }
.prof-av { position: relative; width: 96px; height: 96px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--ink); border: none; padding: 0; cursor: pointer; flex: none; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
[data-theme="dark"] .prof-av { box-shadow: none; }
.prof-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.prof-av .ic { width: 40px; height: 40px; }
/* Точка статуса: зелёная — на линии, серая — оффлайн (как в приложении) */
.prof-status { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: #b0b7c3; border: 3px solid var(--page); }
.prof-status.on { background: var(--green); }
.prof-head2 .prof-id { flex: 1; min-width: 0; } /* длинное имя — эллипсис, не вытеснять стрелку */
.prof-head2 .prof-id b { display: flex; align-items: center; gap: 5px; font-size: 19px; font-weight: 800; }
.prof-head2 .prof-id b > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-head2 .prof-id .prof-ver { width: 18px; height: 18px; color: var(--nav-active); flex: none; }
.prof-head2 .prof-id span { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 5px; }
.prof-head2 .prof-id .prof-phone { font-size: 12.5px; font-weight: 500; color: var(--muted-2); margin-top: 2px; }
.prof-chev { width: 22px; height: 22px; color: var(--muted-2); flex: none; }
.prof-verified { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); background: var(--ok-soft); border: 1px solid var(--ok-border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.prof-verified.no { color: var(--muted); background: var(--field); border-color: var(--line); }
/* Полоса Рейтинг · Принятие · Уровень (как _statsStrip) */
.stats-strip { display: flex; align-items: center; gap: 0; width: 100%; background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 14px 10px 14px 16px; margin-top: 14px; text-align: left; box-shadow: var(--shadow-card); }
.ss-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ss-col .ss-l { font-size: 11px; font-weight: 500; color: var(--muted); }
.ss-col b { font-size: 15.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-col b i { font-style: normal; }
.ss-col b, .ss-col b i { font-variant-numeric: tabular-nums; }
.ss-col small { font-size: 10.5px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-col.wide { flex: 1.4; }
.ss-col b em.ss-ring { display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin-left: 6px; vertical-align: -3px; background: conic-gradient(var(--green) 100%, var(--hair) 0); -webkit-mask: radial-gradient(circle 6px, transparent 98%, #000 100%); mask: radial-gradient(circle 6px, transparent 98%, #000 100%); }
.ss-div { width: 1px; height: 44px; background: var(--hair); margin: 0 12px; flex: none; }
/* Лейблы секций профиля — как в приложении: обычный регистр, 13 w600 */
#screenProfile .sec-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; margin: 6px 2px 8px; }
/* Наличные на руках: прогресс-бар к лимиту */
.pc-cash-bar { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; margin-top: 4px; }
.pc-cash-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--nav-active); transition: width .3s; }
.pc-cash-bar i.over { background: var(--red); }
.stats-strip > .prof-chev { margin-left: 4px; }
/* Жёлтая карта Баланс | Сегодня (как _balanceCard) */
.bal-card { display: flex; align-items: center; background: #f8d64e; border-radius: 18px; padding: 16px 14px; margin-top: 14px; box-shadow: 0 6px 16px rgba(247,181,0,.20); }
.bal-half { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 0; text-align: left; }
.bal-ic { width: 44px; height: 44px; border-radius: 50%; background: #231900; color: #ffc93d; display: grid; place-items: center; flex: none; }
.bal-ic .ic { width: 21px; height: 21px; }
.bal-tx { flex: 1; min-width: 0; }
.bal-tx span { display: block; font-size: 12px; font-weight: 600; color: rgba(35,25,0,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-tx b { display: block; font-size: 17px; font-weight: 800; color: #231900; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.bal-chev { width: 20px; height: 20px; color: rgba(35,25,0,.55); flex: none; }
.bal-div { width: 1px; height: 40px; background: rgba(35,25,0,.15); margin: 0 12px; flex: none; }
/* Узкие экраны: компактнее жёлтая карта, чтобы «Баланс 60.93 с.» не резался в «60.93…» */
@media (max-width: 380px) {
  .bal-card { padding: 14px 10px; }
  .bal-ic { width: 38px; height: 38px; }
  .bal-ic .ic { width: 18px; height: 18px; }
  .bal-half { gap: 8px; }
  .bal-div { margin: 0 8px; }
  .bal-tx b { font-size: 15.5px; }
  .bal-chev { width: 18px; height: 18px; }
}
/* Карточка-меню (как _menuCard): строки 56px, серый чип-иконка 36, разделители с отступом */
.menu-card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
/* Пуленепробиваемо для мобильных: min-height (строки НЕ схлопываются), разделитель без border-image */
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; height: auto; flex: none; box-sizing: border-box; padding: 8px 16px; border: none; background: none; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; }
.menu-row + .menu-row { border-top: 1px solid var(--hair); }
.menu-row:active { background: var(--field); }
.mr-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--field); color: var(--ink); display: grid; place-items: center; flex: none; }
.mr-ic .ic { width: 19px; height: 19px; }
.menu-row > span:not(.mr-ic) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-val { font-size: 12.5px; font-weight: 500; color: var(--muted); font-style: normal; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-chev { width: 20px; height: 20px; color: var(--muted-2); flex: none; }
/* Красная карточка выхода (как _logoutCard) */
.logout-card { width: 100%; height: 56px; margin-top: 14px; border: 1px solid var(--hair); border-radius: 16px; background: var(--card); color: var(--red); font-size: 15px; font-weight: 700; box-shadow: var(--shadow-card); }
.logout-card:active { background: var(--danger-soft); }
/* ===== «Сообщения» — как messages_screen.dart: сторис-плитки + Чаты ===== */
#screenMessages.tab-panel { background: var(--page); }
.stories-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 4px; margin-bottom: 8px; scrollbar-width: none; }
.stories-row::-webkit-scrollbar { display: none; }
.story-card { position: relative; flex: none; width: 112px; height: 138px; border: none; border-radius: 20px; background: var(--field); overflow: visible; padding: 0; text-align: left; }
.story-card .st-img { display: block; width: 100%; height: 82px; border-radius: 20px 20px 0 0; overflow: hidden; background: var(--field); }
.story-card .st-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-card .st-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 6px 9px 7px; font-size: 11.5px; font-weight: 700; line-height: 1.18; color: var(--ink); }
.story-card .st-new { position: absolute; top: -5px; right: -3px; padding: 3px 8px; border-radius: 999px; background: #ff4d2e; border: 2px solid var(--page); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; }
.stories-empty { font-size: 12.5px; color: var(--muted-2); margin-bottom: 10px; }
.msg-sec { font-size: 15px; font-weight: 800; color: var(--ink); margin: 10px 2px; }
.menu-row.tall { height: auto; padding-top: 10px; padding-bottom: 10px; }
.mr-two { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mr-two b { font-size: 15px; font-weight: 700; }
.mr-two i { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ===== Стори-вьювер (как story_viewer.dart): чёрный фуллскрин, прогресс, тап-зоны ===== */
.story-viewer { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; align-items: center; justify-content: center; }
.story-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-progress { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 5px; z-index: 2; }
.sv-progress i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.sv-progress i.done { background: #fff; }
.sv-progress i b { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; animation: shrinkX linear forwards; }
@keyframes shrinkX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sv-close { position: absolute; top: calc(26px + env(safe-area-inset-top)); right: 12px; z-index: 3; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; }
.sv-title { position: absolute; left: 16px; right: 16px; bottom: calc(30px + env(safe-area-inset-bottom)); z-index: 2; color: #fff; font-size: 17px; font-weight: 800; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.sv-btn { position: absolute; left: 16px; right: 16px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 3; padding: 14px; border-radius: 14px; background: var(--brand); color: var(--on-accent); font-size: 15px; font-weight: 800; text-align: center; text-decoration: none; }
.sv-zone { position: absolute; top: 0; bottom: 120px; width: 38%; z-index: 1; }
.sv-zone.left { left: 0; } .sv-zone.right { right: 0; width: 62%; }
/* ===== Уведомления/Новости (как notifications_screen.dart) ===== */
#notifScreen { background: var(--page); }
.notif-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.notif-head b { font-size: 17px; font-weight: 800; }
.notif-pills { display: flex; gap: 8px; margin-bottom: 14px; }
.npill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: none; border-radius: 999px; background: var(--field); color: var(--ink-2); font-size: 13px; font-weight: 700; transition: background .16s, color .16s; }
.npill.active { background: var(--ink); color: var(--page); }
.npill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.notif-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.notif-row + .notif-row { border-top: 1px solid var(--hair); }
.notif-row .mr-ic { margin-top: 1px; }
.nr-tx { flex: 1; min-width: 0; }
.nr-tx b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 800; }
.nr-tx b em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted-2); flex: none; }
.nr-tx > span { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.nr-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--nav-active); flex: none; }
.notif-empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 48px 20px 20px; }
.notif-empty .ne-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--field); color: var(--ink); margin: 0 auto 12px; }
.news-card { display: block; background: var(--card); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; margin-bottom: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-card); }
.news-card img { width: 100%; aspect-ratio: 2/1; object-fit: cover; display: block; }
.news-card .nc-body { display: block; padding: 12px 16px 14px; }
.news-card .nc-body b { display: block; font-size: 16px; font-weight: 800; }
.news-card .nc-body span { display: block; margin-top: 5px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.news-card .nc-body small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--muted-2); }
/* Точка на колокольчике профиля */
.prof-bell { position: relative; }
.bell-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--nav-active); }
/* Жёлтая карточка «Сегодня» на Доходе (как _todayCard) */
.today-card { background: linear-gradient(135deg, #ffc421, #f2a100); border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: 0 10px 22px rgba(247,181,0,.30); }
.today-card .tc-main > span { display: block; font-size: 13.5px; font-weight: 700; color: rgba(35,25,0,.8); }
.today-card .tc-main b { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; color: #231900; }
.today-card .tc-main b i { font-style: normal; font-size: 34px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.today-card .tc-main b em { font-style: normal; font-size: 16px; font-weight: 700; }
.today-card .tc-main small { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: rgba(35,25,0,.8); }
/* Белая пилюля «% чем вчера» в жёлтой карте (как _todayCard) */
.today-card { display: flex; align-items: flex-start; gap: 10px; }
.today-card .tc-main { flex: 1; min-width: 0; }
.tc-pct { flex: none; display: flex; flex-direction: column; align-items: center; background: #fff; border-radius: 999px; padding: 6px 10px; }
.tc-pct b { font-size: 13px; font-weight: 800; }
.tc-pct b.up { color: #16a34a; } .tc-pct b.down { color: #e11d48; }
.tc-pct small { font-size: 10px; font-weight: 600; color: #64748b; }
/* Сегмент Дохода: активный чип ЖЁЛТЫЙ с тёмным текстом (как _segment в dohod_screen) */
#finPeriods .pchip.active { background: var(--brand); color: var(--on-accent); box-shadow: 0 2px 8px rgba(247,181,0,.35); }
/* График по дням (как KBarChart): жёлтые столбики с градиентом, подписи снизу */
.fin-chart { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 14px 14px 10px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.fc-total { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.fc-total b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
/* Как _chartCard: крупный итог периода + строка диапазона */
.fc-sum { display: block; font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.fc-range { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 2px 0 14px; }
/* Касса как _cashCard приложения */
.cash-card { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; box-shadow: var(--shadow-card); padding: 16px; margin-top: 14px; }
.cash-card .cash-top { display: flex; align-items: center; gap: 12px; }
.cash-card .cash-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.cash-card .cash-top > b:last-child { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cash-card .cash-bar { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; margin-top: 12px; }
.cash-card .cash-bar span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--nav-active); transition: width .3s; }
.cash-card .cash-bar span.over { background: var(--red); }
.cash-card .cash-warn { font-size: 12.5px; font-weight: 600; color: var(--red); margin-top: 8px; }
.cash-card .tpl-btn { margin-top: 14px; }
.cash-card.over { background: #fdecec; }
[data-theme="dark"] .cash-card.over { background: rgba(244,63,94,.12); }
/* Экран редактирования профиля (profile_edit_screen): аватар 104 по центру со
   значком камеры, ссылка «Изменить фото», поле имени карточкой, кнопка снизу */
#peScreen { display: flex; flex-direction: column; }
#peScreen > * { flex: 0 0 auto; }
.pe-av-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 4px; }
.pe-av { position: relative; width: 104px; height: 104px; border: none; border-radius: 50%; background: var(--card); color: var(--muted-2); display: grid; place-items: center; padding: 0; box-shadow: 0 5px 12px rgba(0,0,0,.10); }
.pe-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pe-av > .ic { width: 44px; height: 44px; }
.pe-av-cam { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--nav-active); color: #231900; border: 3px solid var(--page); display: grid; place-items: center; }
.pe-av-cam .ic { width: 16px; height: 16px; }
.pe-av-link { border: none; background: none; font-size: 14px; font-weight: 700; color: var(--ink); }
.pe-field { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-card); }
[data-theme="dark"] .pe-field { border: 1px solid var(--hair); }
.pe-field input { width: 100%; height: 56px; box-sizing: border-box; border: 1.6px solid transparent; border-radius: 16px; background: var(--card); color: var(--ink); padding: 0 16px; font-size: 16px; font-weight: 600; }
.pe-field input:focus { outline: none; border-color: var(--nav-active); }
.pe-bottom { margin-top: auto; padding-top: 20px; }
/* Столбчатый график 1:1 как YBarChart: подпись-сумма НАД столбцом, выбранный —
   фирменный жёлтый, остальные светло-жёлтые; >9 столбцов — горизонтальный скролл */
.fc-bars { display: flex; align-items: flex-end; gap: 0; }
.fc-bars.scroll { overflow-x: auto; scrollbar-width: none; }
.fc-bars.scroll::-webkit-scrollbar { display: none; }
.fc-bars.scroll .fc-bar { flex: none; width: 40px; }
.fc-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 3px; border: none; background: none; }
.fc-bar em { height: 16px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.fc-bar i { width: 100%; margin-top: 3px; border-radius: 6px 6px 0 0; background: #fbe7a6; transition: height .38s cubic-bezier(.33,1,.68,1), background .15s; }
.fc-bar span { margin-top: 7px; font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; }
.fc-bar.sel i { background: var(--nav-active); }
.fc-bar.sel em, .fc-bar.sel span { color: var(--ink); font-weight: 800; }
[data-theme="dark"] .fc-bar i { background: rgba(247,181,0,.28); }
/* День-группы начислений (как _dayRow в dohod_screen) */
/* История — как histories_screen.dart: день-заголовки + карточки строк */
.hist-day { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 2px 8px; }
.np-count { font-style: normal; font-size: 11.5px; font-weight: 800; opacity: .75; margin-left: 5px; }
.notif-row .hr-amt { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; align-self: center; }
.notif-row.cancelled .mr-ic { color: var(--red); background: var(--danger-soft); }
/* Детали заказа (order_detail_screen): мини-карта + карточки */
/* ===== Детали заказа — как order_detail_screen.dart: карта на весь экран +
   вытягиваемая шторка поверх неё ===== */
.od-screen { position: fixed; inset: 0; z-index: 55; background: var(--page); }
.od-screen.hidden { display: none !important; }
.od-head-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 6px 12px; background: var(--card); box-shadow: 0 2px 10px rgba(15,23,42,.06); }
.od-ic-btn { width: 44px; height: 44px; flex: none; border: none; background: none; color: var(--ink); display: grid; place-items: center; }
.od-ic-btn .ic { width: 24px; height: 24px; }
.od-hb-tx { flex: 1; min-width: 0; text-align: center; }
.od-hb-tx b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.od-hb-tx i { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.od-map-full { position: absolute; inset: 0; z-index: 1; background: var(--field); }
.od-pin { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.od-pin.a { background: #e11d48; } .od-pin.b { background: #16a34a; }
/* Шторка: высота задаётся из JS (доля экрана 0.16…0.92), тянется за ручку */
.od-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 44%; display: flex; flex-direction: column; background: var(--page); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.2); overflow: hidden; transition: height .18s ease-out; }
.od-grab { flex: none; padding: 8px 0 6px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.od-grab i { width: 38px; height: 4px; border-radius: 3px; background: var(--line); }
.od-sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.od-sheet-title { font-size: 15.5px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
/* Карточка заведения */
.od-place { display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 14px; }
.od-place-tx { flex: 1; min-width: 0; }
.od-place-tx b { display: block; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-place-tx span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.od-place-pr { flex: none; text-align: right; }
.od-place-pr b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.od-place-pr i { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; margin-top: 4px; }
.od-place-pr i.cash { background: var(--field); color: var(--ink); }
.od-place-pr i.paid { background: #e6f7ed; color: #16a34a; }
/* Параметры */
.od-params2 { padding: 0 16px; margin-bottom: 14px; }
.od-param { display: flex; align-items: center; gap: 8px; padding: 14px 0; font-size: 14.5px; }
.od-param + .od-param, .od-arow { border-top: 1px solid var(--hair); }
.od-param > span { flex: 1; min-width: 0; color: var(--muted); }
.od-param > b { font-weight: 700; color: var(--ink); text-align: right; }
.od-chat-ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.od-arow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.od-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; color: #fff; }
.od-dot.a { background: #e11d48; } .od-dot.b { background: #16a34a; }
.od-arow > span { flex: 1; min-width: 0; }
.od-arow small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.od-arow b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-top: 2px; }
/* Состав */
.od-items { padding: 14px 16px; margin-bottom: 14px; }
.od-items-t { display: block; font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 10px; }
.od-item { display: flex; gap: 8px; padding: 4px 0; font-size: 14px; }
.od-item i { font-style: normal; width: 30px; flex: none; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.od-item span { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
/* Timeline — горизонтальный, со стрелками */
.od-tl { display: flex; align-items: flex-start; gap: 4px; background: var(--field); border-radius: 20px; padding: 16px 12px; }
.od-tl-step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.od-tl-step b { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: center; }
.od-tl-step small { font-size: 12px; font-weight: 600; color: var(--muted); }
.od-tl-ok { width: 16px; height: 16px; color: #16a34a; margin-top: 3px; }
.od-tl-arrow { flex: none; align-self: center; font-style: normal; font-size: 15px; color: var(--muted); }
/* История чата по заказу (read-only) */
.odchat { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.odchat-m { align-self: flex-start; max-width: 78%; background: var(--field); border-radius: 14px; padding: 9px 12px; font-size: 14px; color: var(--ink); }
.odchat-m.me { align-self: flex-end; background: var(--brand-soft); }
.odchat-m img { max-width: 100%; border-radius: 10px; display: block; }
.odchat-m i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; text-align: right; }
/* О приложении (settings_screen) */
.about-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 14px 16px; }
.about-card img { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; }
.about-card b { display: block; font-size: 16px; font-weight: 800; }
.about-card b i { font-style: normal; color: var(--nav-active); }
.about-card small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
/* Диалог «О приложении» — центрированная карточка 1:1 как _openAbout (иконка + пилюля версии + OK) */
.about-dialog { width: 100%; max-width: 320px; margin: 0 auto; background: var(--card); border-radius: 24px; padding: 28px 24px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-ic { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; }
.about-name { font-size: 18px; font-weight: 800; color: var(--ink); margin-top: 14px; }
.about-ver-pill { display: inline-block; margin-top: 10px; padding: 7px 14px; border-radius: 20px; background: rgba(247,181,0,.14); color: #9a7100; font-size: 13.5px; font-weight: 800; }
[data-theme="dark"] .about-ver-pill { background: rgba(247,181,0,.18); color: #ffc93d; }
.about-ok { margin-top: 18px; height: 44px; background: #f8d64e; }

/* ===== Маркер курьера на карте ===== */
.me-marker .me { width: 44px; height: 44px; display: grid; place-items: center; }
.me-marker .me .ring { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,201,7,.3); animation: pulse2 1.8s infinite; }
.me-marker .me .dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; display: grid; place-items: center; color: var(--ink); box-shadow: 0 3px 10px rgba(15,23,42,.3); }
.me-marker .me .dot .ic { width: 18px; height: 18px; }
/* Своя 3D-модель курьера на карте (как у клиента) */
.me-marker .me.model { width: 64px; height: 64px; position: relative; }
.me-marker .me.model .ring { width: 32px; height: 32px; top: auto; bottom: 4px; left: 50%; margin-left: -16px; }
.me-marker .me.model .em { position: relative; z-index: 1; width: 52px; height: 52px; display: grid; place-items: center; }
.me-marker .me.model .em img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(15,23,42,.42)); transition: transform .25s ease; }
.me-marker .me.model.moving .em { animation: me-bob .62s ease-in-out infinite; }
@keyframes me-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pulse2 { 0%{transform:scale(.6);opacity:.8} 100%{transform:scale(1.6);opacity:0} }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.94); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; z-index: 100; max-width: 90vw; box-shadow: var(--shadow-lg); animation: tin .25s ease; }
@keyframes tin { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* ===== Оффер нового заказа ===== */
/* ===== Фотоконтроль: полноэкранная камера ===== */
.pc-backdrop { position: fixed; inset: 0; z-index: 90; background: #090909; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px calc(20px) calc(28px + env(safe-area-inset-bottom)); }
.pc-cam { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pc-cam-head { text-align: center; color: #fff; }
.pc-cam-head b { display: block; font-size: 19px; font-weight: 800; }
.pc-cam-head span { display: block; font-size: 13px; color: #9fb0cc; margin-top: 6px; line-height: 1.4; }
.pc-cam-frame { position: relative; width: 260px; height: 340px; border-radius: 24px; overflow: hidden; background: #161615; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.pc-cam-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); } /* зеркало для фронталки */
.pc-cam-oval { position: absolute; inset: 22px 40px; border: 3px dashed rgba(255,255,255,.55); border-radius: 50%; pointer-events: none; }
.pc-cam-rect { position: absolute; inset: 26px; border: 3px dashed rgba(255,255,255,.55); border-radius: 14px; pointer-events: none; }
.pc-cam-rect.hidden, .pc-cam-oval.hidden { display: none; }
.pc-cam-head b { display: block; }
.pc-backdrop .err { width: 100%; max-width: 320px; text-align: center; }
.pc-shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid rgba(255,255,255,.35); background: transparent; display: grid; place-items: center; cursor: pointer; }
.pc-shutter span { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); display: block; transition: transform .1s; }
.pc-shutter:active span { transform: scale(.88); }
.pc-shutter:disabled { opacity: .5; }
.pc-backdrop .link { color: #9fb0cc; }

/* ===== Оффер нового заказа — 1:1 как offer_modal.dart ===== */
.offer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 18px; }
.offer-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.33); animation: offer-in .26s cubic-bezier(.2,.8,.2,1); }
@keyframes offer-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.offer-timer { height: 5px; background: var(--field); overflow: hidden; }
.offer-timer span { display: block; height: 100%; width: 100%; background: #16a34a; transform-origin: left; transition: background .3s; }
.offer-timer span.run { animation: shrink linear forwards; }
.offer-timer span.urgent { background: #e11d48; } /* последние 7 секунд — красная полоса */
.offer-body { padding: 16px 18px 18px; }
.offer-top { display: flex; align-items: center; justify-content: space-between; }
.offer-top b { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.offer-secs { padding: 5px 11px; border-radius: 999px; background: var(--field); font-size: 13px; font-weight: 800; color: var(--ink); }
.offer-secs i { font-style: normal; font-variant-numeric: tabular-nums; }
/* Заработок крупно + чип транспорта */
.offer-earn-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.offer-earn { flex: 1; min-width: 0; }
.offer-earn small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.offer-earn b { display: flex; align-items: flex-end; gap: 5px; margin-top: 2px; }
.offer-earn b i { font-style: normal; font-size: 40px; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.offer-earn b em { font-style: normal; font-size: 17px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.offer-veh { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 14px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--ink); }
.offer-veh .ic { width: 20px; height: 20px; }
.offer-veh i { font-style: normal; }
/* Три метрики с вертикальными разделителями */
.offer-metrics { display: flex; align-items: center; margin-top: 16px; }
.om { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.om b { font-size: 15.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.om small { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
.om-div { width: 1px; height: 30px; background: var(--line); flex: none; }
/* Маршрут А/Б */
.offer-route { margin-top: 16px; background: var(--bg); border-radius: 16px; padding: 14px; }
.rt-row { display: flex; gap: 12px; align-items: flex-start; }
.rt-sep { display: block; height: 1px; background: var(--hair); margin: 10px 0; }
.rt-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; }
.rt-dot.a { background: #e11d48; }  /* как в приложении: А красный, Б зелёный */
.rt-dot.b { background: #16a34a; }
.rt-txt { min-width: 0; flex: 1; }
.rt-txt b { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.rt-txt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 1px; }
/* Пилюли: тип заказа и способ оплаты */
.offer-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.offer-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); }
.offer-pill .ic { width: 16px; height: 16px; color: var(--muted); }
.offer-pill i { font-style: normal; }
.offer-pill.paid { background: #e6f7ed; border-color: #b6e7cc; color: #16a34a; }
.offer-pill.paid .ic { color: #16a34a; }
/* Приём свайпом (SlideToAccept) */
.slide-accept { position: relative; height: 56px; margin-top: 18px; border-radius: 16px; background: var(--field); overflow: hidden; display: grid; place-items: center; touch-action: none; user-select: none; }
.slide-accept .sa-label { font-size: 15px; font-weight: 800; color: var(--muted); transition: opacity .15s; }
.slide-accept.near .sa-label { opacity: .35; }
.sa-knob { position: absolute; left: 4px; top: 4px; width: 76px; height: 48px; border-radius: 13px; background: #16a34a; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(22,163,74,.35); cursor: grab; touch-action: none; }
.sa-knob .ic { width: 24px; height: 24px; }
.slide-accept.busy { pointer-events: none; }
.slide-accept.busy .sa-knob { background: #86c9a1; }
.offer-decline { display: block; width: 100%; margin-top: 8px; padding: 12px; border: none; background: none; font-size: 14px; font-weight: 700; color: var(--muted); }

/* ===== Активный заказ ===== */
.active-card { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; background: var(--card); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; animation: up .25s ease; }
.ac-head { display: flex; align-items: center; justify-content: space-between; }
.ac-step-label { font-size: 16px; font-weight: 800; }
.ac-price b { font-family: "Manrope", sans-serif; letter-spacing: -.3px; font-variant-numeric: tabular-nums; font-size: 18px; }
.ac-price span { color: var(--muted); font-size: 12px; font-weight: 700; }
.ac-steps { display: flex; align-items: center; }
.ac-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ac-step i { width: 38px; height: 38px; border-radius: 50%; background: var(--field); color: var(--muted-2); display: grid; place-items: center; transition: .2s; }
.ac-step i .ic { width: 19px; height: 19px; }
.ac-step span { font-size: 11px; font-weight: 700; color: var(--muted-2); }
.ac-step.active i { background: var(--brand); color: var(--on-accent); box-shadow: 0 4px 12px rgba(255,201,7,.5); }
.ac-step.active span { color: var(--ink); }
.ac-step.done i { background: var(--green); color: #fff; }
.ac-step.done span { color: var(--green); }
.ac-line { flex: 1; height: 2px; background: var(--line); margin: 0 6px; margin-bottom: 18px; }
.ac-line.done { background: var(--green); }
.ac-target { display: flex; align-items: center; gap: 12px; background: var(--field); border-radius: var(--r-md); padding: 12px 14px; }
.ac-pin { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; background: var(--blue); }
.ac-pin.drop { background: var(--green); }
.ac-addr { flex: 1; min-width: 0; }
.ac-addr b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ac-addr span { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-recipient { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink, #111); font-style: normal; }
.ac-goods { display: block; margin-top: 6px; font-size: 13px; color: var(--ink, #111); font-style: normal; padding: 8px 10px; background: rgba(21,128,61,.08); border-radius: 8px; border-left: 3px solid #15803D; line-height: 1.45; }
.ac-note { display: block; margin-top: 5px; font-size: 12.5px; color: var(--ink-2); font-style: normal; padding: 6px 9px; background: var(--field, #f1f5f9); border-radius: 8px; border-left: 3px solid var(--brand, #FFC81A); }
.ac-acts { display: flex; gap: 8px; flex: none; }
.ac-mini { width: 42px; height: 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); text-decoration: none; }
.ac-mini .ic { width: 20px; height: 20px; }
/* Основное действие заказа: жёлтый акцент (KPrimaryButton); движение «в путь» — зелёный статус */
.ac-primary { width: 100%; min-height: 54px; padding: 15px 17px; border: none; border-radius: var(--r-btn); background: var(--brand); color: var(--on-accent); font-size: 16px; font-weight: 800; transition: .15s; box-shadow: var(--shadow-md); }
.ac-primary.go { background: var(--green); color: #fff; }
.ac-primary:active { transform: scale(.985); }
.ac-primary:disabled { background: #cbd5e1; box-shadow: none; }

/* ===== Нижняя навигация — «плавающая» панель как в приложении (main_shell):
   скруглённый верх 24, мягкая тень, активная вкладка — золотой чип-подложка ===== */
:root { --nav-h: calc(68px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: var(--nav-h); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
[data-theme="dark"] .bottom-nav { border-top: 1px solid var(--line); }
.navb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; background: none; color: var(--nav-idle); font-size: 10.5px; font-weight: 700; transition: color .15s; }
.navb .ic { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 15px; transition: background .18s ease-out; }
.navb.active { color: var(--nav-active); }
.navb.active .ic { color: var(--nav-active); background: rgba(247,181,0,.14); }

/* панели над навигацией */
.bottom-panel, .active-card { bottom: var(--nav-h) !important; padding-bottom: 16px !important; }
.tab-panel { position: fixed; top: 0; left: 0; right: 0; bottom: var(--nav-h); z-index: 40; background: var(--bg); border-radius: 0; padding: calc(16px + env(safe-area-inset-top)) 16px 36px; box-shadow: none; max-height: none; overflow-y: auto; animation: up .22s ease; }
.tab-panel.hidden { display: none !important; }
/* профиль на весь экран — ровные отступы между блоками */
#screenProfile { display: flex; flex-direction: column; gap: 14px; }
/* КРИТИЧНО: панель фиксированной высоты + flex-колонка → без flex:none браузер
   СЖИМАЕТ карточки (overflow:hidden режет строки) вместо прокрутки экрана */
#screenProfile > * { flex: 0 0 auto; }
#myBags:empty { display: none; } /* пустой блок термосумок не должен давать двойной gap */
#screenProfile .tp-title { margin-bottom: 2px; }
#screenProfile .sec-label { margin: 0 2px; }
.tp-title { font-family: "Manrope", sans-serif; letter-spacing: -.3px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; margin-bottom: 14px; }
.tp-title.center { display: block; text-align: center; }

/* ===== Нативный шаблон внутренних страниц (TplPage/TplCard/TplRow из ui/tpl.dart) =====
   z-index 50 > навбар (45): страница открывается ПОВЕРХ нижнего меню, как push-
   навигация в приложении. Иначе закреплённая снизу кнопка (напр. «Сохранить» в
   профиле) уезжает под меню. */
.tpl-page { background: var(--page); padding-top: 0 !important; z-index: 50; }
.tpl-head { display: flex; align-items: center; gap: 12px; margin: 0 -16px 16px; padding: calc(12px + env(safe-area-inset-top)) 18px 18px 14px; background: var(--nav-active); border-radius: 0 0 26px 26px; box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.tpl-head b { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; color: #231900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-back { width: 40px; height: 40px; flex: none; border: none; border-radius: 12px; background: rgba(255,255,255,.25); color: #231900; display: grid; place-items: center; }
.tpl-back .ic { width: 22px; height: 22px; }
.tpl-sec { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 18px 4px 10px; }
.tpl-card { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); }
/* flex: none + min-height — строки не схлопываются на мобильных (тот же урок, что с .menu-row) */
.tpl-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; flex: none; box-sizing: border-box; padding: 13px 16px; border: none; background: none; text-align: left; color: var(--ink); }
.tpl-chip { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--field); color: var(--ink); display: grid; place-items: center; }
.tpl-chip .ic { width: 22px; height: 22px; }
.tpl-row-tx { flex: 1; min-width: 0; }
.tpl-row-tx b { display: block; font-size: 16px; font-weight: 700; }
.tpl-row-tx > span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-val { font-size: 14px; font-weight: 600; color: var(--muted); flex: none; }
.tpl-div { display: block; height: 1px; background: var(--hair); margin-left: 72px; }
.tpl-btn { width: 100%; height: 54px; border: none; border-radius: 16px; background: var(--nav-active); color: #231900; font-size: 16px; font-weight: 800; box-shadow: 0 6px 16px rgba(247,181,0,.25); }
.tpl-btn:active { transform: scale(.985); }
.tpl-btn:disabled { background: #e7d9a8; box-shadow: none; }
.tpl-banner { display: flex; align-items: flex-start; gap: 10px; background: var(--field); border-radius: 20px; padding: 14px; margin-bottom: 16px; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.tpl-banner .ic { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* Плитки транспорта 2×2 с картинками (transport_settings_screen) */
.veh2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.veh2 { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; background: var(--card); border: 1.5px solid var(--hair); border-radius: 20px; box-shadow: var(--shadow-card); opacity: .55; }
.veh2 img { height: 62px; object-fit: contain; }
.veh2 span { font-size: 15px; font-weight: 700; color: var(--muted); }
.veh2 .v2-check { display: none; width: 20px; height: 20px; color: var(--nav-active); }
.veh2.active { opacity: 1; background: var(--brand-soft); border: 2px solid var(--nav-active); }
.veh2.active span { color: var(--ink); }
.veh2.active .v2-check { display: block; }

/* Нижняя шторка (bottom sheet как в приложении) */
.vsheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: flex; flex-direction: column; justify-content: flex-end; }
.vsheet { background: var(--card); border-radius: 24px 24px 0 0; padding: 12px 22px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; animation: up .25s ease; }
.vsheet.left { align-items: stretch; text-align: left; }
.vsheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 18px; }
.vsheet-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--field); color: var(--ink); display: grid; place-items: center; margin-bottom: 16px; }
.vsheet-circle .ic { width: 32px; height: 32px; }
.vsheet > b { font-size: 18px; font-weight: 800; color: var(--ink); }
.vsheet-sub { font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.45; margin: 8px 0 20px; }
.vsheet-title { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.lang-row2 { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 2px; border: none; background: none; font-size: 15px; font-weight: 600; color: var(--ink); }
.lang-row2 .lr-check { display: none; width: 22px; height: 22px; color: var(--nav-active); }
.lang-row2.active { font-weight: 800; }
.lang-row2.active .lr-check { display: block; }

/* Фотоконтроль: карточка состояния + плитки съёмки (photo_control_screen) */
.state-card { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; box-shadow: var(--shadow-card); padding: 30px 22px; margin: 24px 4px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.state-circle { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--ink); }
.state-circle.ok { background: #e6f7ed; color: #16a34a; }
.state-circle .ic { width: 44px; height: 44px; }
.state-card b { font-size: 21px; font-weight: 800; color: var(--ink); margin-top: 18px; }
.state-card p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 10px 0 22px; }
.state-refresh { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 1.5px solid var(--line); border-radius: 14px; background: none; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.state-refresh .ic { width: 18px; height: 18px; }
.shot-tile { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--card); border: 1px solid var(--hair); border-radius: 20px; box-shadow: var(--shadow-card); padding: 12px; margin-bottom: 12px; text-align: left; }
.shot-thumb { width: 54px; height: 54px; flex: none; border-radius: 13px; background: var(--brand-soft); color: var(--ink); display: grid; place-items: center; overflow: hidden; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-thumb .ic { width: 26px; height: 26px; }
.shot-tx { flex: 1; min-width: 0; }
.shot-tx b { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.shot-tx span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.shot-tx span.ok { color: #16a34a; }
.shot-tile > .ic { width: 24px; height: 24px; flex: none; color: #b5bcc6; }
.shot-tile.filled > .ic { color: #16a34a; }

/* История: белый фон, шапка с «назад», строки заказов как в histories_screen */
#screenHistory.tab-panel { background: var(--page); }
.hist-head { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.hist-head b { font-size: 19px; font-weight: 800; }
.ho-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; flex: none; box-sizing: border-box; padding: 12px 14px; border: none; background: none; text-align: left; color: var(--ink); }
.ho-row + .ho-row { border-top: 1px solid var(--hair); }
.ho-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--field); color: var(--ink); display: grid; place-items: center; }
.ho-ic .ic { width: 20px; height: 20px; }
.ho-tx { flex: 1; min-width: 0; }
.ho-tx b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-tx span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-tx small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.ho-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ho-right b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ho-right .ic { width: 18px; height: 18px; color: var(--muted-2); }
.ho-row.cancelled .ho-right b { color: var(--muted-2); }

/* Доход: заголовок месяца + карточка дней (как _dayList) */
.fin-month { font-size: 15px; font-weight: 800; color: var(--ink); margin: 6px 4px 10px; }
.fin-daycard { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); }
.fd-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; flex: none; box-sizing: border-box; padding: 14px 16px; border: none; background: none; text-align: left; color: var(--ink); }
.fd-row + .fd-row, .fd-sub + .fd-row { border-top: 1px solid var(--hair); }
.fd-tx { flex: 1; min-width: 0; }
.fd-tx b { display: block; font-size: 15.5px; font-weight: 700; }
.fd-tx span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.fd-sum { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fd-row .mr-chev { transition: transform .15s; }
.fd-row.open .mr-chev { transform: rotate(90deg); }
.fd-sub { border-top: 1px solid var(--hair); background: var(--field); padding: 4px 0; }
.fd-sub .acc-row { border: none; box-shadow: none; background: none; border-radius: 0; padding: 10px 16px; }

/* статы на «Линии» */
.line-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.lstat { background: var(--field); border-radius: 12px; padding: 10px; text-align: center; }
.lstat span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.lstat b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* периоды — KSegmented: контейнер field r14, активный чип card r11 с тенью */
.period-chips { display: flex; gap: 0; padding: 4px; background: var(--field); border-radius: 14px; margin-bottom: 14px; }
[data-theme="dark"] .period-chips { background: var(--field); }
.pchip { flex: 1; height: 38px; padding: 0 10px; border: none; background: transparent; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background .16s, color .16s; }
.pchip.active { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
[data-theme="dark"] .pchip.active { box-shadow: none; }

/* карточка заработка — премиальный НЕЙТРАЛЬНЫЙ графит (без сине-навия, как тёмная тема приложения) */
.earn-card { background: linear-gradient(135deg, #111111, #232322); color: #f4f3f1; border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; }
.earn-card > span { font-size: 12px; color: #cac8c3; font-weight: 600; }
.earn-card b { display: block; font-family: "Manrope", sans-serif; letter-spacing: -.3px; font-variant-numeric: tabular-nums; font-size: 32px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.earn-card b i { font-size: 16px; font-style: normal; color: var(--brand); }
.earn-card small { font-size: 12px; color: #94a3b8; }
.btn-mini { padding: 11px 18px; border: none; border-radius: 12px; background: var(--brand); color: var(--on-accent); font-size: 14px; font-weight: 800; box-shadow: 0 4px 12px rgba(255,201,7,.4); }
.acc-list, .hist-list { display: flex; flex-direction: column; gap: 8px; }
.acc-row, .hist-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-card); }
.acc-row .ar-ic, .hist-row .hr-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--brand-soft); color: #b8860b; display: grid; place-items: center; }
.acc-row .ar-main, .hist-row .hr-main { flex: 1; min-width: 0; }
.acc-row .ar-main b, .hist-row .hr-main b { display: block; font-size: 13.5px; }
.acc-row .ar-main span, .hist-row .hr-main span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.acc-row .ar-amt { font-size: 15px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.acc-row .ar-amt.neg { color: var(--red); }
.hist-row .hr-amt { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.empty-note { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 8px; }

/* статы истории */
.hist-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.hstat { background: var(--field); border-radius: var(--r-md); padding: 14px 8px; text-align: center; }
.hstat b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hstat span { font-size: 11px; color: var(--muted); font-weight: 600; }

/* язык */
/* Чат с клиентом */
.ac-mini { position: relative; }
.ac-chat-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-backdrop { position: fixed; inset: 0; z-index: 85; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: flex; flex-direction: column; justify-content: flex-end; }
.chat-sheet { background: var(--bg); border-radius: 22px 22px 0 0; height: 82vh; display: flex; flex-direction: column; overflow: hidden; animation: up .26s cubic-bezier(.2,.8,.2,1); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.chat-head-t b { display: block; font-size: 15px; } .chat-head-t span { font-size: 12px; color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.35; word-break: break-word; }
.chat-msg.me { align-self: flex-end; background: var(--brand); color: #1a1205; border-bottom-right-radius: 5px; }
.chat-msg.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-quick { display: flex; gap: 7px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-qr { flex: none; padding: 8px 12px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14px; color: var(--ink); }
.chat-send { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--brand); display: grid; place-items: center; cursor: pointer; border: none; }
.chat-send .ic { width: 20px; height: 20px; color: #1a1205; }
.chat-send:active { transform: scale(.94); }
.chat-attach { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; }
.chat-attach .ic { width: 20px; height: 20px; color: var(--muted); }
.chat-attach:active { transform: scale(.94); }
.chat-call { margin-left: auto; width: 40px; height: 40px; flex: none; border-radius: 50%; background: #dcfce7; border: 1px solid #bbf7d0; display: grid; place-items: center; text-decoration: none; }
.chat-call .ic { width: 18px; height: 18px; color: #15803d; }
.chat-msg.has-img { padding: 4px; background: none !important; border: none !important; }
.chat-msg.has-img img { display: block; max-width: 200px; width: 100%; border-radius: 10px; cursor: zoom-in; }
/* Достижения (профиль) */
#achSection { display: flex; flex-direction: column; gap: 10px; }
#achSection .sec-label { margin: 4px 2px 0; }
.ach-count { font-style: normal; font-weight: 800; color: var(--brand); }
.prof-level { appearance: none; -webkit-appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; cursor: pointer; }
.prof-level:active { transform: scale(.99); }
.lvl-mid { flex: 1; min-width: 0; }
.lvl-mid small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.lvl-chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
/* Бонус-карта в профиле */
.bonus-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; }
.bc-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; font-weight: 700; }
.bc-top b { color: var(--green); font-size: 14px; }
.bc-prog { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 9px 0 6px; }
.bc-prog-bar { height: 100%; width: 0; background: linear-gradient(90deg, #4ade80, #22c55e); border-radius: 999px; transition: width .4s; }
.bonus-card small { font-size: 12px; color: var(--muted); }
/* Бонус — кликабельная карточка в профиле + модалка деталей */
.bonus-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #4ade80, #22c55e); }
.bonus-ic .ic { width: 20px; height: 20px; color: #052e1a; }
.bonus-reward { flex: none; font-size: 15px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.bonus-big { text-align: center; font-size: 40px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; margin-top: 4px; }
.bonus-big span { font-size: 22px; font-weight: 700; }
.bonus-modal-sub { text-align: center; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.bonus-expl { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Модалка лестницы уровней */
.lvl-modal { position: fixed; inset: 0; z-index: 88; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: flex; flex-direction: column; justify-content: flex-end; }
.lvl-modal.hidden { display: none !important; }
.lvl-sheet { background: var(--bg); border-radius: 22px 22px 0 0; max-height: 82vh; max-height: 82dvh; overflow-y: auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .26s cubic-bezier(.2,.8,.2,1); }
.lvl-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lvl-sheet-head b { font-size: 17px; }
.lvl-x { width: 32px; height: 32px; border: none; background: var(--field); border-radius: 50%; font-size: 15px; color: var(--ink-2); }
.lvl-ladder { display: flex; flex-direction: column; gap: 8px; }
.lvl-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; opacity: .65; }
.lvl-row.done { opacity: 1; }
.lvl-row.cur { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); opacity: 1; }
.lvl-row-info { flex: 1; min-width: 0; }
.lvl-row-info b { display: block; font-size: 14px; }
.lvl-row-info small { font-size: 12px; color: var(--muted); }
.lvl-tick { color: var(--green); font-weight: 800; font-size: 16px; }
.lvl-bonusbox { margin-top: 14px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 13px 14px; display: flex; flex-direction: column; gap: 4px; }
.lvl-bonusbox b { font-size: 14px; } .lvl-bonusbox span { font-size: 12.5px; color: var(--muted); }
.ach { appearance: none; -webkit-appearance: none; position: relative; text-align: left; width: 100%; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px; opacity: .72; }
.ach.on { opacity: 1; border-color: var(--brand); background: linear-gradient(180deg, var(--brand-soft), var(--card)); }
.ach:not(.on) .ach-prog span { background: var(--muted-2); }
.ach-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--field); margin-bottom: 8px; }
.ach.on .ach-ic { background: var(--brand); }
.ach.on .ach-ic .ic { color: #1a1205; }
.ach-ic .ic { width: 20px; height: 20px; color: var(--muted); }
.ach b { display: block; font-size: 13.5px; }
.ach small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ach-done { position: absolute; top: 11px; right: 12px; color: var(--green); font-weight: 800; }
.ach-prog { height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 9px; }
.ach-prog span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; font-weight: 700; color: var(--ink); }
.pref-row i { font-style: normal; font-weight: 800; font-size: 13px; color: var(--muted); }
.pref-row.on i { color: var(--green); }
.lang-row { display: flex; gap: 8px; }
.lang-chip { flex: 1; padding: 11px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: .15s; }
.lang-chip.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
/* настройки: подпись секции + сегмент темы (Светлая/Тёмная) */
.seg { display: flex; gap: 6px; padding: 4px; background: var(--field); border-radius: 14px; }
.seg-b { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; border: none; background: transparent; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .15s; }
.seg-b .ic { width: 17px; height: 17px; }
.seg-b.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
#authLang { margin-top: 6px; }
#authLang .lang-chip { padding: 9px; }

/* кнопки профиля */
.btn-ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; font-size: 14.5px; font-weight: 700; }
.btn-ghost .ic { width: 18px; height: 18px; }

/* SOS на активном заказе */
.ac-foot { display: flex; flex-direction: column; gap: 6px; }
.ac-sos { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; border: 1.5px solid #fecdd3; background: #fff1f2; color: var(--red); border-radius: 12px; font-size: 13.5px; font-weight: 700; }
.ac-sos .ic { width: 17px; height: 17px; }
.sos-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; text-align: center; }
.sos-head b { font-size: 18px; }
.sos-head span { font-size: 13px; color: var(--muted); }
.logo.small { width: 52px; height: 52px; border-radius: 15px; }
.logo.small .ic { width: 26px; height: 26px; }
.logo.small.danger { background: #fff1f2; color: var(--red); box-shadow: none; }
.sos-list { display: flex; flex-direction: column; gap: 8px; }
.sos-opt { text-align: left; padding: 14px; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--ink); }
.sos-opt:active { background: var(--field); }

/* ===== Наличный расчёт ===== */
.ac-cash { display: flex; align-items: center; gap: 8px; background: var(--brand-soft); border: 1.5px solid var(--brand); border-radius: var(--r-md); padding: 11px 13px; font-size: 13.5px; font-weight: 600; color: #7c5a00; }
.ac-cash.hidden { display: none !important; }
.ac-cash .ic { width: 18px; height: 18px; color: #b8860b; flex: none; }
.ac-cash b { margin-left: auto; font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
/* оплата картой — наличные не нужны (зелёный, спокойный вид) */
.ac-cash.paid { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.ac-cash.paid .ic { color: #15803d; }
/* Старые стили cash-card заменены нативным вариантом (см. блок «Касса как _cashCard» выше) */
.cash-card.hidden { display: none !important; }
.cash-warn.hidden { display: none !important; }
.review-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.review-row .rv-top { display: flex; align-items: center; justify-content: space-between; }
.review-row .rv-stars { color: var(--brand); font-size: 14px; }
.review-row .rv-date { font-size: 11.5px; color: var(--muted); }
.review-row .rv-text { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* ===== Код получателя ===== */
.code-modal { max-width: 420px; text-align: center; align-items: stretch; }
.code-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.code-head .logo.small { width: 52px; height: 52px; border-radius: 15px; }
.code-head .logo.small .ic { width: 26px; height: 26px; }
.code-head b { font-size: 18px; }
.code-head span { font-size: 13px; color: var(--muted); }
.code-otp { margin: 4px 0; }

/* префикс «A» у номера паспорта */
.pass-row { display: flex; align-items: center; gap: 6px; }

/* ===== Профиль: аватар, настройки, транспорт ===== */
.prof-id { flex: 1; min-width: 0; }
.prof-id b { display: block; font-size: 18px; }
.prof-id span { font-size: 13px; color: var(--muted); }
.prof-av-cam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; border: 2px solid var(--card); }
.prof-av-cam .ic { width: 12px; height: 12px; }
.prof-edit { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; flex: none; }
.prof-edit .ic { width: 20px; height: 20px; }

/* блокировка транспорта без документов */
.veh { position: relative; }
.veh-hint { font-size: 12px; color: var(--muted); line-height: 1.4; margin: -4px 2px 0; }

/* настройки профиля */
/* строка-переключатель (тёмная тема) */
.switch { position: relative; width: 50px; height: 30px; border: none; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .18s; flex: none; padding: 0; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.switch.on { background: var(--brand); }
.switch.on i { transform: translateX(20px); }
.prof-av.lg { width: 72px; height: 72px; }
.prof-av.lg .ic { width: 34px; height: 34px; }
.btn-mini.wide { width: 100%; padding: 13px; }

/* смена номера */
.ph-to { font-size: 13px; color: var(--muted); text-align: center; margin: 2px 0 8px; }
.ph-to b { color: var(--ink); }
.phone-otp { margin: 4px 0; }

/* ===== Поддержка ===== */
.sup-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; }
.sup-card-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--ink); display: grid; place-items: center; }
.sup-card-ic .ic { width: 20px; height: 20px; }
.sup-card-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sup-card-tx b { font-size: 15px; }
.sup-card-tx i { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.35; }
.sup-card-arr { color: var(--muted-2); flex: none; }
.sup-card-arr .ic { width: 16px; height: 16px; }

/* Поддержка — полноэкранный чат (как support_screen.dart). 100dvh: честная высота
   на телефоне (vh на мобильных включает URL-бар — низ обрезался). */
.sup-screen { position: fixed; inset: 0; z-index: 60; background: var(--page); display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.sup-head { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 10px; background: var(--card); border-bottom: 1px solid var(--hair); flex: none; }
.sup-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--field); color: var(--ink); display: grid; place-items: center; flex: none; }
.sup-ava .ic { width: 20px; height: 20px; }
.sup-tt { flex: 1; min-width: 0; }
.sup-tt b { display: block; font-size: 15.5px; font-weight: 800; }
.sup-tt i { display: flex; align-items: center; gap: 5px; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sup-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sup-chatv { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.sup-closed-hint { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 14px; }
.sup-quick { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; flex: none; }
.sup-quick::-webkit-scrollbar { display: none; }
.sup-q { flex: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--field); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.sup-q:active { background: var(--brand-soft); }
.sup-view.hidden { display: none; }
.sup-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sup-type { display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--field); border: 1.5px solid transparent; border-radius: 13px; color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; }
.sup-type .ic { width: 18px; height: 18px; flex: none; color: var(--muted); }
.sup-type:active { border-color: var(--ink); }
.sup-tickets { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 0; }
.sup-tk { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; text-align: left; }
.sup-tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sup-tk-main b { font-size: 14px; }
.sup-tk-main span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-tk-st { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; flex: none; }
.sup-tk-st.open { color: var(--green); background: #f0fdf4; }
.sup-tk-st.closed { color: var(--muted); background: var(--field); }

.sup-chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sup-chat-id { flex: 1; min-width: 0; }
.sup-chat-id b { display: block; font-size: 16px; }
.sup-chat-id span { font-size: 12px; color: var(--muted); }
.sup-close-tk { width: auto; flex: none; color: var(--red); padding: 4px 6px; }
.sup-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.sup-bubble { max-width: 80%; padding: 9px 13px; border-radius: 15px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.sup-bubble.op { align-self: flex-start; background: var(--field); color: var(--ink); border-bottom-left-radius: 5px; }
.sup-bubble.me { align-self: flex-end; background: var(--brand); color: var(--ink); border-bottom-right-radius: 5px; }
.sup-input { display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.sup-input input { flex: 1; min-width: 0; border: 1.5px solid var(--line); outline: none; background: var(--field); color: var(--ink); font-size: 15px; border-radius: 13px; padding: 12px 14px; }
.sup-input input:focus { border-color: var(--ink); }
.sup-send { width: 46px; height: 46px; flex: none; border: none; border-radius: 13px; background: var(--brand); color: var(--ink); display: grid; place-items: center; }
.sup-send:disabled { opacity: .5; }
.sup-send .ic { width: 20px; height: 20px; }
.sup-attach { width: 44px; height: 46px; flex: none; border: 1.5px solid var(--line); border-radius: 13px; background: var(--field); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sup-img { display: block; max-width: 200px; width: 100%; border-radius: 11px; margin-top: 4px; }
.sup-bubble.me .sup-img { margin-left: auto; }


/* ===== Адреса курьера / выбор точки на карте ===== */
/* ===== Выбор адреса — 1:1 как home_address_screen.dart: карта на весь экран,
   ФИКСИРОВАННЫЙ пин по центру, нижняя карточка «адрес + Подтвердить» ===== */
.addr-screen { position: fixed; inset: 0; z-index: 70; background: var(--page); }
.addr-screen.hidden { display: none !important; }
.addr-map-full { position: absolute; inset: 0; z-index: 1; }
/* Пин: круг с белой обводкой + «ножка»; остриё ножки — ровно центр экрана */
.addr-pin { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.addr-pin-head { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); border: 3.5px solid #fff; box-shadow: 0 3px 9px rgba(15,23,42,.30); display: grid; place-items: center; }
.addr-pin-head i { width: 12px; height: 12px; border-radius: 50%; background: #fff; display: block; }
.addr-pin-tail { width: 3.5px; height: 10px; background: var(--brand); }
.addr-pin-shadow { position: absolute; left: 50%; top: 50%; z-index: 2; width: 12px; height: 4px; margin-left: -6px; border-radius: 3px; background: rgba(0,0,0,.22); pointer-events: none; }
/* Кнопки поверх карты */
.addr-back, .addr-gps { position: absolute; z-index: 4; width: 44px; height: 44px; border: none; border-radius: 50%; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(15,23,42,.20); }
.addr-back { left: 12px; top: calc(12px + env(safe-area-inset-top)); }
.addr-back .ic, .addr-gps .ic { width: 22px; height: 22px; }
.addr-gps { right: 12px; bottom: 44%; }
/* Поиск (только для разового адреса «по делам») */
.addr-search { position: absolute; z-index: 4; left: 68px; right: 12px; top: calc(12px + env(safe-area-inset-top)); }
.addr-search.hidden { display: none !important; }
.addr-search input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: 14px; border: none; background: var(--card); color: var(--ink); font-size: 15px; box-shadow: 0 2px 10px rgba(15,23,42,.20); }
.addr-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border-radius: 14px; overflow: hidden; max-height: 240px; overflow-y: auto; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.addr-sug { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 11px 14px; background: none; border: 0; border-bottom: 1px solid var(--hair); text-align: left; color: var(--ink); }
.addr-sug:last-child { border-bottom: 0; }
.addr-sug b { font-size: 14px; font-weight: 600; }
.addr-sug small { color: var(--muted); font-size: 12px; }
/* Нижняя карточка */
.addr-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(15,23,42,.12); padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); }
.addr-hint { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.addr-cur-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 16px; }
.addr-cur-row b { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.addr-note { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.addr-note.hidden { display: none !important; }


/* ===== Подтверждение режима «по пути» (маршрут + ETA) ===== */
.route-confirm { position: relative; background: var(--bg, #f6f7f9); color: inherit; border: 1px solid rgba(127,127,127,.18); border-radius: 14px; padding: 14px; margin-top: 2px; box-shadow: none; }
.route-confirm .rc-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; background: none; border: 0; opacity: .55; cursor: pointer; color: inherit; }
.route-confirm .rc-title b { font-size: 16px; font-weight: 700; }
.route-confirm .rc-meta { font-size: 15px; font-weight: 700; margin: 4px 0 2px; color: var(--accent, #d98e00); }
.route-confirm .rc-sub { font-size: 12px; opacity: .65; margin-bottom: 12px; }
.route-confirm .rc-actions { display: flex; gap: 10px; align-items: stretch; }
.route-confirm .rc-actions .btn-ghost { flex: 1; width: auto; min-width: 0; padding: 12px 14px; }
.route-confirm .rc-actions .btn-mini { flex: 1; width: auto; min-width: 0; padding: 12px 14px; }


/* ===== Линия: остров + шторка «Заказы по пути» ===== */
#screenLine.bottom-panel { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0 !important; background: transparent; box-shadow: none; border-top: 0; }
.line-island { align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 200px; max-width: 86%; padding: 13px 26px; margin: 6px auto 12px; border: 0; border-radius: 999px; font-weight: 700; font-size: 15px; color: #fff; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
/* Как в приложении (_islandButton): «Выйти на линию» — ЖЁЛТЫЙ акцент с тёмным текстом,
   «Уйти с линии» — красный с белым */
.line-island.off { background: var(--brand); color: var(--on-accent); }
.line-island.on { background: var(--red); }
.line-island .ic { width: 18px; height: 18px; }
.route-sheet { background: var(--card, #fff); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.12); overflow: hidden; transition: max-height .28s ease; max-height: 56px; }
.route-sheet.expanded { max-height: 72vh; overflow-y: auto; }
.rs-handle { position: relative; display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; cursor: pointer; user-select: none; touch-action: none; }
.rs-grip { position: absolute; left: 50%; top: 7px; transform: translateX(-50%); width: 38px; height: 5px; border-radius: 3px; background: rgba(127,127,127,.35); }
.rs-title { font-size: 15px; font-weight: 700; flex: 1; }
.rs-chev { width: 18px; height: 18px; opacity: .5; transition: transform .28s; }
.route-sheet.expanded .rs-chev { transform: rotate(180deg); }
.rs-body { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.rs-route { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border: 1px solid rgba(127,127,127,.14); border-radius: 16px; background: var(--card, #fff); color: inherit; text-align: left; cursor: pointer; box-shadow: 0 2px 10px rgba(15,23,42,.05); transition: border-color .15s, box-shadow .15s, transform .08s; }
.rs-route:active { transform: scale(.99); }
.rs-route .rs-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.rs-route .rs-ic .ic { width: 23px; height: 23px; }
.rs-route .rs-tx { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rs-route .rs-tx b { font-size: 15px; font-weight: 700; }
.rs-route .rs-tx i { font-size: 12px; opacity: .58; font-style: normal; }
.rs-route .rs-arr { flex: 0 0 auto; opacity: .32; }
.rs-route .rs-arr .ic { width: 18px; height: 18px; }
#btnRouteHome .rs-ic { background: #E8F5EC; color: #15803D; }
#btnRouteWork .rs-ic { background: #FFF3E0; color: #B45309; }
[data-theme="dark"] #btnRouteHome .rs-ic { background: rgba(21,128,61,.20); color: #5cd98a; }
[data-theme="dark"] #btnRouteWork .rs-ic { background: rgba(180,83,9,.22); color: #f0a653; }
.rs-route.active { border-color: var(--accent, #ffc907); box-shadow: 0 4px 16px rgba(255,201,7,.32); }
.rs-cancel { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border: 1px solid #F3B5B5; border-radius: 14px; background: #FDECEC; color: #9B1C1C; font-weight: 600; font-size: 15px; cursor: pointer; }
.rs-cancel .ic { width: 18px; height: 18px; }
[data-theme="dark"] .rs-cancel { background: #3a1c1c; border-color: #6b2b2b; color: #ffb4b4; }
.pc-warn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FDECEC; border: 1px solid #F3B5B5; color: #9B1C1C; }
.pc-warn-ic .ic { width: 22px; height: 22px; }
.pc-warn-tx { flex: 1; display: flex; flex-direction: column; }
.pc-warn-tx b { font-size: 14px; }
.pc-warn-tx i { font-size: 12px; opacity: .85; font-style: normal; }
.pc-warn .btn-mini { flex: 0 0 auto; background: #9B1C1C; color: #fff; }
[data-theme="dark"] .pc-warn { background: #3a1c1c; border-color: #6b2b2b; color: #ffb4b4; }
[data-theme="dark"] .pc-warn .btn-mini { background: #b33; }


/* ===== «По делам»: встроенный поиск ===== */
.errand-panel { display: flex; flex-direction: column; gap: 8px; animation: epIn .2s ease; }
@keyframes epIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.errand-panel .ep-row { display: flex; gap: 8px; align-items: center; }
.errand-panel input { flex: 1; min-width: 0; padding: 13px 14px; border-radius: 14px; border: 1px solid rgba(127,127,127,.3); background: var(--bg, #f6f7f9); color: inherit; font-size: 15px; }
.errand-panel .ep-x { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; border: 1px solid rgba(127,127,127,.2); background: var(--card, #fff); color: inherit; display: grid; place-items: center; cursor: pointer; }
.errand-panel .ep-x .ic { width: 18px; height: 18px; }
.errand-panel .ep-map { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(127,127,127,.4); background: transparent; color: inherit; font-weight: 600; cursor: pointer; }
.errand-panel .ep-map .ic { width: 18px; height: 18px; }
.errand-panel .addr-suggest { position: static; box-shadow: none; max-height: 210px; }


/* ===== Блок-экран: нет геолокации / нет сети ===== */
.geo-gate { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15,23,42,.62); backdrop-filter: blur(7px) saturate(.55); -webkit-backdrop-filter: blur(7px) saturate(.55); }
[data-theme="dark"] .geo-gate { background: rgba(2,6,16,.74); }
.geo-gate.hidden { display: none; }
.geo-gate-box { background: var(--card); border-radius: 22px; padding: 30px 22px; max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.geo-gate-ic { width: 78px; height: 78px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: #b45309; }
.geo-gate-ic .ic { width: 38px; height: 38px; }
.geo-gate-title { font-weight: 800; font-size: 19px; margin-bottom: 8px; color: var(--ink); }
.geo-gate-sub { color: var(--muted); font-size: 14px; line-height: 1.45; margin-bottom: 22px; }
.geo-gate .btn { width: 100%; }

/* ===== Метка курьера — 3D-стрелка как в приложении (_NavArrowPainter) ===== */
.me-marker .me-arrow { width: 54px; height: 54px; transition: transform .25s ease-out; will-change: transform; }
.me-marker .me-arrow svg { display: block; }

/* ===== Баланс — 1:1 как balance_screen.dart: белый фон, простая шапка ===== */
.bal-page { background: var(--page); }
.bal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.bal-head b { font-size: 19px; font-weight: 800; color: var(--ink); }
.bal-hero { background: linear-gradient(135deg, #ffc421, #f2a100); border-radius: 20px; padding: 18px; box-shadow: 0 10px 22px rgba(247,181,0,.30); margin-bottom: 12px; }
.bh-label { display: block; font-size: 13.5px; font-weight: 700; color: rgba(35,25,0,.8); }
.bh-sum { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 12px; color: #231900; }
.bh-sum i { font-style: normal; font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bh-sum em { font-style: normal; font-size: 17px; font-weight: 700; }
.bh-line { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #231900; }
.bh-line .ic { width: 15px; height: 15px; color: rgba(35,25,0,.6); flex: none; }
.bh-line i { font-style: normal; }
.bh-line.hidden { display: none !important; }
/* Пополнение (деньги вносит касса — ведём к диспетчеру) */
.bal-topup { margin-bottom: 12px; }
.bal-topup.hidden { display: none !important; }
.bal-topup-act { padding: 12px 16px 14px; }
.bal-topup.flash { animation: bal-flash 1.1s ease-in-out 2; }
@keyframes bal-flash { 0%, 100% { box-shadow: var(--shadow-card); } 50% { box-shadow: 0 0 0 3px rgba(247,181,0,.55); } }
#balRequest { margin-bottom: 12px; }
/* Ниже порога вывода кнопка нейтрально-серая (не «выцветшая жёлтая») + подсказка */
#balRequest:disabled { background: var(--field); color: var(--muted-2); box-shadow: none; }
.bal-req-hint { margin: -6px 2px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; }
.bal-req-hint.hidden { display: none !important; }
.bal-pills { margin: 18px 0 12px; }
.bal-note { font-size: 12px; color: var(--muted-2); line-height: 1.4; margin-top: 16px; }
.bal-note-err { display: block; font-size: 12px; color: var(--red); margin-top: 2px; }
/* Статус-чип выплаты */
.bal-chip { flex: none; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.bal-chip.approved { background: rgba(22,163,74,.12); color: #16a34a; }
.bal-chip.rejected { background: rgba(225,29,72,.12); color: #e11d48; }
.bal-chip.voided { background: rgba(138,144,153,.14); color: #8a9099; }
.bal-chip.requested { background: rgba(180,83,9,.12); color: #b45309; }
/* Суммы движений: приход зелёный, комиссия красная (как в приложении) */
.ho-right b.pos { color: #16a34a; }
.ho-right b.neg { color: #e11d48; }

/* ===== «Доставка выполнена!» — финиш заказа (delivery_success.dart) ===== */
.done-screen { position: fixed; inset: 0; z-index: 90; background: var(--page); display: flex; flex-direction: column; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; animation: up .24s ease; }
.done-screen.hidden { display: none !important; }
.done-x { align-self: flex-start; width: 44px; height: 44px; border: none; background: none; color: var(--ink); display: grid; place-items: center; }
.done-x .ic { width: 26px; height: 26px; }
.done-mascot { height: 150px; object-fit: contain; margin-top: 4px; }
.done-title { font-size: 22px; font-weight: 800; color: var(--ink); text-align: center; margin-top: 18px; }
.done-sub { font-size: 14px; font-weight: 500; color: var(--muted); text-align: center; margin-top: 8px; }
.done-card { width: 100%; max-width: 420px; margin-top: 22px; padding: 16px; }
.done-earn-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.done-earn-row span { font-size: 14px; font-weight: 700; color: var(--ink); }
.done-earn-row b { font-size: 24px; font-weight: 800; color: #16a34a; font-variant-numeric: tabular-nums; }
.done-div { display: block; height: 1px; background: var(--line); margin: 14px 0 12px; }
.done-brk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.done-brk-row span { font-size: 13.5px; color: var(--muted); }
.done-brk-row b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.done-ok { width: 100%; max-width: 420px; margin-top: auto; }
