:root,
html.theme-dark {
    --bg: #0a0a0a;
    --panel: #111;
    --panel2: #161616;
    --line: rgba(255, 255, 255, .08);
    --text: #f5f5f5;
    --muted: #8a8a8a;
    --danger: #ff4d4d;
    --success: #4ade80;
    --warning: #fbbf24;
    --accent: #00b956;
    --accent-dim: rgba(0, 185, 86, .12);
    --link: #fff;
    --surface: #0c0c0c;
    --surface-hover: rgba(255, 255, 255, .05);
    --surface-active: rgba(255, 255, 255, .08);
    --btn-primary-bg: #fff;
    --btn-primary-fg: #000;
    --btn-secondary-fg: #fff;
    --focus-ring: rgba(255, 255, 255, .2);
    --row-hover: rgba(255, 255, 255, .02);
    --table-hover: rgba(255, 255, 255, .03);
    --overlay: rgba(0, 0, 0, .55);
    --header-bg: rgba(10, 10, 10, .92);
    --mobile-bar-bg: rgba(12, 12, 12, .96);
    --map-bg: #1a1a1a;
    --link-underline: rgba(255, 255, 255, .25);
}

html.theme-light {
    --bg: #f4f4f5;
    --panel: #ffffff;
    --panel2: #f0f0f1;
    --line: rgba(0, 0, 0, .1);
    --text: #18181b;
    --muted: #71717a;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --accent: #00a84d;
    --accent-dim: rgba(0, 168, 77, .1);
    --link: #18181b;
    --surface: #ffffff;
    --surface-hover: rgba(0, 0, 0, .04);
    --surface-active: rgba(0, 168, 77, .08);
    --btn-primary-bg: #18181b;
    --btn-primary-fg: #ffffff;
    --btn-secondary-fg: #18181b;
    --focus-ring: rgba(0, 0, 0, .2);
    --row-hover: rgba(0, 0, 0, .03);
    --table-hover: rgba(0, 0, 0, .03);
    --overlay: rgba(0, 0, 0, .35);
    --header-bg: rgba(255, 255, 255, .92);
    --mobile-bar-bg: rgba(255, 255, 255, .96);
    --map-bg: #e4e4e7;
    --link-underline: rgba(0, 0, 0, .25);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

body { background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5; }

a { color: var(--link); }

body.app { display: grid; grid-template-columns: 260px 1fr; }

aside {
    border-right: 1px solid var(--line);
    padding: 24px;
    background: var(--surface);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo { font-size: 13px; letter-spacing: 5px; margin-bottom: 30px; color: var(--text); }

nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }
nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    transition: .2s;
    font-size: 14px;
}
nav a:hover { background: var(--surface-hover); color: var(--text); }
nav a.active { background: var(--surface-active); color: var(--text); border: 1px solid var(--line); }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }

.sidebar-logo { text-decoration: none; display: block; }
.sidebar-tagline { font-size: 12px; margin-top: -18px; margin-bottom: 24px; line-height: 1.4; }

main { padding: 40px; min-width: 0; }
.home-page { max-width: 1200px; }

.landing-main { max-width: 1200px; margin: 0 auto; padding: 32px 40px 48px; }
.landing-main .public-footer { margin-top: 48px; }

/* Public header */
.public-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(12px);
}

.public-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.public-header .logo { text-decoration: none; margin-bottom: 0; flex-shrink: 0; }

.public-nav { display: flex; gap: 24px; flex: 1; }
.public-nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.public-nav a:hover { color: var(--text); }

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

.landing-header .public-header-inner {
    flex-wrap: nowrap;
}

.landing-header-actions {
    margin-left: 0;
}

.landing-header .public-nav {
    flex: 1;
    justify-content: flex-end;
}

/* Hero */
.home-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0, 185, 86, .08), rgba(255, 255, 255, .02));
    padding: 48px;
    margin-bottom: 24px;
}

.home-eyebrow { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.home-hero h1 { font-size: 44px; line-height: 1.1; font-weight: 700; margin-bottom: 16px; }
.home-lead { color: var(--muted); line-height: 1.7; max-width: 520px; }

.home-hero-highlight {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--line);
    padding-left: 40px;
}

.hero-counter-value { display: block; font-size: 72px; font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -2px; }
.hero-counter-label { display: block; font-size: 18px; margin-top: 8px; font-weight: 600; }
.hero-counter-note { margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-bottom: 40px;
}

.stats-strip-item { background: var(--panel); padding: 24px 20px; text-align: center; }
.stats-strip-item-accent { background: var(--accent-dim); }
.stats-strip-value { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.stats-strip-item-accent .stats-strip-value { color: var(--accent); }
.stats-strip-label { font-size: 12px; color: var(--muted); line-height: 1.4; }

.section { margin-top: 30px; }
.section-header { margin-bottom: 20px; }
.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.section-desc { color: var(--muted); font-size: 14px; line-height: 1.6; }

.tracking-card {
    width: 100%;
    padding: 24px;
    margin-bottom: 24px;
}
.tracking-card-hint { margin-bottom: 16px; }
.tracking-card-footer { margin-top: 12px; font-size: 14px; }
.tracking-form {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}
.tracking-form input {
    flex: 1;
    min-width: 0;
}
.tracking-form--stacked {
    align-items: flex-end;
    flex-wrap: wrap;
}
.tracking-form-field {
    flex: 1;
    min-width: 240px;
    margin-bottom: 0;
}
.track-page .card:not(.tracking-card) {
    width: 100%;
}

.admin-form-card {
    width: 100%;
    grid-column: 1 / -1;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.news-card {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 20px;
    border-radius: 12px;
}
.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}
.news-thumb {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.nav-toggle-bars {
    position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.advantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.advantage-card { border: 1px solid var(--line); background: var(--panel); padding: 28px 24px; transition: border-color .2s; }
.advantage-card:hover { border-color: rgba(0, 185, 86, .35); }
.advantage-card h3 { font-size: 17px; margin-bottom: 10px; font-weight: 600; }
.advantage-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { border: 1px solid var(--line); background: var(--panel2); padding: 28px 24px; }
.step-num {
    width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #000;
    font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step-card h3 { font-size: 17px; margin-bottom: 10px; }
.step-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }

.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
    padding: 32px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel), var(--panel2));
}

.trust-item { text-align: center; }
.trust-item strong { display: block; font-size: 28px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.trust-item span { font-size: 13px; color: var(--muted); }

.landing-cta {
    margin-top: 48px;
    padding: 48px;
    text-align: center;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--accent-dim), rgba(255, 255, 255, .02));
}
.landing-cta h2 { font-size: 32px; margin-bottom: 12px; }
.landing-cta p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; line-height: 1.7; }
.landing-cta .actions { justify-content: center; }

.public-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.public-footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px; text-align: center; }
.public-footer-links { display: flex; justify-content: center; gap: 24px; margin: 20px 0; }
.public-footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.public-footer-links a:hover { color: var(--text); }

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 32px 36px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.dashboard-hero-stat { text-align: right; flex-shrink: 0; }

.hero { border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)); padding: 40px; margin-bottom: 24px; }
.page-title { font-size: 32px; margin-bottom: 8px; font-weight: 600; }
.page-subtitle { color: var(--muted); margin-bottom: 24px; line-height: 1.6; }

.actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    text-decoration: none;
    padding: 14px 18px;
    border-radius: 10px;
    transition: .2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn-secondary { border: 1px solid var(--line); background: transparent; color: var(--btn-secondary-fg); }
.btn-danger { background: rgba(255, 77, 77, .15); color: #ff6b6b; border: 1px solid rgba(255, 77, 77, .3); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn:hover { opacity: .9; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); background: var(--panel); padding: 22px; }
.title { font-size: 12px; letter-spacing: 3px; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }

.recent { border: 1px solid var(--line); background: var(--panel); }
.row { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.row:last-child { border-bottom: none; }
.row-head { font-size: 12px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; background: var(--panel2); }
.city { font-weight: 600; }
.muted { color: var(--muted); }
.footer { margin-top: 30px; color: var(--muted); font-size: 12px; }
.stat-value { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.stat-label { color: var(--muted); font-size: .85rem; }

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

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=file], textarea, select {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--panel2); color: var(--text); font-size: 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus-ring); }
textarea { min-height: 100px; resize: vertical; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters .form-group { margin: 0; min-width: 160px; flex: 1; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.badge-CREATED { background: rgba(96, 165, 250, .12); color: #93c5fd; }
.badge-IN_PROGRESS { background: rgba(251, 191, 36, .12); color: #fcd34d; }
.badge-SHIPPED { background: rgba(167, 139, 250, .12); color: #c4b5fd; }
.badge-DELIVERED { background: rgba(74, 222, 128, .12); color: #86efac; }
.badge-CANCELLED { background: rgba(255, 77, 77, .12); color: #ff6b6b; }

.badge-report-OPEN { background: rgba(96, 165, 250, .12); color: #93c5fd; }
.badge-report-ANSWERED { background: rgba(74, 222, 128, .12); color: #86efac; }
.badge-report-CLOSED { background: rgba(138, 138, 138, .15); color: #a3a3a3; }

.report-thread { margin-top: 24px; }

.vehicle-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.vehicle-option {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 14px 10px; border: 2px solid var(--line); border-radius: 12px;
    cursor: pointer; transition: border-color .15s, background .15s; text-align: center;
}
.vehicle-option input { position: absolute; opacity: 0; pointer-events: none; }
.vehicle-option img { width: 100%; max-width: 100px; height: 56px; object-fit: contain; opacity: .9; }
.vehicle-option span { font-size: 12px; color: var(--muted); }
.vehicle-option:hover { border-color: rgba(0, 185, 86, .4); }
.vehicle-option.is-selected { border-color: var(--accent); background: var(--accent-dim); }
.vehicle-option.is-selected img { opacity: 1; filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(500%) hue-rotate(115deg); }
.vehicle-option.is-selected span { color: var(--text); font-weight: 600; }

.vehicle-preview {
    margin-top: 16px; padding: 16px; border: 1px solid var(--line);
    border-radius: 12px; text-align: center; background: var(--panel2);
}
.vehicle-preview img { max-width: 200px; height: 100px; object-fit: contain; opacity: .9; }
.vehicle-preview p { margin-top: 8px; font-weight: 600; }

.vehicle-thumb { width: 48px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 8px; opacity: .85; }
.vehicle-type-cell { display: flex; align-items: center; gap: 8px; }

.slot-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.slot-btn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px 16px; border: 2px solid var(--line); border-radius: 10px;
    background: var(--panel2); color: var(--text); cursor: pointer; min-width: 120px;
}
.slot-btn strong { font-size: 15px; }
.slot-btn span { font-size: 12px; color: var(--muted); }
.slot-btn:hover { border-color: rgba(0, 185, 86, .45); }
.slot-btn.is-selected { border-color: var(--accent); background: var(--accent-dim); }
.slot-hint { font-size: 14px; margin-top: 4px; }

.link { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--link-underline); }
.actions-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.empty-state { padding: 32px; text-align: center; color: var(--muted); }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; border: 1px solid var(--line); background: var(--panel); padding: 32px; }
.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.form-section-title { font-size: 14px; font-weight: 600; margin: 20px 0 12px; color: var(--text); }
.form-section-title:first-of-type { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { display: block; color: var(--danger); font-size: 12px; margin-top: 4px; }
.field-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

.phone-input {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel2);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.phone-input:focus-within {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 3px rgba(0, 185, 86, .12);
}
.phone-input-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--panel);
    border-right: 1px solid var(--line);
    user-select: none;
}
.phone-input-control {
    flex: 1;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 12px 14px;
    font-size: 15px;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}
.phone-input-control:focus {
    outline: none;
    border: none !important;
    box-shadow: none !important;
}
.phone-input-control::placeholder {
    color: var(--muted);
    opacity: .75;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .auth-card-wide { max-width: 100%; } }

.error-box { border: 1px solid rgba(255, 77, 77, .3); background: rgba(255, 77, 77, .08); color: #ffb4b4; padding: 16px; margin-bottom: 16px; border-radius: 10px; }
.success-box { border: 1px solid rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .08); color: #86efac; padding: 16px; margin-bottom: 16px; border-radius: 10px; }

.landing-flash { max-width: 1200px; margin: 0 auto; padding: 16px 40px 0; }

/* Cabinet polish */
.sidebar-brand { margin-bottom: 24px; }
.user-chip { margin-top: 12px; padding: 10px 12px; background: var(--panel2); border-radius: 10px; border: 1px solid var(--line); }
.user-chip-email { display: block; font-size: 12px; color: var(--text); word-break: break-all; margin-bottom: 4px; }
.user-chip-role { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

nav a.active { background: var(--accent-dim); color: var(--text); border-color: rgba(0, 185, 86, .35); }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-header .page-title { margin-bottom: 4px; }
.page-header .page-subtitle { margin-bottom: 0; }

.admin-badge {
    font-size: 12px; color: var(--muted); padding: 8px 14px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--panel2);
}

.filter-card { border-radius: 12px; }

.data-table, .table-wrap {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 12px;
    overflow: hidden;
}

.data-table .row { transition: background .15s; }
.data-table .row:not(.row-head):hover { background: var(--row-hover); }

.row-admin { grid-template-columns: 1fr 1fr auto auto auto auto !important; }
.row-admin.row-head { grid-template-columns: 1fr 1fr auto auto auto auto !important; }

.price-cell { font-weight: 700; color: var(--accent); }

.detail-hero {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0, 185, 86, .06), var(--panel));
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 28px;
}

.detail-hero-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-route { font-size: 20px; color: var(--muted); margin-top: 8px; }

.detail-price { text-align: right; }
.detail-price-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.detail-price-value { font-size: 32px; font-weight: 800; color: var(--accent); }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.detail-item label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.detail-item div { font-size: 15px; font-weight: 500; }
.detail-notes { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; }

.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table-wrap th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: var(--panel2); }
.table-wrap tr:last-child td { border-bottom: none; }

.comment { border-left: 3px solid var(--accent); padding: 14px 18px; margin-bottom: 12px; background: var(--panel2); border-radius: 0 10px 10px 0; }
.comment-admin { border-left-color: #60a5fa; }
.comment-meta { display: flex; gap: 12px; margin-bottom: 8px; font-size: 13px; }

.card { border-radius: 12px; }

/* Карта маршрута (OpenStreetMap) */
.map-section { margin-top: 24px; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.map-status { font-size: 13px; color: var(--muted); margin-bottom: 10px; min-height: 1.2em; }
.cargo-map {
    width: 100%;
    height: 360px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel2);
    z-index: 1;
}
.address-block {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.address-block h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--accent);
}
.map-pin span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.leaflet-container { background: var(--map-bg); font-family: inherit; }

/* Board / marketplace */
.board-header .public-nav a.active { color: var(--accent); font-weight: 600; }

.ati-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.board-page, .detail-page, .services-page { padding: 24px 0 48px; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.board-filters { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.board-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.board-table th { background: var(--panel2); padding: 12px 16px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.board-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board-table tr:hover td { background: var(--table-hover); }
.board-table tr:last-child td { border-bottom: none; }
.route-cell { font-weight: 600; }
.route-cell small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rate-cell { font-weight: 700; color: var(--accent); white-space: nowrap; }
.rate-negotiable { color: var(--warning); }
.company-cell { font-size: 13px; }
.company-rating { color: var(--warning); font-weight: 700; font-size: 12px; }
.verified-badge { display: inline-block; background: var(--accent-dim); color: var(--accent); font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; margin-left: 4px; }
.board-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.board-link:hover { text-decoration: underline; }
.btn-orange { background: var(--warning); color: #000; border: none; }
.btn-orange:hover { filter: brightness(1.08); }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.detail-card h1 { font-size: 22px; margin-bottom: 8px; }
.detail-route { font-size: 24px; font-weight: 800; color: var(--accent); margin: 14px 0; }
.detail-params { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.detail-param label { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.detail-param div { font-size: 15px; font-weight: 600; }
.detail-sidebar .rate-big { font-size: 32px; font-weight: 800; color: var(--accent); margin: 10px 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.service-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.service-card h3 { font-size: 15px; margin-bottom: 6px; color: var(--accent); }
.service-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.service-icon { font-size: 24px; margin-bottom: 10px; }
.bids-list { margin-top: 24px; }
.bid-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--panel2); flex-wrap: wrap; }
.bid-price { font-size: 18px; font-weight: 800; color: var(--accent); }
.bid-status { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.bid-status-PENDING { background: rgba(251,191,36,.15); color: var(--warning); }
.bid-status-ACCEPTED { background: var(--accent-dim); color: var(--accent); }
.bid-status-REJECTED { background: rgba(255,77,77,.12); color: var(--danger); }

/* Mobile chrome */
.mobile-chrome-host { display: contents; }

.mobile-app-bar,
.mobile-overlay,
.mobile-nav-toggle,
.mobile-menu-btn { display: none; }

body.menu-open,
body.public-nav-open { overflow: hidden; }

.grid-2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 1100px) {
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    .advantages-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    body.app {
        grid-template-columns: 1fr;
        padding-top: 56px;
    }

    body.app .mobile-chrome-host { display: contents; }

    input[type=text], input[type=email], input[type=password], input[type=number],
    input[type=date], input[type=tel], input[type=time], textarea, select {
        font-size: 16px;
    }

    .mobile-app-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        height: 56px;
        padding: 0 16px;
        background: var(--mobile-bar-bg);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(12px);
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--panel2);
        color: var(--text);
        font-size: 20px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-app-bar-title {
        font-size: 12px;
        letter-spacing: 4px;
        font-weight: 600;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 950;
        background: var(--overlay);
    }

    body.menu-open .mobile-overlay { display: block; }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 88vw);
        height: 100dvh;
        z-index: 1000;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, .45);
    }

    body.menu-open .app-sidebar { transform: translateX(0); }

    main, .landing-main { padding: 16px; }
    .home-hero { grid-template-columns: 1fr; padding: 24px 20px; }
    .home-hero-highlight {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 24px;
    }
    .home-hero h1 { font-size: 28px; }
    .hero-counter-value { font-size: 48px; }
    .section-title { font-size: 22px; }
    .page-title { font-size: 24px; }
    .landing-cta { padding: 28px 20px; margin-top: 32px; }
    .landing-cta h2 { font-size: 24px; }
    .dashboard-hero { padding: 20px; flex-direction: column; align-items: flex-start; }
    .dashboard-hero-stat { text-align: left; width: 100%; }
    .detail-hero { padding: 20px; }
    .detail-hero-top { flex-direction: column; }
    .detail-price { text-align: left; width: 100%; }
    .detail-price-value { font-size: 26px; }
    .detail-route { font-size: 16px; }
    .advantages-grid, .steps-grid, .trust-strip { grid-template-columns: 1fr; }
    .stats-strip { grid-template-columns: 1fr 1fr; }

    .public-header-inner {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .landing-header .public-header-inner {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .landing-header .logo {
        flex-shrink: 0;
    }

    .landing-header-actions {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        order: 2;
        width: auto;
        margin-left: 0;
        gap: 6px;
        padding-top: 0;
    }

    .landing-header-actions .theme-toggle-label {
        display: none;
    }

    .landing-header-actions .btn {
        width: auto;
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .landing-header .mobile-nav-toggle {
        order: 3;
        margin-left: auto;
        flex-shrink: 0;
    }

    .landing-header .public-nav {
        order: 4;
        justify-content: flex-start;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--panel2);
        color: var(--text);
        font-size: 20px;
        cursor: pointer;
    }

    .public-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid var(--line);
    }

    body.public-nav-open .public-nav { display: flex; }

    .public-nav a {
        padding: 14px 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--line);
    }

    .public-actions {
        width: 100%;
        order: 5;
        display: none;
    }

    body.public-nav-open .public-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
    }

    body.public-nav-open .public-actions .btn { width: 100%; }

    .public-header-inner, .landing-flash { padding-left: 16px; padding-right: 16px; }
    .public-footer-inner { padding: 28px 16px; }
    .public-footer-links { flex-direction: column; gap: 12px; }

    .row:not(.row-head):not(.row-admin) {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .row-head:not(.row-admin) { display: none; }

    .data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table .row-admin { min-width: 640px; }

    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrap table { min-width: 560px; }

    .filters { flex-direction: column; align-items: stretch; }
    .filters .form-group { min-width: 0; width: 100%; }

    .grid-2 { grid-template-columns: 1fr; }

    .vehicle-picker { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .slot-btn { flex: 1 1 calc(50% - 10px); min-width: 0; }

    .auth-page { padding: 16px; align-items: flex-start; }
    .auth-card { padding: 24px 20px; }

    .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .stats-strip { grid-template-columns: 1fr; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; }
    .actions-inline { flex-direction: column; align-items: stretch; }
    .actions-inline .btn,
    .actions-inline form { width: 100%; }
    .actions-inline form button { width: 100%; }
    .pagination { flex-wrap: wrap; }
    .slot-btn { flex: 1 1 100%; }
    .vehicle-picker { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .auth-card-wide { max-width: 100%; }
    .home-hero h1 { font-size: 24px; }
    .hero { padding: 24px 16px; }
    .btn { min-height: 44px; }
    .detail-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

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

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle-icon {
    font-size: 16px;
    line-height: 1;
}

.theme-toggle-float {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
}

.theme-toggle-sidebar {
    width: 100%;
    justify-content: center;
}

html.theme-light .badge-CREATED { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
html.theme-light .badge-IN_PROGRESS { background: rgba(217, 119, 6, .12); color: #b45309; }
html.theme-light .badge-SHIPPED { background: rgba(109, 40, 217, .12); color: #6d28d9; }
html.theme-light .badge-DELIVERED { background: rgba(22, 163, 74, .12); color: #15803d; }
html.theme-light .badge-CANCELLED { background: rgba(220, 38, 38, .12); color: #b91c1c; }
html.theme-light .badge-report-OPEN { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
html.theme-light .badge-report-ANSWERED { background: rgba(22, 163, 74, .12); color: #15803d; }
html.theme-light .badge-report-CLOSED { background: rgba(113, 113, 122, .15); color: #52525b; }
html.theme-light .error-box { border-color: rgba(220, 38, 38, .25); background: rgba(220, 38, 38, .08); color: #b91c1c; }
html.theme-light .success-box { border-color: rgba(22, 163, 74, .25); background: rgba(22, 163, 74, .08); color: #15803d; }
html.theme-light .home-hero { background: linear-gradient(135deg, rgba(0, 168, 77, .06), rgba(0, 0, 0, .02)); }
html.theme-light .hero { background: linear-gradient(135deg, rgba(0, 0, 0, .03), rgba(0, 0, 0, .01)); }
html.theme-light .landing-cta { background: linear-gradient(135deg, var(--accent-dim), rgba(0, 0, 0, .02)); }
html.theme-light .map-pin span { border-color: var(--panel); }
