/* Schedulo Coach's look: Schedulo Bus's "Midnight Rail" frame (Schedulo Software UI Guidelines
 * 1.0) in the Coach accent. A Midnight Navy rail on the left, a top bar with the project and
 * whether it is saved, the figures as tiles, the tools as chips, Electric Blue for everything
 * pressed, Magenta (#F20D78) for the product label, the chosen tab and the chosen job. */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: block; size-adjust: 93%; src: url("../fonts/Montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: block; size-adjust: 93%; src: url("../fonts/Montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: block; size-adjust: 93%; src: url("../fonts/Montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: block; size-adjust: 93%; src: url("../fonts/Montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Schedulo Logo"; font-weight: 900; font-display: block; src: url("../fonts/Montserrat-900-logo.woff2") format("woff2"); }

:root {
  --co-accent: #f20d78;
  /* (white on the accent is 4.1:1: words on it use the deeper shade, 5.3:1) */
  --co-accent-deep: #c80a62;
  --co-accent-text: #ff5aa5;
  --co-accent-rgb: 242, 13, 120;
  --co-pale: #ffc3df;

  --sr-rail: #040b20;
  --sr-rail-ink: #aeb8d6;
  --sr-rail-sec: #8792b3;
  --sr-rail-hover: rgba(255, 255, 255, 0.06);
  --sr-rail-on: rgba(242, 13, 120, 0.2);
  --sr-rail-bar: #f20d78;
  --sr-soft: #13224d;
  --sr-edge: #1e2c57;
  --sr-action: #2f5fff;
  --sr-action-hover: #4a76ff;
  --sr-action-press: #2448e0;
  --sr-action-ink: #5a8dff;
  --sr-action-rgb: 47, 95, 255;
  --sr-focus: #00c2ff;
  --sr-off: #13224d;
  --sr-off-ink: #8792b3;

  --rf-bg: #060f2b;
  --rf-bar: #0c1a40;
  --rf-tool: #13224d;
  --rf-field: #0a1638;
  --rf-hover: #13224d;
  --rf-text: #eaf0ff;
  --rf-dim: #aeb8d6;
  --rf-faint: #8792b3;
  --rf-line: rgba(174, 184, 214, 0.14);
  --rf-warn: #ffa626;
  --rf-err: #f04848;
  --rf-ok: #46c478;
  --rf-card: #0f1d47;
  --rf-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --co-accent-text: #c80a62;
  --sr-rail: #071433;
  --sr-rail-ink: #c9d1ea;
  --sr-soft: #e5e9f7;
  --sr-edge: #d5dbee;
  --sr-action: #1e4bff;
  --sr-action-hover: #1a3fe0;
  --sr-action-press: #1535c2;
  --sr-action-ink: #1e4bff;
  --sr-action-rgb: 30, 75, 255;
  --sr-off: #e5e9f7;
  --sr-off-ink: #616b8a;
  --rf-bg: #f4f6fb;
  --rf-bar: #ffffff;
  --rf-tool: #e5e9f7;
  --rf-field: #f6f8fb;
  --rf-hover: #eef1f8;
  --rf-text: #071433;
  --rf-dim: #4a5677;
  --rf-faint: #7d869c;
  --rf-line: rgba(7, 20, 51, 0.09);
  --rf-warn: #c46a00;
  --rf-err: #d62e2e;
  --rf-ok: #1e9656;
  --rf-card: #ffffff;
  --rf-shadow: 0 10px 40px rgba(7, 20, 51, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--rf-bg); }
body { font-family: "Montserrat", system-ui, sans-serif; font-size: 13px; color: var(--rf-text); -webkit-font-smoothing: antialiased; }
#app { height: 100%; }
input, select, textarea { font: inherit; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:disabled { cursor: default; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rf-line); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
.hub-icon { flex: none; display: block; }
.flip { transform: scaleX(-1); }

/* --- the frame --------------------------------------------------------------------------------- */

.co { position: absolute; inset: 0; display: flex; background: var(--rf-bg); color: var(--rf-text); overflow: hidden; }
.co-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* --- the rail ---------------------------------------------------------------------------------- */

.co-rail { flex: none; width: 236px; display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; background: var(--sr-rail); color: var(--sr-rail-ink); z-index: 20; }
.co-brand { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 4px; margin-bottom: 6px; }
.co-brand .names { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-brand small { font-size: 10.5px; font-weight: 500; color: var(--sr-rail-sec); white-space: nowrap; }
.co-wordmark { display: inline-flex; align-items: baseline; gap: 0.32em; font-family: "Schedulo Logo", "Montserrat", sans-serif; font-weight: 900; letter-spacing: 0.01em; line-height: 1; white-space: nowrap; }
.co-wordmark b { display: inline-flex; align-items: baseline; color: #fff; font-weight: 900; }
.co-wordmark i { font-style: normal; color: var(--co-accent); }
.co-wordmark .ring { width: 0.848em; height: 0.732em; margin-left: 0.04em; }
.co-home { display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 0 10px; height: 58px; padding: 0 10px; margin-bottom: 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); text-align: left; color: var(--sr-rail-ink); }
.co-home:hover { box-shadow: inset 0 0 0 1px var(--sr-rail-bar); }
.co-home .badge { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(#f6358f, #f20d78); }
.co-home .names { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-home b { font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-home small { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.co-rail-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; }
.co-rail .sec { padding: 14px 12px 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sr-rail-sec); }
.co-ri { height: 42px; display: flex; align-items: center; gap: 13px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: inherit; text-align: left; white-space: nowrap; }
.co-ri:hover:not(.on) { background: var(--sr-rail-hover); color: #fff; }
.co-ri.on { background: var(--sr-rail-on); color: #fff; box-shadow: inset 3px 0 0 var(--sr-rail-bar); }
.co-ri .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; background: #c4352c; }
.co-ri .count.warn { background: #b26a00; }
.co-rail-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.co-rail-foot .ver { padding: 6px 12px 0; font-size: 10.5px; color: var(--sr-rail-sec); }
.co.folded .co-rail { width: 68px; }
.co.folded .co-rail .names, .co.folded .co-ri > span, .co.folded .co-rail .sec, .co.folded .co-home .names, .co.folded .co-home .go, .co.folded .co-ri .count, .co.folded .ver { display: none; }
.co.folded .co-ri { justify-content: center; padding: 0; }
.co.folded .co-home { grid-template-columns: 34px; justify-content: center; padding: 0; }
.co.folded .co-brand { justify-content: center; }

/* --- the top bar ------------------------------------------------------------------------------- */

.co-title { flex: none; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 24px; background: var(--rf-bar); box-shadow: inset 0 -1px 0 var(--rf-line); }
.co-title .name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.co-title .name b { font-size: 15px; font-weight: 700; }
.co-title .name .sub { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--rf-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rf-ok); flex: none; }
.dot.draft { background: var(--rf-warn); }
.ibtn { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--rf-dim); box-shadow: inset 0 0 0 1.3px var(--sr-edge); }
.ibtn:hover:not(:disabled) { color: var(--rf-text); background: var(--rf-hover); }
.ibtn:disabled { opacity: 0.4; }
.ibtn.on { color: var(--sr-action-ink); box-shadow: inset 0 0 0 1.5px var(--sr-action-ink); }
.ibtn.plain { box-shadow: none; }

/* --- buttons, fields, chips --------------------------------------------------------------------- */

.btn { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--sr-action-ink); box-shadow: inset 0 0 0 1.5px var(--sr-action-ink); }
.btn:hover:not(:disabled) { background: rgba(var(--sr-action-rgb), 0.08); }
.btn.solid { background: var(--sr-action); color: #fff; box-shadow: none; }
.btn.solid:hover:not(:disabled) { background: var(--sr-action-hover); }
.btn.quiet { box-shadow: none; color: var(--rf-dim); }
.btn.quiet:hover:not(:disabled) { color: var(--rf-text); background: var(--rf-hover); }
.btn.danger { color: var(--rf-err); box-shadow: inset 0 0 0 1.5px var(--rf-err); }
.btn:disabled { background: var(--sr-off); color: var(--sr-off-ink); box-shadow: none; }
.btn.small { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn:focus-visible, .ibtn:focus-visible, .co-ri:focus-visible { outline: 2px solid var(--sr-focus); outline-offset: 2px; }
.chip { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px 0 11px; border-radius: 10px; background: var(--rf-bar); box-shadow: inset 0 0 0 1.3px var(--sr-edge); font-size: 13px; font-weight: 600; color: var(--rf-text); white-space: nowrap; }
.chip:hover { box-shadow: inset 0 0 0 1.3px var(--rf-dim); }
.chip.on { color: var(--sr-action-ink); box-shadow: inset 0 0 0 1.5px var(--sr-action-ink); }
.seg { display: inline-flex; height: 36px; padding: 3px; border-radius: 10px; box-shadow: inset 0 0 0 1.3px var(--sr-edge); background: var(--rf-bar); }
.seg button { padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--rf-dim); white-space: nowrap; }
.seg button:hover { color: var(--rf-text); }
.seg button.on { background: var(--sr-soft); color: var(--sr-action-ink); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 600; color: var(--rf-dim); }
.input, .select, textarea.input { height: 38px; width: 100%; padding: 0 12px; border-radius: 9px; border: 0; background: var(--rf-field); color: var(--rf-text); box-shadow: inset 0 0 0 1.3px var(--sr-edge); outline: none; font-size: 13px; }
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { padding-right: 32px; }
.input:focus, .select:focus { box-shadow: inset 0 0 0 1.5px var(--sr-action), 0 0 0 3px rgba(var(--sr-action-rgb), 0.16); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--rf-text); }
.check input { display: none; }
.check b { width: 34px; height: 20px; flex: none; border-radius: 10px; background: var(--sr-off); position: relative; box-shadow: inset 0 0 0 1px var(--sr-edge); transition: background 0.15s; }
.check b::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.check input:checked + b { background: var(--sr-action); box-shadow: inset 0 0 0 1px #3f7bff; }
.check input:checked + b::after { left: 17px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; font-weight: 600; background: var(--sr-soft); color: var(--rf-dim); white-space: nowrap; }
.tag.ok { color: var(--rf-ok); background: rgba(70, 196, 120, 0.14); }
.tag.warn { color: var(--rf-warn); background: rgba(255, 166, 38, 0.14); }
.tag.err { color: var(--rf-err); background: rgba(240, 72, 72, 0.14); }
.tag.accent { color: var(--co-accent-text); background: rgba(var(--co-accent-rgb), 0.14); }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 600; color: var(--rf-dim); box-shadow: inset 0 0 0 1.3px var(--sr-edge); }
.pill.on { color: #fff; background: var(--sr-action); box-shadow: none; }
.muted { color: var(--rf-dim); }
.faint { color: var(--rf-faint); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.stars { color: #ffc23d; letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.stars .off { color: var(--rf-line); color: color-mix(in srgb, var(--rf-dim) 35%, transparent); }
.stars.none { color: var(--rf-err); font-size: 11.5px; font-weight: 700; letter-spacing: 0; }

/* --- the figures -------------------------------------------------------------------------------- */

.co-kpis { flex: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding: 16px 24px 6px; }
.tile { height: 76px; display: flex; align-items: center; gap: 13px; padding: 0 16px; border-radius: 14px; background: var(--rf-bar); box-shadow: inset 0 0 0 1px var(--sr-edge); min-width: 0; }
.tile .badge { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sr-soft); color: var(--sr-action-ink); }
.tile .badge.accent { color: var(--co-accent-text); background: rgba(var(--co-accent-rgb), 0.14); }
.tile .badge.warn { color: var(--rf-warn); background: rgba(255, 166, 38, 0.14); }
.tile .badge.err { color: var(--rf-err); background: rgba(240, 72, 72, 0.14); }
.tile .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile b { font-size: 21px; font-weight: 700; }
.tile b em { font-size: 12px; font-style: normal; font-weight: 600; color: var(--rf-dim); margin-left: 4px; }
.tile span { font-size: 12px; font-weight: 500; color: var(--rf-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- the toolbar -------------------------------------------------------------------------------- */

.co-toolbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 24px 12px; flex-wrap: wrap; }
.co-toolbar .gap { flex: 1; }
.co-toolbar .when { display: flex; align-items: center; gap: 6px; }
.co-toolbar .when b { min-width: 168px; text-align: center; font-size: 13px; font-weight: 700; }
.co-toolbar .search { position: relative; }
.co-toolbar .search .input { width: 190px; height: 36px; padding-left: 34px; }
.co-toolbar .search svg { position: absolute; left: 10px; top: 9px; color: var(--rf-dim); }

/* --- the timeline ------------------------------------------------------------------------------- */

.co-gantt { position: relative; flex: 1; min-height: 0; display: flex; box-shadow: inset 0 1px 0 var(--sr-edge); }
.co-gantt canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.co-gantt .scroll { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; overflow-y: scroll; }
.co-gantt .scroll > div { width: 1px; }
.co-tip { position: fixed; z-index: 60; max-width: 360px; padding: 12px 14px; border-radius: 12px; background: var(--rf-card); color: var(--rf-text); box-shadow: var(--rf-shadow), inset 0 0 0 1px var(--sr-edge); font-size: 12px; line-height: 1.5; pointer-events: none; }
.co-tip b { font-size: 13px; }
.co-tip .r { display: flex; gap: 6px; align-items: baseline; }
.co-tip .r i { font-style: normal; width: 12px; flex: none; text-align: center; font-weight: 700; }
.co-tip .r.good i { color: var(--rf-ok); }
.co-tip .r.bad i { color: var(--rf-warn); }

/* --- the status bar ----------------------------------------------------------------------------- */

.co-status { flex: none; height: 40px; display: flex; align-items: center; gap: 18px; padding: 0 18px 0 24px; background: var(--rf-bar); box-shadow: inset 0 1px 0 var(--rf-line); font-size: 12px; font-weight: 500; color: var(--rf-dim); white-space: nowrap; overflow: hidden; }
.co-status .co-wordmark { font-size: 12px; }
:root[data-theme="light"] .co-status .co-wordmark b { color: #071433; }
.co-status .it { display: flex; align-items: center; gap: 6px; }
.co-status .it b { color: var(--rf-text); font-weight: 700; }
.co-status .it.err b, .co-status .it.err { color: var(--rf-err); }
.co-status .it.warn b, .co-status .it.warn { color: var(--rf-warn); }
.co-status .it.link { cursor: pointer; }
.co-status .it.link:hover { color: var(--rf-text); }

/* --- side panel (a job's card, the issues) ------------------------------------------------------ */

.co-side { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; z-index: 15; display: flex; flex-direction: column; background: var(--rf-card); box-shadow: var(--rf-shadow), inset 1px 0 0 var(--sr-edge); }
.co-side > header { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 18px 16px 14px 20px; box-shadow: inset 0 -1px 0 var(--rf-line); }
.co-side > header .stripe { width: 6px; align-self: stretch; border-radius: 3px; flex: none; }
.co-side > header h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.co-side > header p { margin: 0; font-size: 12px; color: var(--rf-dim); }
.co-side .body { flex: 1; overflow-y: auto; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.co-side .foot { flex: none; display: flex; gap: 8px; padding: 12px 20px; box-shadow: inset 0 1px 0 var(--rf-line); }
.sec-h { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rf-faint); margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv > span:nth-child(odd) { color: var(--rf-dim); }
.legs { display: flex; flex-direction: column; gap: 0; }
.legs .leg { display: grid; grid-template-columns: 50px 14px 1fr; gap: 10px; align-items: start; font-size: 12.5px; padding: 3px 0; }
.legs .leg .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.legs .leg .d { width: 10px; height: 10px; border-radius: 50%; margin-top: 3px; box-shadow: inset 0 0 0 2px var(--rf-dim); }
.legs .leg small { display: block; color: var(--rf-dim); font-size: 11.5px; }
.pick { display: flex; flex-direction: column; gap: 4px; }
.pick .p { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-align: left; box-shadow: inset 0 0 0 1px var(--rf-line); }
.pick .p:hover { background: var(--rf-hover); box-shadow: inset 0 0 0 1px var(--sr-action-ink); }
.pick .p.cur { box-shadow: inset 0 0 0 1.5px var(--co-accent); }
.pick .p b { font-size: 13px; }
.pick .p small { grid-column: 1 / -1; color: var(--rf-dim); font-size: 11.5px; line-height: 1.4; }
.issue { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; background: rgba(255, 166, 38, 0.1); }
.issue.hard { background: rgba(240, 72, 72, 0.12); }
.issue svg { margin-top: 1px; color: var(--rf-warn); }
.issue.hard svg { color: var(--rf-err); }
.issue.click { cursor: pointer; }
.issue.click:hover { box-shadow: inset 0 0 0 1px var(--rf-dim); }

/* --- pages (lists and editors) ------------------------------------------------------------------ */

.co-page { flex: 1; min-height: 0; overflow: auto; padding: 18px 24px 30px; }
.co-page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.co-page-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.co-page-head p { margin: 4px 0 0; color: var(--rf-dim); font-size: 12.5px; }
.card { background: var(--rf-bar); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--sr-edge); }
.card.pad { padding: 18px 20px; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.list th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rf-faint); background: var(--rf-bar); box-shadow: inset 0 -1px 0 var(--rf-line); white-space: nowrap; }
table.list td { padding: 11px 14px; box-shadow: inset 0 -1px 0 var(--rf-line); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--rf-hover); }
table.list tr.on td { background: rgba(var(--co-accent-rgb), 0.08); }
table.list td.num { font-variant-numeric: tabular-nums; }
table.list td .sub { display: block; font-size: 11.5px; color: var(--rf-dim); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }

/* --- dialogs ------------------------------------------------------------------------------------ */

.co-scrim { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 7, 15, 0.62); }
:root[data-theme="light"] .co-scrim { background: rgba(7, 20, 51, 0.4); }
.sheet { width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 18px; background: var(--rf-card); box-shadow: var(--rf-shadow), inset 0 0 0 1px var(--sr-edge); overflow: hidden; }
.sheet.narrow { width: min(560px, 100%); }
.sheet > header { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px 24px; box-shadow: inset 0 -1px 0 var(--rf-line); }
.sheet > header h3 { margin: 0; font-size: 17px; font-weight: 700; flex: 1; }
.sheet .tabs { flex: none; display: flex; gap: 4px; padding: 10px 24px 0; box-shadow: inset 0 -1px 0 var(--rf-line); }
.sheet .tabs button { height: 38px; padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--rf-dim); border-radius: 8px 8px 0 0; }
.sheet .tabs button.on { color: var(--rf-text); box-shadow: inset 0 -2.5px 0 var(--co-accent); }
.sheet .body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; }
.sheet > footer { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 24px; box-shadow: inset 0 1px 0 var(--rf-line); }

/* --- toasts and menus --------------------------------------------------------------------------- */

.co-toasts { position: fixed; right: 20px; bottom: 56px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.co-toast { max-width: 420px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--rf-card); box-shadow: var(--rf-shadow), inset 0 0 0 1px var(--sr-edge); font-size: 13px; line-height: 1.45; }
.co-toast.err { box-shadow: var(--rf-shadow), inset 0 0 0 1.5px var(--rf-err); }
.co-menu { position: fixed; z-index: 65; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--rf-card); box-shadow: var(--rf-shadow), inset 0 0 0 1px var(--sr-edge); display: flex; flex-direction: column; }
.co-menu button { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; text-align: left; }
.co-menu button:hover { background: var(--rf-hover); }
.co-menu hr { border: 0; height: 1px; background: var(--rf-line); margin: 4px 6px; }

/* --- the map ------------------------------------------------------------------------------------ */

.co-map { position: relative; overflow: hidden; border-radius: 12px; background: #dfe6ee; box-shadow: inset 0 0 0 1px var(--sr-edge); cursor: grab; touch-action: none; }
.co-map:active { cursor: grabbing; }
.co-map img { position: absolute; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.co-map .co-tiles { position: absolute; inset: 0; }
.co-map .co-tile { position: absolute; width: 256px; height: 256px; background-size: cover; }
.co-map.empty { display: grid; place-items: center; color: #4a5677; font-size: 12.5px; }
.co-map svg.over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.co-map .zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; }
.co-map .zoom button { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: #071433; font-weight: 800; font-size: 16px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.co-map .attr { position: absolute; right: 0; bottom: 0; padding: 2px 6px; font-size: 10px; color: #333; background: rgba(255, 255, 255, 0.8); border-top-left-radius: 6px; pointer-events: auto; }
.co-map .attr a { color: #1e4bff; }

/* --- the calendar (days of operation, unavailable days) ----------------------------------------- */

.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cal .m { display: flex; flex-direction: column; gap: 6px; }
.cal .m b { font-size: 12.5px; }
.cal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal .days span { height: 24px; display: grid; place-items: center; font-size: 10.5px; color: var(--rf-faint); }
.cal .days button { height: 26px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--rf-dim); font-variant-numeric: tabular-nums; }
.cal .days button:hover { box-shadow: inset 0 0 0 1.3px var(--sr-action-ink); }
.cal .days button.on { background: var(--co-accent-deep); color: #fff; }
.cal .days button.hol { box-shadow: inset 0 -2px 0 var(--rf-warn); }
.cal .days button.off { background: rgba(240, 72, 72, 0.18); color: var(--rf-err); }
.cal .days button.we { color: var(--rf-faint); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--rf-dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1250px) {
  .co-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* the scheduling day's calendar */
.co-daypick { position: relative; }
.co-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 330px; padding: 12px; border-radius: 14px; background: var(--rf-card); border: 1px solid var(--rf-line); box-shadow: var(--rf-shadow); display: flex; flex-direction: column; gap: 10px; }
.co-pop .head { display: flex; align-items: center; justify-content: space-between; }
.co-pop .head b { font-size: 14px; }
.co-pop .cal.one { display: block; }
.co-pop .cal .days button { height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; }
.co-pop .cal .days button small { font-size: 9.5px; font-weight: 700; color: var(--rf-faint); display: inline-flex; align-items: center; gap: 2px; line-height: 1; min-height: 10px; }
.co-pop .cal .days button small i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }
.co-pop .cal .days button small.warn { color: var(--rf-warn); }
.co-pop .cal .days button small.err { color: var(--rf-err); }
.co-pop .cal .days button.on small { color: #fff; }
.co-pop .cal .days button.today { box-shadow: inset 0 0 0 1.5px var(--co-accent); }
.co-pop .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.co-pop .legend { gap: 8px; font-size: 10.5px; }
.dotk { width: 7px; height: 7px; border-radius: 50%; background: var(--rf-faint); display: inline-block; }
.dotk.warn { background: var(--rf-warn); }
.dotk.err { background: var(--rf-err); }

/* the zoom slider and the timeline's own scrollbar */
.co-zoom { display: flex; align-items: flex-start; gap: 0; color: var(--rf-dim); padding-top: 2px; }
.co-zoom .sch-tick { position: relative; width: 9px; height: 26px; flex: none; }
.co-zoom .sch-tick::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 26px; border-radius: 1.5px; background: #3f7bff; }
.co-zoom .sch-tick::after { content: ""; position: absolute; left: 3px; width: 7px; top: 11.5px; height: 3px; background: #3f7bff; }
.co-zoom .track { display: flex; flex-direction: column; gap: 3px; width: 300px; }
.co-zoom .bar { --p: 0%; position: relative; height: 26px; border-radius: 13px; padding: 0 11px; box-sizing: border-box; background: linear-gradient(to right, #162c66 calc(11px + var(--p) * (1 - 22 / 300)), #4c8df0 0); border: 1.5px solid #3f7bff; }
.co-zoom .pips { position: absolute; inset: 0 11px; pointer-events: none; }
.co-zoom .pips i { position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); }
.co-zoom .pips i.past { background: #7fa5ff; }
.co-zoom input[type="range"] { -webkit-appearance: none; appearance: none; position: absolute; inset: -1.5px 0; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; }
.co-zoom input[type="range"]::-webkit-slider-runnable-track { height: 26px; background: transparent; }
.co-zoom input[type="range"]::-moz-range-track { height: 26px; background: transparent; }
.co-zoom input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #1e4bff; border: 1.5px solid #3f7bff; box-shadow: 0 1px 4px rgba(7, 20, 51, 0.45); transition: background 0.15s; }
.co-zoom input[type="range"]::-moz-range-thumb { width: 23px; height: 23px; border-radius: 50%; background: #1e4bff; border: 1.5px solid #3f7bff; }
.co-zoom input[type="range"]:hover::-webkit-slider-thumb, .co-zoom input[type="range"]:focus-visible::-webkit-slider-thumb { border-color: #7fa5ff; box-shadow: 0 0 0 3px rgba(30, 75, 255, 0.3); }
.co-zoom input[type="range"]:focus { outline: none; }
.co-zoom .stops { display: flex; justify-content: space-between; margin: 0 -2px; }
.co-zoom .stops button { font-size: 10px; font-weight: 600; color: var(--rf-faint); padding: 0 2px; white-space: nowrap; }
.co-zoom .stops button:hover { color: var(--rf-text); }
.co-zoom .stops button.on { color: var(--co-accent); font-weight: 700; }
.co-hscroll { flex: none; height: 16px; overflow-x: scroll; overflow-y: hidden; margin-left: 236px; background: var(--rf-tool); box-shadow: inset 0 1px 0 var(--rf-line); }
.co-hscroll > div { height: 1px; }
.co-hscroll::-webkit-scrollbar { height: 12px; }
.co-hscroll::-webkit-scrollbar-thumb { background: var(--co-accent-deep); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }

/* a job's itinerary beside its map */
.co-plan { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(380px, 1fr); gap: 18px; min-height: 520px; }
.co-plan .steps { display: flex; flex-direction: column; gap: 6px; }
.co-plan .step { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rf-line); cursor: pointer; }
.co-plan .step.on { box-shadow: inset 0 0 0 1.5px var(--co-accent); background: rgba(var(--co-accent-rgb), 0.05); }
.co-plan .step .pin { flex: none; width: 24px; height: 24px; margin-top: 6px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.co-plan .step .tools { display: grid; grid-template-columns: repeat(2, 30px); gap: 0; align-content: start; }
.co-plan .step .est { grid-column: 1 / -1; font-size: 11.5px; color: var(--rf-dim); }
.co-plan .step .est.bad { color: var(--rf-err); font-weight: 600; }
.co-plan .mapside { display: flex; flex-direction: column; min-height: 0; position: sticky; top: 0; height: min(640px, calc(100vh - 260px)); align-self: start; }
.co-plan .co-map.big { flex: 1; min-height: 360px; }
.co-plan .found { display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow: auto; margin-bottom: 8px; padding: 4px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--rf-line); }
.co-plan .found button { text-align: left; padding: 6px 8px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; }
.co-plan .found button:hover { background: var(--rf-hover); }
.co-plan .found small { font-size: 11px; color: var(--rf-dim); }

/* The schedule-bar switch, as Schedulo Bus has it (its css/base.css; the brand guide): the
   symbol's tick and stub, then a bar with a round segment that slides across like a schedule
   block. The look's switch has a sun (light) and a moon (dark) in its segment. */
.sch-bar { --sch-edge: #3f7bff; display: inline-flex; align-items: center; flex: none; height: 32px; }
.sch-bar .tick { position: relative; width: 9px; height: 32px; flex: none; }
.sch-bar .tick::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 32px; border-radius: 1.5px; background: #3f7bff; }
.sch-bar .tick::after { content: ""; position: absolute; left: 3px; width: 7px; top: 14.5px; height: 3px; background: #3f7bff; }
.sch-bar .pill { position: relative; width: 58px; height: 26px; flex: none; box-sizing: border-box; border-radius: 13px; background: #4c8df0; border: 1.5px solid #4c8df0; transition: background 0.2s, border-color 0.2s; }
.sch-bar .seg { position: absolute; top: -1.5px; left: -1.5px; width: 26px; height: 26px; box-sizing: border-box; border-radius: 50%; background: #071433; border: 1.5px solid var(--sch-edge); color: #eef2ff; display: grid; place-items: center; transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1), background 0.2s; }
.sch-bar .seg svg { grid-area: 1 / 1; width: 15px; height: 15px; transition: opacity 0.18s, transform 0.2s; }
.sch-bar .when-on { opacity: 0; transform: scale(0.6); }
.sch-bar.on .pill { background: #162c66; border-color: var(--sch-edge); }
.sch-bar.on .seg { transform: translateX(32px); background: #1e4bff; }
.sch-bar.on .when-on { opacity: 1; transform: none; }
.sch-bar.on .when-off { opacity: 0; transform: rotate(60deg) scale(0.6); }
:hover > .sch-bar, :focus-visible > .sch-bar { --sch-edge: #7fa5ff; }
@media (prefers-reduced-motion: reduce) { .sch-bar .pill, .sch-bar .seg, .sch-bar .seg svg { transition: none; } }
.co-look { display: flex; align-items: center; gap: 12px; }
.co-look-switch { display: flex; align-items: center; padding: 2px; border-radius: 99px; }
.co-look-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(30, 75, 255, 0.35); }
.co-look-word { font-weight: 600; color: var(--rf-dim); }
.co-rail .co-look { height: 46px; padding: 0 12px; }
.co-rail .co-look-word { color: var(--sr-rail-ink); font-size: 13.5px; }
.co.folded .co-rail .co-look { justify-content: center; padding: 0; }
.co.folded .co-rail .co-look-word, .co.folded .co-rail .co-look .sch-bar .tick { display: none; }
