:root {
--bg: #ffffff;
--bg-sub: #f8fafc;
--bg-card: #ffffff;
--border: #e2e8f0;
--border-active: #3b82f6;
--text: #1e293b;
--text-muted: #64748b;
--accent: #3b82f6;
--accent-soft: rgba(59, 130, 246, 0.08);
--kitchen: #f59e0b;
--kitchen-soft: rgba(245, 158, 11, 0.1);
--success: #22c55e;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
--shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}
.dispatch-container {
width: calc(100% + 48px);
height: calc(100vh - 88px);
margin: -24px;
display: flex;
flex-direction: column;
background: var(--bg);
color: var(--text);
font-family: 'Inter', -apple-system, sans-serif;
overflow: hidden;
position: relative;
}
/* Embedded mode: rendered inside a parent container (e.g. a Dialog),
so drop the negative margin and viewport-based sizing that assumes
the standalone /dispatch page is wrapped in MainCard's 24px padding. */
.dispatch-container.embedded {
width: 100%;
height: 100%;
margin: 0;
flex: 1;
min-height: 0;
}
.dispatch-container * {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Header */
.dispatch-container #hdr {
height: 56px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24px;
background: var(--bg);
border-bottom: 1px solid var(--border);
z-index: 1010;
}
.dispatch-container .logo {
display: flex;
align-items: center;
gap: 12px;
}
.dispatch-container .logo-badge {
width: 32px;
height: 32px;
border-radius: 8px;
background: linear-gradient(135deg, #3b82f6, #2563eb);
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 14px;
color: #fff;
}
.dispatch-container .logo-name {
font-size: 18px;
font-weight: 800;
color: var(--text);
letter-spacing: -0.02em;
}
.dispatch-container .logo-name em {
color: var(--accent);
font-style: normal;
opacity: 0.8;
}
/* Operating-city pill — sits to the RIGHT of the "Dispatch" heading inline. */
/* The location pill is now an interactive dropdown trigger. Wrapped in
.logo-city-wrap so the absolute-positioned menu below anchors to it. */
.dispatch-container .logo-city-wrap {
position: relative;
display: inline-block;
}
.dispatch-container .logo-city {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px 4px 10px;
border-radius: 999px;
background: rgba(123, 31, 162, 0.08);
border: 1px solid rgba(123, 31, 162, 0.25);
color: #7b1fa2;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.02em;
line-height: 1;
cursor: pointer;
font-family: inherit;
transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dispatch-container .logo-city:hover {
background: rgba(123, 31, 162, 0.14);
border-color: rgba(123, 31, 162, 0.45);
}
.dispatch-container .logo-city.open {
background: rgba(123, 31, 162, 0.18);
border-color: rgba(123, 31, 162, 0.55);
box-shadow: 0 4px 12px rgba(123, 31, 162, 0.18);
}
.dispatch-container .logo-city svg {
font-size: 13px;
flex-shrink: 0;
}
.dispatch-container .logo-city-caret {
font-size: 15px;
transition: transform 0.2s ease;
}
.dispatch-container .logo-city.open .logo-city-caret {
transform: rotate(180deg);
}
.dispatch-container .logo-city-text {
max-width: 180px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Dropdown menu — anchored under the trigger, scrolls if there are many hubs. */
.dispatch-container .logo-city-menu {
position: absolute;
top: calc(100% + 6px);
left: 0;
min-width: 200px;
max-height: 320px;
overflow-y: auto;
background: #fff;
border: 1px solid rgba(123, 31, 162, 0.18);
border-radius: 12px;
box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
padding: 6px;
z-index: 1000;
animation: logo-city-menu-in 0.14s ease-out;
}
@keyframes logo-city-menu-in {
from {
opacity: 0;
transform: translateY(-4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dispatch-container .logo-city-menu::-webkit-scrollbar {
width: 6px;
}
.dispatch-container .logo-city-menu::-webkit-scrollbar-thumb {
background: rgba(123, 31, 162, 0.3);
border-radius: 999px;
}
.dispatch-container .logo-city-option {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 8px 10px;
border: 0;
background: transparent;
border-radius: 8px;
font-size: 12px;
font-weight: 600;
color: #1e293b;
cursor: pointer;
font-family: inherit;
text-align: left;
transition: background 0.12s ease;
}
.dispatch-container .logo-city-option:hover {
background: rgba(123, 31, 162, 0.06);
}
.dispatch-container .logo-city-option.active {
background: rgba(123, 31, 162, 0.1);
color: #7b1fa2;
}
.dispatch-container .logo-city-option-icon {
font-size: 14px;
color: #7b1fa2;
flex-shrink: 0;
}
.dispatch-container .logo-city-option span:not(.logo-city-option-check) {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dispatch-container .logo-city-option-check {
color: #7b1fa2;
font-weight: 800;
flex-shrink: 0;
}
.dispatch-container .hdr-sep {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 4px;
}
.dispatch-container .hdr-meta {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
}
.dispatch-container #clock {
font-size: 13px;
color: var(--text);
font-weight: 600;
font-family: 'JetBrains Mono', monospace;
background: var(--bg-sub);
padding: 7px 16px;
border-radius: 10px;
border: 1px solid var(--border);
}
/* Header right-cluster — profit/loss + orders pill + date picker, sits to the
LEFT of the running clock. Pushed against the clock with margin-left:auto so
the .logo on the left stays anchored and the cluster floats right. */
.dispatch-container .hdr-stats {
display: flex;
align-items: center;
gap: 16px;
margin-left: auto;
margin-right: 16px;
min-width: 0;
flex-wrap: nowrap;
}
/* Tabs */
.dispatch-container #strat-row {
height: 54px;
flex-shrink: 0;
display: flex;
align-items: center;
gap: 8px;
padding: 0 24px;
background: var(--bg);
border-bottom: 1px solid var(--border);
}
.dispatch-container .sbt {
padding: 8px 14px;
border-radius: 10px;
border: 1px solid rgba(15, 23, 42, 0.08);
background: var(--bg);
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
line-height: 1;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
font-family: inherit;
}
.dispatch-container .sbt:hover {
background: var(--bg-sub);
color: var(--text);
border-color: var(--text-muted);
}
.dispatch-container .sbt.active {
background: var(--accent);
border-color: var(--accent);
color: #fff;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
/* SVG icon slot inside each tab button — fixed square, color inherits from button
so active-state white propagates without per-tab overrides. */
.dispatch-container .sbt .sbt-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
font-size: 18px;
line-height: 1;
flex-shrink: 0;
color: inherit;
}
.dispatch-container .sbt .sbt-icon svg {
width: 1em;
height: 1em;
display: block;
/* react-icons SVGs fill with currentColor by default — this just ensures
consistent baseline alignment with the label next to them. */
vertical-align: middle;
}
/* Strat-row quick stats — total orders + profit/loss chips next to the view-mode buttons */
.dispatch-container .strat-stats {
display: inline-flex;
align-items: center;
gap: 8px;
margin-left: 8px;
padding-left: 12px;
border-left: 1px solid var(--border);
height: 32px;
}
/* Right-floating variant — used for the profit/loss chip when there's no
live-controls block to nest inside. */
.dispatch-container .strat-stats.strat-stats-right {
margin-left: auto;
padding-left: 0;
border-left: none;
}
.dispatch-container .strat-stat {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 15px;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
line-height: 1;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
transition: all 0.15s ease;
white-space: nowrap;
}
.dispatch-container .strat-stat-icon {
font-size: 13px;
line-height: 1;
}
.dispatch-container .strat-stat-label {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
}
.dispatch-container .strat-stat-value {
font-size: 13px;
font-weight: 800;
}
.dispatch-container .strat-stat-orders {
background: var(--accent-soft);
border-color: rgba(59, 130, 246, 0.25);
}
.dispatch-container .strat-stat-orders .strat-stat-value {
color: var(--accent);
}
.dispatch-container .strat-stat-profit {
background: rgba(34, 197, 94, 0.1);
border-color: rgba(34, 197, 94, 0.3);
}
.dispatch-container .strat-stat-profit .strat-stat-value,
.dispatch-container .strat-stat-profit .strat-stat-label {
color: var(--success);
}
.dispatch-container .strat-stat-loss {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.35);
}
.dispatch-container .strat-stat-loss .strat-stat-value,
.dispatch-container .strat-stat-loss .strat-stat-label {
color: #dc2626;
}
/* Live data controls (date picker + load status) */
.dispatch-container .live-controls {
margin-left: auto;
display: flex;
align-items: center;
gap: 12px;
}
.dispatch-container .live-status {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
padding: 7px 15px;
border-radius: 999px;
background: var(--bg-sub);
border: 1px solid var(--border);
}
.dispatch-container .live-status-ready {
color: var(--success);
}
.dispatch-container .live-status-error {
color: #ef4444;
}
.dispatch-container .live-status-sub {
color: var(--text-muted);
font-weight: 500;
font-size: 11px;
opacity: 0.85;
}
.dispatch-container .live-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--accent);
animation: live-pulse 1.2s ease-in-out infinite;
}
.dispatch-container .live-dot.ready {
background: var(--success);
animation: none;
}
.dispatch-container .live-dot.error {
background: #ef4444;
animation: none;
}
@keyframes live-pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.4;
transform: scale(0.85);
}
}
/* ── Date picker chip ─────────────────────────────────────────────
Three-part pill: prev-day arrow ◂ | formatted-date card | ▸ next-day
arrow. The center card overlays a transparent native
so clicking anywhere on the chip opens the OS date dialog while still
showing a glanceable formatted value (`Mon, May 25, 2026`). A small
"Today" badge appears when the picked date matches today, and the
next-day arrow disables itself there.
Design language: matches the Compare-button family — soft white card,
indigo border + halo on hover/focus, subtle lift on interaction.
──────────────────────────────────────────────────────────────── */
.dispatch-container .date-chip {
position: relative;
/* anchors .date-cal-popover */
display: inline-flex;
align-items: stretch;
gap: 0;
background: #ffffff;
border: 1px solid rgba(15, 23, 42, 0.08);
border-radius: 12px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
0 4px 12px rgba(15, 23, 42, 0.06);
transition: border-color 0.18s ease, box-shadow 0.18s ease,
transform 0.18s ease;
}
.dispatch-container .date-chip.is-open {
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
0 12px 30px rgba(99, 102, 241, 0.22);
}
.dispatch-container .date-chip:hover {
border-color: rgba(99, 102, 241, 0.45);
box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06),
0 8px 22px rgba(99, 102, 241, 0.15);
transform: translateY(-1px);
}
.dispatch-container .date-chip:focus-within {
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
0 8px 22px rgba(99, 102, 241, 0.22);
}
/* Center card — visible chrome the operator reads. Renders as a