:root {
  --bg: #F1F4F7;
  --card: #FFFFFF;
  --text: #14213D;
  --muted: #5F6F81;
  --line: #DDE3EA;
  --seg: #E3E9EF;
  --accent: #FFC629;
  --on-accent: #14213D;
  --green: #17794D;
  --orange: #A15C00;
  --red: #B3261E;
  --red-bg: #FDECEA;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151C; --card: #1A222D; --text: #EEF2F7; --muted: #9AA8B8; --line: #2B3644; --seg: #232D3A;
    --green: #5FD38D; --orange: #F2B35C; --red: #FF8A80; --red-bg: #3A1F1D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10151C;
  --card: #1A222D;
  --text: #EEF2F7;
  --muted: #9AA8B8;
  --line: #2B3644;
  --seg: #232D3A;
  --green: #5FD38D;
  --orange: #F2B35C;
  --red: #FF8A80;
  --red-bg: #3A1F1D;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 20px;
  -webkit-text-size-adjust: 100%;
}
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.content { flex: 1; padding: 0 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.head { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px 14px; gap: 8px; }
.head.sub { padding-top: 20px; }
h1 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -0.3px; }
h2 { margin: 6px 0 0; font-size: 18px; line-height: 24px; font-weight: 800; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--card); display: flex; align-items: center; justify-content: center; padding: 0; flex: none; position: relative;
}
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
}

/* segment */
.seg { padding: 4px; background: var(--seg); border-radius: 12px; display: flex; gap: 4px; }
.seg button {
  flex: 1; min-height: 44px; border: none; border-radius: 9px; background: transparent; color: var(--muted);
  font-size: 15px; font-weight: 700; padding: 0 6px;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--card); color: var(--text); font-weight: 800; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }

/* yo'nalish kartasi */
.route { padding: 12px 10px 12px 16px; background: var(--card); border-radius: 16px; display: flex; align-items: center; gap: 8px; }
.route .side { flex: 1; min-width: 0; }
.route .side.right { text-align: right; padding-right: 6px; }
.label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.place { font-size: 20px; line-height: 26px; font-weight: 800; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--muted); }

/* sana chiplari */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 4px; margin: 0 -20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--card); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; }

.count { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* kartochkalar */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--card); border-radius: 14px; }
.card.fit { box-shadow: inset 4px 0 0 var(--accent); }
.card .whenbox { width: 70px; flex: none; display: flex; flex-direction: column; }
.card .when { flex: none; font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: -0.5px; }
.card .when.range { font-size: 12px; line-height: 24px; letter-spacing: -0.3px; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 13px; line-height: 18px; font-weight: 800; }
.card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.card .title { font-size: 15px; line-height: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .title.row1 { display: flex; align-items: center; gap: 8px; }
.card .title.row1 .ell { flex: 1; }
.card .car2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }
.card .title .ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card .title .car { font-weight: 600; color: var(--muted); }
.card .meta { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.card .note-t { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.card .seats { font-size: 12px; line-height: 16px; font-weight: 700; color: var(--green); }
.card .seats.low { color: var(--orange); }
.card .parcel { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text); }
.card .parcel svg { flex: none; }
.sw-text { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.card .actions { display: flex; gap: 8px; flex: none; }
.call {
  width: 38px; height: 38px; border-radius: 19px; border: none; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.call.ghost { width: 40px; height: 40px; background: transparent; border: 1px solid var(--line); color: var(--text); margin: 0 4px; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-weight: 600; background: var(--card); border-radius: 16px; }
.empty b { display: block; color: var(--text); font-size: 17px; line-height: 24px; margin-bottom: 4px; }

/* pastki panel */
.bar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.bar .pad { padding: 10px 20px 10px; display: flex; flex-direction: column; gap: 8px; }
.bar .pad.last { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.bar .hint { text-align: center; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }
.btn {
  min-height: 52px; border-radius: 14px; border: none; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 800; padding: 0 16px; width: 100%;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); min-height: 44px; font-size: 14px; font-weight: 700; width: auto; }
.btn.danger { color: var(--red); }
.nav { display: grid; grid-template-columns: 1fr 72px 1fr; align-items: center; padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); }
.nav-item { min-height: 52px; border: none; background: transparent; color: var(--muted); position: relative; display: flex; align-items: center; justify-content: center; padding: 0; }
.nav-ico { width: 64px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.nav-item[aria-current="page"] { color: var(--text); }
.nav-item[aria-current="page"] .nav-ico { background: var(--seg); }
.nav-add {
  width: 60px; height: 60px; border-radius: 30px; border: none; background: var(--accent); color: var(--on-accent); justify-self: center;
  margin-top: -30px; display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 0 0 6px var(--card), 0 6px 14px rgba(0, 0, 0, .22);
}
.nav-add:active { transform: scale(.96); }
.nav-badge {
  position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.profile-card { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 16px; padding: 16px; }
.taxi-logo .tx-ink { fill: var(--on-accent); }
.taxi-logo .tx-cut { fill: var(--accent); }
.taxi-logo .tx-text { font: 800 8.4px Manrope, system-ui, sans-serif; letter-spacing: .5px; }
.avatar { width: 56px; height: 56px; border-radius: 28px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex: none; }
.head-actions { display: flex; gap: 8px; }
.icon-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.icon-btn:disabled { opacity: .5; cursor: progress; }
.plate {
  align-self: center; font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: 0.02em; padding: 0 5px;
  border: 1.5px solid var(--text); border-radius: 5px; white-space: nowrap;
}
.info-row { background: var(--card); border-radius: 16px; padding: 12px 16px; }
.info-row .val { font-size: 18px; line-height: 26px; font-weight: 800; overflow-wrap: anywhere; }
.info-row .empty-val { color: var(--muted); font-weight: 600; font-size: 16px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn-row .btn.secondary { min-height: 52px; font-size: 16px; }
.p-name { font-size: 18px; line-height: 24px; font-weight: 800; overflow-wrap: anywhere; }
.p-role { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--muted); }
.role-tag { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.match { align-self: center; font-size: 11px; line-height: 16px; font-weight: 800; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }

/* formalar */
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 16px; font-weight: 700;
}
.input::placeholder { color: var(--muted); font-weight: 600; opacity: .8; }
.input:focus-visible, .btn:focus-visible, .chip:focus-visible, .nav-item:focus-visible, .nav-add:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible, .call:focus-visible {
  outline: 3px solid #3B82F6; outline-offset: 2px;
}
.phone { display: flex; align-items: center; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.phone span { padding: 0 4px 0 14px; font-size: 16px; font-weight: 800; color: var(--muted); }
.phone input { flex: 1; min-width: 0; height: 46px; border: none; background: transparent; padding: 0 14px 0 6px; font-size: 16px; font-weight: 700; outline: none; }
.phone:focus-within { outline: 3px solid #3B82F6; outline-offset: 2px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.stepper { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.stepper button { width: 44px; height: 40px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 8px; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { font-size: 18px; font-weight: 800; }
.err { padding: 10px 14px; border-radius: 12px; background: var(--red-bg); color: var(--red); font-size: 14px; line-height: 20px; font-weight: 700; }
.note { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }

/* mening e'lonlarim */
.status { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--seg); color: var(--muted); }
.status.ok { background: rgba(23, 121, 77, .14); color: var(--green); }
.mine { background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.mine .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mine .tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mine .btn.secondary { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.mine .tools { flex-wrap: nowrap; }
.mine .tools .note { white-space: nowrap; }
.edit-time .seg button { font-size: 14px; padding: 0 4px; white-space: nowrap; }
.edit-time .input { font-size: 15px; padding: 0 10px; }
.limit-note { font-size: 13px; line-height: 19px; font-weight: 600; color: var(--muted); background: var(--card); border-radius: 14px; padding: 10px 14px; }
.limit-note b { color: var(--text); font-weight: 800; }
.limit-note.out { background: rgba(176, 58, 46, .10); }
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 16, 24, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { width: 100%; max-width: 480px; background: var(--card); border-radius: 20px 20px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); }
.sheet-name { font-size: 14px; font-weight: 700; color: var(--muted); }
.sheet-num { font-size: 26px; line-height: 32px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 10px; }
.sheet-btns { display: flex; gap: 8px; }
.sheet-btns .btn { flex: 1; white-space: nowrap; font-size: 15px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; text-decoration: none; }
.mine.old .top { opacity: .6; }
.btn.repeat { min-height: 48px; font-size: 16px; gap: 8px; }
.settings { background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.settings-title { font-size: 13px; line-height: 18px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.seg-ico { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.edit-time { background: var(--bg); border-radius: 12px; padding: 12px; }
.save-row { display: flex; gap: 8px; }
.btn.save { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; font-size: 16px; }
.card .new { flex: none; font-size: 11px; line-height: 16px; font-weight: 800; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.mini-stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 0 2px; }
.mini-stepper button { width: 40px; height: 44px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; }
.mini-stepper button:disabled { opacity: .35; }
.mini-stepper output { min-width: 22px; text-align: center; font-weight: 800; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 16px; }
.switch-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; position: relative; cursor: pointer;
  width: 52px; height: 30px; border-radius: 15px; background: var(--seg); border: 1px solid var(--line); transition: background .15s;
}
.switch-row input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 12px;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s;
}
.switch-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(22px); }
.switch-row input[type="checkbox"]:focus-visible { outline: 3px solid #3B82F6; outline-offset: 2px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 6px 0 -4px; }

#toast {
  position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 10; max-width: calc(100vw - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* kirish: rol tanlash */
.role-screen { display: flex; flex-direction: column; gap: 18px; padding: 20px 16px 28px; min-height: 100%; }
.role-lang { max-width: 260px; margin-left: auto; width: 100%; }
.role-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 8px; }
.role-logo { width: 88px; height: 88px; border-radius: 44px; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.role-hero h1 { margin: 0; font-size: 22px; line-height: 28px; }
.role-ask { font-size: 17px; line-height: 24px; font-weight: 700; color: var(--muted); }
.role-cards { display: flex; flex-direction: column; gap: 12px; }
.role-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; font: inherit; cursor: pointer; }
.role-card:active, .role-card:focus-visible { border-color: var(--accent); outline: none; }
.role-ico { flex: none; width: 60px; height: 60px; border-radius: 30px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.role-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.role-title { font-size: 18px; line-height: 24px; font-weight: 800; }
.role-desc { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
.role-note { text-align: center; }
.logout-btn { align-self: stretch; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; font-size: 16px; }
