/* Rails: a bright retail palette. Channel colours: own shop blue, Marketvine pink, Tradewick orange. */
:root {
  --ink: #14142b; --muted: #6e7191; --line: #e4e6f0; --bg: #f5f6fb; --paper: #fff;
  --blue: #3d5afe; --pink: #ff2e7e; --orange: #ff9800; --green: #00b37e; --yellow: #ffb400; --red: #ff3b30;
  --grey: #9aa0b5; --soft-blue: #eef1ff; --soft-pink: #fff0f6;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); }
.muted { color: var(--muted); }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 6px 0 4px; }
h1 small { font-size: 14px; color: var(--muted); font-weight: 500; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 8px; }
.lede { color: var(--muted); max-width: 780px; margin: 0 0 16px; }

/* top bar */
.top { display: flex; align-items: center; gap: 22px; padding: 0 24px; height: 54px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand i { display: inline-block; width: 26px; height: 14px; border-top: 3px solid var(--blue); border-bottom: 3px solid var(--pink); position: relative; }
.brand i::after { content: ""; position: absolute; left: 10px; top: -1px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
nav { display: flex; gap: 4px; }
nav a { padding: 6px 11px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
nav a:hover { background: var(--bg); color: var(--ink); }
nav a.on { background: var(--ink); color: #fff; }
.count { background: var(--yellow); color: var(--ink); border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
nav a.on .count { color: var(--ink); }
.clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; }
.retailer { color: var(--muted); font-size: 12px; }
main { padding: 14px 24px 18px; }
footer { display: flex; justify-content: space-between; padding: 8px 24px 14px; color: var(--grey); font-size: 11.5px; }

/* buttons and forms */
button, .btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--ink); color: #fff; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ok { background: var(--green); }
.btn.no { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
input, select { font: inherit; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px; background: #fff; }
form { margin: 0; }

/* play bar */
.playbar { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 16px; padding: 10px 16px; box-shadow: 0 1px 0 var(--line); }
.btn-play { width: 42px; height: 42px; padding: 0; font-size: 15px; background: linear-gradient(135deg, var(--blue), var(--pink)); }
.clockface b { display: block; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.clockface span { font-size: 11px; color: var(--muted); }
.speeds { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.speeds button { background: transparent; color: var(--muted); padding: 5px 10px; }
.speeds button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 20, 43, .15); }
.track { flex: 1; position: relative; height: 8px; border-radius: 4px; background: var(--line); margin: 0 6px 12px; }
.track .fill { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--pink), var(--orange)); transition: width .9s linear; }
.track span { position: absolute; top: 11px; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.mode { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.mode.live { background: var(--soft-pink); color: var(--pink); }

/* the yard */
.yardwrap { display: grid; grid-template-columns: 1fr 350px; gap: 16px; margin-top: 12px; }
.yard { background: var(--paper); border-radius: 18px; padding: 12px 16px 8px; }
.yard svg { width: 100%; height: auto; display: block; overflow: visible; }
.platform { fill: var(--bg); }
.rail { stroke: #c9cde0; stroke-width: 1.4; }
.sleeper { stroke: #e9ebf4; stroke-width: 1.2; }
.node { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.chan { font-size: 13px; font-weight: 800; fill: var(--ink); }
.chan-sub { font-size: 10.5px; fill: var(--muted); }
.st-name { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; fill: var(--muted); }
.st-total { font-size: 25px; font-weight: 900; fill: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.st-arrived { font-size: 10.5px; fill: var(--green); font-weight: 700; }
.st-chan { font-size: 9.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.dot { transition: transform .95s cubic-bezier(.4, .1, .3, 1), opacity .6s; opacity: .9; }
.dot.enter { opacity: 0; }
.dot.leave { opacity: 0; }
.section { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; fill: var(--muted); }
.section-sub { font-size: 10.5px; fill: var(--grey); }
.switch { fill: none; stroke: #d7dae8; stroke-width: 1.4; }
.siding { stroke: #d7dae8; stroke-width: 1.4; stroke-dasharray: 2 3; }
.hour { stroke: #eef0f6; }
.hour-label { font-size: 10px; fill: var(--grey); }
.nowline { stroke: var(--pink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rail-title { font-size: 11.5px; font-weight: 800; fill: var(--ink); }
.rail-sub { font-size: 10px; fill: var(--muted); }
.x-dot { stroke: #fff; stroke-width: 1.5; }
.x-dot.ask { stroke: var(--ink); stroke-width: 1.5; }
.tag { fill: var(--ink); }
.tag-text { font-size: 10.5px; fill: #fff; font-weight: 600; }
.tag-pin { stroke: var(--ink); stroke-width: 1.5; }
.pull { transition: transform 1.6s cubic-bezier(.5, 0, .2, 1), opacity 1.6s; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(255, 46, 126, .6)); }
.pull.landed { opacity: 0; }
.empty { font-size: 12px; fill: var(--muted); }
.legend { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
.legend i, .feed i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 2px 0 6px; vertical-align: middle; }

/* side column */
.side h2:first-child { margin-top: 2px; }
.gauge { display: flex; gap: 10px; align-items: center; background: var(--paper); border-radius: 14px; padding: 9px 12px; margin-bottom: 8px; font-size: 11.5px; line-height: 1.4; }
.dial { width: 84px; flex: none; }
.arc-bg { fill: none; stroke: var(--bg); stroke-width: 9; stroke-linecap: round; }
.arc-bg.thin { stroke-width: 6; }
.arc-stock { fill: none; stroke: var(--blue); stroke-width: 9; stroke-linecap: round; }
.arc-pick { fill: none; stroke-width: 6; stroke-linecap: round; }
.dial-num { font-size: 17px; font-weight: 900; fill: var(--ink); }
.dial-sub { font-size: 8px; fill: var(--muted); }
.g-text b { font-size: 13px; }
.pick { font-weight: 700; }
.g-receipt { display: block; margin-top: 3px; font-size: 11px; background: var(--soft-blue); border-radius: 6px; padding: 2px 6px; text-decoration: none; }
.feed { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 14px; }
.feed li { padding: 7px 12px 7px 26px; border-bottom: 1px solid var(--bg); font-size: 12px; position: relative; }
.feed li i { position: absolute; left: 4px; top: 12px; }
.feed a { color: var(--ink); text-decoration: none; }
.feed small { display: block; color: var(--muted); font-size: 10.5px; }

/* tables, cards, pills (the other screens) */
.panel { background: var(--paper); border-radius: 16px; padding: 14px 18px; margin-bottom: 14px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--bg); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
td code, .call { font-size: 11.5px; background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.auto_done, .pill.approved, .pill.shadow { background: #e3f8ef; color: #00865e; }
.pill.escalated { background: #fff5d6; color: #8a6100; }
.pill.rolled_back, .pill.failed { background: #ffe6e4; color: #c4251c; }
.pill.rejected, .pill.declined { background: #eef0f6; color: var(--muted); }
.tier { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; }
.tier.t0 { background: var(--green); } .tier.t1 { background: var(--blue); } .tier.t2 { background: var(--yellow); color: var(--ink); } .tier.t3 { background: var(--red); }
.kindchip { font-weight: 700; }
.filters { display: flex; gap: 8px; margin: 6px 0 12px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 10px 0 14px; }
.stat { background: var(--paper); border-radius: 16px; padding: 12px 16px; }
.stat b { display: block; font-size: 30px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.blue b { color: var(--blue); } .stat.pink b { color: var(--pink); } .stat.green b { color: var(--green); } .stat.orange b { color: var(--orange); }
.bar { position: relative; height: 10px; background: var(--bg); border-radius: 5px; min-width: 120px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.bar.p i { background: var(--blue); } .bar.r i { background: var(--pink); }
.weakest { background: #fff5d6; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.error { background: #ffe6e4; color: #c4251c; border-radius: 10px; padding: 8px 12px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--paper); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .meta { font-size: 11.5px; color: var(--muted); }
.card.term { border-top: 4px solid var(--blue); }
.card.term.two { border-top-color: var(--pink); }
.card.term.det { border-top-color: var(--orange); }
.ticket { display: grid; grid-template-columns: 1fr 260px; gap: 16px; background: var(--paper); border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; border-left: 6px solid var(--yellow); }
.ticket h3 { margin: 0 0 6px; font-size: 16px; }
.ticket form { display: flex; gap: 6px; margin-bottom: 6px; }
.ticket form input { flex: 1; min-width: 0; }
.facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.cols2 > * { min-width: 0; }
pre { background: #14142b; color: #e8eaff; padding: 12px 14px; overflow: auto; font-size: 11.5px; border-radius: 12px; }
.askbox { display: flex; gap: 8px; margin: 8px 0 10px; }
.askbox input { flex: 1; font-size: 16px; padding: 11px 14px; border-radius: 999px; }
.askbox button { padding: 0 22px; background: linear-gradient(135deg, var(--blue), var(--pink)); }
.chips a { display: inline-block; margin: 0 6px 6px 0; padding: 5px 11px; border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 12.5px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.answer { font-size: 18px; font-weight: 700; }
.doc { max-width: 900px; background: var(--paper); border-radius: 18px; padding: 8px 34px 24px; }
.doc h1 { font-size: 28px; } .doc h2 { font-size: 14px; color: var(--pink); }
.doc table { margin: 10px 0; }
.doc pre { white-space: pre-wrap; }
