:root {
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
}

/* ── Nav ──────────────────────────────── */
.web-nav {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 1300;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.web-nav .nav-back {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    text-decoration: none;
}
.web-nav .nav-logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
    flex: 1;
}
.web-nav .nav-phone {
    font-size: 13px;
    color: var(--muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.web-nav .nav-menu-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.nav-dropdown {
    position: absolute;
    top: 52px; right: 8px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 10px;
    min-width: 240px;
    z-index: 1400;
    display: none;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a, .nav-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--accent-light); color: var(--accent); }
.nav-dropdown a i, .nav-dropdown button i {
    width: 16px;
    text-align: center;
    flex: 0 0 16px;
}
.nav-dropdown .divider {
    height: 1px;
    background: var(--border);
    margin: 6px 2px;
}

/* ── Containers ───────────────────────── */
.web-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
}

/* ── Card ─────────────────────────────── */
.web-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 14px;
}
.web-card-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--text);
}

/* ── Map ──────────────────────────────── */
#webMap {
    width: 100%;
    height: 260px;
    border-radius: var(--radius);
    background: #e2e8f0;
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
}
#webMap .leaflet-control-attribution,
#webMap .leaflet-bottom.leaflet-right,
#webMap .ymaps-2-1-79-copyright,
#webMap .ymaps-2-1-79-map-copyrights-promo,
#webMap .ymaps-2-1-79-gotoymaps,
#webMap .ymaps-2-1-79-gototech { display: none !important; }

.map-wrap {
    position: relative;
    margin-bottom: 14px;
}
.map-zoom {
    position: absolute;
    right: 10px; bottom: 10px;
    z-index: 1200;
    display: flex; flex-direction: column; gap: 6px;
}
.map-zoom button {
    width: 38px; height: 38px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* ── Form fields ──────────────────────── */
.web-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
    display: block;
}
.web-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .2s;
    margin-bottom: 12px;
}
.web-input:focus { border-color: var(--accent); }

.suggest-box {
    background: #fff;
    border: 2px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    max-height: 220px;
    overflow-y: auto;
    margin-top: -10px;
    margin-bottom: 12px;
    display: none;
}
.suggest-box.open { display: block; }
.suggest-item { padding: 9px 12px; cursor: pointer; font-size: 14px; }
.suggest-item:hover { background: var(--accent-light); }

/* ── Tariff chips ─────────────────────── */
.tariff-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.tariff-chip {
    flex: 1 1 80px;
    min-width: 80px;
    max-width: 110px;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: #fff;
    transition: all .18s;
    user-select: none;
}
.tariff-chip.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}
.tariff-chip i { font-size: 18px; display: block; margin-bottom: 4px; }

/* ── Price display ────────────────────── */
.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.price-label { color: var(--muted); font-size: 14px; }
.price-value { font-weight: 700; font-size: 20px; color: var(--accent); }

/* ── Primary button ───────────────────── */
.web-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.web-btn:disabled { opacity: .55; cursor: not-allowed; }
.web-btn-primary { background: var(--accent); color: #fff; }
.web-btn-danger { background: #ef4444; color: #fff; }
.web-btn-outline {
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
}

/* ── Phone modal ──────────────────────── */
.phone-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.phone-modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,.22);
}
.phone-modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.phone-modal p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ── Bid cards ────────────────────────── */
.bid-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.bid-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.bid-info { flex: 1; min-width: 0; }
.bid-name { font-weight: 600; font-size: 15px; }
.bid-amount { font-size: 19px; font-weight: 700; color: var(--accent); }
.bid-time { font-size: 12px; color: var(--muted); }
.btn-accept {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: #22c55e;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

/* ── Status badge ─────────────────────── */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.status-pending  { background: #fef3c7; color: #92400e; }
.status-bidding  { background: #dbeafe; color: #1e40af; }
.status-accepted { background: #dbeafe; color: #1e40af; }
.status-arrived  { background: #e0f2fe; color: #0369a1; }
.status-in_progress { background: #dcfce7; color: #166534; }
.status-completed { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* ── History rows ─────────────────────── */
.order-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { background: var(--accent-light); border-radius: 10px; padding-left: 8px; }
.order-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.order-addresses { flex: 1; min-width: 0; }
.order-from, .order-to { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-from { font-weight: 600; }
.order-to { color: var(--muted); }
.order-meta { text-align: right; flex-shrink: 0; }
.order-price { font-weight: 700; font-size: 15px; }
.order-date { font-size: 12px; color: var(--muted); }

/* ── Spinner ──────────────────────────── */
.spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ────────────────────────────── */
.web-toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    animation: fadeInUp .25s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Route map (status page) ──────────── */
#webRouteMap {
    width: 100%;
    height: 240px;
    border-radius: var(--radius);
    background: #e2e8f0;
    position: relative;
    z-index: 1;
}
#webRouteMap .leaflet-control-attribution,
#webRouteMap .leaflet-bottom.leaflet-right,
#webRouteMap .ymaps-2-1-79-copyright,
#webRouteMap .ymaps-2-1-79-map-copyrights-promo,
#webRouteMap .ymaps-2-1-79-gotoymaps,
#webRouteMap .ymaps-2-1-79-gototech,
#webRouteMap .ymaps-2-1-79-copyright_logo_no,
#webRouteMap .ymaps-2-1-79-copyright__content {
    display: none !important;
}
