/* ==========================================================================
   Город Едет — style.css v8.0 (Финальный)
   ========================================================================== */

:root {
    --bg: #f5f9ff;
    --bg-soft: #eef4fb;
    --card-bg: #ffffff;
    --text: #071B3D;
    --text-light: #58718F;
    --text-muted: #8ba3c7;
    --border: #d0e0f0;
    --border-strong: #b0cbe8;
    --accent: #078BFF;
    --accent-hover: #0066cc;
    --accent-pressed: #0052a3;
    --accent-text: #ffffff;
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --info: #3b82f6;
    --info-bg: rgba(7, 139, 255, 0.1);
    --info-text: #074c8f;
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --shadow: 0 2px 12px rgba(7, 27, 61, 0.06);
    --shadow-hover: 0 6px 24px rgba(7, 139, 255, 0.15);
    --shadow-lg: 0 20px 60px rgba(7, 27, 61, 0.15);
    --input-bg: #f5f9ff;
    --input-border: #d0e0f0;
    --transition: 0.15s ease;
    --transition-slow: 0.3s ease;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

[data-theme="dark"] {
    --bg: #071B3D;
    --bg-soft: #0a254f;
    --card-bg: #0a254f;
    --text: #f3f4f6;
    --text-light: #8ba3c7;
    --text-muted: #58718F;
    --border: #133a75;
    --border-strong: #1c4b91;
    --accent: #078BFF;
    --accent-hover: #33a3ff;
    --accent-pressed: #0066cc;
    --accent-text: #ffffff;
    --success: #10b981;
    --success-bg: #064e3b;
    --success-text: #6ee7b7;
    --error: #ef4444;
    --error-bg: #7f1d1d;
    --error-text: #fca5a5;
    --warning: #f59e0b;
    --warning-bg: #78350f;
    --warning-text: #fcd34d;
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);
    --info-text: #93c5fd;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.8);
    --input-bg: #071B3D;
    --input-border: #133a75;
    color-scheme: dark;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
                 'Apple Color Emoji', 'Segoe UI Emoji';
    font-size: 16px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background var(--transition-slow), color var(--transition-slow);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

/* ==================== HEADER ==================== */
header {
    width: 100%;
    max-width: 720px;
    padding: calc(28px + var(--safe-top)) 20px 16px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    height: 48px;
    width: auto;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 500;
}

.theme-toggle {
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.theme-toggle:hover {
    transform: scale(1.06) rotate(-8deg);
    background: var(--border);
}

.theme-toggle:active { transform: scale(0.94); }

/* ==================== MAIN ==================== */
main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    padding: 0 20px calc(60px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    width: 100%;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition), transform var(--transition);
    animation: fadeIn 0.3s ease;
}

.card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 22px;
    color: var(--text);
    letter-spacing: -0.3px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== FORM ==================== */
.form { display: flex; flex-direction: column; gap: 16px; }

.form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.form input[type="text"],
.form input[type="tel"],
.form input[type="password"],
.form input[type="number"],
.form input[type="email"],
.form input[type="datetime-local"],
.form input[type="url"],
.form select,
.form textarea {
    padding: 16px 18px;
    font-size: 1rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-weight: 500;
    width: 100%;
    min-height: 52px;
    -webkit-appearance: none;
    appearance: none;
}

.form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2358718F' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 46px;
}

.form textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form input:hover:not(:focus),
.form select:hover:not(:focus),
.form textarea:hover:not(:focus) {
    border-color: var(--border-strong);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--accent);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(7, 139, 255, 0.15);
}

.form input:disabled,
.form select:disabled,
.form textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form input::placeholder,
.form textarea::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form input[type="number"]::-webkit-outer-spin-button,
.form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==================== BUTTONS ==================== */
.btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    width: 100%;
    text-decoration: none;
    gap: 8px;
    min-height: 56px;
    letter-spacing: -0.2px;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.3;
    text-align: center;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.btn:active::after { opacity: 1; transition: opacity 0s; }

.btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    color: var(--accent-text);
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-soft);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--card-bg);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
}

.btn-secondary:active:not(:disabled) { background: var(--border); }

.btn-small {
    padding: 10px 16px;
    background: var(--accent);
    color: var(--accent-text);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    min-height: 38px;
    white-space: nowrap;
}

.btn-small:hover {
    background: var(--accent-hover);
    text-decoration: none;
    color: var(--accent-text);
}

.btn-small:active { transform: scale(0.96); }

.btn-link {
    background: none;
    border: none;
    color: var(--info);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    padding: 4px;
}

.btn-link:hover { color: var(--text); }

/* ==================== MESSAGES ==================== */
.message {
    text-align: center;
    font-size: 0.95rem;
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 600;
    max-height: 0;
    overflow: hidden;
    line-height: 1.4;
}

.message.success,
.message.error { max-height: 200px; }

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    opacity: 1;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    opacity: 1;
}

/* ==================== LINK-BACK ==================== */
.link-back {
    display: block;
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 20px;
    font-weight: 500;
    padding: 10px;
    border-radius: var(--radius-xs);
    transition: color var(--transition), background var(--transition);
}

.link-back:hover {
    color: var(--text);
    background: var(--bg-soft);
    text-decoration: none;
}

/* ==================== ORDER ITEM ==================== */
.order-item {
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 12px;
    transition: all var(--transition);
    animation: fadeIn 0.25s ease;
}

.order-item.active {
    border-color: var(--accent);
    background: rgba(7, 139, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(7, 139, 255, 0.15);
}

[data-theme="dark"] .order-item.active {
    background: rgba(7, 139, 255, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    gap: 8px;
    flex-wrap: wrap;
}

.order-header .status {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.order-route {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 14px;
    font-weight: 500;
    word-break: break-word;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-detail {
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
    line-height: 1.7;
}

.order-detail p {
    margin-bottom: 10px;
    line-height: 1.7;
    font-weight: 500;
    word-break: break-word;
}

.order-detail p:last-child { margin-bottom: 0; }

.driver-info {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    border-left: 4px solid var(--accent);
    font-weight: 500;
    line-height: 1.6;
}

.price-preview {
    padding: 20px;
    background: linear-gradient(135deg, rgba(7,139,255,0.08), rgba(7,139,255,0.03));
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

[data-theme="dark"] .price-preview {
    background: rgba(7, 139, 255, 0.1);
    color: var(--text);
}

.price-preview small { color: var(--text-light); }

/* ==================== TABS ==================== */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.tab-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--bg-soft);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    transition: all var(--transition);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn:hover:not(.active) {
    background: var(--border);
    border-color: var(--border-strong);
}

.tab-btn.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(7, 139, 255, 0.3);
}

.tab-btn:active { transform: scale(0.97); }

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    top: calc(24px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    font-size: 1rem;
    font-weight: 700;
    display: none;
    max-width: 90%;
    text-align: center;
    line-height: 1.4;
}

.toast.show {
    display: block;
    animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: calc(24px + var(--safe-top)); opacity: 1; }
}

/* ==================== CHAT ==================== */
.chat-box {
    max-height: 500px;
    overflow-y: auto;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.msg {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 500;
    line-height: 1.5;
    animation: bubbleIn 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg.mine {
    background: var(--accent);
    color: var(--accent-text);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.msg.theirs {
    background: var(--card-bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-bottom-left-radius: 4px;
}

.msg-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 4px;
    font-weight: 500;
}

.chat-input { display: flex; gap: 8px; }

.chat-input input {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--input-border);
    font-size: 1rem;
    outline: none;
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-weight: 500;
    min-height: 52px;
}

.chat-input input:focus {
    border-color: var(--accent);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(7, 139, 255, 0.15);
}

.chat-input button {
    padding: 16px 20px;
    min-width: 60px;
    min-height: auto;
    font-size: 1.1rem;
}

/* ==================== PAYMENTS ==================== */
.payment-item {
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.payment-item.confirmed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.06);
}

.payment-item.pending {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.06);
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    gap: 12px;
}

.payment-row:last-child { border-bottom: none; }
.payment-label { color: var(--text-light); font-weight: 500; }
.payment-value { font-weight: 700; text-align: right; }

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 30px 20px calc(30px + var(--safe-bottom));
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

footer a:hover { color: var(--text); }

/* ==================== INFO/SUCCESS/WARNING ==================== */
.step-info,
.step-success,
.step-warning {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.5;
    border: 1.5px solid;
}

.step-info {
    background: var(--info-bg);
    border-color: rgba(7, 139, 255, 0.3);
    color: var(--info-text);
}

.step-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--success-text);
}

.step-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--warning-text);
}

[data-theme="dark"] .step-info { color: var(--info-text); }
[data-theme="dark"] .step-success { color: var(--success-text); }
[data-theme="dark"] .step-warning { color: var(--warning-text); }

/* ==================== SKELETON ==================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-soft) 0%, var(--border) 50%, var(--bg-soft) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-xs);
    color: transparent !important;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== UTILITY ==================== */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }

/* ==================== MOBILE ==================== */
@media (max-width: 500px) {
    body { font-size: 15px; }
    header { padding: calc(22px + var(--safe-top)) 16px 12px; }
    header h1 { font-size: 1.45rem; padding-right: 56px; }
    .subtitle { font-size: 0.88rem; }
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: calc(18px + var(--safe-top));
        right: 16px;
    }
    main { padding: 0 14px calc(40px + var(--safe-bottom)); gap: 14px; }
    .card { padding: 20px; border-radius: 18px; }
    .card h2 { font-size: 1.2rem; margin-bottom: 18px; }
    .btn { padding: 14px 20px; min-height: 52px; font-size: 0.98rem; }
    .btn-small { padding: 9px 14px; font-size: 0.82rem; }
    .form input[type="text"],
    .form input[type="tel"],
    .form input[type="password"],
    .form input[type="number"],
    .form input[type="email"],
    .form input[type="datetime-local"],
    .form input[type="url"],
    .form select,
    .form textarea {
        padding: 14px 16px;
        font-size: 16px;
    }
    .tab-btn { padding: 10px 14px; font-size: 0.85rem; }
    .toast {
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
    }
    .chat-box { max-height: 60vh; }
    .msg { max-width: 82%; font-size: 0.92rem; }
}

@media (max-width: 360px) {
    header h1 { font-size: 1.3rem; }
    .card { padding: 16px; }
    .btn { font-size: 0.92rem; }
}

@media (prefers-contrast: high) {
    :root { --border: #000; --border-strong: #000; }
    [data-theme="dark"] { --border: #fff; --border-strong: #fff; }
}

@media print {
    header, footer, .theme-toggle, .btn, .topbar, .tabs { display: none !important; }
    body { background: #fff; color: #000; }
    .card { box-shadow: none; border: 1px solid #000; }
}

@media (max-height: 500px) and (orientation: landscape) {
    header { padding: calc(12px + var(--safe-top)) 20px 8px; }
    main { padding-bottom: calc(20px + var(--safe-bottom)); }
    .card { padding: 16px; }
}

@media (hover: hover) and (pointer: fine) {
    .card:hover { box-shadow: var(--shadow-hover); }
    .order-item:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow);
    }
}

/* ==================== ADDITIONAL ==================== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-light);
}

.pill.success { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.pill.error   { background: var(--error-bg);   color: var(--error-text);   border-color: transparent; }
.pill.warning { background: var(--warning-bg); color: var(--warning-text); border-color: transparent; }
.pill.info    { background: var(--info-bg);    color: var(--info-text);    border-color: transparent; }

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
    border: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--error);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.switch input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ==================== НОВЫЕ СТИЛИ (ГОРОД ЕДЕТ) ==================== */

/* Выбор города на главной */
.city-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 20px;
    transition: all var(--transition);
}
.city-selector:hover { background: var(--info-bg); }

.city-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(7,27,61,0.8); z-index: 1000; display: none;
    align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.city-modal.active { display: flex; animation: fadeIn 0.3s; }
.city-modal-content {
    background: var(--card-bg); border-radius: 24px;
    width: 100%; max-width: 400px; padding: 24px;
}
.city-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.city-item {
    padding: 16px; border-radius: 12px; background: var(--bg-soft);
    border: 2px solid var(--border); cursor: pointer; font-weight: 700;
    font-size: 1.1rem; text-align: center; transition: all 0.2s;
}
.city-item:hover { border-color: var(--accent); background: var(--info-bg); }
.city-item.active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* Главный экран (Hero) */
.hero-section {
    text-align: center;
    padding: 10px 0 20px;
}
.hero-section h1 { font-size: 2rem; margin-bottom: 12px; color: var(--text); }
.hero-section p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 20px; }

/* Плитки действий (Такси, Доставка) */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    gap: 10px;
}
.action-tile:hover {
    border-color: var(--accent);
    background: var(--card-bg);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    color: var(--text);
}
.action-tile .icon { font-size: 2.5rem; }
.action-tile .title { font-weight: 800; font-size: 1.1rem; }
.action-tile .subtitle { font-size: 0.85rem; color: var(--text-light); text-align: center; }

@media (max-width: 420px) {
    .action-grid { grid-template-columns: 1fr; }
}

/* Карточки тарифов (с SVG иконками) */
.tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.tariff-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.tariff-card:hover { border-color: var(--accent); }
.tariff-card.active {
    border-color: var(--accent);
    background: var(--info-bg);
    box-shadow: 0 0 0 2px var(--accent);
}
.tariff-card img { width: 48px; height: 48px; margin-bottom: 8px; }
.tariff-card .name { font-weight: 700; font-size: 0.95rem; }
.tariff-card .price { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* Карточки водителя (в детали заказа) */
.driver-card {
    background: linear-gradient(135deg, rgba(7,139,255,0.08), rgba(7,139,255,0.03));
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 18px;
    margin-top: 16px;
}
[data-theme="dark"] .driver-card {
    background: rgba(7,139,255,0.1);
}
.driver-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.driver-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    color: #fff;
}
.driver-info-main { flex: 1; min-width: 0; }
.driver-name { font-weight: 800; font-size: 1.1rem; }
.driver-car { font-size: 0.9rem; color: var(--text-light); margin-top: 2px; }
.driver-plate {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: var(--text);
    color: var(--bg);
    border-radius: 6px;
    font-family: monospace;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.driver-actions { display: flex; gap: 10px; margin-top: 12px; }
.driver-actions .btn { flex: 1; margin: 0; }
.btn-call { background: var(--success); color: #fff; }

/* Карта на странице заказа */
#driverMap {
    width: 100%; height: 260px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    margin-top: 14px;
    overflow: hidden;
}

/* Кнопки навигации в панели водителя */
.btn-nav {
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 12px;
    padding: 12px;
    transition: all var(--transition);
}
.btn-nav:hover { background: var(--border); text-decoration: none; color: var(--text); }

/* Статусы заказа (баннеры) */
.status-banner {
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
    border: 2px solid;
    transition: all 0.3s;
}
.status-banner.pending { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #92400e; }
.status-banner.accepted { background: rgba(7,139,255,0.1); border-color: rgba(7,139,255,0.4); color: #074c8f; }
.status-banner.arrived { background: rgba(16,185,129,0.15); border-color: var(--success); color: #065f46; animation: pulse-arrived 2s infinite; }
.status-banner.in_progress { background: rgba(139,92,246,0.15); border-color: #8b5cf6; color: #5b21b6; animation: pulse-in-progress 2s infinite; }
.status-banner.completed { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #065f46; }
.status-banner.canceled { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); color: #991b1b; }

[data-theme="dark"] .status-banner.pending { color: #fcd34d; }
[data-theme="dark"] .status-banner.accepted { color: #93c5fd; }
[data-theme="dark"] .status-banner.arrived,
[data-theme="dark"] .status-banner.completed { color: #6ee7b7; }
[data-theme="dark"] .status-banner.in_progress { color: #c4b5fd; }
[data-theme="dark"] .status-banner.canceled { color: #fca5a5; }

@keyframes pulse-arrived {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(16,185,129,0); }
}
@keyframes pulse-in-progress {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(139,92,246,0); }
}