/* Best Bay TMS. Same layout language as ops.bestbayedge.com, in Best Bay Logistics teal and navy
   (#06ABAD and #15212F, sampled from the logo). Red stays reserved for things that need attention. */
:root {
  color-scheme: dark;
  --page: #05090F; --line: #223042; --card: #131D2A; --card-line: #223042;
  --well: #1A2635; --well-line: #263547; --field: #0F1823; --btn: #182331; --btn-line: #31435A;
  --hover: #1E2C3D; --ink: #EEF4F6; --ink-2: #DCE6EA; --ink-3: #C8D4DA; --nav: #9FB0BC; --muted: #8FA1AE;
  --accent: #06ABAD; --accent-hi: #1BC4C6; --on-accent: #04181A; --accent-card: #0D2E33; --track: #223042; --pill: #24344A;
  --red: #E94F49; --red-card: #3A1C1E; --warn-bg: #33260f; --warn-ink: #ffcf94; --err: #ff8a80; --good: #5FD08A;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-color: #3A4D65 transparent; scrollbar-width: thin; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #31435A; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #4A6280; border: 2px solid transparent; background-clip: padding-box; }
[hidden] { display: none !important; }
.mesh-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body { margin: 0; padding: 24px; background: var(--page); color: var(--ink); font: 14px/1.45 var(--sans); min-height: 100vh; }
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .drawer:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); margin: 0; font-size: 13px; }
.small { font-size: 12px; }
.sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.frame { max-width: 1760px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; padding: 20px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(6,171,173,.34) 0, rgba(13,60,72,.46) 170px, rgba(21,33,47,.32) 400px, rgba(15,24,35,.12) 620px, rgba(15,24,35,.12) 100%); align-items: start; }
main { min-width: 0; display: grid; gap: 16px; }
.side { position: sticky; top: 24px; height: calc(100vh - 88px); min-height: 480px; display: flex; flex-direction: column; gap: 18px; padding: 20px 12px 12px; border-radius: 16px; background: #101A26; border: 1px solid var(--line); }
.logo { display: block; width: 168px; height: auto; margin: 0 auto; }
.nav { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; padding-right: 2px; }
.nav-group { margin: 12px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; border-radius: 10px; color: var(--nav); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--hover); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav svg { flex: none; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px 6px 2px; border-top: 1px solid var(--line); }
.avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--accent-card); color: var(--accent-hi); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.me-text { min-width: 0; display: grid; gap: 2px; }
.me-email { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 4px 4px 0; }
.title-left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.title-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumb { color: var(--muted); font-size: 13px; text-decoration: none; }
.crumb:hover { color: var(--ink); }
.banner { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 500; }
.banner.info { background: var(--accent-card); color: #BDEDEE; }

.kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.kpi { flex: 1 1 170px; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); text-align: left; text-decoration: none; }
a.kpi:hover { border-color: var(--btn-line); }
.kpi.alert { background: var(--red-card); border-color: var(--red); }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi-count { display: block; font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi.alert .kpi-count { color: var(--red); font-weight: 700; }
.kpi-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.kpi.small-kpi { flex: 1 1 130px; min-width: 0; min-height: 0; padding: 12px 14px; gap: 6px; }
.kpi.small-kpi .kpi-count { overflow-wrap: anywhere; line-height: 1.2; }
.kpi.small-kpi .kpi-count { font-size: 20px; }
.kpi.small-kpi .kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; }

.panels { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.panel { min-width: 0; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 12px; }
.panels > .panel { flex: 1 1 420px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.panel-foot { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--btn); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.danger { color: var(--err); }
.btn.tiny { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.tiny.icon { width: 30px; }

.pill { display: inline-block; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 2px 8px; border-radius: 999px; background: var(--pill); white-space: nowrap; }
.pill.good { background: #123527; color: #8BE3AC; }
.pill.live { background: var(--accent-card); color: #7FE3E4; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--red-card); color: #FF9D97; }
.pill.turvo { background: none; box-shadow: inset 0 0 0 1px var(--btn-line); color: var(--muted); }

/* Grid */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .grow { flex: 1 1 240px; min-width: 200px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.lookup-input, .search-input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--field); color: var(--ink); font: inherit; font-size: 13px; }
.search-input::placeholder { color: #7D8E9B; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border-radius: 9px; border: 1px solid var(--card-line); background: var(--well); font-size: 12px; color: var(--ink-3); cursor: pointer; }
.chip:hover { border-color: var(--btn-line); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chip b { color: var(--ink); font-weight: 600; }
.chip .x { color: var(--muted); font-weight: 700; }
.table-wrap { overflow: auto; max-height: 68vh; margin: 0 -20px -18px; border-top: 1px solid var(--card-line); border-radius: 0 0 16px 16px; }
.table-wrap.plain { margin: 0; border: 1px solid var(--well-line); border-radius: 12px; max-height: none; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; padding: 0; background: var(--card); text-align: left; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--card-line); }
th button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 9px 12px; background: none; border: 0; color: var(--ink-2); font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
th button:hover { background: var(--hover); }
th.num button { justify-content: flex-end; }
th.plain { padding: 9px 12px; color: var(--ink-2); font-weight: 600; }
td { padding: 8px 12px; border-bottom: 1px solid var(--card-line); white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--well); }
td.mono { font-family: var(--mono); font-size: 12.5px; }
td a.open, td .open { color: var(--ink); text-decoration: underline; text-decoration-color: var(--btn-line); text-underline-offset: 2px; }
td.editable { cursor: cell; }
td.editable:hover { box-shadow: inset 0 0 0 1px var(--btn-line); }
td input.cell-edit, td select.cell-edit { width: 100%; min-width: 110px; height: 28px; padding: 0 6px; background: var(--field); color: var(--ink); border: 1px solid var(--accent); border-radius: 6px; font: inherit; font-size: 12.5px; }
.neg { color: #FF9D97; }
.route-chain { display: inline-flex; gap: 4px; align-items: center; }
.route-chain i { font-style: normal; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 28px; font-size: 12px; color: var(--muted); }
.pager .right { display: flex; gap: 6px; align-items: center; }
.empty { padding: 26px 0 10px; text-align: center; }

/* Forms */
.form { display: grid; gap: 14px; }
.form-group { display: grid; gap: 10px; }
.form-group > h3 { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; }
.fld { display: grid; gap: 3px; align-content: start; min-width: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.fld.wide { grid-column: 1 / -1; }
.fld .req { color: var(--accent-hi); }
.inp, .fld input:not([type=checkbox]), .fld select, .fld textarea { width: 100%; height: 38px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; }
.fld textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.fld input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 8px 0; }
.fld input[readonly] { color: var(--muted); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.75); }
.form-error { margin: 0; color: var(--err); font-weight: 500; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.combo { position: relative; }
.combo-pop { position: fixed; z-index: 1500; max-height: 280px; overflow-y: auto; padding: 6px; background: #0F1823; border: 1px solid var(--btn-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.combo-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--ink-3); text-align: left; cursor: pointer; }
.combo-opt:hover, .combo-opt.active { background: var(--hover); color: var(--ink); }
.combo-opt small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 18px; margin: 0; }
.dl > div { min-width: 0; }
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 1px 0 0; overflow-wrap: anywhere; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: pre-line; }

/* Tabs */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { flex: none; padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--nav); font-size: 13px; font-weight: 600; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { margin-left: 5px; color: var(--muted); font-weight: 500; }

/* Shipment lifecycle bar */
.phases { display: flex; gap: 3px; }
.phase { flex: 1 1 0; min-width: 0; padding-top: 7px; border-top: 3px solid var(--track); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase.done { border-top-color: var(--accent); color: var(--ink-3); }
.phase.now { border-top-color: var(--accent-hi); color: var(--ink); font-weight: 700; }
.phase.stopped { border-top-color: var(--red); color: var(--ink); font-weight: 700; }

/* Stops */
.stops { display: grid; gap: 0; }
.stop { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 14px; background: var(--well); border: 1px solid var(--well-line); }
.stop.done { border-left: 3px solid var(--accent); }
.stop-num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--accent-card); color: var(--accent-hi); box-shadow: inset 0 0 0 1px var(--accent); }
.stop-num.delivery { background: var(--accent); color: var(--on-accent); }
.stop-body { min-width: 0; display: grid; gap: 10px; }
.stop-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.stop-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.stop-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.stop-gap { display: flex; align-items: center; justify-content: center; height: 26px; position: relative; }
.stop-gap::before { content: ""; position: absolute; left: 31px; top: 0; bottom: 0; width: 2px; background: var(--btn-line); }
.stop-gap button { position: relative; opacity: 0; min-height: 22px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--btn-line); background: var(--btn); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.stop-gap:hover button, .stop-gap button:focus-visible { opacity: 1; }
.stop-more { justify-self: start; }
.stop-line { font-size: 13px; color: var(--ink-3); }

/* Timeline, activity */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { display: grid; gap: 1px; padding-left: 12px; border-left: 2px solid var(--well-line); font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.feed li.hi { border-left-color: var(--accent); }
.feed time, .feed .who { color: var(--muted); font-size: 12px; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--well); border: 1px solid var(--well-line); text-decoration: none; color: inherit; font-size: 13px; min-width: 0; }
a.row:hover { border-color: var(--btn-line); }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-main b { font-weight: 600; }
.row .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-right { flex: none; text-align: right; font-size: 12px; color: var(--muted); }

/* Map */
.map { height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0F1823; isolation: isolate; font-family: var(--sans); }
.map.tall { height: 560px; }
.pin { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 12px; box-shadow: 0 0 0 2px #05090F; }
.pin.delivery { background: var(--ink); }
.pin.ping { background: var(--red); }
.leaflet-container a { color: var(--ink-3); }
.leaflet-control-attribution { background: rgba(15,24,35,.8) !important; color: var(--muted); font-size: 10px; }
.leaflet-bar a { background: rgba(15,24,35,.92); color: var(--ink); border-bottom-color: var(--btn-line); }
.leaflet-bar a:hover { background: var(--hover); color: var(--ink); }
.leaflet-tooltip { background: #0F1823; color: var(--ink); border: 1px solid var(--btn-line); border-radius: 8px; font-family: var(--sans); font-size: 12px; padding: 7px 10px; }

/* Calendar */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 10px; border-radius: 12px; background: var(--well); border: 1px solid var(--well-line); min-height: 240px; }
.day.today { border-color: var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.appt { display: block; padding: 6px 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--card-line); font-size: 12px; text-decoration: none; color: var(--ink-3); overflow-wrap: anywhere; }
a.appt:hover { border-color: var(--btn-line); }
.appt b { display: block; color: var(--ink); font-weight: 600; }
.appt.done { opacity: .65; }

/* Bars and charts */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--ink-3); }
.bar-top span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-n { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.track { display: block; height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 3px; }
.fill { display: block; height: 5px; min-width: 2px; border-radius: 3px; background: var(--accent); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .gridline { stroke: var(--card-line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .barmark { fill: var(--accent); }
.chart .barmark.neg { fill: var(--red); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(255,255,255,.05); }
.tooltip { position: absolute; z-index: 5; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: #0F1823; border: 1px solid var(--btn-line); font-size: 12px; white-space: nowrap; }
.tooltip b { display: block; }

/* Drawer, toast */
.scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001; width: min(560px, 100%); padding: 20px 22px 32px; overflow-y: auto; background: var(--card); border-left: 1px solid var(--line); display: grid; align-content: start; gap: 14px; }
.drawer.wide { width: min(760px, 100%); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.col-list { display: grid; gap: 4px; }
.col-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--well); font-size: 13px; min-width: 0; }
.col-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.col-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-row .btn.tiny { min-height: 26px; padding: 0 8px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: grid; gap: 8px; }
.toast { max-width: 420px; padding: 10px 14px; border-radius: 10px; background: var(--well); border: 1px solid var(--accent); font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.bad { border-color: var(--red); }
.code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--well-line); font-family: var(--mono); font-size: 12px; overflow-x: auto; white-space: pre; color: var(--ink-3); }
.endpoint { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--card-line); font-size: 13px; }
.endpoint b { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); font-weight: 500; }
.endpoint code { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.endpoint span { grid-column: 2; color: var(--muted); font-size: 12px; }

/* Dropdown, same component as ops */
.dd { position: relative; min-width: 0; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 12px; background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; color: var(--ink); font-size: 13px; cursor: pointer; text-align: left; }
.dd-btn:hover:not(:disabled) { border-color: #4A6280; }
.dd-btn[aria-expanded="true"] { border-color: var(--accent); }
.dd-btn:disabled { color: var(--muted); cursor: not-allowed; }
.dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chevron { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .12s; }
.dd-btn[aria-expanded="true"] .dd-chevron { transform: rotate(180deg); }
.dd-pop { position: fixed; z-index: 1500; display: flex; flex-direction: column; padding: 6px; background: #0F1823; border: 1px solid var(--btn-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.dd-search { flex: none; height: 34px; margin-bottom: 6px; padding: 0 10px; background: var(--well); border: 1px solid var(--well-line); border-radius: 8px; color: var(--ink); font: inherit; font-size: 13px; }
.dd-search::placeholder { color: #7D8E9B; }
.dd-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; outline: none; min-height: 0; }
.dd-option { padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--ink-3); cursor: pointer; overflow-wrap: anywhere; }
.dd-option.active { background: var(--hover); color: var(--ink); }
.dd-option[aria-selected="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.dd-none { padding: 10px; font-size: 13px; color: var(--muted); }

/* Sign-in */
body.login { display: grid; place-items: center; }
.login-card { width: min(380px, 100%); padding: 28px; display: grid; gap: 14px; border-radius: 16px; background: linear-gradient(180deg, #0E5560 0, #123644 170px, #101A26 340px, #0F1823 100%); border: 1px solid var(--line); }
.login-logo { display: block; width: 190px; height: auto; margin: 0 0 6px; }
.login-card label { display: grid; gap: 4px; font-weight: 500; font-size: 13px; color: var(--ink-3); }
.login-card input { width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; }
.login-card .submit { width: 100%; height: 44px; margin-top: 4px; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.login-card .submit:hover { background: var(--accent-hi); }
.login-card a.link { font-size: 13px; }

@media (max-width: 1000px) {
  body { padding: 0; }
  .frame { grid-template-columns: minmax(0, 1fr); border-radius: 0; border: 0; padding: 12px; gap: 12px; }
  .side { position: static; height: auto; min-height: 0; padding: 12px; gap: 10px; }
  .logo { width: 130px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav-group { display: none; }
  .nav a { flex: none; white-space: nowrap; box-shadow: none !important; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent) !important; }
  .panel { padding: 14px; }
  .table-wrap { margin: 0 -14px -14px; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .day { min-height: 0; }
  .map, .map.tall { height: 320px; }
}
@media (forced-colors: active) { .fill, .pin, .barmark { background: CanvasText; forced-color-adjust: none; } }
