/* Two palettes, not an inversion: warm daylight and a quiet blue evening. */
@media(max-width:780px){:root[data-theme=dark] .route-builder{background-size:auto 520px;background-position:62% bottom}:root[data-theme=dark] .route-builder::before{background:linear-gradient(180deg,#10182400 0,#10182411 65%,#10182444 100%)}}
[data-theme=dark] .messages-shell,[data-theme=dark] .chat-item,[data-theme=dark] .conversation-head,[data-theme=dark] .conversation form,[data-theme=dark] .message{background:#1b2739;color:#f0f3f8;border-color:#3c4e65}[data-theme=dark] .conversation{background:#101824}[data-theme=dark] .chat-item.active{background:#343244;border-left-color:#ffa57f}[data-theme=dark] .message.mine{background:#233e58;border-color:#47759a}[data-theme=dark] .message small,[data-theme=dark] .chat-item small,[data-theme=dark] .chat-item span{color:#b0bed1}[data-theme=dark] .account button{background:#25344a;color:#f0f3f8;border-color:#3c4e65}
:root{--app-bg:#f7f6f2;--app-panel:#fff;--app-soft:#f0f3f5;--app-ink:#17243d;--app-muted:#5f6c80;--app-line:#dce3e9;--app-accent:#c7452d;--app-link:#205ec0;--app-photo-glaze:rgba(255,255,255,.88);--red:#c8442b;--red-dark:#b43720}
:root[data-theme=dark]{--app-bg:#101824;--app-panel:#1b2739;--app-soft:#24334a;--app-ink:#f0f3f8;--app-muted:#b0bed1;--app-line:#3c4e65;--app-accent:#ffa57f;--app-link:#9bc5ff;--app-photo-glaze:rgba(20,32,48,.9);--ink:#f0f3f8;--muted:#b0bed1;--line:#3c4e65;--paper:#1b2739;--canvas:#101824;--red:#c8462d;--red-dark:#ad3621;--yellow:#f3c47a;--blue:#9bc5ff;--teal:#6cc8b3;--shadow:0 18px 50px #0004}
body{background:var(--app-bg)}.theme-toggle{flex:0 0 44px;width:44px;height:44px;padding:11px;display:grid;place-items:center;border:1px solid var(--app-line);border-radius:50%;background:var(--app-panel);color:var(--app-ink);cursor:pointer}.theme-toggle svg{height:21px;width:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.flow-header-link+.theme-toggle{margin-left:0}.theme-options button{white-space:normal}.topbar{gap:22px}.profile-button{margin-left:auto}.eyebrow{color:var(--app-accent)}
[data-theme=dark] body{color:var(--app-ink)}
[data-theme=dark] .topbar,[data-theme=dark] body>header,[data-theme=dark] .results-column,[data-theme=dark] .seller-card,[data-theme=dark] .dialog-card,[data-theme=dark] .flow-panel,[data-theme=dark] .auth-card,[data-theme=dark] .panel,[data-theme=dark] .sidebar,[data-theme=dark] .variants,[data-theme=dark] .database-state{background:var(--app-panel);color:var(--app-ink);border-color:var(--app-line)}
[data-theme=dark] .brand-logo{background:#f9fafc;border-radius:9px;padding:4px 6px;box-sizing:content-box;max-width:calc(100% - 12px)}
[data-theme=dark] .topbar nav a{color:var(--app-muted)}[data-theme=dark] .topbar nav a.active{color:#fff;border-color:#ff9c78}
[data-theme=dark] .route-builder{background-color:#0b1626;background-image:url('assets/poedu-road-village-night-v1.jpg');background-position:center 64%}
[data-theme=dark] .route-builder::before{background:linear-gradient(180deg,#10263b11,#10182400 58%,#10182433)}[data-theme=dark] .route-builder::after{background:var(--app-bg)}
[data-theme=dark] .route-builder .route-heading>div{background:var(--app-photo-glaze);border-color:#68809855;color:#fff;box-shadow:0 12px 30px #0003}
[data-theme=dark] .route-builder .route-heading>p{background:#19273de8;border-color:#708ba155;color:#dde7f5}
[data-theme=dark] .route-controls-card{background:#1b2739f5;border-color:#647c934d;box-shadow:0 20px 50px #0004}
[data-theme=dark] input:not([type=checkbox]):not([type=radio]),[data-theme=dark] select,[data-theme=dark] textarea{background:#121e2e;color:#f0f3f8;border-color:#4a6079;box-shadow:none}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#a4b4c9;opacity:1}
[data-theme=dark] .route-form label,[data-theme=dark] .dialog-card label,[data-theme=dark] .trip-date-fields label,[data-theme=dark] .form-grid label,[data-theme=dark] .auth-card form label,[data-theme=dark] .field>span{color:var(--app-muted)}
[data-theme=dark] .place-field i{background:#34445d;color:#fff}
[data-theme=dark] .profile-button,[data-theme=dark] .swap,[data-theme=dark] .secondary,[data-theme=dark] .quiet-button,[data-theme=dark] .flow-secondary,[data-theme=dark] .theme-options button,[data-theme=dark] .map-toolbar button,[data-theme=dark] .detour button,[data-theme=dark] .categories button{background:#25344a;color:var(--app-ink);border-color:var(--app-line)}
[data-theme=dark] .profile-button span,[data-theme=dark] .dialog-close{background:var(--app-soft);color:var(--app-ink)}[data-theme=dark] .detour button.active,[data-theme=dark] .theme-options button[aria-pressed=true]{background:#f2c887;color:#202b3a;border-color:#f2c887}
[data-theme=dark] .trip-settings summary,[data-theme=dark] .pilot-route-note,[data-theme=dark] .fresh-toggle,[data-theme=dark] .seller-place,[data-theme=dark] .product-price small,[data-theme=dark] .map-card p,[data-theme=dark] .dialog-card>p,[data-theme=dark] .dialog-card small,[data-theme=dark] .empty-state,[data-theme=dark] .flow-help,[data-theme=dark] .auth-card form>p,[data-theme=dark] .tabs button,[data-theme=dark] .back{color:var(--app-muted)}
[data-theme=dark] .trip-settings summary>span:last-child,[data-theme=dark] .detour-time,[data-theme=dark] .flow-status{color:#96d7cb}
[data-theme=dark] .product-dock{background:#1c2c41e8;border-color:#4d657e;box-shadow:0 12px 32px #0004}[data-theme=dark] .dock-label{background:#e2eaf5;color:#142137}
[data-theme=dark] .dock-item.active{background:#a6603433;box-shadow:inset 0 0 0 1px #c8946b}
[data-theme=dark] .route-summary,[data-theme=dark] .product-line span,[data-theme=dark] .photo-picker,[data-theme=dark] .product-card,[data-theme=dark] .private-fields,[data-theme=dark] .order-counter button{background:var(--app-soft);color:var(--app-ink);border-color:var(--app-line)}
[data-theme=dark] .route-summary small,[data-theme=dark] .panel-intro,[data-theme=dark] .actions>span,[data-theme=dark] .sidebar nav a{color:var(--app-muted)}
[data-theme=dark] .sidebar nav a.active{background:var(--app-soft);color:var(--app-ink)}[data-theme=dark] .panel-heading,[data-theme=dark] .actions,[data-theme=dark] .variant-row,[data-theme=dark] .order-line,[data-theme=dark] .order-total{border-color:var(--app-line)}
[data-theme=dark] .verified{background:#173f3a;color:#a3eadb}[data-theme=dark] .verified.stale{background:#463821;color:#f3d398}
[data-theme=dark] .map-column,[data-theme=dark] .map-toolbar,[data-theme=dark] .map-card,[data-theme=dark] .map-legend{background:var(--app-panel);color:var(--app-ink);border-color:var(--app-line)}
[data-theme=dark] .route-map svg>rect:first-of-type{fill:#172637}[data-theme=dark] .route-map svg>rect:nth-of-type(2){opacity:.08}[data-theme=dark] .water{fill:#213e58}[data-theme=dark] .minor-roads path{stroke:#38506a}[data-theme=dark] .towns text{fill:#e0ebf7;stroke:#172637}[data-theme=dark] .route-shadow{stroke:#314a64}[data-theme=dark] .map-card b{color:#e5edf7}
[data-theme=dark] .pickup-concept{background:#1d2a2c;border-color:#334747}[data-theme=dark] .pickup-intro p,[data-theme=dark] .pickup-steps p,[data-theme=dark] .pickup-pilot p{color:#becdc9}[data-theme=dark] .pickup-steps li{background:#273739;border-color:#48605b}[data-theme=dark] .pickup-rules{background:#101b2b;color:#f0f3f8}[data-theme=dark] .pickup-pilot{background:#293332;border-color:#52615b}[data-theme=dark] .pickup-pilot span,[data-theme=dark] .pickup-pilot a{color:#f3cba1}[data-theme=dark] .research-callout{background:#243c39;color:#edf4ef}[data-theme=dark] .research-callout p{color:#bfd4ce}[data-theme=dark] .research-callout a{background:#d7e8dd;color:#142c28}[data-theme=dark] .seller-callout{background:#101c2e;color:#f2f5fa}[data-theme=dark] .auth-story{background:#101c2e}[data-theme=dark] .tabs button.active{color:#fff;border-color:#ff9c78}
[data-theme=dark] .search-feedback{background:#342d23;color:#f5dcc0;border-color:#776043}[data-theme=dark] .search-feedback button{background:#57432b;color:#fff;border-color:#9c7e54}[data-theme=dark] .order-error,[data-theme=dark] .error,[data-theme=dark] .flow-status.error{background:#48292b;color:#ffd0c5}
[data-theme=dark] .toast{background:#e3ebf5;color:#162137}[data-theme=dark] .order-dialog::backdrop{background:#020a14c7}
@media(max-width:780px){.topbar{gap:10px}.theme-toggle{width:40px;height:40px;flex-basis:40px;padding:9px}[data-theme=dark] .mobile-nav{background:#152236fa;border-color:#3c4e65;box-shadow:0 -6px 20px #0002}[data-theme=dark] .mobile-nav a{color:#b5c3d7}[data-theme=dark] .mobile-nav a[aria-current=page]{background:#354154;color:#ffcf9a}[data-theme=dark] .mobile-nav .nav-sell svg{background:#f3c487;color:#192536}[data-theme=dark] .route-builder{background-color:var(--app-bg)}[data-theme=dark] .route-builder::before{background:linear-gradient(180deg,#1018241a 0,#10182488 190px,#101824 390px)}[data-theme=dark] .product-dock{background:transparent;box-shadow:none}[data-theme=dark] .dock-item .dock-label{color:#e4ebf5;background:none}[data-theme=dark] .dock-item.active{background:#463b31;border-color:#ad825c;box-shadow:none}[data-theme=dark] .results-view-switch{background:#1a283c}[data-theme=dark] .results-view-switch button{color:#afbed3}[data-theme=dark] .results-view-switch button[aria-pressed=true]{background:#34455c;color:#fff}[data-theme=dark] .auth-story{background:var(--app-panel)}[data-theme=dark] .brand-logo{padding:3px 4px;max-width:125px}.order-dialog{scroll-padding-bottom:16px}}
