/* ========================================================================
   TheTaxi — Глобальные стили
   Корпоративные цвета: синий #3366FF, тёмный #1a1f36, светлый #eef2f6
   ======================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #3366FF;
    --primary-dark: #2952CC;
    --primary-light: #E8EFFF;
    --black: #1a1f36;
    --text: #1a1f36;
    --text-muted: #5e6e89;
    --gray: #eef2f6;
    --gray-light: #f7f9fc;
    --gray-dark: #8898aa;
    --gray-mid: #d6dde5;
    --border: #e3e8ef;
    --green: #00C48C;
    --red: #FF647C;
    --orange: #FF9A3C;
    --blue: #3366FF;
    --shadow: 0 1px 3px rgba(26,31,54,0.06), 0 1px 2px rgba(26,31,54,0.04);
    --shadow-md: 0 4px 12px rgba(26,31,54,0.08);
    --shadow-lg: 0 8px 24px rgba(26,31,54,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 60px;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--gray-light);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

a { color: var(--text); text-decoration: none; }
a:hover { opacity: 0.85; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ============== Шапка (светлая) ============== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--header-h);
    background: #ffffff;
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(8px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-icon.big {
    width: 72px;
    height: 72px;
    font-size: 36px;
    border-radius: 18px;
    margin: 0 auto;
}

.logo-text { color: var(--text); }

.nav-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s;
    white-space: nowrap;
}

.nav-link i { font-size: 14px; }

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    opacity: 1;
}

.nav-link.logout { color: var(--red); }
.nav-link.logout:hover { background: rgba(255,100,124,0.1); color: var(--red); }

.wallet-link {
    background: var(--primary);
    color: white !important;
    padding: 8px 14px;
    border-radius: 22px;
    font-weight: 600;
    margin-left: 8px;
}

.wallet-link:hover {
    background: var(--primary-dark);
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    color: var(--text);
    font-size: 22px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
}

.mobile-menu-btn:hover { background: var(--gray); }

/* ============== Контейнеры ============== */
.container {
    max-width: 920px;
    margin: 24px auto;
    padding: 0 20px;
}

.container.wide { max-width: 1280px; }
.container.narrow { max-width: 640px; }

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card h3 { margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.card h4 { margin-bottom: 8px; font-size: 16px; font-weight: 600; }

/* ============== Формы ============== */
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: white;
    color: var(--text);
    transition: all 0.18s;
    -webkit-appearance: none;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(51,102,255,0.15);
}

.form-input:disabled {
    background: var(--gray);
    color: var(--gray-dark);
    cursor: not-allowed;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-grid { display: flex; flex-direction: column; }

/* ============== Кнопки ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.18s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn i { font-size: 13px; }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(51,102,255,0.2);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(51,102,255,0.25);
    transform: translateY(-1px);
}
.btn-primary:disabled {
    background: var(--gray-mid);
    color: var(--gray-dark);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--gray); }

.btn-cancel {
    background: white;
    color: var(--red);
    border: 1px solid var(--red);
}
.btn-cancel:hover { background: rgba(255,100,124,0.08); }

.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #00a878; }

.btn-sos { background: var(--red); color: white; }

.btn-full { width: 100%; }
.btn-large { padding: 14px 22px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-icon {
    padding: 0;
    width: 38px;
    height: 38px;
    background: var(--gray);
    border-radius: 50%;
    font-size: 15px;
    color: var(--text);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: var(--gray-mid); }

/* ============== Auth ============== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 0% 0%, rgba(51,102,255,0.12) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0,196,140,0.08) 0%, transparent 50%),
        var(--gray-light);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-size: 28px;
    margin-top: 14px;
    font-weight: 700;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a { color: var(--primary); font-weight: 600; }

/* ============== Auth — расширенный layout ============== */
.auth-card-wide { max-width: 520px; }

.auth-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-size: 13px;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text);
}

.checkbox-row input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span { padding: 0 14px; }

/* === Step progress === */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 0 20px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s;
    border: 2px solid var(--border);
}

.step-item.active .step-circle {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(51,102,255,0.15);
}

.step-item.done .step-circle {
    background: var(--green);
    color: white;
    border-color: var(--green);
}
.step-item.done .step-circle::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}
.step-item.done .step-circle { font-size: 0; }
.step-item.done .step-circle::before { font-size: 14px; }

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.step-item.active .step-label { color: var(--primary); font-weight: 600; }
.step-item.done .step-label { color: var(--green); }

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

/* === Step content === */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeIn 0.3s; }

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

.step-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}

/* === Role cards (step 1) === */
.role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.role-card { position: relative; cursor: pointer; }
.role-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-card-inner {
    background: var(--gray-light);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.2s;
}

.role-card-inner h4 {
    margin: 10px 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.role-card-inner p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.role-icon {
    font-size: 32px;
    color: var(--gray-dark);
    transition: color 0.2s;
}

.role-card:hover .role-card-inner {
    border-color: var(--primary);
    background: white;
}

.role-card input:checked ~ .role-card-inner {
    background: var(--primary-light);
    border-color: var(--primary);
}

.role-card input:checked ~ .role-card-inner .role-icon,
.role-card input:checked ~ .role-card-inner h4 {
    color: var(--primary);
}

/* === Password === */
.password-wrap {
    position: relative;
}

.password-wrap .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
}
.password-toggle:hover { color: var(--text); }

.password-strength {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    background: var(--gray-mid);
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.strength-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 100px;
    text-align: right;
}

/* === Field hint === */
.field-hint {
    font-size: 12px;
    margin-top: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 14px;
}

.field-hint.error { color: var(--red); }
.field-hint.success { color: var(--green); }

/* === Step buttons === */
.step-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.step-buttons .btn { flex: 1; }
.step-buttons .btn-secondary { flex: 0 0 auto; min-width: 110px; }

.terms-row {
    font-size: 13px;
    margin-bottom: 18px;
    align-items: flex-start;
    line-height: 1.5;
}

.terms-row a { color: var(--primary); }

/* === Success === */
.success-state {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    font-size: 64px;
    color: var(--green);
    margin-bottom: 16px;
}

.success-state h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.success-state p {
    color: var(--text-muted);
}

.demo-accounts {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

.demo-accounts h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.demo-chip {
    padding: 6px 12px;
    background: var(--gray);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    border: none;
    transition: all 0.18s;
}

.demo-chip:hover {
    background: var(--primary);
    color: white;
}

/* ============== Роли ============== */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.role-option {
    position: relative;
    padding: 18px;
    background: var(--gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.role-option i { font-size: 24px; color: var(--text-muted); }

.role-option input {
    position: absolute;
    opacity: 0;
}

.role-option:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.role-option:has(input:checked) i { color: var(--primary); }

/* ============== Карта ============== */
.passenger-page, .driver-page {
    height: calc(100vh - var(--header-h));
    position: relative;
    overflow: hidden;
}

.map-container {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.custom-marker { display: flex; align-items: center; justify-content: center; }

.marker-pin {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: white;
    font-size: 14px;
}

.marker-pin.from { background: var(--green); }
.marker-pin.to { background: var(--red); }
.marker-pin.driver { background: var(--primary); border-radius: 50%; transform: none; }
.marker-pin i { transform: rotate(45deg); }
.marker-pin.driver i { transform: none; }

.marker-pulse {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    font-size: 14px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0,196,140,0.7); }
    70% { box-shadow: 0 0 0 16px rgba(0,196,140,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,196,140,0); }
}

/* ============== Нижняя панель ============== */
.bottom-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 8px 20px 24px;
    max-height: 78vh;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 -8px 24px rgba(26,31,54,0.12);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-mid);
    border-radius: 2px;
    margin: 4px auto 8px;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
}

/* ============== Адреса ============== */
.address-inputs { position: relative; }

.address-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: border-color 0.18s;
}

.address-row:focus-within {
    border-color: var(--primary);
    background: white;
}

.address-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 2px 0;
    font-size: 15px;
    outline: none;
    color: var(--text);
    min-width: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-from { background: var(--green); }
.dot-to { background: var(--red); }

.suggestions {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 8px;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.suggestion-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray);
    cursor: pointer;
    font-size: 14px;
}
.suggestion-item:hover { background: var(--primary-light); color: var(--primary); }
.suggestion-item:last-child { border-bottom: none; }

/* ============== Trip info ============== */
.trip-info {
    display: flex;
    justify-content: space-around;
    padding: 14px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.info-item { text-align: center; }
.info-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.info-value { font-size: 18px; font-weight: 700; margin-top: 4px; }

/* ============== Payment ============== */
.payment-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.payment-option {
    position: relative;
    padding: 12px 8px;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.18s;
    color: var(--text);
}

.payment-option input { position: absolute; opacity: 0; }

.payment-option.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.payment-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--text-muted);
}
.payment-option.active .payment-icon { color: var(--primary); }

/* ============== Offers ============== */
.offers-panel { max-height: 85vh; }

.offers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offers-title { font-size: 22px; font-weight: 700; }
.offers-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.timer-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.offers-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
}

.offer-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.35s ease;
    transition: all 0.2s;
}

.offer-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(51,102,255,0.12);
}

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

.offer-driver {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.driver-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gray);
    object-fit: cover;
    flex-shrink: 0;
}

.driver-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray);
    object-fit: cover;
}

.driver-info { flex: 1; min-width: 0; }

.driver-name { font-weight: 700; font-size: 15px; }

.driver-rating {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.driver-rating .star-icon { color: #FFB400; font-size: 12px; }

.driver-car {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-comment {
    font-size: 12px;
    color: var(--primary);
    margin-top: 4px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
}

.offer-right { text-align: right; min-width: 100px; }

.offer-price { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.offer-arrival { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }

.btn-select { padding: 7px 14px; font-size: 13px; }

/* ============== Loading / Empty ============== */
.loading-state, .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 48px; color: var(--gray-mid); margin-bottom: 12px; display: block; }

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--gray);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 14px;
}

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

.pulse-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
    margin: 0 auto 12px;
    animation: pulse 1.5s infinite;
}

/* ============== Driver top bar ============== */
.driver-top-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 50;
    background: white;
    border-radius: var(--radius);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.driver-stats-mini {
    display: flex;
    gap: 14px;
    font-size: 13px;
    font-weight: 600;
}

.driver-stats-mini span { display: flex; align-items: center; gap: 5px; }
.driver-stats-mini .star-icon { color: #FFB400; }

.online-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-label {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.online-label .status-circle {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gray-mid);
}
.online-label.is-online .status-circle { background: var(--green); }

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--gray-mid);
    transition: 0.3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider { background-color: var(--green); }
input:checked + .slider:before { transform: translateX(20px); }

.driver-waiting-panel {
    min-height: 120px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.driver-waiting-state {
    text-align: center;
    padding: 20px;
}
.driver-waiting-state i { font-size: 32px; color: var(--gray-mid); margin-bottom: 8px; display: block; }
.driver-waiting-state p { color: var(--text-muted); }
.driver-waiting-state small { color: var(--text-muted); display: block; margin-top: 6px; }

.verification-alert {
    position: absolute;
    top: 76px;
    left: 12px;
    right: 12px;
    z-index: 49;
}

/* ============== Trip panel ============== */
.trip-panel { max-height: 80vh; }
.trip-status { text-align: center; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--gray);
    font-size: 13px;
    font-weight: 600;
}

.status-badge.status-accepted { background: var(--primary-light); color: var(--primary); }
.status-badge.status-driver_arrived { background: #FFF4E5; color: var(--orange); }
.status-badge.status-in_progress { background: rgba(0,196,140,0.15); color: var(--green); }
.status-badge.status-completed { background: var(--green); color: white; }
.status-badge.status-cancelled { background: rgba(255,100,124,0.15); color: var(--red); }

.driver-card, .passenger-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.driver-details, .passenger-info { flex: 1; min-width: 0; }
.driver-name, .passenger-name { font-weight: 700; font-size: 15px; }

.driver-car-info, .driver-car-number, .passenger-phone {
    font-size: 13px;
    color: var(--text-muted);
}

.driver-car-number {
    font-weight: 600;
    color: var(--text);
    margin-top: 2px;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.btn-call {
    background: var(--green);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.btn-call:hover { background: #00a878; opacity: 1; color: white; }

.trip-route {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.route-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
}

.route-row:not(:last-child) {
    border-bottom: 1px dashed var(--border);
}

.route-text { font-size: 13px; flex: 1; word-break: break-word; }
.route-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.trip-meta {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.meta-item { text-align: center; }
.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.meta-value { font-size: 15px; font-weight: 700; }
.meta-value.price { font-size: 22px; color: var(--primary); }

.trip-actions {
    display: flex;
    gap: 8px;
}
.trip-actions .btn { flex: 1; }

/* ============== Incoming offer modal ============== */
.offer-modal-content {
    max-width: 520px;
    width: 95%;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideUp 0.3s;
}

.incoming-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 22px 20px;
    text-align: center;
    position: relative;
}

.incoming-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.incoming-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.incoming-timer {
    position: absolute;
    top: 14px;
    right: 14px;
    background: white;
    color: var(--primary);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.incoming-route, .incoming-stats, .price-suggestion, .offer-modal-content .form-group, .offer-actions {
    padding-left: 20px;
    padding-right: 20px;
}

.incoming-route {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 16px 20px 0;
    padding: 12px 14px;
}

.incoming-stats {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.stat-box {
    flex: 1;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.stat-box .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.stat-box .stat-value {
    font-size: 15px;
    font-weight: 700;
}

.price-suggestion {
    background: var(--primary-light);
    margin: 16px 20px;
    padding: 14px;
    border-radius: var(--radius);
}

.price-hint {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.price-hint strong {
    font-size: 17px;
    color: var(--primary);
}

.price-hint small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
    flex-basis: 100%;
}

.price-input-wrap label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.price-input {
    font-size: 22px !important;
    font-weight: 700;
    text-align: center;
}

.quick-prices {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.quick-price {
    flex: 1;
    padding: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
}

.quick-price:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.offer-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 20px;
    padding-top: 4px;
}
.offer-actions .btn { flex: 1; }

/* ============== Wallet ============== */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(51,102,255,0.2);
}

.balance-label {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: 40px;
    font-weight: 800;
    margin: 10px 0 16px;
    line-height: 1.1;
}

.balance-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.balance-actions .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: none;
}
.balance-actions .btn-primary:hover {
    background: var(--gray-light);
    color: var(--primary-dark);
}
.balance-actions .btn-secondary {
    background: rgba(255,255,255,0.18);
    color: white;
    border-color: rgba(255,255,255,0.3);
}
.balance-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.cards-list { display: flex; flex-direction: column; gap: 8px; }

.payment-card {
    background: var(--gray-light);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-info { display: flex; align-items: center; gap: 12px; }
.card-info i { color: var(--primary); font-size: 22px; }
.card-brand { font-weight: 700; font-size: 14px; }
.card-number { font-family: monospace; color: var(--text-muted); font-size: 13px; }

.transactions-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.transaction-item:last-child { border-bottom: none; }

.tx-info { flex: 1; min-width: 0; }
.tx-description { font-size: 14px; font-weight: 500; }
.tx-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }

/* ============== Trip history ============== */
.trips-list { display: flex; flex-direction: column; gap: 12px; }

.trip-history-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.trip-history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.trip-date { font-size: 13px; color: var(--text-muted); }
.trip-price { font-size: 18px; font-weight: 700; color: var(--primary); }

.trip-history-route { margin: 8px 0; }

.route-line {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
}

.trip-history-footer {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.trip-history-footer span { display: flex; align-items: center; gap: 4px; }
.trip-status-text.status-completed { color: var(--green); }
.trip-status-text.status-cancelled { color: var(--red); }

/* ============== Modal ============== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,31,54,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.modal.open { display: flex; }

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 440px;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gray);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--gray-mid); }

.modal h3 { margin-bottom: 16px; font-weight: 600; font-size: 18px; }

.hint { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

/* ============== Toast ============== */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.toast {
    background: var(--text);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s, fadeOut 0.3s 2.7s forwards;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warning { background: var(--orange); color: white; }
.toast.info { background: var(--primary); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(50%); }
}

/* ============== Alerts ============== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-warning { background: #FFF4E5; color: #b45309; border-left: 3px solid var(--orange); }
.alert-info { background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }
.alert-success { background: rgba(0,196,140,0.1); color: var(--green); border-left: 3px solid var(--green); }
.alert-error { background: rgba(255,100,124,0.1); color: var(--red); border-left: 3px solid var(--red); }

.flash-container {
    max-width: 920px;
    margin: 16px auto;
    padding: 0 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.flash-error { background: rgba(255,100,124,0.1); color: var(--red); }
.flash-success { background: rgba(0,196,140,0.1); color: var(--green); }
.flash-info { background: var(--primary-light); color: var(--primary); }

/* ============== Chat ============== */
.chat-modal .chat-content {
    max-width: 520px;
    height: 82vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.chat-header {
    padding: 14px 20px;
    background: white;
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.chat-header .modal-close {
    position: static;
    color: var(--text);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--gray-light);
}

.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
}

.chat-message.own {
    align-self: flex-end;
    background: var(--primary);
    color: white;
}

.chat-message.other {
    align-self: flex-start;
    background: white;
    border: 1px solid var(--border);
}

.chat-text { font-size: 14px; }

.chat-time {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
    text-align: right;
}
.chat-message.other .chat-time { color: var(--text-muted); }

.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: white;
    border-radius: 0 0 16px 16px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.chat-input:focus { border-color: var(--primary); }

.chat-input-row .btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
}

/* ============== Stars / tags ============== */
.stars-input {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0;
    font-size: 38px;
}

.star {
    color: var(--gray-mid);
    cursor: pointer;
    transition: all 0.18s;
}
.star.active { color: #FFB400; }
.star:hover { transform: scale(1.15); }

.rating-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tag-chip {
    padding: 6px 12px;
    background: var(--gray);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    border: 1px solid transparent;
}

.tag-chip:hover { background: var(--gray-mid); }

.tag-chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tips-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.tips-buttons .btn { padding: 10px 6px; font-size: 13px; }

/* ============== Admin ============== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}

.stat-card i.card-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    color: var(--gray-mid);
}

.stat-card.highlight {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.stat-card.highlight .stat-label,
.stat-card.highlight i.card-icon { color: rgba(255,255,255,0.85); }

.stat-card.warning { background: #FFF4E5; border-color: #FFD9A8; }
.stat-card.warning i.card-icon { color: var(--orange); }

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-card small {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    font-size: 13px;
}

.data-table thead { background: var(--gray-light); }
.data-table th {
    color: var(--text-muted);
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--gray-light); }

.actions-cell {
    display: flex;
    gap: 4px;
}

.table-wrapper { overflow-x: auto; }

.status-pill, .role-pill, .active-pill, .blocked-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.status-pill.status-completed { background: rgba(0,196,140,0.15); color: var(--green); }
.status-pill.status-cancelled { background: rgba(255,100,124,0.15); color: var(--red); }
.status-pill.status-accepted { background: var(--primary-light); color: var(--primary); }
.status-pill.status-driver_arrived { background: #FFF4E5; color: var(--orange); }
.status-pill.status-in_progress { background: rgba(0,196,140,0.15); color: var(--green); }
.status-pill.status-searching { background: var(--primary-light); color: var(--primary); }
.status-pill.status-active { background: rgba(0,196,140,0.15); color: var(--green); }
.status-pill.status-expired { background: var(--gray); color: var(--text-muted); }

.role-pill.role-passenger { background: var(--primary-light); color: var(--primary); }
.role-pill.role-driver { background: #FFF4E5; color: var(--orange); }
.role-pill.role-admin { background: #F3E8FF; color: #7E22CE; }

.active-pill { background: rgba(0,196,140,0.15); color: var(--green); }
.blocked-pill { background: rgba(255,100,124,0.15); color: var(--red); }

.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 14px;
    background: white;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    color: var(--text);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============== Verify cards ============== */
.verify-list {
    display: grid;
    gap: 16px;
}

.verify-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.verify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.verify-header h3 { font-size: 16px; }
.verify-header .phone { color: var(--text-muted); font-size: 13px; }

.verify-body p { margin-bottom: 6px; font-size: 14px; }
.verify-body strong { color: var(--text); }

.verify-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.verify-actions .btn { flex: 1; }

.offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--gray);
    border-radius: 10px;
    margin: 2px;
    font-size: 12px;
}

.offers-row td { background: var(--gray-light); padding: 8px 10px; }

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* ============== Адаптив ============== */
@media (max-width: 1024px) {
    .nav-link span { display: none; }
    .nav-link { padding: 8px 10px; }
    .wallet-link { padding: 8px 14px; }
    .wallet-link .wallet-balance { display: inline; }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }
    .app-header { padding: 0 16px; }
    .logo-icon { width: 32px; height: 32px; font-size: 16px; }
    .logo { font-size: 17px; }

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
        display: none;
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .nav-menu.open { display: flex; }
    .nav-link {
        width: 100%;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
    }
    .nav-link span { display: inline; }
    .wallet-link {
        margin-left: 0;
        justify-content: flex-start;
    }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

    .container { padding: 0 16px; margin: 16px auto; }
    .page-title { font-size: 22px; margin-bottom: 16px; }
    .card { padding: 18px; }

    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 20px; }

    .balance-amount { font-size: 32px; }

    .data-table { font-size: 12px; }
    .data-table th { font-size: 10px; padding: 8px 6px; }
    .data-table td { padding: 8px 6px; }

    .bottom-panel { padding: 8px 16px 16px; max-height: 70vh; }
    .panel-title { font-size: 18px; }
    .offers-title { font-size: 18px; }

    .offer-card {
        flex-direction: row;
    }
    .offer-right { min-width: 90px; }
    .offer-price { font-size: 22px; }

    .trip-meta { padding: 10px; }
    .meta-value { font-size: 14px; }
    .meta-value.price { font-size: 18px; }

    .driver-top-bar { padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
    .driver-stats-mini { font-size: 12px; gap: 10px; }
    .online-label { font-size: 13px; }

    .incoming-stats { flex-wrap: wrap; }
    .stat-box { flex: 1 1 calc(33% - 8px); min-width: 80px; }
    .price-input { font-size: 20px !important; }

    .tips-buttons { grid-template-columns: repeat(2, 1fr); }

    .auth-card { padding: 28px 22px; }
    .auth-logo h1 { font-size: 22px; }

    .role-cards { grid-template-columns: 1fr; gap: 10px; }
    .role-card-inner { padding: 18px; display: flex; align-items: center; gap: 14px; text-align: left; }
    .role-card-inner h4 { margin: 0; }
    .role-icon { font-size: 26px; }

    .step-progress { padding: 0; }
    .step-circle { width: 32px; height: 32px; font-size: 13px; }
    .step-label { font-size: 11px; }

    .auth-extras { flex-direction: column; align-items: flex-start; gap: 10px; }
    .step-buttons { flex-direction: column-reverse; }
    .step-buttons .btn-secondary { width: 100%; }
}

@media (max-width: 480px) {
    .balance-amount { font-size: 28px; }
    .stats-grid { grid-template-columns: 1fr; }
    .offer-card { padding: 12px; gap: 10px; }
    .driver-avatar { width: 42px; height: 42px; }
    .offer-price { font-size: 20px; }
    .filter-row { gap: 6px; }
    .filter-chip { padding: 5px 10px; font-size: 12px; }

    .verify-actions { flex-direction: column; }
    .verify-header { flex-direction: column; align-items: flex-start; gap: 4px; }

    #toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .modal { padding: 12px; }
    .modal-content { padding: 20px; border-radius: 14px; }
    .stars-input { font-size: 32px; gap: 6px; }
}

/* iOS safe area */
@supports (padding: max(0px)) {
    .app-header { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
    .bottom-panel { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
