:root {
    color-scheme: only light;
    --ink: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --wash: #f8fafc;
    --white: #ffffff;
    --indigo: #4f46e5;
    --indigo-dark: #4338ca;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --indigo-soft: #eef2ff;
    --emerald: #059669;
    --emerald-dark: #047857;
    --emerald-soft: #ecfdf5;
    --amber: #b45309;
    --amber-soft: #fffbeb;
    --red: #dc2626;
    --blue: #1d4ed8;
    --blue-soft: #eff6ff;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    --hover: #f1f5f9;
    --soft-text: #334155;
    --faint: #94a3b8;
    --ok: #047857;
    --ok-line: #a7f3d0;
    --danger-text: #b91c1c;
    --danger-soft: #fef2f2;
    --danger-line: #fecaca;
    --warn-line: #fde68a;
    --indigo-line: #c7d2fe;
    --indigo-ring: #e0e7ff;
    --blue-line: #bfdbfe;
    --green: #10b981;
    --green-ring: #d1fae5;
    --map: #efeae3;
    --tabbar: rgba(255, 255, 255, 0.94);
    --btn-solid: #0f172a;
    --btn-solid-text: #ffffff;
    --btn-solid-hover: #1e293b;
}

/* Dark theme is paused. To turn it back on, use: @media (prefers-color-scheme: dark) */
@media not all {
    :root {
        color-scheme: dark;
        --ink: #f8fafc;
        --text: #e2e8f0;
        --muted: #94a3b8;
        --line: #334155;
        --wash: #0f172a;
        --white: #1e293b;
        --indigo: #a5b4fc;
        --indigo-dark: #c7d2fe;
        --accent: #6366f1;
        --accent-hover: #818cf8;
        --indigo-soft: #312e81;
        --emerald: #34d399;
        --emerald-dark: #059669;
        --emerald-soft: #064e3b;
        --amber: #fbbf24;
        --amber-soft: #451a03;
        --red: #f87171;
        --blue: #93c5fd;
        --blue-soft: #1e3a8a;
        --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
        --hover: #334155;
        --soft-text: #e2e8f0;
        --faint: #94a3b8;
        --ok: #6ee7b7;
        --ok-line: #065f46;
        --danger-text: #fca5a5;
        --danger-soft: #450a0a;
        --danger-line: #7f1d1d;
        --warn-line: #92400e;
        --indigo-line: #4338ca;
        --indigo-ring: #312e81;
        --blue-line: #1e40af;
        --green: #34d399;
        --green-ring: #064e3b;
        --map: #0f172a;
        --map-filter: invert(1) hue-rotate(180deg) saturate(0.35) brightness(0.85) contrast(0.95);
        --tabbar: rgba(15, 23, 42, 0.94);
        --btn-solid: #e2e8f0;
        --btn-solid-text: #0f172a;
        --btn-solid-hover: #f8fafc;
    }

}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body { margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    background: var(--wash);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-dark); }

button,
a,
.btn,
.tab,
summary {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
button:focus,
button:focus-visible,
button:active,
a:focus,
a:focus-visible,
a:active,
.btn:focus,
.btn:focus-visible,
.btn:active,
.tab:focus,
.tab:focus-visible,
.tab:active,
summary:focus,
summary:focus-visible,
summary:active {
    outline: none;
    box-shadow: none;
}
button:active,
a:active,
.btn:active,
.tab:active,
summary:active {
    transform: scale(0.97);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding-top: env(safe-area-inset-top);
}

.topbar-inner {
    max-width: 32rem;
    margin: 0 auto;
    min-height: 64px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topbar-inner.wide { max-width: 80rem; padding: 0 24px; }

.topbar-inner.brand-center { justify-content: center; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
}

.brand-mark {
    height: 52px;
    width: auto;
    flex: 0 0 auto;
    display: block;
}

.brand-mark svg,
.brand-mark img { height: 52px; width: auto; display: block; }

.brand-name {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.brand-name span { color: var(--indigo); }

.appbar {
    gap: 8px;
}

/* The app bar runs to the right edge so the widget can sit flush against it, on every page */
.topbar-inner.appbar {
    max-width: none;
    padding-right: 0;
}

.appbar-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.appbar-balance {
    min-width: 0;
    padding: 0 6px;
    text-align: right;
}

.appbar-balance span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.appbar-balance strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
}

.appbar-menu { position: relative; }

.appbar-menu summary {
    list-style: none;
    cursor: pointer;
}

.appbar-menu summary::-webkit-details-marker { display: none; }

.icon-btn,
.appbar-user {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
}

.icon-btn:hover,
.appbar-menu[open] > .icon-btn,
.appbar-user:hover,
.appbar-menu[open] > .appbar-user {
    background: var(--indigo-soft);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.icon-btn svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.appbar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.appbar-badge[hidden] { display: none; }

.appbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
}

.appbar-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.notice-list {
    width: min(20rem, calc(100vw - 32px));
    max-height: min(320px, calc(100vh - 96px));
    overflow: auto;
}

.appbar-who {
    margin: 0 0 4px;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--line);
}

.appbar-who strong,
.appbar-who em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appbar-who strong {
    font-size: 14px;
    font-weight: 700;
}

.appbar-who em {
    margin-top: 2px;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.appbar-panel form { display: grid; gap: 2px; margin: 0; }

.appbar-panel a,
.appbar-panel button {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.appbar-panel a:hover,
.appbar-panel button:hover { background: var(--hover); }

.appbar-panel .menu-danger { color: var(--danger-text); }

.appbar-panel .menu-danger:hover { background: var(--danger-soft); }

.notice-item {
    padding: 10px 12px;
    border-radius: 10px;
}

.notice-item.unread { background: var(--indigo-soft); }

.notice-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.notice-item p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.notice-empty {
    margin: 0;
    padding: 12px;
    font-size: 14px;
    color: var(--muted);
}

.top-note {
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 16px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ok);
}

#address,
#phone,
#withdraw { scroll-margin-top: 96px; }

.confirm-dialog {
    width: min(22rem, calc(100vw - 32px));
    margin: auto;
    border: 0;
    border-radius: 18px;
    padding: 20px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
}

.confirm-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }

.confirm-dialog p {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    margin: 0;
}

.confirm-actions .btn { flex: 1; width: auto; }

.shell {
    max-width: 32rem;
    margin: 0 auto;
    padding: 16px 16px calc(108px + env(safe-area-inset-bottom));
}

.shell.auth { max-width: 36rem; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--wash);
}

.segmented-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented-tab:hover { color: var(--ink); }

.segmented-tab.active {
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* Login screen: split layout on desktop, one compact screen (no scroll) on mobile and in the native shell */
.auth-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.auth-container {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
}

.auth-hero-side {
    display: none;
}

.auth-page > .topbar {
    display: none;
}

.auth-mobile-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 50px;
}

@media (max-width: 1023px) {
    .auth-form-side {
        justify-content: flex-start;
    }
}

.auth-mobile-logo img {
    display: block;
    width: 180px;
    height: auto;
}

.auth-form-side {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
    background: transparent;
}

.auth-form-inner {
    width: 100%;
    max-width: 600px;
}

.auth-form-inner .segmented {
    height: 56px;
    box-sizing: border-box;
}

.auth-form-inner .segmented-tab {
    height: 48px;
    min-height: 0;
    font-size: 15px;
}

.auth-form-inner .segmented-tab.active {
    color: #4f46e5;
    box-shadow: none;
}

.auth-form-inner .auth-panel {
    margin-top: 0;
    padding: 24px;
}

.card .auth-panel-title {
    margin: 0 0 50px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.auth-form-inner .auth-panel .segmented {
    margin-bottom: 20px;
}

.auth-form-inner .lbl {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auth-form-inner .input {
    height: 52px;
    box-sizing: border-box;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.auth-forgot {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo);
}

.auth-form-inner .auth-submit {
    height: 52px;
    font-size: 15px;
    border-radius: 12px;
    background: #4f46e5;
    color: #ffffff;
    box-shadow: none !important;
}

.auth-form-inner .auth-submit:hover {
    background: #4338ca;
}

@media (min-width: 1024px) {
    html:not(.native-app) .auth-mobile-logo {
        display: none;
    }

    html:not(.native-app) .auth-hero-side {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 0 0 30%;
        width: 30%;
        padding: 60px;
        box-sizing: border-box;
        color: #ffffff;
        background: #171f31;
    }

    html:not(.native-app) .auth-container {
        align-items: stretch;
        padding: 0;
    }

    html:not(.native-app) .auth-hero-brand {
        align-self: flex-start;
    }

    html:not(.native-app) .auth-hero-logo {
        width: min(360px, 100%);
        height: auto;
        display: block;
    }

    html:not(.native-app) .auth-hero-body {
        margin: auto 0;
        text-align: left;
    }

    html:not(.native-app) .auth-hero-title {
        margin: 0 0 20px;
        max-width: 520px;
        font-size: 48px;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: -0.03em;
        text-align: left;
    }

    html:not(.native-app) .auth-hero-lead {
        margin: 0;
        max-width: 480px;
        font-size: 20px;
        line-height: 1.5;
        text-align: left;
        color: rgba(255, 255, 255, 0.78);
    }

    html:not(.native-app) .auth-hero-copy {
        margin: 0;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
    }

    html:not(.native-app) .auth-form-side {
        flex: 0 0 70%;
        width: 70%;
        padding: 48px;
        background: #ffffff;
    }

    html:not(.native-app) .auth-form-inner {
        width: 100%;
        max-width: 650px;
        margin: 0 auto;
    }

    html:not(.native-app) .auth-form-inner .auth-panel {
        padding: 36px;
    }

    html:not(.native-app) .card .auth-panel-title {
        font-size: 24px;
    }

    html:not(.native-app) .auth-form-inner .segmented-tab {
        font-size: 16px;
    }

    html:not(.native-app) .auth-form-inner .input {
        height: 52px;
    }
}

.shell.wide {
    max-width: 80rem;
    padding: 32px 24px 64px;
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.page-lead {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.kicker {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo);
    border: 1px solid var(--indigo-ring);
    font-size: 12px;
    font-weight: 600;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-head {
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--wash);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-head h2, .card h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.card-body { padding: 24px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

.lbl {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.input, .select {
    display: block;
    width: 100%;
    margin-top: 8px;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--ink);
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
}

.input:focus, .select:focus {
    background: var(--white);
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* Экранная клавиатура PIN (pin-pad.js): поля только для чтения, ввод через div-кнопки. */
.pin-field .input[readonly] {
    background: var(--white);
    color: var(--ink);
    caret-color: transparent;
    cursor: pointer;
}
.pin-field.is-active .input {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.pin-key {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 12px;
    background: var(--wash);
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.pin-key:active {
    background: var(--line);
}
.pin-key.is-blank {
    background: none;
    cursor: default;
}
.pin-key.is-blank:active {
    background: none;
}
/* Кнопка отпечатка в ячейке «пустого» слота: без фона, пока токена нет — невидима, место сохраняется. */
.pin-bio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--indigo);
    cursor: pointer;
    visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
}
.pin-bio.is-visible {
    visibility: visible;
    background: var(--wash);
}
.pin-bio.is-visible:active {
    background: var(--line);
    transform: scale(0.96);
}
.pin-bio:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* Экран ввода PIN (courier/pin.html): светлый фон, точки-индикаторы, клавиатура без плашек. */
.pin-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    box-sizing: border-box;
}
.pin-wrap {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 48px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}
.pin-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pin-logo {
    display: block;
    width: 160px;
    height: auto;
    margin-bottom: 40px;
}
.pin-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}
.pin-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #64748b;
}
.pin-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 32px;
}
.pin-box[hidden] { display: none; }
.pin-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
/* Поле остаётся в DOM для отправки формы, но не видно. */
.pin-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.pin-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.pin-dot {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.2s;
}
.pin-dot.active {
    background: #4f46e5;
    transform: scale(1.1);
}
.pin-dots.is-shake {
    animation: pin-shake 0.4s ease-in-out;
}
@keyframes pin-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}
.pin-error {
    min-height: 20px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #dc2626;
    text-align: center;
}
.pin-error:empty,
.pin-error[hidden] { display: none; }
.pin-screen .pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 12px 24px;
    width: 100%;
    max-width: 280px;
    margin-top: 16px;
}
.pin-screen .pin-key {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    color: #0f172a;
    font-size: 28px;
    font-weight: 500;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
/* Круг-отклик при нажатии (ripple). */
.pin-screen .pin-key::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.15);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    pointer-events: none;
}
.pin-screen .pin-key:active::after {
    transform: scale(1);
    opacity: 1;
    transition: none;
}
.pin-screen .pin-key[data-key="back"] {
    font-size: 24px;
    color: #64748b;
}
.pin-screen .pin-bio {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: #4f46e5;
}
.pin-screen .pin-bio.is-visible {
    background: transparent;
}
.pin-screen .pin-bio.is-visible:active {
    background: rgba(79, 70, 229, 0.15);
    transform: none;
}
.pin-foot {
    margin: 32px 0 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
.pin-foot a {
    color: #4f46e5;
    text-decoration: none;
}
/* Переключатель отпечатка на экране настройки PIN (courier/pin-setup.html). */
.pin-option {
    display: flex;
    align-items: center;
    margin-top: 24px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}
.pin-option[hidden] { display: none; }
.pin-option input {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    accent-color: #4f46e5;
}

.input[readonly] {
    background: var(--hover);
    color: var(--muted);
}

.input.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.input.upper { text-transform: uppercase; }
.input.error, .select.error { border-color: var(--red); background: var(--danger-soft); }

.field-icon { position: relative; }
.field-icon .input[readonly] { background: var(--hover); color: var(--muted); }
.field-icon .input { padding-left: 36px; }
.field-icon .glyph {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
    font-size: 14px;
    pointer-events: none;
}

.err {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--red);
}

.alert {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.alert.ok { color: var(--ok); background: var(--emerald-soft); border: 1px solid var(--ok-line); }
.alert.bad { color: var(--red); background: var(--danger-soft); border: 1px solid var(--danger-line); }
.alert.warn { color: var(--amber); background: var(--amber-soft); border: 1px solid var(--warn-line); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn.primary {
    color: white;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { color: var(--btn-solid-text); background: var(--btn-solid); }
.btn.dark:hover { background: var(--btn-solid-hover); }
.btn.green { color: white; background: var(--emerald-dark); }
.btn.green:hover { filter: brightness(1.12); }
.btn.danger { color: #fff; background: var(--red); }
.btn.danger:hover { background: #7f1d1d; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.complete-hint { margin: 8px 0 0; }
.btn.ghost {
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: none;
}
.btn.ghost:hover { background: var(--wash); }

.foot {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}
.foot a { font-weight: 700; }

.grid-2, .grid-3, .choices {
    display: grid;
    gap: 12px;
}
.grid-2, .choices.gender { grid-template-columns: 1fr 1fr; }
.grid-3, .choices.transport { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.street { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }

.card.suggest-card { overflow: visible; }

.suggest { position: relative; }

.nav-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.suggest-list {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    margin: 0;
    padding: 4px;
    overflow: auto;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.suggest-list button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.suggest-list button:hover,
.suggest-list button.active { background: var(--wash); }

.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--soft-text);
}
.choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}
.choice:has(input:checked) {
    border-color: var(--indigo);
    background: var(--indigo-soft);
    color: var(--indigo);
    font-weight: 700;
}

.section-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
}

.job {
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0;
    color: inherit;
    box-shadow: var(--shadow);
    overflow: hidden;
    scroll-margin-top: calc(72px + env(safe-area-inset-top));
    scroll-margin-bottom: calc(84px + env(safe-area-inset-bottom));
}
.job-head,
.nearby-job {
    padding: 16px;
}

.nearby-job {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nearby-job form,
.job-open .job-more form { margin: 0; }

.offer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex: 0 0 auto;
}

.offer-fact {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.offer .price { font-size: 18px; }

.offer .km { text-align: right; }

.job-open { border-color: var(--indigo-line); }

.job summary {
    display: block;
    padding: 16px;
    cursor: pointer;
    list-style: none;
}
.job summary::-webkit-details-marker { display: none; }
.job summary::marker { content: ""; }
.job[open] { border-color: var(--indigo-line); }
.job-reveal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 12px;
    color: var(--indigo);
    font-size: 13px;
    font-weight: 700;
}
.job-reveal svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}
.job-reveal svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.job[open] .job-reveal svg { transform: rotate(180deg); }
.job-more {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 16px 16px;
    border-top: 1px solid var(--line);
}
.job-more form { margin: 0; }
.job-more .nav-apps { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.order-track { display: flex; flex-direction: column; gap: 8px; }
.order-map {
    position: relative;
    z-index: 0;
    height: 280px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--map);
    box-shadow: inset 0 0 0 1px var(--line);
}
.order-map.leaflet-container,
.order-map .leaflet-container {
    font-family: Inter, system-ui, sans-serif;
    background: var(--map);
}
.order-map .leaflet-control-zoom {
    margin: 0 12px 12px 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.order-map .leaflet-control-zoom a {
    width: 40px;
    height: 40px;
    line-height: 38px;
    border: 0;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font: 500 22px/38px Inter, system-ui, sans-serif;
}
.order-map .leaflet-control-zoom a:first-child { border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.order-map .leaflet-control-zoom a:hover,
.order-map .leaflet-control-zoom a:focus {
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}
.order-map .leaflet-control-attribution,
.order-map .maplibregl-ctrl-attrib,
.order-map .maplibregl-ctrl-logo {
    display: none;
}
.order-map .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    color: #0f172a;
    font-family: Inter, system-ui, sans-serif;
}
.order-map .leaflet-popup-content {
    margin: 10px 14px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.order-map .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.84);
    box-shadow: none;
}
.order-map .leaflet-popup-close-button {
    color: #64748b;
    font: 500 16px/24px Inter, system-ui, sans-serif;
}
.order-map.map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
}
.order-map .leaflet-div-icon,
.order-map .map-pin {
    background: transparent;
    border: 0;
}
.order-map .pin-ride,
.order-map .pin-branch,
.order-map .pin-stop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.order-map .pin-pulse {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.45);
    animation: pin-pulse 1.8s ease-out infinite;
    pointer-events: none;
}
.order-map .pin-ride.is-idle .pin-pulse { display: none; }
.order-map .pin-core,
.order-map .pin-stop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}
.order-map .pin-ride .pin-core,
.order-map .pin-branch .pin-core {
    width: 30px;
    height: 30px;
}
.order-map .pin-ride.is-live .pin-core { background: #059669; }
.order-map .pin-ride.is-idle .pin-core {
    background: #94a3b8;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}
.order-map .pin-branch .pin-core { background: #0f172a; }
.order-map .pin-stop {
    width: 28px;
    height: 28px;
    font: 700 12px/1 Inter, system-ui, sans-serif;
}
.order-map .pin-stop.pin-a { background: #0f172a; }
.order-map .pin-stop.pin-b { background: #059669; }
.order-map .pin-core svg {
    width: 15px;
    height: 15px;
    display: block;
}
.order-map .pin-core svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.order-map .pin-core svg .fill {
    fill: currentColor;
    stroke: none;
}
@keyframes pin-pulse {
    0% { transform: scale(0.7); opacity: 0.7; }
    100% { transform: scale(2.4); opacity: 0; }
}
.fleet-board { display: flex; flex-direction: column; gap: 10px; }
.fleet-title {
    margin: 0;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.fleet-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.fleet-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    text-align: center;
}
.fleet-stat strong {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.fleet-stat span {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fleet-stats.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fleet-stats.cols-2 .fleet-stat strong {
    font-size: 16px;
    overflow-wrap: anywhere;
}
.fleet-stat strong.in { color: var(--emerald); }
.fleet-stat strong.out { color: var(--red); }

.feed-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-scroll {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.chip-filter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--soft-text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.chip-filter:hover { color: var(--ink); background: var(--hover); }
.chip-filter.active,
.chip-filter.active:hover {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
}
.filter-range {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -8px 0 0;
    color: var(--indigo);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.date-filter { position: relative; flex: 0 0 auto; z-index: 5; }
.date-filter summary { list-style: none; cursor: pointer; }
.date-filter summary::-webkit-details-marker { display: none; }
.date-filter.on > summary {
    background: var(--indigo-soft);
    color: var(--indigo);
}
.date-filter.on > summary::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--indigo);
}
.date-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 6;
    width: min(260px, calc(100vw - 32px));
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
.date-panel .btn { width: 100%; }

.period-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}
.period-switch a {
    display: block;
    padding: 10px 6px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.period-switch a:hover { color: var(--ink); background: var(--hover); }
.period-switch a.active,
.period-switch a.active:hover {
    background: var(--indigo-soft);
    color: var(--indigo);
}
.feed-tools > .period-switch { flex: 1 1 auto; min-width: 0; }
.period-switch.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.period-switch.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.period-switch.cols-4 a { padding: 10px 4px; font-size: 12px; }
.analytics.stack { gap: 8px; }
.analytics .page-lead { margin: 0; }
.chart-date {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.chart-card {
    padding: 12px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.bars {
    display: flex;
    align-items: stretch;
    gap: 4px;
    height: 132px;
}
.bar {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.bar-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 26px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.15;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.bar-value small {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.bar-plot {
    flex: 1 1 auto;
    width: 100%;
    max-width: 32px;
    min-height: 64px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bar-fill {
    width: 100%;
    height: 0;
    border-radius: 10px 10px 5px 5px;
    background: linear-gradient(180deg, #4F46E5 0%, rgba(79, 70, 229, 0.45) 100%);
}
.bar:not(.is-empty) .bar-fill { min-height: 8px; }
.bar.is-empty .bar-fill {
    height: 4px !important;
    min-height: 0;
    background: var(--line);
}
.bar-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}
.metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.metric span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.metric strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.metric-square {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 76px;
    padding: 12px;
}
.metric-square span {
    font-size: 12px;
    line-height: 1.25;
}
.metric-square strong {
    font-size: 18px;
    text-align: left;
}
.fleet-map { height: min(62vh, 520px); }
.tabs-inner.cols-5 .tab { font-size: 10px; padding-left: 1px; padding-right: 1px; }
.order-track-note { margin: 0; }
.order-courier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.order-courier[hidden] { display: none; }
.order-quote {
    padding: 12px 14px;
    border: 1px solid var(--indigo-line);
    border-radius: 12px;
    background: var(--indigo-soft);
}
.order-quote[hidden] { display: none; }
.order-quote-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.order-quote-fee {
    font-size: 22px;
    font-weight: 800;
    color: var(--indigo);
    font-variant-numeric: tabular-nums;
}
.order-quote-lbl { display: none; }
.order-quote .km { margin: 6px 0 0; color: var(--indigo); }
.order-quote .alert { margin-top: 8px; }
.order-quote-error[hidden] { display: none; }
.order-courier .lbl { display: block; }
.order-courier strong { display: block; margin-top: 2px; color: var(--ink); }
.order-courier a { font-weight: 700; white-space: nowrap; }
.who strong { display: block; margin-top: 4px; color: var(--ink); }
.who a { display: inline-block; margin-top: 4px; font-weight: 700; }
.who .km, .who .page-lead { margin-top: 6px; }
.phone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo);
    font-size: 14px;
    font-weight: 700;
}
.phone-btn.wa { background: var(--emerald-soft); color: var(--ok); }
.phone-btn svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.phone-btn svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (hover: hover) {
    .job summary:hover { background: var(--hover); }
}
.job-top, .split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.job-top > * { min-width: 0; }
.price {
    font-size: 16px;
    font-weight: 800;
    color: var(--indigo);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.addr { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.addr p {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.addr .a { color: var(--soft-text); font-weight: 500; }
.addr .b { color: var(--ink); font-weight: 600; }
.addr .a::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 3px;
    top: 14px;
    bottom: -12px;
    width: 2px;
    background-image: radial-gradient(circle, var(--faint) 1.15px, transparent 1.25px);
    background-size: 2px 7px;
    background-repeat: repeat-y;
}
.addr .dot { margin: 4px 0 0; position: relative; z-index: 1; flex: 0 0 auto; }
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    vertical-align: middle;
}
.dot.indigo { background: var(--indigo); }
.dot.green { background: var(--green); }

.km { font-size: 12px; font-weight: 700; color: var(--faint); }

.empty {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 48px 16px;
    text-align: center;
    box-shadow: var(--shadow);
}
.empty h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--soft-text); }
.empty p { margin: 6px auto 0; max-width: 280px; font-size: 14px; color: var(--faint); }
.empty-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.empty-orders .empty-mark {
    background: var(--indigo-soft);
    color: var(--indigo);
}
.empty-orders .empty-mark svg,
.empty-orders .empty-refresh svg {
    display: block;
    flex: 0 0 auto;
}
.empty-orders .empty-mark svg { width: 28px; height: 28px; }
.empty-orders .empty-mark svg *,
.empty-orders .empty-refresh svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.empty-orders .empty-refresh {
    width: auto;
    margin: 18px auto 0;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--indigo);
    background: var(--indigo-soft);
    font-weight: 750;
}
.empty-orders .empty-refresh:hover { background: var(--indigo-ring); color: var(--indigo-dark); }
.empty-orders .empty-refresh svg { width: 16px; height: 16px; }

.order-page { gap: 10px; }
.order-page .page-lead { margin: 0; }
.order-page .page-lead + .page-lead { margin-top: 2px; }
.order-form .card-body { padding: 14px 14px 12px; }
.order-form .stack { gap: 10px; }
.order-form .lbl { margin-bottom: 0; }
.order-form .input,
.order-form .select {
    min-height: 38px;
    margin-top: 6px;
    padding: 7px 10px;
}
.order-form .stop { margin-left: 6px; padding-left: 16px; }
.order-form .stop.b { padding-top: 2px; }
.order-form .stop strong,
.order-form .stop span { margin-top: 0; }
.order-form .qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.order-form .qty-row .lbl {
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
    font-size: 14px;
    color: var(--text);
}
.order-form .qty-row .input {
    width: 88px;
    margin-top: 0;
}
.order-form .btn { padding: 10px 16px; }
.stop {
    position: relative;
    margin-left: 8px;
    padding-left: 20px;
    border-left: 2px solid var(--indigo);
}
.stop.b { border-left-color: var(--green); padding-top: 8px; }
.stop::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-ring);
}
.stop.b::before { top: 14px; background: var(--green); box-shadow: 0 0 0 3px var(--green-ring); }
.stop .lbl.a { color: var(--indigo); }
.stop .lbl.b { color: var(--emerald); }
.stop strong { display: block; margin-top: 4px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.stop span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.back {
    font-size: 14px;
    font-weight: 700;
}
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--faint); font-size: 14px; }

.person h3, .pack h3 { margin: 4px 0 0; font-size: 14px; }
.pack-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
}
.pack-row span:last-child { color: var(--faint); font-weight: 600; }

.profile-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.profile-copy { min-width: 0; }
.profile-copy h2,
.profile-copy p {
    margin: 0;
    overflow-wrap: anywhere;
}
.profile-copy p { margin-top: 2px; font-size: 14px; color: var(--muted); }
.profile-copy .chip { margin-top: 8px; }
.facts {
    display: flex;
    flex-direction: column;
    max-width: 36rem;
    margin: 4px 0 0;
}
.facts div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}
.facts dt {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.facts dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    overflow-wrap: anywhere;
}
.facts dd.money {
    font-size: 18px;
    font-weight: 800;
    color: var(--emerald);
    font-variant-numeric: tabular-nums;
}
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo);
    border: 1px solid var(--indigo-ring);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.profile-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.chip {
    display: inline-flex;
    margin-top: 0;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--hover);
    color: var(--soft-text);
    font-size: 12px;
    font-weight: 600;
}
.balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 20px;
}
.balance {
    margin: 4px 0 0;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--emerald);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--hover);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.pill i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    display: inline-block;
}
.pill.online { background: var(--emerald-soft); color: var(--ok); border-color: var(--ok-line); }
.pill.busy, .pill.assigned, .pill.ready { background: var(--indigo-soft); color: var(--indigo); border-color: var(--indigo-line); }
.pill.picked { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.pill.search { background: var(--amber-soft); color: var(--amber); border-color: var(--warn-line); }
.pill.prep { background: var(--indigo-soft); color: var(--indigo); border-color: var(--indigo-line); }
.pill.new { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.pill.search i { animation: pulse 1.2s ease-in-out infinite; }
.pill.done { background: var(--emerald-soft); color: var(--ok); border-color: var(--ok-line); }
.pill.cancel { background: var(--hover); color: var(--muted); border-color: var(--line); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-table-wrap { display: none; }
.tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    color: inherit;
    text-decoration: none;
}
a.tx-row:hover { background: var(--wash); }
.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.tx-icon.plus { background: var(--emerald-soft); color: var(--ok); }
.tx-icon.minus { background: var(--danger-soft); color: var(--red); }
.tx-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.tx-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.tx-date { font-size: 13px; color: var(--muted); }
.tx-order {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.tx-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tx-amt { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tx-amt.plus { color: var(--emerald); }
.tx-amt.minus { color: var(--red); }
.tx-bal { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: var(--tabbar);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.tabs-inner,
.tabs-inner.cols-3,
.tabs-inner.cols-4,
.tabs-inner.cols-5 {
    max-width: 32rem;
    margin: 0 auto;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}
.tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 6px 2px 7px;
    border-radius: 14px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
}
.tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tab svg {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 auto;
}
.tab svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tab.active { background: var(--indigo-soft); color: var(--indigo); }
.tabs:has(.tab-create) {
    overflow: visible;
    background: transparent;
    border-top: 0;
    backdrop-filter: none;
}
.tabs:has(.tab-create)::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--tabbar);
    border-top: 1px solid var(--line);
    -webkit-mask: radial-gradient(circle 38px at 50% 10px, transparent 37px, #000 38.5px);
    mask: radial-gradient(circle 38px at 50% 10px, transparent 37px, #000 38.5px);
    pointer-events: none;
}
.tabs:has(.tab-create)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    z-index: 1;
    width: 76px;
    height: 76px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--line);
    clip-path: inset(28px 0 0 0);
    pointer-events: none;
}
.tabs-inner:has(.tab-create) {
    position: relative;
    z-index: 1;
    overflow: visible;
    background: transparent;
}
.tab.tab-create {
    position: relative;
    z-index: 2;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    min-height: 56px;
    align-self: flex-start;
    margin-top: -24px;
    padding: 0;
    border-radius: 50%;
    background: #4F46E5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.tabs-inner.cols-5 .tab.tab-create { padding: 0; }
.tab.tab-create:hover,
.tab.tab-create.active {
    background: #4F46E5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.tab.tab-create svg { width: 28px; height: 28px; }
.tab.tab-create svg * { stroke-width: 2.25; }
.tab.tab-create span,
.side-brand { display: none; }

.notice-stack {
    position: fixed;
    z-index: 80;
    left: 16px;
    right: 16px;
    top: calc(16px + env(safe-area-inset-top));
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notice-pop {
    padding: 16px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid var(--danger-line);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}
.notice-pop strong { display: block; font-size: 16px; color: var(--ink); }
.notice-pop p { margin: 8px 0 12px; color: var(--text); }
.notice-permit {
    position: fixed;
    z-index: 70;
    left: 16px;
    right: 16px;
    bottom: 108px;
    margin: 0 auto;
    max-width: 28rem;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: var(--btn-solid);
    color: var(--btn-solid-text);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    grid-column: 1 / -1;
    padding-top: 4px;
}
.pager a,
.pager-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}
.pager a {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}
.pager a:hover { background: var(--wash); }
.pager .km { min-width: 72px; text-align: center; }

.form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.note { font-size: 12px; color: var(--faint); }
.hide-sm { display: none; }

.orders { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.orders th {
    padding: 14px 24px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
    background: var(--wash);
    border-bottom: 1px solid var(--line);
}
.orders td { padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.orders tr:hover td { background: var(--wash); }
.orders .id { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--ink); }
.orders .time { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); font-family: "Segoe UI", sans-serif; font-weight: 400; }
.table-wrap { overflow-x: auto; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; }
.company { text-align: right; min-width: 0; }
.company p { margin: 0; }
.company .name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}
.company .bal { margin-top: 2px; font-size: 13px; color: var(--muted); }
.company .bal b { color: var(--emerald); font-variant-numeric: tabular-nums; }
.avatar-sq {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--hover);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}


@media (max-width: 519px) {
    .brand-mark { height: 72px; padding: 2px; box-sizing: border-box; }
    .brand-mark svg, .brand-mark img { height: 68px; }
    .brand-name { font-size: 18px; }
    .page-title { font-size: 22px; }
}

@media (max-width: 639px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3, .choices.transport, .choices.gender { grid-template-columns: 1fr 1fr; }
    .form-foot { flex-direction: column; align-items: stretch; }
    .pager a, .pager-gap { min-width: 0; flex: 1; }
}

@media (max-width: 719px) {
    .appbar-balance span { display: none; }
    .appbar { position: relative; }
    .appbar-notices { position: static; }
    .appbar-notices .notice-list {
        left: 12px;
        right: 12px;
        width: auto;
        min-width: 0;
    }
}

@media (min-width: 640px) {
    .hide-sm { display: block; }
    .btn.fit { width: auto; }
    .two-col { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
    .shell,
    .topbar-inner {
        max-width: 80rem;
    }

    .shell {
        padding: 32px 24px calc(108px + env(safe-area-inset-bottom));
    }

    .shell.auth {
        max-width: 36rem;
        padding: 32px 24px 48px;
    }

    .topbar-inner.appbar { padding-left: 24px; }
    .top-note { max-width: 80rem; padding-left: 24px; padding-right: 24px; }

    .stack:has(> .job) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .stack:has(> .job) > :not(.job) {
        grid-column: 1 / -1;
    }

    form.suggest-card > .card-body.stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 24px;
        align-items: start;
    }

    form.suggest-card > .card-body.stack > .btn,
    form.suggest-card > .card-body.stack > .alert,
    form.suggest-card > .card-body.stack > p {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .shell,
    body:has(.tabs-inner.cols-3) .shell,
    body:has(.tabs-inner.cols-4) .shell,
    body:has(.tabs-inner.cols-5) .shell {
        padding-bottom: 48px;
    }

    .topbar-inner.appbar {
        min-height: 64px;
    }

    .appbar-title {
        max-width: min(16rem, calc(50vw - 18rem));
    }

    .tabs {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 50%;
        right: auto;
        z-index: 40;
        width: max-content;
        max-width: min(32rem, calc(100vw - 26rem));
        height: auto;
        top: 14px;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border-top: 0;
        pointer-events: none;
    }

    .tabs:has(.cols-5) {
        max-width: min(40rem, calc(100vw - 22rem));
    }

    .tabs:has(.tab-create)::before,
    .tabs:has(.tab-create)::after { content: none; }

    .tabs-inner.cols-5 .tab {
        padding: 8px 8px;
        font-size: 12px;
    }

    .tabs-inner.cols-5 .tab.tab-create {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        align-self: center;
        margin-top: 0;
        padding: 0;
    }

    .tab.tab-create svg { width: 24px; height: 24px; }

    .tabs-inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        width: max-content;
        max-width: 100%;
        min-height: 0;
        margin: 0;
        padding: 4px;
        gap: 2px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--wash);
        pointer-events: none;
    }

    .tabs-inner:has(.tab-create) { background: var(--wash); }

    .tab {
        pointer-events: auto;
        flex: 0 0 auto;
        min-width: 44px;
        min-height: 40px;
        padding: 8px 14px;
    }
}

.line-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 4px 0 0;
    flex: 0 0 auto;
}

.line-switch {
    position: relative;
    width: 42px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #e11d48;
    flex: 0 0 auto;
}

.line-switch.on { background: #059669; }

.line-switch:disabled { opacity: 1; cursor: default; }

.line-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform .18s ease;
}

.line-switch.on .line-knob { transform: translateX(18px); }

.line-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.line-label.on { color: #059669; }
.line-label.off { color: var(--muted); }

/* Header widget: balance, notices and courier avatar, part of the app bar and pinned to its right edge with a rounded left side.
   Sits 12px below the top of the header (the header's own vertical padding) on every page; the map page overrides it to fixed at the same spot. */
.appbar-actions.appbar-widget {
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    height: 52px;
    padding: 6px 14px 6px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 0;
    border-radius: 24px 0 0 24px !important;
    background: linear-gradient(135deg, #4f46e5, #312e81) !important;
    color: #ffffff !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: -4px 6px 18px rgba(79, 70, 229, 0.25) !important;
}

.appbar-widget .appbar-user {
    width: 44px;
    height: 44px;
}

.appbar-widget .appbar-balance span,
.appbar-widget .appbar-balance strong {
    color: #ffffff !important;
}

.appbar-widget .icon-btn {
    color: #ffffff;
}

/* Hover and open states on the gradient: a light tint instead of the white-theme indigo */
.appbar-widget .icon-btn:hover,
.appbar-widget .appbar-menu[open] > .icon-btn,
.appbar-widget .appbar-user:hover,
.appbar-widget .appbar-menu[open] > .appbar-user {
    background: rgba(255, 255, 255, 0.15);
}

/* Avatar gets a light tint so it stays readable on the gradient */
.appbar-widget .appbar-avatar {
    background: rgba(255, 255, 255, 0.2);
}

/* Online/offline switch inside the avatar menu */
.appbar-panel .line-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 12px;
}

.appbar-panel .line-form .line-switch,
.appbar-panel .line-form .line-switch:hover {
    display: block;
    width: 42px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    background: #e11d48;
}

.appbar-panel .line-form .line-switch.on,
.appbar-panel .line-form .line-switch.on:hover {
    background: #059669;
}

.appbar-panel .line-form .line-switch:disabled,
.appbar-panel .line-form .line-switch:disabled:hover {
    opacity: 1;
    cursor: default;
}

/* Map page: transparent header so the map reaches the top; only the widget takes clicks */
body:has(.map-screen) .topbar {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    pointer-events: none;
}

html:not(.native-app) body:has(.map-screen) .topbar .topbar-inner.appbar {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Map page: the widget floats over the map at exactly the spot it occupies in the header on other pages,
   so switching pages does not move it. The 12px offset matches the header's padding; the header already adds the safe-area inset. */
body:has(.map-screen) .appbar-widget {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 0;
    z-index: 40;
    pointer-events: auto;
}

/* The confirm dialog lives inside the header, so it must opt back in (pointer-events is inherited) */
body:has(.map-screen) .confirm-dialog {
    pointer-events: auto;
}

/* Courier map: no +/- zoom buttons (pinch zoom and the map gestures are enough) */
body:has(.map-screen) .leaflet-control-zoom,
body:has(.map-screen) .maplibregl-ctrl-group {
    display: none !important;
}

.day-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin: 0;
}

.day-stat {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 12px 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

/* BU GÜN — the headline earnings tile */
.day-stat:first-child {
    background: var(--indigo-soft);
    border-color: var(--indigo-line);
}

.day-ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--white);
    color: var(--indigo);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.day-ico svg,
.proof-pick svg,
.support-open svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.day-k {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.day-stat strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.day-stat:first-child strong {
    font-size: 19px;
    font-weight: 800;
    color: var(--indigo);
}

.offline-gate {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 36px 18px 28px;
    text-align: center;
    box-shadow: var(--shadow);
}

.offline-dot {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0 auto;
    border-radius: 50%;
    background: #e11d48;
    box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.12);
}

.offline-gate h2 {
    margin: 14px 0 6px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.offline-gate p {
    margin: 0 auto 16px;
    max-width: 260px;
    font-size: 14px;
    color: var(--muted);
}

.support-open svg { width: 18px; height: 18px; }

.proof-pick {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 1px dashed var(--indigo);
    border-radius: 12px;
    background: var(--indigo-soft);
    color: var(--indigo);
    font-weight: 700;
    cursor: pointer;
}

.proof-pick input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.proof-preview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.complete-form { display: flex; flex-direction: column; gap: 8px; }

.wait-banner {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
}

.support-sheet {
    width: min(480px, 100%);
    max-height: min(85vh, 640px);
    margin: auto auto 0;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 20px 20px 0 0;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.16);
}

.support-sheet::backdrop { background: rgba(15, 23, 42, 0.45); }

.support-sheet[open] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-sheet h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.sheet-grab {
    width: 36px;
    height: 4px;
    margin: 4px auto 6px;
    border-radius: 999px;
    background: var(--line);
}

.support-action {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.support-action:active { transform: scale(0.97); }

.support-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--indigo-soft);
    color: var(--indigo-dark, var(--indigo));
    font-size: 13px;
    font-weight: 700;
}

.support-links:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Desktop web: the bottom tab bar becomes a fixed left sidebar.
   Skipped inside the Capacitor shell (html.native-app), which keeps the mobile layout. */
@media (min-width: 1024px) {
    html:not(.native-app) {
        --side-w: 256px;
        --side-bg: #171f31;
        --side-line: rgba(255, 255, 255, 0.08);
        --side-text: #94a3b8;
        --side-hover: rgba(255, 255, 255, 0.06);
        --side-active: #4f46e5;
    }

    html:not(.native-app) body:has(.tabs) {
        padding-left: var(--side-w);
    }

    html:not(.native-app) .tabs {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: var(--side-w);
        max-width: none;
        height: 100vh;
        transform: none;
        z-index: 40;
        display: block;
        background: var(--side-bg);
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        overflow-y: auto;
        pointer-events: auto;
    }

    html:not(.native-app) .tabs::before,
    html:not(.native-app) .tabs::after {
        content: none;
    }

    html:not(.native-app) .tabs .tabs-inner {
        position: static;
        z-index: auto;
        overflow: visible;
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
        padding: 0 14px 20px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        border: 0;
        border-radius: 0;
        background: transparent;
        pointer-events: auto;
    }

    html:not(.native-app) .tabs .side-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 104px;
        box-sizing: border-box;
        padding: 16px 20px;
        margin: 0 0 12px;
        border-bottom: 1px solid var(--side-line);
        text-decoration: none;
    }

    html:not(.native-app) .tabs .side-brand-mark {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    html:not(.native-app) .tabs .side-brand-mark img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    html:not(.native-app) .tabs .tab {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 10px 14px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        border-radius: 10px;
        color: var(--side-text);
        font-size: 15px;
        font-weight: 600;
        text-align: left;
    }

    html:not(.native-app) .tabs .tab span {
        display: inline;
        font-size: inherit;
    }

    html:not(.native-app) .tabs .tab svg {
        width: 20px;
        height: 20px;
    }

    html:not(.native-app) .tabs .tab:hover {
        background: var(--side-hover);
        color: #fff;
    }

    html:not(.native-app) .tabs .tab.active,
    html:not(.native-app) .tabs .tab.active:hover {
        background: var(--side-active);
        color: #fff;
    }

    html:not(.native-app) .tabs .tab.tab-create,
    html:not(.native-app) .tabs .tab.tab-create:hover {
        flex: 0 0 auto;
        align-self: stretch;
        width: 100%;
        height: auto;
        min-height: 46px;
        margin: 0;
        padding: 10px 14px;
        border-radius: 10px;
        background: transparent;
        color: var(--side-text);
        box-shadow: none;
    }

    html:not(.native-app) .tabs .tab.tab-create.active,
    html:not(.native-app) .tabs .tab.tab-create.active:hover {
        background: var(--side-active);
        color: #fff;
    }

    html:not(.native-app) .tabs .tab.tab-create svg {
        width: 20px;
        height: 20px;
    }

    html:not(.native-app) .tabs .tab.tab-create svg * {
        stroke-width: 2;
    }

    html:not(.native-app) .notice-stack {
        left: calc(var(--side-w) + 16px);
    }

    html:not(.native-app) .notice-permit {
        left: calc(var(--side-w) + 16px);
        bottom: 24px;
    }
}

/* Desktop web: the work area fills the space right of the sidebar instead of the 32rem mobile column. */
@media (min-width: 1024px) {
    html:not(.native-app) body:has(.tabs) .topbar-inner {
        max-width: none;
    }

    html:not(.native-app) body:has(.tabs) .topbar-inner.appbar {
        padding-left: 32px;
    }

    html:not(.native-app) body:has(.tabs) .top-note {
        padding-left: 32px;
        padding-right: 32px;
    }

    html:not(.native-app) body:has(.tabs) .top-note {
        max-width: none;
    }

    html:not(.native-app) body:has(.tabs) .shell {
        width: 100%;
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
        padding: 24px 32px 48px;
    }

    /* Home: six transport types in one row, map takes the full width. */
    html:not(.native-app) body:has(.tabs) .fleet-stats {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }

    html:not(.native-app) body:has(.tabs) .fleet-stat {
        padding: 16px 10px;
    }

    html:not(.native-app) body:has(.tabs) .fleet-stat strong {
        font-size: 24px;
    }

    html:not(.native-app) body:has(.tabs) .fleet-map {
        width: 100%;
        height: min(640px, 72vh);
    }

    /* Orders: status switch spans the full width, job cards flow in two columns. */
    html:not(.native-app) body:has(.tabs) .feed-tools,
    html:not(.native-app) body:has(.tabs) .feed-tools > .period-switch {
        width: 100%;
    }

    html:not(.native-app) body:has(.tabs) .period-switch a {
        padding: 12px 8px;
        font-size: 14px;
    }

    /* Job cards in a responsive grid; feed tools and empty states keep the full row. */
    html:not(.native-app) body:has(.tabs) .stack:has(> .job) {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: 16px;
        align-items: start;
    }

    html:not(.native-app) body:has(.tabs) .stack:has(> .job) > :not(.job) {
        grid-column: 1 / -1;
    }

    html:not(.native-app) body:has(.tabs) .job summary .job-top {
        justify-content: space-between;
    }

    /* New order: white card, two columns (route and recipient left, parameters right), total bar full width below. */
    html:not(.native-app) body:has(.tabs) .order-form {
        max-width: 960px;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.08);
    }

    html:not(.native-app) body:has(.tabs) .order-form .input,
    html:not(.native-app) body:has(.tabs) .order-form .select {
        max-width: 100%;
        height: 44px;
        min-height: 44px;
    }

    html:not(.native-app) body:has(.tabs) .order-form > .card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        align-items: start;
        padding: 24px;
    }

    html:not(.native-app) body:has(.tabs) .order-form > .card-body > .alert {
        grid-column: 1 / -1;
    }

    html:not(.native-app) body:has(.tabs) .order-col {
        min-width: 0;
    }

    html:not(.native-app) body:has(.tabs) .order-col-left {
        grid-column: 1;
    }

    html:not(.native-app) body:has(.tabs) .order-col-side {
        grid-column: 2;
    }

    /* Total bar: amount on the left, white action button on the right. */
    html:not(.native-app) body:has(.tabs) .order-summary {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 16px 24px;
        border-radius: 12px;
        background: #4f46e5;
        color: #fff;
    }

    html:not(.native-app) body:has(.tabs) .order-quote {
        flex: 1;
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    html:not(.native-app) body:has(.tabs) .order-quote-top {
        justify-content: flex-start;
        align-items: center;
    }

    html:not(.native-app) body:has(.tabs) .order-quote-lbl {
        display: inline;
        margin-right: 8px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.85);
    }

    html:not(.native-app) body:has(.tabs) .order-quote-fee {
        font-size: 26px;
        color: #fff;
    }

    html:not(.native-app) body:has(.tabs) .order-quote .km {
        color: rgba(255, 255, 255, 0.85);
    }

    html:not(.native-app) body:has(.tabs) .order-summary .btn.primary {
        width: auto;
        flex-shrink: 0;
        padding: 12px 24px;
        background: #fff;
        color: #3730a3;
        box-shadow: none !important;
    }

    html:not(.native-app) body:has(.tabs) .order-summary .btn.primary:hover {
        background: #eef2ff;
    }

    /* Analytics and transactions: charts and rows stretch to the container width. */
    html:not(.native-app) body:has(.tabs) .chart-card {
        width: 100%;
        padding: 20px 24px;
    }

    html:not(.native-app) body:has(.tabs) .tx-list {
        width: 100%;
        max-width: 900px;
    }

    html:not(.native-app) body:has(.tabs) .tx-row {
        padding: 14px 20px;
    }

    /* Transactions: one table across the work area; the card list stays for mobile. */
    html:not(.native-app) body:has(.tabs) .tx-cards {
        display: none;
    }

    html:not(.native-app) body:has(.tabs) .tx-table-wrap {
        display: block;
        width: 100%;
        overflow-x: auto;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }

    html:not(.native-app) body:has(.tabs) .tx-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

    html:not(.native-app) body:has(.tabs) .tx-table th,
    html:not(.native-app) body:has(.tabs) .tx-table td {
        padding: 14px 20px;
        border-bottom: 1px solid var(--line);
        text-align: left;
        vertical-align: middle;
    }

    html:not(.native-app) body:has(.tabs) .tx-table th {
        background: var(--wash);
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    html:not(.native-app) body:has(.tabs) .tx-table td {
        color: var(--ink);
    }

    html:not(.native-app) body:has(.tabs) .tx-table td:nth-child(3) {
        color: var(--muted);
        white-space: nowrap;
    }

    html:not(.native-app) body:has(.tabs) .tx-table tbody tr:last-child td {
        border-bottom: 0;
    }

    html:not(.native-app) body:has(.tabs) .tx-table tbody tr:hover td {
        background: var(--wash);
    }

    html:not(.native-app) body:has(.tabs) .tx-table .num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    html:not(.native-app) body:has(.tabs) .tx-table a {
        color: var(--indigo);
        font-weight: 700;
        text-decoration: none;
    }

    html:not(.native-app) body:has(.tabs) .tx-table a:hover {
        text-decoration: underline;
    }

    /* Analytics: the four key figures sit above the chart in one row. */
    html:not(.native-app) body:has(.tabs) .analytics .metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    html:not(.native-app) body:has(.tabs) .analytics .metric-square {
        min-height: 96px;
        padding: 16px 18px;
    }

    html:not(.native-app) body:has(.tabs) .analytics .metric-square strong {
        font-size: 24px;
    }
}

/* Shared line icon style — 24px grid, rounded 1.9px strokes */
.ico {
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Order cards in the courier app: offer card and active order card share the Yolda look */
.nearby-job,
.job-open {
    border: 1px solid rgba(79, 70, 229, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 28px -6px rgba(79, 70, 229, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    background: #ffffff !important;
}

.nearby-job .transport-badge {
    background: #e0e7ff !important;
    color: #4338ca !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
}

.nearby-job .job-plate {
    background: #f8fafc !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    border: 1px solid #f1f5f9 !important;
}

.nearby-job .job-price {
    color: #4f46e5 !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
}

/* Nearby order card: transport + price bar, route, params plate, accept */
.nearby-job {
    gap: 0;
}

.job-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-bottom: 12px;
}

.transport-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.transport-badge .ico {
    width: 16px;
    height: 16px;
}

.job-price {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    color: #4f46e5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nearby-job .addr {
    margin: 0 0 12px;
    gap: 10px;
}

.nearby-job .addr p {
    font-size: 15px;
    line-height: 1.35;
}

.nearby-job .addr .b {
    font-weight: 700;
}

.job-plate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.plate-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    color: var(--muted);
}

.plate-item .ico {
    width: 16px;
    height: 16px;
    color: var(--indigo);
}

.plate-item strong {
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.plate-k {
    font-weight: 500;
}

.nearby-job .job-accept {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: none !important;
}

.nearby-job[hidden],
.nearby-stack[hidden] {
    display: none !important;
}

/* Accept button: fill grows left to right over the 20 s offer window (--progress-percent is set by courier-sheet.js) */
.job-accept.has-progress {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.job-accept.has-progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    width: var(--progress-percent, 0%);
    background: rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

/* Branch order card: status + fee bar, route, recipient/time plate */
.job-plate { flex-wrap: wrap; }

.branch-job .addr {
    margin: 0 0 12px;
    gap: 10px;
}

.branch-job .addr p {
    font-size: 15px;
    line-height: 1.35;
}

.branch-job .addr .b { font-weight: 700; }

.branch-job .job-plate { margin-bottom: 0; }

.branch-job .plate-item { min-width: 0; }

.plate-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Order details: meta row, plate, hero card on the order page */
.od-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.od-meta .mono { font-size: 13px; }

.od-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.job-more .job-plate { margin: 0; }

.od-hero .card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.od-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.od-price {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #4f46e5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.od-hero .job-plate { margin: 0; }

.od-hero .km { margin: 0; }

/* Полноэкранная загрузка: показывается после ввода PIN и при входе отпечатком, пока открывается следующая страница. */
.yolda-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: #171f31;
    transition: opacity 0.25s ease;
}

.yolda-loader[hidden] { display: none; }

.yolda-loader img {
    width: min(280px, 70vw);
    height: auto;
}

.yolda-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: yolda-spin 0.8s linear infinite;
}

.yolda-loader-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}

@keyframes yolda-spin {
    to { transform: rotate(360deg); }
}

/* ---- Courier jobs: map-first screen ---- */
.map-screen {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--map);
}

#map.courier-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Floating stats strip over the map, directly below the app bar widget (widget ends at ~64px + safe area) */
.day-card.map-stats {
    position: absolute !important;
    top: calc(env(safe-area-inset-top) + 76px) !important;
    left: 12px;
    right: 12px;
    z-index: 10;
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 4px;
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.day-card.map-stats .day-stat,
.day-card.map-stats .day-stat:first-child {
    flex: 1 1 0;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 4px 8px;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.day-card.map-stats .day-stat + .day-stat {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.day-card.map-stats .day-ico {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.18);
    color: #a5b4fc;
    box-shadow: none;
}

.day-card.map-stats .day-ico svg {
    width: 13px;
    height: 13px;
}

.day-txt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.day-card.map-stats .day-k {
    font-size: 9px;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.day-card.map-stats .day-stat strong,
.day-card.map-stats .day-stat:first-child strong {
    font-size: 13px;
    line-height: 1.1;
    color: #ffffff;
}

/* Accent value: the "Bu gün" earnings in AZN */
.day-card.map-stats .day-stat:first-child strong {
    color: #818cf8;
}

/* Bottom sheet: collapsed to the search pill, expands when .has-offer is set */
.bottom-sheet {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 92px; /* 80px bottom menu + 12px gap */
    z-index: 10;
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    /* Collapsed: sheet sinks until only the 52px header pill shows, resting on the 80px bottom menu */
    transform: translateY(calc(100% - 40px));
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bottom-sheet.has-offer,
.bottom-sheet.is-expanded {
    transform: translateY(0);
}

/* Collapsed state shows only the header, so the drag handle is hidden too */
.bottom-sheet:not(.has-offer):not(.is-expanded) .sheet-grab {
    display: none;
}

/* Set right after an order is accepted: the sheet stays out of the way so the route is visible. Listed after has-offer so it wins. */
.bottom-sheet.is-collapsed {
    transform: translateY(calc(100% - 40px));
}

/* Collapsed: only the header pill (title + buttons) may show, no order card pieces below it */
.bottom-sheet.is-collapsed {
    height: auto !important;
    max-height: 70px !important;
    overflow: hidden !important;
}

/* Expanded: keep the card below the top of the screen so the courier and map stay visible */
.bottom-sheet.is-expanded {
    max-height: 55vh !important;
    overflow-y: auto !important;
}

.sheet-grab {
    flex: 0 0 auto;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.15);
}

.sheet-pill {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 8px 8px 16px;
}

.sheet-live {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    animation: sheet-pulse 1.8s infinite;
}

.sheet-live.is-busy {
    background: var(--indigo);
}

.sheet-live.is-off {
    background: var(--faint);
    animation: none;
}

.sheet-pill-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.sheet-pill[role="button"] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sheet-pill[role="button"]:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: -2px;
    border-radius: 16px;
}

.sheet-chev {
    flex: 0 0 auto;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: transform 0.3s ease;
}

.sheet-chev svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-sheet.is-expanded .sheet-chev {
    transform: rotate(180deg);
}

.sheet-refresh {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
}

.sheet-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    max-height: 62vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px calc(14px + env(safe-area-inset-bottom));
}

.sheet-body > .alert {
    margin: 0;
}

.sheet-body .job,
.sheet-body .offline-gate {
    margin: 0;
}

@keyframes sheet-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .bottom-sheet { transition: none; }
    .sheet-live { animation: none; }
    .nav-arrow, .nav-badge { transition: none; }
}

/* Navigation: route banner, recenter button and the courier arrow */
.nav-banner[hidden],
.recenter-btn[hidden] {
    display: none;
}

.nav-banner {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 28px) !important;
    left: 16px;
    right: 16px;
    z-index: 25;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.nav-turn {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #4f46e5;
    transition: transform 0.3s ease;
}

.nav-badge svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-text {
    min-width: 0;
}

.nav-line {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
}

.nav-line strong {
    font-size: 22px;
    font-weight: 800;
    margin-right: 4px;
}

.nav-street {
    margin: 2px 0 0;
    font-size: 13px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    opacity: 0.9;
}

.map-screen.is-navigating .map-stats {
    display: none;
}

/* While navigating the recenter button sits just under the route banner (its bottom is set by courier-map.js) */
.map-screen.is-navigating .recenter-btn {
    top: calc(var(--nav-bottom, 0px) + 12px) !important;
}

/* Right edge, under the stats strip (strip ends at ~160px + safe area). */
.recenter-btn {
    position: absolute;
    right: 12px;
    top: calc(env(safe-area-inset-top) + 172px) !important;
    transform: none;
    z-index: 15 !important;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    color: #4f46e5;
    cursor: pointer;
}

.recenter-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.nav-marker {
    background: none;
    border: 0;
}

.nav-arrow {
    display: block;
    width: 40px;
    height: 40px;
    transition: transform 0.3s linear;
}

.nav-arrow svg {
    width: 40px;
    height: 40px;
    fill: #4f46e5;
    stroke: #fff;
    stroke-width: 1.6;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
