/* Manager portal. Builds on apps/shared/app.css (sx-*). Light theme, navy / gold. */
.ico { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mc-num, .sx-table td.num, .mg-kpi .sx-stat-value { font-variant-numeric: tabular-nums; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: rgba(10,10,10,0.06); padding: 1px 6px; border-radius: 6px; }
a { color: var(--navy); }

/* bar + tabs */
.sx-bar { flex-wrap: nowrap; min-width: 0; }
.sx-bar .sx-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-bar .sx-sandbox, .sx-bar .sx-lang { flex-shrink: 0; }
.mg-user { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mg-user small { opacity: 0.75; font-weight: 500; }
.mg-tabs { position: sticky; top: 56px; z-index: 15; background: var(--bg); padding: 0 16px; margin-bottom: 0; max-width: 100%; flex-wrap: wrap; overflow: visible; }
.mg-tabs .sx-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.mg-main { max-width: 1280px; padding-top: 16px; }

/* range bar */
.mg-rangebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.mg-rangebar .sx-select, .mg-rangebar .sx-input { width: auto; min-width: 150px; }
.mg-rangebar .sx-btn { min-height: 44px; }
.mg-custom { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.mg-custom[hidden] { display: none; }
.mg-custom label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.mg-range-text { display: flex; flex-direction: column; line-height: 1.25; }
.mg-range-text small { color: var(--text-muted); font-size: 12px; }
.mg-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.mg-toggle input, .mg-check input { width: 20px; height: 20px; accent-color: var(--navy); }
.mg-toggle.big { display: flex; padding: 8px 0; font-size: 14px; }

/* bar menu (Sandbox tools + Sign out) */
.mg-menu { position: relative; }
.mg-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.12); color: #fff; font-size: 14px; font-weight: 600; }
.mg-menu summary::-webkit-details-marker { display: none; }
.mg-menu summary:hover, .mg-menu[open] summary { background: rgba(255,255,255,0.2); }
.mg-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; display: grid; gap: 4px; padding: 8px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
.sx-bar .mg-menu-pop button { background: none; color: var(--navy); text-align: left; min-height: 44px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.sx-bar .mg-menu-pop button:hover { background: rgba(10,10,10,0.07); }
.mg-menu-who { display: none; padding: 8px 12px; color: var(--navy); font-size: 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.mg-menu-who small { color: var(--text-muted); }

/* row "..." menus: popup is fixed-positioned by JS so a scrolling table never clips it */
.mg-more { position: relative; display: inline-block; }
.mg-more summary { list-style: none; cursor: pointer; min-width: 44px; justify-content: center; font-size: 20px; line-height: 1; }
.mg-more summary::-webkit-details-marker { display: none; }
.mg-more-menu { position: fixed; z-index: 1000; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
.mg-more-menu button { background: none; border: 0; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.mg-more-menu button:hover { background: rgba(10,10,10,0.07); }
.mg-more-menu button.danger { color: var(--danger); }
.mg-more-menu button.danger:hover { background: rgba(220,38,38,0.08); }
.mg-more-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.mg-why { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; max-width: 170px; white-space: normal; line-height: 1.3; }
#tsApproveWhy { display: inline-block; max-width: 280px; margin: 0 10px 0 0; }

/* Overview hero + strip */
.mg-hero { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.mg-hero-card { padding: 20px 24px; box-shadow: none; display: grid; gap: 6px; border-top: 0; }
.mg-hero-label { font-size: 14px; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.mg-hint { display: inline-flex; color: var(--text-muted); cursor: help; }
.mg-hint:focus-visible { outline: 3px solid var(--gold); border-radius: 50%; }
.mg-hero-value { font-family: var(--font); font-size: 36px; line-height: 1; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.mg-hero-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.mg-state { font-size: 14px; padding: 4px 12px; }
.mg-hero-card.unknown .mg-hero-value { color: var(--text-muted); }
.mg-strip { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.mg-strip-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; display: grid; gap: 1px; min-width: 0; }
.mg-strip-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.mg-strip-item b { font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; }
.mg-strip-item .sx-stat-delta { font-size: 12px; }

/* KPI tiles */
.mg-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 16px; }
.mg-kpis-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mg-kpi { padding: 14px 16px; box-shadow: none; }
.mg-kpi .sx-stat-value { font-size: 28px; }
.mg-delta { display: flex; align-items: center; gap: 4px; }
.mg-delta.good { color: #0f7a36; }
.mg-delta.bad { color: #b91c1c; }
.mg-delta.flat { color: var(--text-muted); }

/* cards */
.mg-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); margin-bottom: 16px; }
.mg-card { margin-bottom: 16px; min-width: 0; }
.mg-grid > .mg-card { margin-bottom: 0; }
.mg-grid > .mg-card.wide { grid-column: 1 / -1; }
.mg-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mg-card-head h2 { margin: 0; }
.mg-card-head h3 { margin: 12px 0 0; }
.mg-card-head .sx-spacer { flex: 1; }
.mg-card-sub { font-size: 14px; }
.mg-foot { font-size: 14px; margin-top: 10px; }
.mg-big { font-family: var(--font); font-size: 36px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.mg-h1 { font-size: 28px; color: var(--navy); margin-bottom: 4px; }
.mg-center { text-align: center; justify-content: center; }
.mg-note { background: var(--gold-pale); border: 1px solid var(--line-strong); color: var(--gold-ink); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.mg-empty .mg-empty-ico { width: 40px; height: 40px; color: var(--gold-ink); margin-bottom: 8px; }
.mg-empty p { max-width: 520px; margin: 0 auto; }

/* tables */
.mg-table th { white-space: nowrap; }
.mg-table td { white-space: nowrap; }
.mg-table td:first-child { white-space: normal; min-width: 120px; }
.mg-table tfoot td { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 600; }
.mg-table tr.mg-inactive td { color: var(--text-muted); }
.mg-actions { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.sx-btn.sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.sx-btn.danger-outline { color: var(--danger); border-color: rgba(220,38,38,0.35); }
.sx-btn.danger-outline:hover { border-color: var(--danger); }

/* charts */
.mg-chart { width: 100%; min-height: 60px; }
.mc-chart { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.mc-chart:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.mc-hit { cursor: crosshair; }
.mc-hit.on { fill: rgba(10,10,10,0.06); }
.mc-tip { position: absolute; z-index: 1200; pointer-events: none; background: var(--navy-dark); color: #fff; font-size: 14px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; white-space: pre-line; box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; font-variant-numeric: tabular-nums; max-width: 280px; }
.mc-tip.on { opacity: 1; }
.mc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); margin: 0 0 6px; }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { width: 18px; height: 4px; border-radius: 2px; border: 1px solid transparent; }
.mc-legend i.dashed { height: 0; border-width: 2px 0 0; border-style: dashed; border-radius: 0; }

/* alerts: an icon + chip carries the level (no colored side borders) */
.mg-alerts { list-style: none; display: grid; gap: 8px; }
.mg-alert { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; min-height: 56px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.mg-alert:hover { border-color: var(--navy); background: var(--white); }
.mg-alert:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mg-alert .sx-chip { flex-shrink: 0; }
.mg-alert-text { flex: 1; min-width: 0; }
.mg-alert-text small { display: block; color: var(--text-muted); font-size: 14px; }
.mg-alert-go { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; color: var(--navy); font-size: 14px; font-weight: 600; }

/* production board */
.mg-board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mg-station { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); display: grid; gap: 6px; }
.mg-station.idle { opacity: 0.8; }
.mg-station-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--navy); }
.mg-station-q .mc-num { font-family: var(--font); font-size: 28px; font-weight: 600; color: var(--navy); }
.mg-station-who { display: flex; gap: 4px; flex-wrap: wrap; font-size: 14px; }

/* sign-in */
.mg-signin { max-width: 560px; margin: 24px auto; text-align: center; }
.mg-people { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 16px; text-align: left; }
.mg-person { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text); font-size: 16px; }
.mg-person:hover { border-color: var(--navy); }
.mg-person small { display: block; color: var(--text-muted); font-size: 14px; }
.mg-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--gold-light); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 20px; flex-shrink: 0; }
.mg-back { margin-bottom: 8px; }
.mg-who { font-size: 20px; font-weight: 600; color: var(--navy); }
.mg-pin-msg { min-height: 24px; margin-top: 12px; color: var(--danger); font-weight: 600; }
.mg-locked { padding: 24px 0; }
.mg-locked h2 { color: var(--danger); font-size: 28px; }

/* forms + dialogs */
.mg-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,0.25); color: var(--text); }
.mg-dialog.wide { width: min(820px, calc(100vw - 24px)); }
.mg-dialog::backdrop { background: rgba(10,10,10,0.40); }
.mg-dialog-in { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.mg-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.mg-dialog-head h2 { flex: 1; font-size: 20px; color: var(--navy); }
.mg-x { background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; color: var(--text-muted); font-size: 20px; }
.mg-x:hover { background: rgba(10,10,10,0.06); }
.mg-dialog-body { padding: 16px; overflow: auto; }
.mg-dialog-body > * + * { margin-top: 10px; }
.mg-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.mg-form { display: grid; gap: 12px; }
.mg-form [hidden] { display: none; }
.mg-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.mg-inline > .sx-field { flex: 1 1 160px; }
.mg-inline .sx-input { flex: 1; }
.sx-field .mg-inline { margin-top: 4px; }
.mg-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.mg-err { display: block; color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.mg-err:empty { display: none; }
.mg-radios { border: 0; display: grid; gap: 10px; }
.mg-radios label { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.mg-save-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* timesheets */
.mg-emp { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; }
.mg-emp summary { cursor: pointer; font-size: 16px; min-height: 32px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mg-emp h3 { font-size: 16px; color: var(--navy); margin: 10px 0 6px; }

/* downloads */
.mg-downloads { list-style: none; display: grid; gap: 8px; }
.mg-downloads li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mg-downloads small { display: block; color: var(--text-muted); font-size: 14px; }

/* deliveries */
.mg-proofs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.mg-proof { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); padding: 6px; display: grid; gap: 4px; text-align: left; }
.mg-proof img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: var(--surface-3); }
.mg-proof img.sig { object-fit: contain; }
.mg-proof small { font-size: 12px; color: var(--text-muted); }
.mg-proof-big { display: flex; gap: 12px; flex-wrap: wrap; }
.mg-proof-big figure { flex: 1 1 260px; }
.mg-proof-big img { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.mg-proof-big figcaption { font-size: 14px; color: var(--text-muted); }

/* devices */
.mg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); vertical-align: 0; }
.mg-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.mg-code { font-family: ui-monospace, Consolas, monospace; font-size: clamp(34px, 9vw, 56px); font-weight: 600; letter-spacing: 0.14em; color: var(--navy); text-align: center; background: var(--gold-pale); border: 2px dashed var(--gold); border-radius: var(--radius); padding: 16px 8px; display: flex; justify-content: center; gap: 0.4em; }
.mg-code-sm { font-size: 14px; letter-spacing: 0.1em; }
.mg-count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-ink); }

/* print */
#printArea { display: none; }
.mg-badge-card { width: 3.37in; height: 2.125in; border: 1px solid var(--navy); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; margin: 0 auto; font-family: var(--font); }
.mg-badge-biz { font-size: 12px; color: var(--ink-2); }
.mg-badge-name { font-family: var(--font); font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.mg-badge-role { font-size: 12px; color: var(--ink-2); }
.mg-badge-code svg { max-width: 2.9in; height: 0.6in; }
.mg-badge-text { font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 600; letter-spacing: 0.12em; }
.mg-print h1 { font-size: 28px; color: var(--navy); }
.mg-print h2 { font-size: 20px; color: var(--navy); margin: 14px 0 6px; }
.mg-print-table, #printArea table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mg-print-table th, .mg-print-table td, #printArea th, #printArea td { border-bottom: 1px solid #ccd; padding: 4px 6px; text-align: left; }
.mg-print-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mg-print-foot { margin-top: 12px; font-size: 12px; }
@media print {
  body.mg-printing > *:not(#printArea) { display: none !important; }
  body.mg-printing #printArea { display: block; }
  body.mg-printing { background: #fff; }
  .mg-print h2, .mg-print-table { break-inside: avoid; }
}

/* bottleneck board + pay reports */
.mg-bn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mg-bn-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); }
.mg-bn-item.hot { border-color: var(--navy); box-shadow: inset 4px 0 0 var(--gold); }
.mg-bn-row { width: 100%; display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(150px, 1.2fr) 24px; gap: 12px; align-items: center; text-align: left; min-height: 52px; padding: 8px 12px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.mg-bn-row:disabled { cursor: default; opacity: 0.7; }
.mg-bn-row:not(:disabled):hover { background: var(--surface-2); }
.mg-bn-row:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.mg-bn-row.open .mg-bn-go { transform: rotate(180deg); }
.mg-bn-n .mc-num { font-size: 20px; font-weight: 600; color: var(--navy); }
.mg-bn-list { padding: 0 12px 12px; }
.sx-seg { display: inline-flex; gap: 4px; }
.mg-pay-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
@media (max-width: 900px) {
  .mg-bn-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .mg-bn-old, .mg-bn-oldest { grid-column: 1 / -1; }
  .mg-bn-go { display: none; }
}

@media (max-width: 900px) {
  .mg-hero-value { font-size: 36px; }
}
@media (max-width: 900px) {
  .mg-tabs { top: 0; position: relative; padding: 0 8px; }
  .sx-bar { position: relative; gap: 8px; padding: 8px 12px; }
  .mg-user { display: none; }
  .mg-menu-who { display: block; }
  .mg-menu-text { display: none; }
  .mg-kpi .sx-stat-value { font-size: 28px; }
  .mg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mg-hero { grid-template-columns: 1fr; gap: 10px; }
  .mg-hero-card { padding: 14px 16px; }
  .mg-hero-value { font-size: 36px; }
  .mg-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-alert { flex-wrap: wrap; }
  .mg-alert-go { width: 100%; }
  .mg-rangebar .sx-select, .mg-rangebar .sx-input { min-width: 0; flex: 1 1 140px; }
  .mg-downloads li { flex-wrap: wrap; }
  .mg-dialog-foot .sx-btn { flex: 1; }
}
@media (max-width: 640px) {
  /* 9 tabs: a tidy 3-column grid of compact tabs instead of a long wrapped strip */
  .mg-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  .mg-tabs .sx-tab { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 4px; font-size: 14px; min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .mc-tip { transition: none; } }

/* Deliveries: live driver map + progress */
.dl-live { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.dl-mapcol { min-width: 0; }
.dl-map { height: 420px; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); z-index: 0; }
.dl-nomap { padding: 24px; text-align: center; }
.dl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; color: var(--navy); }
.dl-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--navy); }
.dl-legend .lg.next { background: var(--gold); }
.dl-legend .lg.arrived { background: var(--warn); }
.dl-legend .lg.done { background: var(--ok); }
.dl-legend .lg.failed { background: var(--danger); }
.dl-nospot { margin: 6px 0 0; font-size: 14px; }
.dl-cards { display: grid; gap: 10px; min-width: 0; max-height: 480px; overflow-y: auto; }
.dl-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--white); }
.dl-card.warn { border-color: var(--warn); }
.dl-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dl-seen { font-size: 14px; }
.dl-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.dl-bar { display: flex; height: 12px; margin: 8px 0 4px; border-radius: 6px; overflow: hidden; background: rgba(10,10,10,0.1); }
.dl-bar-done { background: var(--ok); }
.dl-bar-failed { background: var(--danger); }
.dl-count { font-size: 14px; color: var(--navy); overflow-wrap: anywhere; }
.dl-next { font-size: 14px; margin-top: 2px; min-height: 1em; overflow-wrap: anywhere; }
.dl-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.dl-day { margin-bottom: 12px; }
.dl-day .dl-bar { height: 16px; }
@media (max-width: 900px) {
  .dl-live { grid-template-columns: minmax(0, 1fr); }
  .dl-cards { max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
  .dl-map { height: 50vh; min-height: 280px; }
}

/* ── Schedule tab ── */
.mg-sch td { white-space: normal; vertical-align: top; min-width: 112px; }
.mg-sch td:first-child { min-width: 120px; }
.mg-sch th small { color: var(--text-muted); font-weight: 600; }
.mg-sch-cell { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.mg-sch-chip { font: inherit; font-size: 12px; font-weight: 600; text-align: left; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--navy); background: rgba(10,10,10,0.08); color: var(--navy); cursor: pointer; line-height: 1.3; }
.mg-sch-chip.draft { border-style: dashed; background: transparent; }
.mg-sch-chip:hover { background: rgba(10,10,10,0.16); }
.mg-sch-draft { font-style: normal; font-weight: 600; color: var(--warn); margin-left: 4px; }
.mg-sch-att { font-style: normal; font-weight: 600; margin-left: 4px; }
.mg-sch-att.on-time { color: #0f7a36; }
.mg-sch-att.late, .mg-sch-att.off { color: var(--warn); }
.mg-sch-att.missed { color: #b91c1c; }
.mg-sch-add { align-self: flex-start; border: 1px dashed var(--border); background: transparent; color: var(--text-muted); border-radius: 8px; width: 28px; height: 24px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mg-sch-add:hover { color: var(--navy); border-color: var(--navy); }
.mg-sch-today, .mg-sch-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mg-sch-req { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mg-sub { font-size: 14px; margin: 14px 0 6px; color: var(--text-muted); }

/* Audit tab: a made-offline row and number are marked in the warning color, never by color alone (the words say it too) */
.mg-warn { color: var(--gold-ink); font-weight: 600; }
.mg-table tr.mg-row-warn td { background: var(--gold-pale); }
.mg-audit .mg-inline { gap: 8px 18px; align-items: center; margin: 8px 0; }

/* Store switcher in the app bar (apps/manager/tab-stores.js) */
.mg-storesel { display: inline-flex; align-items: center; gap: 6px; }
.mg-storesel .sx-select { min-width: 9rem; max-width: 14rem; }
