:root {
    --bg: #f4f1eb;
    --card: rgba(255, 255, 255, 0.9);
    --text: #142126;
    --muted: #66727a;
    --accent: #e86b35;
    --secondary: #0f766e;
    --line: rgba(20, 33, 38, 0.1);
    --shadow: 0 20px 48px rgba(20, 33, 38, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(232, 107, 53, 0.1), transparent 28%),
        linear-gradient(180deg, #faf8f4 0%, #f2eee7 100%);
}

body[data-app-role="admin"],
body[data-app-role="operator"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: rgba(15, 118, 110, 0.12);
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

@media (min-width: 921px) {
    .layout {
        width: calc(100% - 32px);
        max-width: none;
    }

    body[data-app-role="admin"] .layout {
        width: calc(100% - 48px);
        max-width: min(100%, 1680px);
    }
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero,
.form-card,
.track-card,
.orders-card,
.driver-card-panel {
    padding: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent);
}

h1,
h2 {
    margin: 0;
}

.lead {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 20px;
    margin-top: 20px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.admin-mobile-header {
    display: none;
}

.admin-nav-card {
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 20px;
}

.admin-nav {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.admin-nav-logout-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.admin-nav-logout-btn {
    width: 100%;
    justify-content: center;
}

.nav-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.nav-btn.active {
    background: var(--text);
    color: #fff;
}

.admin-pages {
    display: grid;
    gap: 20px;
}

.admin-page {
    display: none;
    padding: 28px;
}

.admin-page.active {
    display: block;
}

.admin-placeholder {
    padding: 28px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-overview-eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-overview-strip {
    margin-bottom: 16px;
}

.orders-page-shell {
    display: grid;
    gap: 16px;
    margin-bottom: 4px;
}

@media (min-width: 900px) {
    .orders-page-shell {
        grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
        align-items: start;
    }
}

.orders-page-block--stats {
    padding: 14px 16px 18px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(20, 33, 38, 0.05), rgba(255, 255, 255, 0.72));
    border: 1px solid var(--line);
}

.orders-page-block--main {
    min-width: 0;
}

/* Заказы (админ): ПК — обзор дар боло; пурраи паҳнои нишондиҳандаи контент (бе маҳдудияти 1220px) */
@media (min-width: 900px) {
    #page-orders.admin-page {
        width: 100%;
        max-width: none;
        min-width: 0;
        box-sizing: border-box;
    }

    #page-orders .orders-page-shell {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: stretch;
        width: 100%;
    }

    #page-orders .orders-page-block--stats,
    #page-orders .orders-page-block--main {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    #page-orders .orders-page-block--stats {
        position: static;
    }

    #page-orders .orders-page-block--stats .stats-grid {
        gap: 14px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #page-orders .orders-page-block--stats .stat-card {
        padding: 14px 16px 16px;
    }
}

@media (min-width: 1100px) {
    #page-orders .orders-page-block--stats .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1101px) {
    #page-orders .order-admin-card__grid {
        grid-template-columns: minmax(232px, 1fr) minmax(300px, 1.4fr) minmax(216px, 272px);
    }

    #page-orders .order-admin-card__head {
        padding: 18px 22px;
    }

    #page-orders .order-admin-card__section {
        padding: 18px 22px;
    }

    #page-orders .order-admin-card__actions {
        padding: 16px 22px;
    }

    #page-orders .order-admin-card__id {
        font-size: 1.2rem;
    }
}

.stat-card-sub {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.stat-card--tone-teal {
    background: linear-gradient(145deg, rgba(15, 118, 110, 0.14), rgba(255, 255, 255, 0.78));
    border-color: rgba(15, 118, 110, 0.28);
}

.stat-card--tone-amber {
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.14), rgba(255, 255, 255, 0.78));
    border-color: rgba(217, 119, 6, 0.3);
}

.stat-card--tone-violet {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.12), rgba(255, 255, 255, 0.78));
    border-color: rgba(124, 58, 237, 0.26);
}

.stat-card--tone-slate {
    background: linear-gradient(145deg, rgba(71, 85, 105, 0.12), rgba(255, 255, 255, 0.82));
    border-color: rgba(71, 85, 105, 0.22);
}

.stat-card--revenue .stat-card-sub--stack {
    margin-top: 6px;
    color: #64748b;
}

.stat-card--revenue .stat-card-sub--muted {
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.35;
}

.stat-card,
.info-panel,
.drivers-admin-block,
.details-grid > div,
.mini-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
}

.stat-card span,
.details-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card strong,
.details-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 1.2rem;
}

.page-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.info-panel h3 {
    margin: 0 0 12px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-item {
    display: grid;
    gap: 6px;
}

.mini-item span {
    color: var(--muted);
}

.drivers-admin-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 12px;
}

.admin-page--drivers .drivers-admin-panel {
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(20, 33, 38, 0.08);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 249, 0.94));
    box-shadow: 0 12px 36px rgba(20, 33, 38, 0.06);
}

.drivers-admin-panel-head {
    margin-bottom: 14px;
}

.drivers-admin-lead {
    margin: 8px 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
}

.drivers-admin-lead strong {
    color: var(--text);
    font-weight: 700;
}

.drivers-admin-block-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.drivers-admin-create-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.drivers-admin-create-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
}

.drivers-admin-field {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.drivers-admin-field span {
    color: var(--muted);
    font-size: 0.85rem;
}

.drivers-admin-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
    min-height: 48px;
    box-sizing: border-box;
}

.drivers-admin-field--select {
    margin-bottom: 4px;
}

.drivers-admin-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
    min-height: 52px;
    box-sizing: border-box;
}

.drivers-admin-create-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.drivers-admin-btn-primary {
    min-height: 48px;
    padding-left: 22px;
    padding-right: 22px;
}

.drivers-admin-message {
    margin: 0;
    flex: 1 1 200px;
}

.drivers-admin-empty {
    margin: 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.admin-driver-panel {
    margin-top: 4px;
}

.admin-driver-panel-inner {
    padding-top: 4px;
}

.admin-driver-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
}

.admin-driver-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.admin-driver-status-badge--free {
    background: rgba(34, 197, 94, 0.14);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.admin-driver-status-badge--busy {
    background: rgba(232, 107, 53, 0.12);
    color: #9a3412;
    border: 1px solid rgba(232, 107, 53, 0.28);
}

.admin-driver-idline {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
}

.admin-driver-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
    margin-bottom: 16px;
}

.admin-driver-edit-grid .admin-driver-commission-input {
    max-width: none;
}

.admin-driver-pin-block {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 118, 110, 0.35);
    background: rgba(15, 118, 110, 0.05);
    margin-bottom: 16px;
}

.admin-driver-pin-label {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.admin-driver-pin-value {
    margin: 0 0 12px;
}

.admin-driver-pin-value code {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
}

.admin-driver-pin-block .js-admin-driver-save-pin {
    margin-top: 10px;
}

.admin-driver-facts--compact {
    margin-top: 0;
}

.admin-driver-name {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.admin-driver-facts {
    display: grid;
    gap: 10px;
    margin: 0;
}

.admin-driver-facts > div {
    display: grid;
    grid-template-columns: minmax(0, 120px) 1fr;
    gap: 8px 12px;
    align-items: baseline;
    font-size: 0.95rem;
    line-height: 1.4;
}

.admin-driver-facts dt {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-driver-facts dd {
    margin: 0;
    word-break: break-word;
}

.admin-driver-commission-block {
    margin-top: 18px;
    display: grid;
    gap: 8px;
}

.admin-driver-commission-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-driver-commission-input {
    width: 100%;
    max-width: 200px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
    min-height: 48px;
    box-sizing: border-box;
}

.admin-driver-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.admin-driver-cta .primary-btn,
.admin-driver-cta .secondary-btn {
    min-height: 48px;
    flex: 1 1 160px;
}

.driver-delete-btn {
    border-color: rgba(185, 28, 28, 0.35);
    color: #991b1b;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.order-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.order-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.order-form input,
.order-form select,
.order-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
}

.order-form textarea {
    resize: vertical;
    min-height: 96px;
}

.full {
    grid-column: 1 / -1;
}

.preview,
.order-delivery-hint,
.tracking-info,
.tracking-metrics,
.order-item,
.empty-box {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.form-hint {
    margin: -6px 0 4px;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.admin-retail-sync-banner {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
    background: rgba(20, 129, 109, 0.1);
    border: 1px solid rgba(20, 129, 109, 0.28);
}

.admin-retail-sync-banner.hidden {
    display: none;
}

.product-field-block {
    padding: 14px 16px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    display: grid;
    gap: 0;
}

.product-field-block .product-field-label {
    margin: 0;
}

.product-field-hint {
    margin: 8px 0 0;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.order-form--delivery-new .delivery-form-section {
    padding: 0 0 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
}

.order-form--delivery-new .delivery-form-section:last-of-type {
    border-bottom: 0;
}

.delivery-form-section-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.delivery-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.delivery-form-section--split {
    display: grid;
    grid-template-columns: minmax(152px, 220px) minmax(0, 1fr);
    gap: 12px 18px;
    align-items: start;
    grid-column: 1 / -1;
}

.delivery-payment-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: linear-gradient(160deg, rgba(15, 118, 110, 0.07), rgba(255, 255, 255, 0.92));
}

.delivery-form-section-title--sidebar {
    margin: 0 0 2px;
    font-size: 0.92rem;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(15, 118, 110, 0.14);
}

.delivery-form-section-title--main {
    margin: 0 0 10px;
}

.delivery-preset-label {
    display: grid;
    gap: 6px;
    margin: 0;
    font-weight: 600;
}

.delivery-preset-label-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.delivery-preset-select {
    width: 100%;
    margin: 0;
    padding: 10px 36px 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(20, 33, 38, 0.12);
    background-color: #fffdf8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2315766a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.delivery-preset-hint {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--muted);
}

.delivery-client-fields {
    min-width: 0;
}

.product-field-label--composer > span {
    margin-bottom: 6px;
}

.product-field-composer {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffdf8;
    overflow: hidden;
}

.product-field-composer textarea {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    min-height: 88px;
    padding: 12px 14px;
    resize: vertical;
}

.product-items-preview--stacked {
    margin: 0;
    padding: 8px 10px 10px;
    border: 0;
    border-top: 1px dashed rgba(15, 118, 110, 0.28);
    border-radius: 0;
    background: rgba(248, 252, 251, 0.85);
}

.product-line-preview {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    padding: 4px 0;
    font-size: 0.92rem;
    line-height: 1.4;
}

.product-line-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: var(--secondary);
}

.product-line-text {
    font-weight: 600;
    word-break: break-word;
}

.product-preview-empty--inline {
    margin: 0;
    padding: 4px 2px 2px;
    font-size: 0.82rem;
    color: var(--muted);
}

.order-form-driver-block--right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.order-form-driver-block--right .delivery-form-section-title--driver {
    margin-bottom: 2px;
}

.driver-assign-panel {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.92));
    box-shadow: 0 8px 24px rgba(20, 33, 38, 0.05);
}

.driver-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.driver-mode-row .driver-assign-option--compact {
    flex: 1 1 200px;
    margin: 0;
}

.driver-assign-fieldset--compact {
    padding: 10px 10px 8px;
    margin: 0;
}

.driver-assign-fieldset--compact .driver-assign-legend {
    font-size: 0.78rem;
}

.driver-assign-option--compact {
    margin: 6px 0 0;
    padding: 8px 8px;
    font-size: 0.86rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
}

.driver-assign-option--compact:first-of-type {
    margin-top: 4px;
}

.order-form-driver-select--compact span {
    font-size: 0.82rem;
}

.order-form-driver-select--compact select {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
}

.driver-order-summary--compact {
    font-size: 0.84rem;
    margin: 0;
}

.drivers-status-compact--tight {
    gap: 6px;
    margin-top: 2px;
}

.drivers-status-compact--tight .driver-status-pill {
    padding: 6px 9px;
    min-height: 0;
    font-size: 0.78rem;
}

.drivers-status-compact--tight .driver-status-pill .dsp-name {
    font-size: 0.82rem;
}

@media (max-width: 720px) {
    .delivery-form-section--split {
        grid-template-columns: 1fr;
    }

    .delivery-payment-sidebar {
        order: 0;
    }

    .driver-assign-panel {
        margin-left: 0;
        max-width: none;
    }
}

.product-field-example code {
    font-size: 0.88em;
    background: rgba(15, 118, 110, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

.driver-assign-fieldset {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 0 12px;
    background: rgba(255, 255, 255, 0.5);
}

.driver-assign-legend {
    padding: 0 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.driver-assign-option {
    display: block;
    margin: 8px 0 0;
    font-size: 0.92rem;
    line-height: 1.45;
    cursor: pointer;
}

.driver-assign-option input {
    margin-right: 8px;
    vertical-align: middle;
}

.driver-assign-wrap.hidden {
    display: none;
}

@media (max-width: 920px) {
    .delivery-form-row {
        grid-template-columns: 1fr;
    }
}

.order-form--create .order-form-driver-block {
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 249, 0.88));
    box-shadow: 0 8px 28px rgba(20, 33, 38, 0.06);
}

.order-form-driver-head {
    margin-bottom: 4px;
}

.order-form-driver-heading {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.order-form-driver-lead {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--muted);
}

.order-form-driver-lead strong {
    color: var(--text);
}

.order-form-driver-block {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
}

.order-form-driver-select {
    margin: 0;
}

.driver-order-summary {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.drivers-compact-label {
    margin: 6px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.drivers-compact-hint {
    display: inline;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.76rem;
    color: var(--muted);
    opacity: 0.92;
}

.drivers-status-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.driver-status-pill {
    display: inline-grid;
    gap: 2px;
    padding: 8px 11px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fafaf8;
    font-size: 0.82rem;
    line-height: 1.25;
    max-width: 100%;
}

.driver-status-pill .dsp-name {
    font-weight: 800;
    font-size: 0.88rem;
}

.driver-status-pill .dsp-phone {
    color: var(--muted);
    font-size: 0.78rem;
    word-break: break-all;
}

.driver-status-pill .dsp-state {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
}

.driver-status-pill .dsp-chosen {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.driver-status-pill.is-available {
    border-color: rgba(15, 118, 110, 0.35);
    background: rgba(15, 118, 110, 0.06);
}

.driver-status-pill.is-busy {
    opacity: 0.82;
    background: rgba(120, 120, 120, 0.06);
}

.driver-status-pill.is-chosen {
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.45);
}

button.driver-status-pill {
    font: inherit;
    text-align: left;
    cursor: pointer;
    width: auto;
    max-width: 100%;
}

button.driver-status-pill.driver-status-pill--pick:hover {
    border-color: rgba(15, 118, 110, 0.55);
    background: rgba(15, 118, 110, 0.1);
}

button.driver-status-pill.driver-status-pill--pick:focus-visible {
    outline: 2px solid rgba(15, 118, 110, 0.55);
    outline-offset: 2px;
}

.driver-order-summary--minimal {
    margin: 0;
    font-size: 0.86rem;
    color: #b45309;
}

.product-items-preview {
    margin: 6px 0 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 118, 110, 0.35);
    background: rgba(255, 255, 255, 0.85);
}

.product-field-block .product-items-preview--inside,
.product-field-block .product-items-preview--stacked {
    margin: 0;
}

.order-delivery-hint--tariff {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
    padding: 12px 14px;
}

.product-preview-title {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary);
}

.product-preview-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.product-preview-ordered {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.product-preview-ordered li {
    padding-left: 4px;
}

.product-preview-ordered li::marker {
    font-weight: 800;
    color: var(--secondary);
}

.actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.secondary-btn {
    border: 0;
    border-radius: 16px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: var(--text);
    color: #fff;
}

.secondary-btn {
    background: rgba(15, 118, 110, 0.12);
    color: var(--secondary);
}

.message {
    margin: 0;
    color: var(--muted);
}

.map {
    width: 100%;
    height: 360px;
    margin-top: 14px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.tracking-metrics {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tracking-metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.tracking-metrics strong {
    display: block;
    margin-top: 4px;
}

.orders-card {
    margin-top: 20px;
}

.driver-card-panel {
    margin-top: 20px;
}

.driver-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
}

.driver-mobile-header {
    display: none;
}

.driver-top-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 16px;
    margin-top: 18px;
}

.driver-top-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 249, 247, 0.86));
    border: 1px solid var(--line);
}

.driver-top-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 12px;
}

.driver-top-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.driver-top-map {
    height: 320px;
}

.driver-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.driver-picker {
    display: grid;
    gap: 8px;
    min-width: 280px;
    font-weight: 600;
}

.driver-picker select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
}

.driver-subnav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.driver-subnav-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    border-radius: 14px;
    min-height: 56px;
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.driver-subnav-btn.active {
    background: var(--secondary);
    color: #fff;
}

.driver-page {
    display: none;
    margin-top: 18px;
}

.driver-page.active {
    display: block;
}

.selected-order {
    outline: 2px solid rgba(15, 118, 110, 0.18);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.06);
}

.orders-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.orders-filters {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
}

.orders-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
}

.orders-filter-field {
    display: grid;
    gap: 6px;
    min-width: min(100%, 200px);
    flex: 1 1 160px;
}

.orders-filter-field > span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.orders-filter-input,
.orders-filters .orders-filter-input {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
}

.orders-month-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.orders-filter-actions {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
}

@media (max-width: 780px) {
    .orders-filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-filter-field {
        min-width: 0;
    }

    .orders-filter-actions {
        width: 100%;
    }

    .orders-filter-actions .secondary-btn {
        width: 100%;
    }
}

.orders-filter-summary {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.orders-driver-breakdown {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-size: 0.86rem;
    line-height: 1.4;
}

.orders-driver-breakdown.hidden {
    display: none;
}

.orders-breakdown-label {
    font-weight: 700;
    color: var(--text);
}

.driver-breakdown-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.driver-breakdown-chip {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.driver-breakdown-chip:hover {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.35);
}

.driver-breakdown-chip.is-active {
    background: rgba(15, 118, 110, 0.14);
    border-color: rgba(15, 118, 110, 0.45);
    font-weight: 700;
}

.secondary-btn--compact {
    padding: 8px 12px;
    min-height: 40px;
    font-size: 0.88rem;
    border-radius: 12px;
}

/* Админ: список заказов — карточки (вместо таблицы) */
.orders-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-admin-card {
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 249, 0.94));
    box-shadow: 0 12px 40px rgba(20, 33, 38, 0.07);
    padding: 0;
    overflow: hidden;
}

.order-admin-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(255, 255, 255, 0));
}

.order-admin-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.order-admin-card__id {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text);
}

.order-admin-card__track {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.order-admin-card__time {
    margin-left: auto;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.order-admin-card__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 220px);
    gap: 0;
}

.order-admin-card__section {
    padding: 16px 18px;
    border-right: 1px solid rgba(20, 33, 38, 0.08);
    min-width: 0;
}

.order-admin-card__section:last-of-type {
    border-right: 0;
}

.order-admin-card__section--compact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: flex-start;
}

.order-admin-card__label {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.order-admin-card__strong {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
}

.order-admin-card__product {
    white-space: pre-wrap;
}

.order-admin-card__meta {
    margin: 0 0 4px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--muted);
}

.order-admin-card__address {
    margin-bottom: 10px;
}

.order-admin-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.order-admin-card__link:hover {
    border-bottom-color: rgba(15, 118, 110, 0.45);
}

.order-admin-card__hint {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 8px 10px;
    text-align: left;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(15, 118, 110, 0.06);
    border: 1px dashed rgba(15, 118, 110, 0.22);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.order-admin-card__hint:hover {
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.35);
}

.order-admin-card__hint--note {
    color: var(--muted);
    font-weight: 500;
}

.order-admin-card__inline,
.order-admin-card__fee {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text);
}

.order-admin-card__fee {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.order-admin-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
}

.order-admin-card__actions .primary-btn,
.order-admin-card__actions .secondary-btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 12px;
}

.order-admin-card__danger {
    margin-left: auto;
    border-color: rgba(220, 38, 38, 0.35);
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.9);
}

.order-admin-card__danger:hover {
    background: rgba(254, 226, 226, 0.95);
    border-color: rgba(220, 38, 38, 0.45);
}

@media (max-width: 1100px) {
    .order-admin-card__grid {
        grid-template-columns: 1fr 1fr;
    }

    .order-admin-card__section--compact {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: 0;
        border-top: 1px solid rgba(20, 33, 38, 0.08);
    }

    .order-admin-card__section--compact > div {
        flex: 1 1 160px;
    }
}

@media (max-width: 720px) {
    .order-admin-card__grid {
        grid-template-columns: 1fr;
    }

    .order-admin-card__section {
        border-right: 0;
        border-bottom: 1px solid rgba(20, 33, 38, 0.08);
    }

    .order-admin-card__section:last-of-type {
        border-bottom: 0;
    }

    .order-admin-card__section--compact {
        flex-direction: column;
    }

    .order-admin-card__time {
        margin-left: 0;
        width: 100%;
    }

    .order-admin-card__actions .secondary-btn,
    .order-admin-card__actions .primary-btn {
        flex: 1 1 auto;
        min-width: min(100%, 140px);
    }

    .order-admin-card__danger {
        margin-left: 0;
    }
}

.table-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-item h3,
.order-item p {
    margin: 0;
}

.order-item {
    display: grid;
    gap: 10px;
}

.driver-order-card {
    gap: 14px;
    padding: 18px;
}

.driver-order-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.driver-order-topline h3 {
    font-size: 1.05rem;
}

.driver-order-customer {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.driver-order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.driver-order-grid div {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(246, 248, 247, 0.95);
    border: 1px solid var(--line);
}

.driver-order-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.driver-order-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 0.98rem;
}

.driver-order-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.driver-order-footer .primary-btn,
.driver-order-footer .secondary-btn {
    min-height: 46px;
}

.driver-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.driver-action-btn {
    min-height: 68px;
    border-radius: 20px;
    font-size: 1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(20, 33, 38, 0.08);
}

.driver-page .tracking-info,
.driver-page .empty-box,
.driver-page .order-item {
    background: #ffffff;
}

.meta {
    color: var(--muted);
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(203, 95, 44, 0.1);
    color: var(--accent);
}

.pill.in_transit {
    background: rgba(15, 118, 110, 0.12);
    color: var(--secondary);
}

.pill.accepted,
.pill.arrived,
.pill.completed,
.pill.on_route,
.pill.assigned {
    background: rgba(203, 95, 44, 0.1);
    color: var(--accent);
}

.pill.completed {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.hidden {
    display: none;
}

@media (max-width: 920px) {
    body[data-app-role="admin"] #page-dashboard .page-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }

    body[data-app-role="admin"] #page-dashboard .info-panel {
        min-width: 0;
        padding: 12px 14px;
    }

    body[data-app-role="admin"] #page-dashboard .info-panel h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    body[data-app-role="admin"] #page-dashboard .mini-item {
        padding: 10px 12px;
        font-size: 0.86rem;
    }

    body[data-app-role="admin"] #page-dashboard .mini-item span {
        font-size: 0.78rem;
    }

    .admin-driver-edit-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell,
    .grid,
    .order-form,
    .tracking-metrics,
    .stats-grid,
    .page-split,
    .drivers-admin-create-fields,
    .details-grid,
    .driver-top-layout,
    .driver-subnav,
    .driver-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav-card {
        position: static;
    }

    .admin-page,
    .hero,
    .form-card,
    .track-card,
    .orders-card,
    .driver-card-panel {
        padding: 20px;
    }

    .driver-picker {
        min-width: 100%;
    }

    .driver-top-map,
    .map {
        height: 280px;
    }

    .status-row {
        align-items: stretch;
    }

    .status-row .primary-btn,
    .status-row .secondary-btn {
        width: 100%;
        min-height: 52px;
    }

    .admin-driver-cta {
        flex-direction: column;
    }

    .admin-driver-cta .primary-btn,
    .admin-driver-cta .secondary-btn {
        width: 100%;
        flex: none;
        min-height: 52px;
    }

    .admin-driver-commission-input {
        max-width: none;
    }

    .admin-driver-facts > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Узкие телефоны: админка на всю ширину без обрезки, с safe-area */
@media (max-width: 420px) {
    body[data-app-role="admin"] .layout {
        width: calc(100% - 16px);
        max-width: 100%;
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

@media (max-width: 640px) {
    .layout {
        width: min(100% - 20px, 1180px);
        padding: 16px 0 28px;
    }

    body {
        background:
            radial-gradient(circle at top left, rgba(232, 107, 53, 0.16), transparent 26%),
            linear-gradient(180deg, #fcfbf8 0%, #f1ede6 100%);
    }

    .card {
        border-radius: 22px;
    }

    .hero {
        padding: 20px 18px;
        border-radius: 26px;
        background: linear-gradient(180deg, rgba(20, 33, 38, 0.96), rgba(33, 52, 57, 0.94));
        color: #ffffff;
    }

    .hero .eyebrow,
    .hero .lead {
        color: rgba(255, 255, 255, 0.76);
    }

    .hero h1 {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .hero .lead {
        margin-top: 12px;
        line-height: 1.55;
        font-size: 0.96rem;
    }

    .admin-shell {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 14px;
        position: relative;
    }

    .admin-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 10px;
        z-index: 30;
        padding: 12px 14px;
        border-radius: 22px;
        background: rgba(20, 33, 38, 0.95);
        color: #ffffff;
        box-shadow: 0 20px 34px rgba(20, 33, 38, 0.18);
        backdrop-filter: blur(12px);
    }

    .admin-mobile-header .eyebrow {
        margin-bottom: 4px;
        color: rgba(255, 255, 255, 0.7);
    }

    .admin-mobile-header-copy {
        display: grid;
        gap: 2px;
    }

    .admin-mobile-header-copy strong {
        font-size: 1.02rem;
        line-height: 1.35;
    }

    .admin-menu-toggle {
        display: inline-grid;
        place-content: center;
        gap: 5px;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
    }

    .admin-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .admin-mobile-header.menu-open .admin-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .admin-mobile-header.menu-open .admin-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .admin-mobile-header.menu-open .admin-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .admin-nav-card {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        z-index: 25;
        display: none;
        padding: 12px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(20, 33, 38, 0.08);
        box-shadow: 0 22px 36px rgba(20, 33, 38, 0.14);
    }

    .admin-nav-card .eyebrow {
        display: none;
    }

    .admin-nav-card.mobile-open {
        display: block;
    }

    .admin-nav.mobile-open {
        display: grid;
    }

    .admin-nav {
        gap: 8px;
        margin-top: 0;
    }

    .admin-nav-logout-form {
        margin-top: 10px;
        padding-top: 10px;
    }

    .nav-btn {
        min-height: 52px;
        padding: 13px 14px;
        border-radius: 16px;
        background: #ffffff;
    }

    .admin-pages {
        gap: 14px;
    }

    .admin-placeholder,
    .admin-page {
        padding: 16px 14px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.96);
    }

    .page-head {
        margin-bottom: 14px;
    }

    .page-head h2,
    .admin-placeholder h2 {
        font-size: 1.28rem;
        line-height: 1.3;
    }

    .lead,
    .message,
    .meta {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .stat-card,
    .info-panel,
    .drivers-admin-block,
    .details-grid > div,
    .mini-item,
    .preview,
    .order-delivery-hint,
    .tracking-info,
    .tracking-metrics,
    .order-item,
    .empty-box {
        border-radius: 18px;
        padding: 14px;
        background: #ffffff;
    }

    .order-form input,
    .order-form select,
    .order-form textarea {
        min-height: 52px;
        padding: 14px;
        border-radius: 16px;
    }

    .actions {
        display: grid;
        gap: 10px;
    }

    .actions .primary-btn,
    .actions .secondary-btn {
        width: 100%;
        min-height: 54px;
    }

    .map {
        height: 240px;
        border-radius: 18px;
    }

    .tracking-metrics {
        gap: 8px;
    }

    .orders-list {
        gap: 12px;
        margin-top: 12px;
    }

    .driver-subnav-btn,
    .driver-action-btn {
        width: 100%;
    }

    .driver-top-card,
    .preview,
    .order-delivery-hint,
    .tracking-info,
    .tracking-metrics,
    .order-item,
    .empty-box {
        padding: 14px;
    }

    #page-driver-panel {
        padding: 14px;
        border-radius: 24px;
        position: relative;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 247, 0.95)),
            #ffffff;
    }

    #page-driver-panel .driver-panel-head {
        align-items: stretch;
        gap: 12px;
        display: none;
    }

    #page-driver-panel .driver-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 10px;
        z-index: 12;
        padding: 12px 14px;
        margin-bottom: 14px;
        border-radius: 20px;
        background: rgba(20, 33, 38, 0.94);
        color: #ffffff;
        box-shadow: 0 18px 32px rgba(20, 33, 38, 0.18);
        backdrop-filter: blur(10px);
    }

    #page-driver-panel .driver-mobile-header .eyebrow {
        margin-bottom: 4px;
        color: rgba(255, 255, 255, 0.72);
    }

    #page-driver-panel .driver-mobile-header-copy {
        display: grid;
        gap: 2px;
    }

    #page-driver-panel .driver-mobile-header-copy strong {
        font-size: 1.02rem;
        line-height: 1.35;
    }

    #page-driver-panel .driver-menu-toggle {
        display: inline-grid;
        gap: 5px;
        width: 48px;
        height: 48px;
        padding: 0;
        place-content: center;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
    }

    #page-driver-panel .driver-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    #page-driver-panel .driver-mobile-header.menu-open .driver-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    #page-driver-panel .driver-mobile-header.menu-open .driver-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    #page-driver-panel .driver-mobile-header.menu-open .driver-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    #page-driver-panel .driver-panel-head h2 {
        font-size: 1.35rem;
    }

    #page-driver-panel .driver-picker span {
        font-size: 0.92rem;
    }

    #page-driver-panel .driver-picker select {
        min-height: 54px;
        font-size: 1rem;
        border-radius: 18px;
    }

    #page-driver-panel .driver-top-layout {
        gap: 12px;
        margin-top: 14px;
    }

    #page-driver-panel .driver-top-card {
        padding: 12px;
        border-radius: 20px;
    }

    #page-driver-panel .driver-top-card-head {
        margin-bottom: 10px;
    }

    #page-driver-panel .driver-top-card h3 {
        font-size: 1rem;
        line-height: 1.35;
    }

    #page-driver-panel .driver-top-map,
    #page-driver-panel .map {
        height: 220px;
        margin-top: 10px;
        border-radius: 18px;
    }

    #page-driver-panel .driver-summary-grid,
    #page-driver-panel .details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #page-driver-panel .driver-subnav {
        display: none;
        position: absolute;
        top: 78px;
        left: 14px;
        right: 14px;
        z-index: 11;
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 0;
        padding: 12px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(20, 33, 38, 0.08);
        box-shadow: 0 18px 36px rgba(20, 33, 38, 0.14);
    }

    #page-driver-panel .driver-subnav.mobile-open {
        display: grid;
    }

    #page-driver-panel .driver-subnav-btn {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        padding: 13px 14px;
        border-radius: 16px;
        font-size: 0.95rem;
        justify-content: flex-start;
        text-align: left;
    }

    #page-driver-panel .driver-page {
        margin-top: 14px;
    }

    #page-driver-panel .orders-list {
        gap: 12px;
        margin-top: 12px;
    }

    #page-driver-panel .order-item {
        gap: 12px;
        padding: 14px;
        border-radius: 20px;
    }

    #page-driver-panel .driver-order-grid {
        grid-template-columns: 1fr;
    }

    #page-driver-panel .driver-order-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    #page-driver-panel .order-item h3 {
        font-size: 1rem;
        line-height: 1.35;
    }

    #page-driver-panel .meta {
        font-size: 0.93rem;
        line-height: 1.45;
    }

    #page-driver-panel .status-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
    }

    #page-driver-panel .pill {
        justify-content: center;
        min-height: 38px;
        font-size: 0.9rem;
    }

    #page-driver-panel .status-row .primary-btn,
    #page-driver-panel .status-row .secondary-btn,
    #page-driver-panel .driver-action-btn {
        width: 100%;
        min-height: 58px;
        border-radius: 18px;
        font-size: 0.98rem;
    }

    #page-driver-panel .driver-action-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #page-driver-panel .tracking-info,
    #page-driver-panel .empty-box {
        border-radius: 18px;
        line-height: 1.45;
    }

    /* —— Админ-панель: удобство на телефоне —— */
    body[data-app-role="admin"] .layout {
        width: min(100% - 16px, 1180px);
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    body[data-app-role="admin"] .hero.card {
        border-radius: 24px;
    }

    body[data-app-role="admin"] .role-hero--admin {
        padding: 12px 14px;
    }

    body[data-app-role="admin"] .role-hero--admin .role-hero-heading {
        font-size: 1.2rem;
    }

    body[data-app-role="admin"] .role-hero--admin .role-logout-form {
        width: auto;
        max-width: none;
    }

    body[data-app-role="admin"] .role-hero--admin .role-hero-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    body[data-app-role="admin"] .role-hero--admin .role-logout-btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    body[data-app-role="admin"] .admin-mobile-header {
        top: max(8px, env(safe-area-inset-top));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    body[data-app-role="admin"] .admin-nav-card.mobile-open {
        margin-left: env(safe-area-inset-left);
        margin-right: env(safe-area-inset-right);
    }

    body[data-app-role="admin"] #dashboardStats.stats-grid,
    body[data-app-role="admin"] .admin-overview-strip.stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body[data-app-role="admin"] .stat-card {
        padding: 12px 14px;
        min-height: 88px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body[data-app-role="admin"] .stat-card span {
        font-size: 0.78rem;
    }

    body[data-app-role="admin"] .stat-card strong {
        font-size: 1.15rem;
    }

    body[data-app-role="admin"] .page-split {
        gap: 12px;
    }

    body[data-app-role="admin"] .info-panel h3 {
        font-size: 0.95rem;
    }

    body[data-app-role="admin"] .orders-filters {
        padding: 12px;
        border-radius: 18px;
    }

    body[data-app-role="admin"] .driver-breakdown-chip {
        min-height: 36px;
        padding: 6px 12px;
    }

    .driver-breakdown-chip {
        touch-action: manipulation;
    }

    #page-map-tracking .map {
        min-height: 260px;
        height: min(52vh, 320px);
    }

    #page-order-details .details-grid {
        grid-template-columns: 1fr;
    }

    /* Создать доставку: карточки секций + кнопка снизу */
    #page-create-delivery.admin-page {
        padding: 16px 12px 28px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        overflow-x: clip;
        max-width: 100%;
        box-sizing: border-box;
    }

    #page-create-delivery .order-form--delivery-new {
        gap: 0;
        margin-top: 12px;
        min-width: 0;
    }

    #page-create-delivery .driver-assign-panel {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        box-sizing: border-box;
    }

    #page-create-delivery .order-form--delivery-new > .delivery-form-section,
    #page-create-delivery .order-form--delivery-new > .product-field-block,
    #page-create-delivery .order-form--delivery-new > .order-form-driver-block {
        border-radius: 20px;
        padding: 16px 14px;
        margin-bottom: 12px;
        border: 1px solid rgba(20, 33, 38, 0.08);
        background: linear-gradient(165deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 249, 0.94));
        box-shadow: 0 10px 32px rgba(20, 33, 38, 0.06);
    }

    #page-create-delivery .order-form--delivery-new .delivery-form-section {
        border-bottom: none;
        margin-bottom: 12px;
        padding-bottom: 16px;
    }

    #page-create-delivery .delivery-form-section-title {
        font-size: 1.05rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(15, 118, 110, 0.14);
        color: var(--secondary);
        letter-spacing: -0.02em;
    }

    #page-create-delivery .product-field-block .delivery-form-section-title {
        margin-top: 0;
    }

    #page-create-delivery .product-field-hint {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    #page-create-delivery .product-items-preview--stacked {
        border-radius: 0 0 14px 14px;
    }

    #page-create-delivery .delivery-payment-sidebar {
        padding: 10px 10px 12px;
    }

    #page-create-delivery .driver-assign-fieldset--compact {
        padding: 10px 8px 8px;
    }

    #page-create-delivery .driver-assign-option--compact {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 8px;
        margin: 6px 0 0;
        font-size: 0.9rem;
    }

    #page-create-delivery .driver-assign-option--compact input {
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin: 2px 0 0;
        flex-shrink: 0;
        accent-color: var(--secondary);
    }

    #page-create-delivery .drivers-status-compact--tight {
        gap: 6px;
    }

    #page-create-delivery .drivers-status-compact--tight .driver-status-pill,
    #page-create-delivery .drivers-status-compact--tight button.driver-status-pill {
        min-height: 40px;
        padding: 8px 10px;
        border-radius: 12px;
    }

    #page-create-delivery .actions {
        position: sticky;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 50;
        margin: 8px -2px 0;
        padding: 12px 4px 8px;
        background: linear-gradient(180deg, rgba(252, 251, 248, 0) 0%, rgba(252, 251, 248, 0.88) 28%, #f4f1eb 100%);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 0 0 22px 22px;
    }

    #page-create-delivery .actions .primary-btn {
        width: 100%;
        min-height: 56px;
        font-size: 1.05rem;
        font-weight: 800;
        letter-spacing: 0.02em;
        border-radius: 18px;
        box-shadow: 0 14px 36px rgba(232, 107, 53, 0.28);
        touch-action: manipulation;
    }

    #page-create-delivery .order-form textarea {
        min-height: 120px;
        font-size: 1rem;
        line-height: 1.45;
    }

    #page-create-delivery .product-field-composer textarea {
        min-height: 88px;
    }

    #page-create-delivery .order-form input,
    #page-create-delivery .order-form select {
        font-size: 1rem;
    }

    #page-create-delivery .delivery-preset-select {
        font-size: 1rem;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    body[data-app-role="admin"] .drivers-admin-layout {
        gap: 14px;
    }

    body[data-app-role="admin"] .drivers-admin-btn-primary {
        min-height: 52px;
        border-radius: 16px;
    }

    .admin-page--drivers .drivers-admin-panel {
        padding: 14px 16px;
    }
}

@media (max-width: 900px) and (min-width: 641px) {
    body[data-app-role="admin"] #dashboardStats.stats-grid,
    body[data-app-role="admin"] .admin-overview-strip.stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    body[data-app-role="admin"] .layout {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

@media (max-width: 420px) {
    .admin-mobile-header {
        top: 8px;
        padding: 11px 12px;
        border-radius: 18px;
    }

    .admin-nav-card {
        top: 68px;
        padding: 10px;
        border-radius: 18px;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    #page-driver-panel {
        padding: 12px;
    }

    #page-driver-panel .driver-mobile-header {
        top: 8px;
        padding: 11px 12px;
    }

    #page-driver-panel .driver-subnav {
        left: 12px;
        right: 12px;
        top: 72px;
    }

    #page-driver-panel .driver-top-map,
    #page-driver-panel .map {
        height: 200px;
    }

    #page-driver-panel .order-item,
    #page-driver-panel .tracking-info,
    #page-driver-panel .empty-box,
    #page-driver-panel .driver-top-card {
        padding: 12px;
    }
}

.pill.OPEN {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.pill.ASSIGNED,
.pill.NEW,
.pill.PENDING,
.pill.STARTED,
.pill.ON_THE_WAY,
.pill.ARRIVED,
.pill.CANCELLED {
    background: rgba(203, 95, 44, 0.1);
    color: var(--accent);
}

.pill.READY {
    background: rgba(202, 138, 4, 0.14);
    color: #92400e;
}

.pill.ON_THE_WAY,
.pill.STARTED {
    background: rgba(15, 118, 110, 0.12);
    color: var(--secondary);
}

.pill.CANCELLED {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

.pill.COMPLETED {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.track-client-layout {
    max-width: 760px;
}

body.track-client-page {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(15, 118, 110, 0.12), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #f4f1eb 100%);
}

.track-client-layout.track-client-shell {
    max-width: 480px;
    margin: 0 auto;
    width: min(480px, calc(100% - 24px));
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.auth-layout {
    max-width: 1180px;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.auth-card,
.auth-alert,
.driver-only-shell {
    padding: 24px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form input,
.auth-form select {
    width: 100%;
}

.auth-alert {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.role-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

body[data-app-role="admin"] .role-hero--admin {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px 16px;
    padding: 14px 18px;
}

body[data-app-role="admin"] .role-hero--admin .role-hero-main {
    min-width: 0;
    flex: 1;
}

body[data-app-role="admin"] .role-hero--admin .eyebrow {
    margin: 0 0 2px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

body[data-app-role="admin"] .role-hero--admin .role-hero-heading {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body[data-app-role="admin"] .role-hero--admin .role-logout-form {
    flex-shrink: 0;
}

body[data-app-role="admin"] .role-hero--admin .role-logout-btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

body[data-app-role="admin"] .role-hero--admin .role-logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.role-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

body[data-app-role="admin"] .role-hero--admin .role-crm-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    background: rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(165, 180, 252, 0.45);
    color: #fff;
    box-sizing: border-box;
}

body[data-app-role="admin"] .role-hero--admin .role-crm-btn:hover {
    background: rgba(99, 102, 241, 0.5);
}

.driver-broadcast-note {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: rgba(15, 118, 110, 0.06);
}

.driver-broadcast-note__text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text);
}

.driver-list-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.admin-placeholder-lead {
    margin-top: 8px;
    font-size: 0.95rem;
}

#page-create-delivery.admin-page {
    overflow-x: clip;
    max-width: 100%;
    box-sizing: border-box;
}

.role-logout-form {
    flex-shrink: 0;
}

.driver-layout-page {
    max-width: 1180px;
}

/* Мобильный кабинет водителя (как приложение) */
body[data-app-role="driver"] {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #e8edf3;
    -webkit-tap-highlight-color: transparent;
}

.driver-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: #e8edf3;
    position: relative;
    box-shadow: 0 0 48px rgba(20, 33, 38, 0.08);
}

.driver-app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px max(8px, env(safe-area-inset-top));
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(20, 33, 38, 0.06);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.driver-app-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.95rem;
}

.driver-app-logo {
    color: #0f766e;
}

.driver-app-logout-btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.driver-app-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px calc(88px + env(safe-area-inset-bottom));
}

body[data-app-role="driver"] .driver-page {
    margin-top: 0;
    display: none;
}

body[data-app-role="driver"] .driver-page.active {
    display: block;
}

.driver-trip-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.driver-trip-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.driver-trip-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #0f172a;
}

.driver-trip-sub {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.35;
}

.driver-trip-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.driver-trip-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.driver-trip-toggle-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
}

.driver-trip-toggle-ui {
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.2s;
}

.driver-trip-toggle-ui::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.driver-trip-toggle input:checked + .driver-trip-toggle-ui {
    background: #22c55e;
}

.driver-trip-toggle input:checked + .driver-trip-toggle-ui::after {
    transform: translateX(20px);
}

.driver-trip-hero {
    border-radius: 20px;
    padding: 28px 16px 22px;
    text-align: center;
    background: linear-gradient(165deg, #059669 0%, #10b981 45%, #34d399 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.35);
    margin-bottom: 12px;
}

.driver-trip-hero-main {
    font-size: 2.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.driver-trip-hero-sub {
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    opacity: 0.98;
}

.driver-trip-dash {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px;
}

.driver-trip-speed {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.driver-trip-speed-svg {
    width: 120px;
    height: 120px;
}

.driver-trip-speed-bg {
    stroke: #e2e8f0;
}

.driver-trip-speed-arc {
    stroke: #10b981;
    stroke-dasharray: 0 999;
}

.driver-trip-speed-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    line-height: 1.1;
}

.driver-trip-speed-text small {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
}

.driver-trip-dash-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-trip-mini-card {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(20, 33, 38, 0.08);
    box-shadow: 0 8px 22px rgba(20, 33, 38, 0.06);
}

.driver-trip-mini-card span {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.driver-trip-mini-card strong {
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.driver-trip-mini-card--time strong {
    color: #9333ea;
}

.driver-trip-mini-card--dist strong {
    color: #2563eb;
}

.driver-trip-grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.driver-trip-cell {
    background: #fff;
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(20, 33, 38, 0.08);
}

.driver-trip-cell span {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.driver-trip-cell strong {
    font-size: 0.92rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #ea580c;
}

.driver-trip-cell--inter strong {
    color: #ea580c;
}

.driver-trip-cell--wait strong {
    color: #ea580c;
}

.driver-trip-btns {
    margin-bottom: 16px;
}

.driver-trip-call-bar {
    margin-bottom: 12px;
}

.driver-trip-call-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.35);
}

.driver-trip-call-link:active {
    transform: scale(0.98);
}

.driver-trip-pay-row {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(20, 33, 38, 0.08);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.driver-trip-pay-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.driver-trip-pay-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.driver-trip-pay-opt {
    min-height: 46px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    color: #475569;
}

.driver-trip-pay-opt.is-active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.driver-trip-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.driver-trip-btn {
    min-height: 52px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.driver-trip-btn--primary {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
}

.driver-trip-btn--secondary {
    background: #e2e8f0;
    color: #64748b;
}

.driver-trip-btn--secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.driver-trip-btn--accent {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.driver-trip-btn--ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.driver-trip-chat {
    margin-bottom: 16px;
}

.driver-chat-dock {
    position: fixed;
    left: 50%;
    bottom: calc(72px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 460px;
    z-index: 35;
}

/* Круг чата: ҳамсоз бо .driver-bottom-chatfab (driver.php) */
.footer-chat-fab {
    position: fixed;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35);
    z-index: 40;
    cursor: pointer;
}

.footer-chat-fab[data-unread]::after {
    content: attr(data-unread);
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}

.driver-trip-map-section {
    margin-top: 4px;
}

.driver-trip-map-title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.driver-trip-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.driver-trip-map-toggle {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.driver-trip-map-box {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(20, 33, 38, 0.1);
}

.driver-trip-map-el {
    height: 220px;
    width: 100%;
    border-radius: 18px;
}

.driver-map-page-inner .map {
    height: min(55vh, 420px);
    border-radius: 18px;
}

.driver-map-page-map {
    width: 100%;
}

.driver-orders-mob {
    margin-top: 0;
}

.driver-orders-active-title,
.driver-orders-history-title {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.driver-orders-history-wrap {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed rgba(20, 33, 38, 0.12);
}

.driver-orders-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-order-card--history {
    padding: 14px;
    background: linear-gradient(165deg, rgba(248, 250, 249, 0.95), rgba(255, 255, 255, 0.88));
    border-style: dashed;
}

.driver-order-card--history .driver-order-topline h3 {
    font-size: 1rem;
}

.driver-history-line {
    margin: 8px 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #64748b;
}

.driver-orders-no-active {
    margin: 0;
    padding: 12px;
    font-size: 0.9rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
}

.driver-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(20, 33, 38, 0.1);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.08);
    z-index: 30;
    backdrop-filter: blur(12px);
}

.driver-bottom-nav > .driver-bottom-nav-btn {
    min-width: 0;
}

.driver-bottom-nav-btn {
    border: 0;
    background: transparent;
    border-radius: 14px;
    padding: 8px 4px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.driver-bottom-nav-btn.active {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.14);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.driver-bottom-nav-btn--badge {
    position: relative;
}

.driver-bottom-nav-btn--badge::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 18%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

/* Новые сообщения (водитель): точка на кнопке, без красного цвета */
.driver-bottom-nav-btn--notify {
    position: relative;
}

.driver-bottom-nav-btn--notify::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 10%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #7c3aed;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.96);
}

/* Чат: охири навбар — ба канори рости ячейка (монанди track / floating) */
.driver-bottom-nav > .driver-bottom-nav-btn--chatfab {
    justify-self: end;
    width: auto;
    max-width: none;
}

/* Нагузоштани opacity-и пешфарзи :disabled ба тугма — иконка намешиканад */
.driver-bottom-nav-btn--chatfab:disabled {
    opacity: 1 !important;
}

.driver-bottom-nav-btn--chatfab:disabled .driver-bottom-nav-btn__cap {
    opacity: 0.75;
}

/* Чат у водителя: круглая иконка; индикатор на круге */
.driver-bottom-nav-btn--chatfab {
    position: relative;
    overflow: visible;
    padding-top: 6px;
    padding-bottom: 6px;
    max-width: 100%;
}

.driver-bottom-nav-btn__cap {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

/* Гардиши доимии 360° танҳо барои эмодзи 💬 (доира ҷунбанда намешавад); телефон ва ПК як CSS */
@keyframes driver-footer-chatfab-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Доираи чат = ҳамон `.footer-chat-fab` дар track (клиент): 48px, #7c3aed, 💬 */
.driver-bottom-chatfab {
    position: relative;
    box-sizing: border-box;
    overflow: visible;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35);
}

.driver-bottom-chatfab-ic {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
    transform-origin: 50% 50%;
    animation: driver-footer-chatfab-spin 8s linear infinite;
}

.driver-bottom-nav-btn--chatfab-disabled .driver-bottom-chatfab-ic {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .driver-bottom-chatfab-ic {
        animation: none;
    }
}

.driver-bottom-chatfab-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.98);
    z-index: 3;
    pointer-events: none;
}

.driver-bottom-nav-btn--chatfab-disabled .driver-bottom-chatfab {
    opacity: 0.55;
    filter: grayscale(0.25);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.22);
}

.driver-bottom-nav-btn--chatfab-disabled .driver-bottom-nav-btn__cap {
    opacity: 0.65;
}

.driver-bottom-nav-btn--chatfab.active .driver-bottom-chatfab {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.45), 0 12px 28px rgba(124, 58, 237, 0.45);
}

.driver-bottom-nav-btn--chatfab.driver-bottom-nav-btn--notify::after {
    display: none;
}

/* Непрочитанные: счётчик в .driver-bottom-chatfab-badge (зелёный), без лишней точки */
.driver-bottom-nav-btn--chatfab.driver-bottom-nav-btn--notify .driver-bottom-chatfab::after {
    display: none;
}

.driver-bottom-ic--chat {
    border: 2px solid currentColor;
    border-radius: 10px 10px 10px 3px;
    box-sizing: border-box;
}

.driver-bottom-ic--chat::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 5px;
    height: 3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 0 0 2px 0;
    opacity: 0.9;
}

.driver-bottom-ic {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
    color: inherit;
}

.driver-bottom-ic--steer {
    border: 2.5px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}

.driver-bottom-ic--steer::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}

.driver-bottom-ic--mapic {
    border: 2px solid currentColor;
    border-radius: 5px;
    box-sizing: border-box;
}

.driver-bottom-ic--mapic::after {
    content: '';
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent currentColor transparent;
    opacity: 0.45;
}

.driver-bottom-ic--orders::before {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    top: 50%;
    margin-top: -1px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

.driver-bottom-ic--profile {
    border: 2px solid currentColor;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    box-sizing: border-box;
}

.driver-profile {
    background: #fff;
    border-radius: 22px;
    padding: 22px 18px;
    border: 1px solid rgba(20, 33, 38, 0.08);
    box-shadow: 0 12px 32px rgba(20, 33, 38, 0.08);
}

.driver-profile-avatar {
    text-align: center;
    margin-bottom: 16px;
}

.driver-profile-img {
    width: 104px;
    height: 104px;
    max-width: 100%;
    border-radius: 999px;
    object-fit: cover;
    object-position: center;
    border: 3px solid #e2e8f0;
    display: block;
}

.driver-profile-img.hidden {
    display: none;
}

.driver-profile-placeholder {
    width: 104px;
    height: 104px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: #e2e8f0;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
}

.driver-profile-upload-btn {
    margin-top: 10px;
    width: auto;
}

.driver-profile-h {
    margin: 0 0 12px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.driver-profile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0;
    font-size: 0.92rem;
}

.driver-profile-row span {
    color: #64748b;
}

.driver-profile-note {
    margin-top: 12px;
    font-size: 0.86rem;
    color: #64748b;
    min-height: 1.2em;
}

.driver-panel-head-single {
    margin-bottom: 20px;
}

body.auth-page {
    background:
        radial-gradient(circle at 8% 10%, rgba(232, 107, 53, 0.12), transparent 24%),
        radial-gradient(circle at 92% 14%, rgba(15, 118, 110, 0.08), transparent 22%),
        linear-gradient(180deg, #f7f3ec 0%, #efe8dd 100%);
}

.auth-topline {
    margin-bottom: 18px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 33, 38, 0.08);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-caption {
    margin: 12px 0 0;
    color: #6a766e;
    font-size: 0.95rem;
}

.auth-stage {
    padding: 0;
    overflow: hidden;
}

.auth-copy,
.auth-side-note,
.auth-card-head {
    display: grid;
    gap: 10px;
}

.auth-side-note {
    padding-top: 10px;
}

.auth-side-note h2 {
    font-size: 1.45rem;
    line-height: 1.08;
}

.auth-bullets {
    margin: 4px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.auth-card-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.auth-hero {
    position: relative;
    overflow: hidden;
    box-shadow: none;
    border: 0;
    background: transparent;
}

.auth-hero::before,
.auth-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.auth-hero::before {
    width: 240px;
    height: 240px;
    right: -70px;
    top: -120px;
    background: radial-gradient(circle, rgba(232, 107, 53, 0.18) 0%, rgba(232, 107, 53, 0) 72%);
}

.auth-hero::after {
    width: 220px;
    height: 220px;
    left: -90px;
    bottom: -130px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0) 72%);
}

.auth-card {
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 107, 53, 0.7), rgba(15, 118, 110, 0.5));
}

.auth-card h2 {
    margin-top: 4px;
    font-size: 2rem;
    line-height: 1.05;
}

.auth-card .eyebrow {
    margin-bottom: 16px;
}

.auth-form span {
    font-size: 0.92rem;
    font-weight: 700;
    color: #42505a;
}

.auth-form input,
.auth-form select {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(20, 33, 38, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: rgba(232, 107, 53, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 107, 53, 0.12);
}

.auth-card .primary-btn {
    min-height: 56px;
    border-radius: 18px;
    font-size: 1.05rem;
    box-shadow: 0 16px 26px rgba(20, 33, 38, 0.14);
}

.auth-alert {
    font-weight: 600;
}

.auth-entry-switch {
    max-width: 520px;
    margin: 0 auto 20px;
    padding: 24px;
    text-align: center;
}

.auth-entry-switch h2 {
    margin: 0 0 14px;
    font-size: 1.8rem;
}

.auth-entry-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-entry-actions .secondary-btn {
    min-width: 200px;
}

.auth-grid-single {
    grid-template-columns: minmax(320px, 520px) !important;
    justify-content: center;
}

.auth-back-btn {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-back-top {
    margin: 0 0 14px;
    align-self: flex-start;
}

.auth-back-btn:hover {
    background: rgba(15, 118, 110, 0.14);
    border-color: rgba(15, 118, 110, 0.28);
    transform: translateY(-1px);
}

.auth-back-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.2);
}

.auth-back-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 118, 110, 0.2);
    font-size: 0.88rem;
    line-height: 1;
}

@media (min-width: 921px) {
    .auth-layout {
        width: min(1240px, calc(100% - 72px));
        padding-top: 20px;
        padding-bottom: 64px;
    }

    .auth-topline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 24px;
        padding: 0 4px;
    }

    .auth-brand {
        min-height: 38px;
        padding: 0 18px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 10px 30px rgba(20, 33, 38, 0.06);
    }

    .auth-caption {
        margin: 0;
        font-size: 1rem;
        text-align: right;
    }

    .auth-stage {
        display: block;
        width: min(980px, 100%);
        margin: 0 auto;
        padding: 30px;
        border-radius: 34px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
            linear-gradient(135deg, rgba(255, 247, 241, 0.72), rgba(242, 250, 248, 0.66));
        box-shadow: 0 30px 80px rgba(20, 33, 38, 0.09);
        backdrop-filter: blur(12px);
    }

    .auth-grid {
        width: 100%;
        max-width: 920px;
        margin: 0 auto;
        grid-template-columns: repeat(2, minmax(320px, 1fr));
        gap: 20px;
        align-items: stretch;
    }

    .auth-card,
    .auth-alert {
        padding: 30px;
    }

    .auth-card {
        display: flex;
        flex-direction: column;
        min-height: 336px;
        border-radius: 28px;
        border: 1px solid rgba(20, 33, 38, 0.06);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9)),
            rgba(255, 255, 255, 0.94);
        box-shadow: 0 18px 45px rgba(20, 33, 38, 0.08);
    }

    .auth-card::after {
        content: '';
        position: absolute;
        right: 24px;
        top: 22px;
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: rgba(20, 33, 38, 0.08);
    }

    .auth-card-admin {
        background:
            linear-gradient(180deg, rgba(255, 250, 247, 0.98), rgba(255, 255, 255, 0.92)),
            rgba(255, 255, 255, 0.94);
    }

    .auth-card-driver {
        background:
            linear-gradient(180deg, rgba(247, 251, 250, 0.98), rgba(238, 247, 245, 0.88)),
            rgba(255, 255, 255, 0.92);
    }

    .auth-card h2 {
        font-size: 2.05rem;
        line-height: 1.02;
        max-width: 430px;
    }

    .auth-card-head {
        gap: 12px;
    }

    .auth-form {
        margin-top: 22px;
        gap: 18px;
    }

    .auth-form label {
        gap: 10px;
    }

    .auth-form input,
    .auth-form select {
        min-height: 58px;
        border-radius: 16px;
    }

    .auth-card .primary-btn {
        margin-top: auto;
        min-height: 58px;
        border-radius: 20px;
        font-size: 1rem;
    }

    .auth-alert {
        max-width: 100%;
        margin: 0 0 20px;
        border-radius: 24px;
    }

    .auth-entry-switch {
        margin-bottom: 24px;
    }
}

@media (max-width: 760px) {
    .role-hero {
        flex-direction: column;
    }
}

.track-client-hero,
.track-client-card,
.track-client-summary,
.track-client-timeline-card,
.track-client-chat-card {
    padding: 24px;
}

.track-client-chat-card {
    margin-top: 18px;
}

.track-client-chat-title {
    margin: 8px 0 0;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.track-client-chat-lead {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.order-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(42vh, 380px);
    overflow-y: auto;
    padding: 12px;
    border-radius: 16px;
    background: rgba(248, 250, 249, 0.92);
    border: 1px solid var(--line);
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.order-chat-bubble {
    padding: 10px 12px;
    border-radius: 14px;
    max-width: min(92%, 420px);
}

.order-chat-bubble--client {
    align-self: flex-end;
    background: rgba(15, 118, 110, 0.14);
    border: 1px solid rgba(15, 118, 110, 0.22);
}

.order-chat-bubble--driver {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
}

.order-chat-bubble--admin {
    align-self: center;
    max-width: min(96%, 440px);
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.12), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(124, 58, 237, 0.28);
}

.order-details-chat {
    margin-top: 18px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.order-details-chat-inner {
    margin-top: 8px;
}

.order-details-chat .order-chat-messages {
    max-height: min(38vh, 340px);
}

.admin-order-chat-form textarea {
    min-height: 64px;
}

.order-chat-who {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.order-chat-text {
    margin: 6px 0 4px;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
}

.order-chat-time {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
}

.order-chat-map-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--secondary);
}

.order-chat-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
    padding: 8px 4px;
}

.track-chat-form {
    display: grid;
    gap: 10px;
}

.track-chat-field {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.track-chat-field textarea {
    width: 100%;
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
    resize: vertical;
}

.track-chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.track-chat-actions .secondary-btn,
.track-chat-actions .primary-btn {
    flex: 1 1 140px;
    min-height: 48px;
}

.track-chat-status {
    margin: 0 0 8px;
    font-size: 0.88rem;
    color: var(--muted);
}

.driver-order-chat {
    margin-top: 14px;
}

.driver-order-chat-inner {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
}

.driver-chat-toggle {
    width: 100%;
    border: 0;
    border-radius: 14px;
    min-height: 48px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(124, 58, 237, 0.1);
    color: #4c1d95;
    font-weight: 800;
    cursor: pointer;
}

.driver-chat-toggle-note {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
}

.driver-chat-form .primary-btn {
    width: 100%;
    min-height: 48px;
}

.track-client-card,
.track-client-result {
    margin-top: 18px;
}

.track-client-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.track-client-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.track-client-form input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
}

.track-client-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.track-client-meta div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.track-client-meta span,
.track-step-copy span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.track-client-meta strong,
.track-step-copy strong {
    display: block;
    margin-top: 6px;
}

.track-client-steps {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.track-step {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.track-step-dot {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    border-radius: 999px;
    border: 3px solid rgba(20, 33, 38, 0.16);
    background: #ffffff;
}

.track-step.done .track-step-dot {
    border-color: rgba(15, 118, 110, 0.18);
    background: var(--secondary);
}

.track-step.active {
    border-color: rgba(232, 107, 53, 0.28);
    box-shadow: 0 12px 24px rgba(232, 107, 53, 0.08);
}

.track-step.active .track-step-dot {
    border-color: rgba(232, 107, 53, 0.18);
    background: var(--accent);
}

@media (max-width: 920px) {
    .track-client-form,
    .track-client-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .track-client-hero,
    .track-client-card,
    .track-client-summary,
    .track-client-timeline-card,
    .track-client-chat-card {
        padding: 18px 16px;
    }

    .track-client-form .primary-btn {
        width: 100%;
        min-height: 54px;
    }

    .track-chat-actions {
        flex-direction: column;
    }

    .track-chat-actions .secondary-btn,
    .track-chat-actions .primary-btn {
        width: 100%;
        flex: none;
    }
}

.track-client-address {
    margin-top: 18px;
}

.track-collapse-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.track-client-address-lead {
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.track-addr-payment {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f766e;
}

.track-addr-form {
    display: grid;
    gap: 10px;
}

.track-addr-label textarea {
    width: 100%;
    min-height: 88px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font: inherit;
    resize: vertical;
}

.track-addr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.track-addr-actions .secondary-btn,
.track-addr-actions .primary-btn {
    flex: 1 1 160px;
    min-height: 48px;
}

.track-meta-map-link {
    font-weight: 700;
    color: var(--secondary);
}

.pill--payment {
    background: rgba(15, 118, 110, 0.12);
    border: 1px solid rgba(15, 118, 110, 0.22);
    color: #0b5c55;
    font-size: 0.78rem;
}

.pill--sale {
    font-size: 0.78rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.26);
    color: #4338ca;
}

.pill--sale-store {
    background: rgba(100, 116, 139, 0.12);
    border: 1px solid rgba(71, 85, 105, 0.22);
    color: #475569;
}

.pill--sale-corp {
    background: rgba(234, 88, 12, 0.12);
    border: 1px solid rgba(234, 88, 12, 0.28);
    color: #9a3412;
}

.delivery-form-row--payment {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.delivery-form-payment-label {
    font-weight: 700;
    font-size: 0.9rem;
}

.payment-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.admin-settings-lead {
    margin-bottom: 16px;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.admin-settings-field {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.admin-settings-field input {
    min-height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font: inherit;
}

.admin-settings-field--full {
    grid-column: 1 / -1;
}

.admin-settings-field textarea {
    min-height: 140px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font: inherit;
    font-weight: 400;
    resize: vertical;
}

.admin-settings-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.driver-trip-tariff-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(20, 33, 38, 0.08);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    color: #475569;
    box-shadow: 0 4px 14px rgba(20, 33, 38, 0.05);
}

.driver-trip-payment {
    margin: 4px 0 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f766e;
}

.driver-trip-addr-wrap {
    margin: 14px 16px 0;
}

.driver-trip-addr-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.driver-trip-addr-toggle:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.45);
    outline-offset: 2px;
}

.driver-trip-addr-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    opacity: 0.75;
}

.driver-trip-addr-toggle.is-open .driver-trip-addr-chevron {
    transform: rotate(-135deg);
}

.driver-trip-addr-block {
    margin: 14px 16px 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
}

.driver-trip-addr-block--collapsible {
    margin: 8px 0 0;
}

.driver-trip-addr-field {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.driver-trip-addr-field textarea {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font: inherit;
    resize: vertical;
}

.driver-trip-addr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.driver-trip-addr-actions .primary-btn,
.driver-trip-addr-actions .secondary-btn {
    flex: 1 1 160px;
    min-height: 46px;
}

.driver-trip-addr-msg {
    margin: 8px 0 0;
    font-size: 0.86rem;
    color: var(--muted);
}

.crm-customers-list {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.crm-customer-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.65);
    align-items: start;
}

.crm-customer-row strong {
    display: block;
    font-size: 1rem;
}

.crm-customer-row .meta {
    grid-column: 1 / -1;
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
}

.crm-receipt-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 16px;
}

.crm-receipt-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
}

.crm-receipt-box img {
    display: block;
    margin-top: 12px;
    max-width: 200px;
    height: auto;
}

.warehouse-shell {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.warehouse-stock-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.92rem;
}

.warehouse-stock-table th,
.warehouse-stock-table td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
}

.warehouse-panel {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.nav-btn.hidden {
    display: none;
}