/* ============ Yoobi Курьер — светлая тема (как клиент) ============ */
:root {
  --brand: #ffc907;
  --brand-soft: #fff6d6;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #eef1f6;
  --field: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --green: #10b981;
  --red: #f43f5e;
  --blue: #2563eb;
  --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: 22px; --r-md: 14px;
}
/* ===== Тёмная тема (как в макете TezkorCourier) ===== */
[data-theme="dark"] {
  --brand-soft: rgba(255,201,7,.16);
  --ink: #e7ecf5; --ink-2: #b9c4da; --muted: #8b99b5; --muted-2: #5d6b87;
  --bg: #0b1220; --field: #1a2440; --card: #111a2e; --line: #233052;
  --shadow-lg: 0 18px 50px rgba(0,0,0,.55); --shadow-md: 0 10px 26px rgba(0,0,0,.45); --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
}
[data-theme="dark"] #map { background: #0b1220; }
[data-theme="dark"] .top { background: linear-gradient(180deg, rgba(11,18,32,.95), rgba(11,18,32,0)); }
[data-theme="dark"] .field:focus-within, [data-theme="dark"] .otp-box:focus { background: var(--field); }
[data-theme="dark"] .btn { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .btn:hover { background: #ffd633; }
[data-theme="dark"] .btn:disabled { background: #2a3550; color: #6b7794; box-shadow: none; }
[data-theme="dark"] .ac-primary { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .ac-primary.go { background: var(--green); color: #fff; }
[data-theme="dark"] .ac-primary:disabled { background: #2a3550; color: #6b7794; }
[data-theme="dark"] .ac-pin, [data-theme="dark"] .rt-dot.a { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .err { background: rgba(244,63,94,.14); border-color: rgba(244,63,94,.4); color: #fda4af; }
[data-theme="dark"] .up.done, [data-theme="dark"] .prof-verified { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); }
[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(17,26,46,.8) !important; color: #8b99b5 !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: #b9c4da !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Inter", -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
.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; bottom: calc(var(--nav-h) + var(--panel-h, 200px) + 16px); z-index: 30; width: 46px; height: 46px; border: none; border-radius: 14px; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-md); }

/* ===== Общие листы (вход/верификация/проверка) ===== */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); }
.sheet.center { display: grid; place-items: center; padding: 20px; }
.sheet.scroll { overflow-y: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.box { width: min(380px, 100%); 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: 34px 30px 26px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.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: "Unbounded", sans-serif; 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; }

.btn { width: 100%; padding: 16px; border: none; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15.5px; font-weight: 800; transition: .15s; box-shadow: var(--shadow-md); }
.btn:hover { background: #1e293b; }
.btn:active { transform: scale(.985); }
.btn:disabled { background: #cbd5e1; 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: "Unbounded", sans-serif; 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(16,185,129,.18); animation: pulse 1.6s infinite; }
.conn-dot.off { background: var(--muted-2); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(16,185,129,.5)} 70%{box-shadow:0 0 0 10px rgba(16,185,129,0)} 100%{box-shadow:0 0 0 0 rgba(16,185,129,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 { 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; }
.prof-head { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.prof-av { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--ink); border: none; padding: 0; cursor: pointer; flex: none; }
.prof-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.prof-av .ic { width: 28px; height: 28px; }
.prof-head b { display: block; font-size: 18px; }
.prof-head span { font-size: 13px; color: var(--muted); }
.prof-verified { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 10px 12px; }
.prof-verified.no { color: var(--muted); background: var(--field); border-color: var(--line); }

/* ===== Маркер курьера на карте ===== */
.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: #0b1220; 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: #111a2e; 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; }

.offer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.55); backdrop-filter: blur(5px); display: grid; place-items: end center; padding: 0; }
.offer-card { width: 100%; max-width: 480px; background: var(--card); border-radius: 24px 24px 0 0; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: up .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
.offer-timer { height: 5px; background: var(--line); border-radius: 0 0 6px 6px; overflow: hidden; margin: 0 -18px; }
.offer-timer span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), #34d399); transform-origin: left; }
.offer-timer span.run { animation: shrink linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.offer-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.offer-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: #b45309; font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 999px; }
.offer-badge .ic { width: 16px; height: 16px; }
.offer-price { text-align: right; }
.offer-earn-l { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--green); margin-bottom: -2px; }
.offer-price b { font-family: "Unbounded", sans-serif; font-size: 26px; }
.offer-price span { font-size: 14px; color: var(--muted); font-weight: 700; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-meta span { display: inline-flex; align-items: center; gap: 5px; background: var(--field); border-radius: 10px; padding: 7px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.offer-meta .ic { width: 15px; height: 15px; color: var(--muted); }
.offer-meta i { font-style: normal; font-weight: 800; color: var(--ink); }
.offer-route { display: flex; flex-direction: column; gap: 2px; background: var(--field); border-radius: var(--r-md); padding: 12px 14px; }
.rt-row { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; position: relative; }
.rt-row:first-child::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: -6px; width: 2px; background: var(--line); }
.rt-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; z-index: 1; }
.rt-dot.a { background: var(--ink); }
.rt-dot.b { background: var(--green); }
.rt-txt { min-width: 0; }
.rt-txt b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.rt-txt span { font-size: 14px; font-weight: 600; color: var(--ink); }
.offer-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.offer-btn { padding: 16px; border: none; border-radius: 14px; font-size: 15px; font-weight: 800; transition: .15s; }
.offer-btn.decline { background: var(--field); color: var(--ink-2); }
.offer-btn.accept { background: var(--green); color: #fff; box-shadow: var(--shadow-md); }
.offer-btn:active { transform: scale(.985); }

/* ===== Активный заказ ===== */
.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: "Unbounded", sans-serif; 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(--ink); 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(--ink); }
.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 { font-size: 12.5px; color: var(--ink-2); font-style: normal; }
.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; }
.ac-primary { width: 100%; padding: 17px; border: none; border-radius: 16px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 800; transition: .15s; box-shadow: var(--shadow-md); }
.ac-primary.go { background: var(--green); }
.ac-primary:active { transform: scale(.985); }
.ac-primary:disabled { background: #cbd5e1; box-shadow: none; }

/* ===== Нижняя навигация + вкладки ===== */
:root { --nav-h: calc(58px + 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-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(15,23,42,.06); }
.navb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: none; color: var(--muted-2); font-size: 10.5px; font-weight: 700; transition: color .15s; }
.navb .ic { width: 22px; height: 22px; }
.navb.active { color: var(--ink); }
.navb.active .ic { color: #b8860b; }

/* панели над навигацией */
.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 24px; 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; }
#screenProfile .tp-title { margin-bottom: 2px; }
#screenProfile .sec-label { margin: 0 2px; }
.tp-title { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 20px; margin-bottom: 14px; }

/* статы на «Линии» */
.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; }

/* периоды */
.period-chips { display: flex; gap: 8px; margin-bottom: 14px; }
.pchip { flex: 1; padding: 10px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pchip.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }

/* карточка заработка */
.earn-card { background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; }
.earn-card > span { font-size: 12px; color: #cbd5e1; font-weight: 600; }
.earn-card b { display: block; font-family: "Unbounded", sans-serif; 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; }
.withdraw-card { display: flex; align-items: center; justify-content: space-between; background: var(--field); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.withdraw-card span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.withdraw-card b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-mini { padding: 11px 18px; border: none; border-radius: 12px; background: var(--brand); color: var(--ink); 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(--line); border-radius: var(--r-md); padding: 12px 14px; }
.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; }
.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, #34d399, #10b981); 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, #34d399, #10b981); }
.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; 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); }
#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 { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.cash-card.hidden { display: none !important; }
.cash-top { display: flex; align-items: center; justify-content: space-between; }
.cash-top span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cash-top b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cash-bar { height: 8px; border-radius: 999px; background: var(--field); overflow: hidden; margin: 10px 0; }
.cash-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.cash-bar span.over { background: var(--red); }
.cash-warn { font-size: 12px; color: var(--red); font-weight: 600; margin-bottom: 8px; }
.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-lock { display: none; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--field); color: var(--muted); place-items: center; }
.veh-lock .ic { width: 11px; height: 11px; }
.veh.locked { opacity: .55; }
.veh.locked .veh-lock { display: grid; }
.veh.locked.active { opacity: 1; }
.veh-hint { font-size: 12px; color: var(--muted); line-height: 1.4; margin: -4px 2px 0; }

/* настройки профиля */
.set-av-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.prof-av.lg { width: 72px; height: 72px; }
.prof-av.lg .ic { width: 34px; height: 34px; }
.set-phone-row { display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: 13px; padding: 11px 14px; }
.set-phone-cur { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.set-phone-cur span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.set-phone-cur b { font-size: 16px; }
.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; }

.sup-modal { height: min(82vh, 680px); padding-top: 18px; }
.sup-view { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.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; }


/* ===== Адреса курьера / выбор точки на карте ===== */
.addr-modal { max-width: 480px; }
.addr-card .sup-card-tx i { white-space: normal; line-height: 1.3; }
.addr-search { position: relative; }
.addr-search input { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(127,127,127,.3); background: var(--bg, #fff); color: inherit; font-size: 15px; }
.addr-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--card, #fff); border: 1px solid rgba(127,127,127,.18); border-radius: 12px; overflow: hidden; max-height: 230px; 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: 10px 13px; background: none; border: 0; border-bottom: 1px solid rgba(127,127,127,.12); text-align: left; cursor: pointer; color: inherit; }
.addr-sug:last-child { border-bottom: 0; }
.addr-sug:hover { background: rgba(127,127,127,.08); }
.addr-sug b { font-size: 14px; font-weight: 600; }
.addr-sug small { opacity: .6; font-size: 12px; }
.addr-map { height: 240px; border-radius: 14px; overflow: hidden; margin: 10px 0; position: relative; }
.addr-map::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -20px 0 0 -10px; background: var(--accent, #ffc907); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.45); z-index: 500; pointer-events: none; }
.addr-current { font-size: 13px; opacity: .85; margin: 6px 0; }
.addr-current b { font-weight: 600; }


/* ===== Подтверждение режима «по пути» (маршрут + 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); }
.line-island.off { background: #15803D; }
.line-island.on { background: #E5484D; }
.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; }
