:root {
  color-scheme: dark;
  --bg: #061013;
  --bg-2: #09171b;
  --panel: rgba(12, 28, 33, .82);
  --panel-strong: rgba(13, 32, 38, .96);
  --line: rgba(145, 207, 213, .14);
  --line-strong: rgba(145, 222, 222, .28);
  --text: #effffd;
  --muted: #89a6aa;
  --muted-2: #5e797e;
  --accent: #30e2c0;
  --accent-bright: #79ffe4;
  --accent-dark: #073a34;
  --blue: #6ec7ff;
  --amber: #ffba68;
  --red: #ff7f8f;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .36);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --display: "Avenir Next", "SF Pro Display", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(900px 620px at 92% -10%, rgba(35, 183, 165, .14), transparent 62%),
    radial-gradient(700px 500px at -15% 65%, rgba(28, 105, 121, .12), transparent 66%),
    linear-gradient(150deg, #071316 0%, #061013 48%, #081417 100%);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
[hidden] { display: none !important; }

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 35, 40, .88), rgba(8, 21, 25, .82));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .025);
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.muted { color: var(--muted); line-height: 1.55; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 0 5px rgba(48, 226, 192, .1), 0 0 16px var(--accent); animation: pulse 2.3s infinite; }
@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 0 9px transparent; } }

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s, background .18s, box-shadow .18s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button svg { width: 19px; height: 19px; }
.button--primary { color: #031d19; background: linear-gradient(135deg, #76ffe2, #24d7b6); box-shadow: 0 10px 28px rgba(39, 222, 188, .18); }
.button--primary:hover { box-shadow: 0 13px 34px rgba(39, 222, 188, .27); }
.button--ghost { border-color: var(--line); background: rgba(15, 39, 44, .72); }
.button--ghost:hover { border-color: var(--line-strong); background: rgba(22, 50, 55, .85); }
.button--danger { border-color: rgba(255, 127, 143, .23); color: #ffb0ba; background: rgba(79, 23, 32, .42); }
.button--wide { width: 100%; }
.button--location { min-width: 169px; justify-content: flex-start; background: linear-gradient(135deg, rgba(48, 226, 192, .18), rgba(30, 116, 105, .11)); border-color: rgba(48, 226, 192, .25); }
.button--location svg { color: var(--accent); }
.button--location span { margin-right: auto; }
.button--location small { display: block; color: var(--muted); font-size: 9px; font-weight: 600; }
.button--location.locating svg { animation: locate 1.1s linear infinite; }
@keyframes locate { to { transform: rotate(360deg); } }

.icon-button, .round-button, .avatar-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(13, 32, 37, .66);
  cursor: pointer;
}
.icon-button svg, .round-button svg { width: 19px; height: 19px; }
.icon-button:hover, .round-button:hover { border-color: var(--line-strong); background: rgba(22, 48, 53, .92); }
.round-button.active { color: var(--amber); border-color: rgba(255, 186, 104, .36); background: rgba(255, 186, 104, .08); }

/* Login */
.login-view { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 30px 18px; overflow: hidden; }
.login-view::before, .login-view::after { content: ""; position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.login-view::before { width: 430px; height: 430px; right: -150px; top: -120px; border: 1px solid rgba(62, 224, 200, .16); box-shadow: inset 0 0 90px rgba(47, 221, 193, .07), 0 0 120px rgba(44, 172, 158, .05); }
.login-view::after { width: 270px; height: 270px; left: -120px; bottom: -50px; border: 1px solid rgba(76, 160, 178, .12); }
.login-card { width: min(510px, 100%); padding: clamp(28px, 6vw, 50px); border-radius: 32px; position: relative; overflow: hidden; }
.login-card::after { content: ""; position: absolute; top: 0; left: 15%; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .75; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #03241f; background: linear-gradient(145deg, #7affe4, #25d2b2); box-shadow: 0 8px 30px rgba(38, 219, 184, .2); }
.brand-mark svg { width: 27px; height: 27px; stroke-width: 2.2; }
.brand-mark--large { width: 68px; height: 68px; border-radius: 21px; margin-bottom: 28px; }
.brand-mark--large svg { width: 39px; height: 39px; }
.login-card h1 { margin: 0; font-size: clamp(38px, 8vw, 56px); line-height: .98; letter-spacing: -.05em; }
.login-card h1 span { color: transparent; background: linear-gradient(90deg, #eafffb, #83cfc5); background-clip: text; -webkit-background-clip: text; }
.login-copy { max-width: 410px; margin: 21px 0 32px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.login-form label, .settings-card label, .route-card label { display: block; color: #b9d1d3; font-size: 12px; font-weight: 750; }
.password-field { position: relative; margin-top: 9px; }
.password-field input { padding-right: 55px; }
.password-field .icon-button { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; }
input, select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 15px;
  color: var(--text);
  background: rgba(4, 14, 17, .74);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus { border-color: rgba(48, 226, 192, .55); box-shadow: 0 0 0 4px rgba(48, 226, 192, .08); background: rgba(5, 18, 21, .95); }
input::placeholder { color: #526d72; }
.login-form .button { margin-top: 13px; min-height: 54px; }
.form-error { min-height: 20px; margin: 8px 0 0; color: #ff9ca9; font-size: 12px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 28px; color: var(--muted-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.trust-row span { display: flex; align-items: center; gap: 6px; }
.trust-row i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Shell */
.app-shell { min-height: 100vh; padding-top: 79px; }
.topbar { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 79px; padding: env(safe-area-inset-top, 0) clamp(18px, 4vw, 56px) 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(5, 15, 18, .82); backdrop-filter: blur(24px) saturate(130%); -webkit-backdrop-filter: blur(24px) saturate(130%); }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 12px; }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.desktop-nav { height: 100%; display: flex; gap: 4px; align-items: center; }
.nav-link { height: 43px; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 8px; padding: 0 15px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { color: #cbe4e3; background: rgba(133, 198, 202, .06); }
.nav-link.active { color: var(--accent-bright); background: rgba(48, 226, 192, .09); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.avatar-button { color: #092924; border-color: rgba(89, 255, 225, .6); background: linear-gradient(145deg, #7affe4, #2bd8b8); font-size: 11px; font-weight: 950; }
.status-pill { height: 34px; border: 1px solid var(--line); border-radius: 99px; display: flex; align-items: center; gap: 7px; padding: 0 12px; color: #95b2b5; background: rgba(9, 24, 28, .75); font-size: 10px; }
.status-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status-pill.offline span { background: var(--red); box-shadow: 0 0 10px var(--red); }
.workspace { width: min(1560px, 100%); margin: 0 auto; padding: clamp(18px, 3vw, 42px) clamp(16px, 3.5vw, 52px) 70px; }
.panel { display: none; animation: panel-in .28s ease both; }
.panel.active { display: block; }
@keyframes panel-in { from { opacity: 0; transform: translateY(7px); } }
.mobile-nav { display: none; }

/* Monitor */
.monitor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.primary-column, .side-column { display: grid; gap: 22px; }
.hero-card, .board-card, .locator-card, .insight-card, .source-card { border-radius: var(--radius); }
.hero-card { min-height: 227px; padding: clamp(22px, 3vw, 34px); position: relative; overflow: visible; }
.hero-glow { position: absolute; z-index: -1; inset: -1px; overflow: hidden; border-radius: inherit; pointer-events: none; }
.hero-glow::before { content: ""; position: absolute; width: 470px; height: 270px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(46, 226, 191, .17), transparent 70%); }
.hero-top { display: flex; justify-content: space-between; gap: 25px; }
.hero-top h1 { margin: 0; max-width: 780px; font-size: clamp(27px, 3.1vw, 43px); line-height: 1.08; letter-spacing: -.045em; }
.stop-heading-row { display: flex; align-items: center; gap: 14px; }
.stop-heading-row p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.clock-block { min-width: 108px; text-align: right; }
.clock-block strong { display: block; font-family: var(--mono); font-size: 29px; letter-spacing: -.06em; }
.clock-block span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.command-row { position: relative; z-index: 6; margin-top: 30px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; }
.search-wrap { position: relative; }
.search-wrap > svg { position: absolute; z-index: 2; left: 15px; top: 15px; width: 20px; height: 20px; color: #769196; pointer-events: none; }
.search-wrap input { min-height: 50px; padding: 0 57px 0 45px; background: rgba(5, 17, 20, .82); }
.search-wrap kbd { position: absolute; top: 13px; right: 12px; min-width: 30px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255,255,255,.025); font: 10px var(--mono); text-align: center; }
.search-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); max-height: 380px; overflow: auto; padding: 7px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(7, 21, 25, .98); box-shadow: 0 24px 55px rgba(0,0,0,.55); }
.search-item, .choice-item { width: 100%; border: 0; border-radius: 12px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 10px; text-align: left; background: transparent; cursor: pointer; }
.search-item:hover, .choice-item:hover { background: rgba(48, 226, 192, .07); }
.search-item .stop-icon, .choice-item .stop-icon { width: 38px; height: 38px; border: 1px solid rgba(48, 226, 192, .18); border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: rgba(48, 226, 192, .06); }
.stop-icon svg { width: 18px; height: 18px; }
.search-item strong, .choice-item strong { display: block; font-size: 12px; }
.search-item small, .choice-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.provider-tag { border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }

.board-card { overflow: hidden; }
.section-head { padding: 22px 23px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.board-head { align-items: center; border-bottom: 1px solid var(--line); }
.board-controls { display: flex; align-items: center; gap: 13px; }
.mini-select { height: 34px; border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 8px; align-items: center; padding: 0 10px; background: rgba(8, 24, 28, .78); font-size: 10px; font-weight: 750; cursor: pointer; }
.mini-select svg { width: 14px; height: 14px; }
.updated-label { color: var(--muted-2); font: 9px var(--mono); }
.filter-row { display: flex; gap: 7px; overflow-x: auto; padding: 14px 20px 13px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; height: 31px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; color: var(--muted); background: rgba(9, 25, 29, .6); font-size: 10px; font-weight: 780; cursor: pointer; }
.filter-chip.active { color: #04251f; border-color: transparent; background: var(--accent); }
.board-columns { display: grid; grid-template-columns: 84px minmax(190px, 1fr) 90px 135px 42px; gap: 12px; padding: 10px 22px; color: #587278; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.board-columns span:nth-child(4) { text-align: right; }
.departure-row { min-height: 81px; display: grid; grid-template-columns: 84px minmax(190px, 1fr) 90px 135px 42px; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid rgba(140, 202, 208, .085); transition: background .16s; }
.departure-row:hover { background: rgba(65, 174, 164, .035); }
.departure-row.cancelled { opacity: .58; }
.line-badge { width: max-content; min-width: 52px; max-width: 80px; height: 34px; border-radius: 10px; display: grid; place-items: center; padding: 0 8px; overflow: hidden; color: #05221e; background: var(--accent); font-size: 12px; font-weight: 950; white-space: nowrap; }
.line-badge[data-mode="bus"] { color: #061b2a; background: #76c8ff; }
.line-badge[data-mode="tram"] { color: #2a1700; background: #ffc76f; }
.line-badge[data-mode="subway"] { color: #fff; background: #3975d5; }
.line-badge[data-mode="suburban"] { color: #fff; background: #24904f; }
.line-badge[data-mode="regional"] { color: #fff; background: #cf394c; }
.line-badge[data-mode="train"] { color: #fff; background: #b73d51; }
.departure-direction { min-width: 0; }
.departure-direction strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.departure-direction small { display: flex; gap: 6px; align-items: center; margin-top: 5px; color: var(--muted); font-size: 9px; }
.realtime-mark { color: var(--accent); }
.platform { width: max-content; min-width: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; color: #bed6d7; background: rgba(255,255,255,.025); font: 10px var(--mono); text-align: center; }
.platform.changed { color: var(--amber); border-color: rgba(255,186,104,.25); }
.departure-time { text-align: right; }
.departure-time strong { display: block; font: 800 19px var(--mono); letter-spacing: -.06em; }
.departure-time strong.now { color: var(--accent-bright); }
.departure-time small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.delay { color: var(--amber) !important; }
.on-time { color: var(--accent) !important; }
.cancel-label { color: var(--red) !important; font-weight: 850; }
.alarm-button { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 11px; display: grid; place-items: center; color: #789397; background: transparent; cursor: pointer; }
.alarm-button:hover { color: var(--accent); border-color: var(--line); background: rgba(48,226,192,.06); }
.alarm-button svg { width: 18px; height: 18px; }
.empty-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-state h3 { margin: 18px 0 4px; color: #cce1e1; font-size: 15px; }
.empty-state p { max-width: 340px; margin: 0; font-size: 12px; line-height: 1.55; }
.empty-orbit { width: 58px; height: 58px; border: 1px solid rgba(48,226,192,.22); border-radius: 50%; display: grid; place-items: center; position: relative; }
.empty-orbit::before { content:""; position:absolute; width: 36px; height:36px; border:1px solid rgba(48,226,192,.14); border-radius:50%; }
.empty-orbit span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.empty-orbit i { position: absolute; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); transform-origin: 3px 32px; animation: orbit 3s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.skeleton-row { min-height: 81px; display: grid; grid-template-columns: 72px 1fr 100px; align-items: center; gap: 15px; padding: 12px 22px; border-top: 1px solid var(--line); }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, rgba(110,160,165,.05), rgba(110,160,165,.13), rgba(110,160,165,.05)); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.skeleton:first-child { height: 34px; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* Side */
.locator-card { min-height: 446px; overflow: hidden; }
.accuracy-badge { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--muted); font: 9px var(--mono); }
.accuracy-badge.good { color: var(--accent); border-color: rgba(48,226,192,.27); }
.accuracy-badge.medium { color: var(--amber); border-color: rgba(255,186,104,.25); }
.radar { height: 188px; margin: 0 20px 17px; border: 1px solid rgba(93,171,176,.13); border-radius: 18px; position: relative; overflow: hidden; background: radial-gradient(circle, rgba(49,221,192,.07), transparent 59%), rgba(4,14,17,.58); }
.radar-grid { position: absolute; inset: -20%; background-image: linear-gradient(rgba(100,175,182,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(100,175,182,.055) 1px, transparent 1px); background-size: 28px 28px; transform: perspective(330px) rotateX(24deg); }
.radar::before, .radar::after { content:""; position:absolute; border:1px solid rgba(48,226,192,.10); border-radius:50%; left:50%; top:50%; transform:translate(-50%,-50%); }
.radar::before { width: 110px; height: 110px; }
.radar::after { width: 170px; height: 170px; }
.radar-center { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 25px; height: 25px; border: 1px solid rgba(48,226,192,.3); border-radius: 50%; display:grid;place-items:center;background:rgba(6,23,24,.7); }
.radar-center span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow:0 0 15px var(--accent); }
.radar-point { position:absolute; z-index:4; width:12px;height:12px;border:2px solid #071416;border-radius:50%;background:var(--blue);box-shadow:0 0 0 3px rgba(110,199,255,.14),0 0 14px rgba(110,199,255,.5); transform:translate(-50%,-50%); }
.radar-point:first-of-type { background:var(--accent);box-shadow:0 0 0 3px rgba(48,226,192,.14),0 0 14px rgba(48,226,192,.5); }
.radar-empty { position:absolute;z-index:5;left:50%;bottom:14px;transform:translateX(-50%);width:max-content;color:var(--muted-2);font-size:9px; }
.candidate-list { padding: 0 20px 20px; }
.candidate-list > .muted { margin: 0; font-size: 10px; }
.candidate-mini { width:100%; min-height:54px; border:0; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr auto;gap:10px;align-items:center;padding:10px 2px;text-align:left;background:transparent;cursor:pointer; }
.candidate-mini strong { display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.candidate-mini small { display:block;margin-top:3px;color:var(--muted);font-size:9px; }
.candidate-mini > span:last-child { color:#b9d1d1;font:10px var(--mono); }
.candidate-mini.selected strong { color:var(--accent-bright); }
.insight-card { padding: 21px; position: relative; overflow:hidden; }
.insight-card::after { content:"";position:absolute;width:180px;height:180px;right:-100px;top:-100px;border-radius:50%;background:rgba(48,226,192,.08);filter:blur(18px); }
.insight-icon, .settings-icon { width:43px;height:43px;border:1px solid rgba(48,226,192,.22);border-radius:13px;display:grid;place-items:center;color:var(--accent);background:rgba(48,226,192,.07); }
.insight-icon svg, .settings-icon svg { width:21px;height:21px; }
.insight-card .eyebrow { margin-top:17px; }
.insight-card h3 { margin:0;font-size:15px; }
.insight-card p:not(.eyebrow) { margin:8px 0 14px;color:var(--muted);font-size:10px;line-height:1.55; }
.text-button { border:0;display:inline-flex;align-items:center;gap:7px;padding:0;color:var(--accent);background:transparent;font-size:10px;font-weight:800;cursor:pointer; }
.text-button svg { width:14px;height:14px; }
.text-button--standalone { margin-top: 15px; }
.source-card { display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:10px;padding:15px 16px; }
.source-card > div { display:grid;grid-template-columns:10px 1fr;column-gap:7px; }
.source-card strong { font-size:10px; }
.source-card small { grid-column:2;color:var(--muted-2);font-size:8px;margin-top:2px; }
.source-dot { width:6px;height:6px;margin-top:3px;border-radius:50%;background:#6b8589; }
.source-dot--live { background:var(--accent);box-shadow:0 0 8px var(--accent); }

/* Secondary pages */
.page-head { max-width: 830px; margin: 18px 0 28px; }
.page-head h1 { margin:0;font-size:clamp(34px,5vw,58px);letter-spacing:-.055em;line-height:1; }
.page-head > p:last-child, .page-head > div > p:last-child { margin:12px 0 0;color:var(--muted);font-size:14px; }
.page-head--actions { max-width:none;display:flex;justify-content:space-between;align-items:flex-end;gap:20px; }
.route-layout { display:grid;grid-template-columns:minmax(340px, 480px) 1fr;gap:23px;align-items:start; }
.route-card { border-radius:var(--radius);padding:28px;position:relative; }
.route-card > label { margin:0 0 18px;padding-left:30px; }
.route-card > label input { margin-top:8px; }
.route-line { position:absolute;left:37px;top:60px;height:99px;width:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between; }
.route-line span { width:10px;height:10px;border:2px solid var(--accent);border-radius:50%;background:#071619; }
.route-line span:last-child { border-radius:2px;border-color:var(--blue); }
.route-line i { position:absolute;top:10px;bottom:10px;width:1px;background:linear-gradient(var(--accent),var(--blue)); }
.route-current { margin:-10px 0 18px 30px;border:0;padding:0;color:var(--accent);background:transparent;font-size:10px;font-weight:800;cursor:pointer; }
.route-options { display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:10px;margin:22px 0; }
.route-options label input, .route-options label select { margin-top:8px;min-height:46px;font-size:11px; }
.journey-results { display:grid;gap:12px; }
.journey-results .empty-state { border-radius:var(--radius); }
.journey-card { border-radius:18px;padding:19px 20px; }
.journey-summary { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px; }
.journey-summary .times { display:flex;align-items:center;gap:12px;font:850 20px var(--mono);letter-spacing:-.05em; }
.journey-summary .times i { width:38px;height:1px;background:var(--line-strong);position:relative; }
.journey-summary .times i::after { content:"";position:absolute;right:0;top:-2px;width:5px;height:5px;border-top:1px solid var(--muted);border-right:1px solid var(--muted);transform:rotate(45deg); }
.journey-summary small { color:var(--muted);font-size:10px; }
.leg { display:grid;grid-template-columns:72px 1fr;gap:12px;padding:11px 0;border-top:1px solid var(--line); }
.leg-line { width:max-content;max-width:68px;border-radius:8px;padding:5px 7px;color:#06211d;background:var(--accent);font-size:9px;font-weight:900; }
.leg-line.walk { color:var(--muted);border:1px solid var(--line);background:transparent; }
.leg strong { font-size:11px; }.leg small{display:block;margin-top:3px;color:var(--muted);font-size:9px;line-height:1.45;}
.card-list { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px; }
.list-card { min-height:180px;border-radius:20px;padding:22px;display:flex;flex-direction:column;position:relative; }
.list-card h3 { margin:0 40px 6px 0;font-size:17px; }.list-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.5;}
.list-card .card-icon { width:38px;height:38px;margin-bottom:18px;border-radius:11px;display:grid;place-items:center;color:var(--accent);background:rgba(48,226,192,.08); }
.list-card .card-icon svg { width:19px;height:19px; }
.list-card .card-actions { margin-top:auto;padding-top:18px;display:flex;gap:8px; }
.list-card .delete-card { position:absolute;right:13px;top:13px; }
.empty-card { grid-column:1/-1;min-height:250px;border:1px dashed var(--line-strong);border-radius:var(--radius);display:grid;place-items:center;padding:30px;color:var(--muted);text-align:center; }
.toggle { width:42px;height:24px;border:0;border-radius:99px;padding:3px;background:#263d41;cursor:pointer; }
.toggle::before { content:"";display:block;width:18px;height:18px;border-radius:50%;background:#7f999d;transition:transform .2s,background .2s; }
.toggle.on { background:rgba(48,226,192,.25); }.toggle.on::before{transform:translateX(18px);background:var(--accent);}
.settings-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px; }
.settings-card { border-radius:var(--radius);padding:27px; }
.settings-card h2 { margin:19px 0 7px;font-size:20px; }.settings-card>p{min-height:45px;margin:0 0 19px;color:var(--muted);font-size:11px;line-height:1.55;}
.settings-card form { display:grid;gap:12px; }.settings-card label input{margin-top:7px;min-height:46px;}
.accent-card { border-color:rgba(48,226,192,.25);background:linear-gradient(145deg,rgba(14,48,48,.9),rgba(8,25,28,.86));}
.copy-field { min-height:49px;margin-bottom:12px;border:1px solid var(--line);border-radius:13px;display:flex;align-items:center;gap:10px;padding:5px 5px 5px 13px;background:rgba(4,14,17,.63); }
.copy-field code { min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#b9d4d4;font:10px var(--mono); }.copy-field .icon-button{border:0;background:transparent;}
.attribution { display:block;margin-top:16px;color:var(--muted-2);font-size:9px;line-height:1.55; }.attribution a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;}

/* Dialog and feedback */
.dialog { width:min(570px,calc(100% - 28px));max-height:min(760px,calc(100dvh - 35px));overflow:auto;border-radius:26px;padding:28px;color:var(--text); }
.dialog::backdrop { background:rgba(0,8,10,.76);backdrop-filter:blur(8px); }
.dialog h2 { margin:0;font-size:27px;letter-spacing:-.04em; }.dialog>.muted{font-size:12px;margin:10px 35px 20px 0;}
.dialog-close { position:absolute;right:14px;top:14px; }.choice-list{display:grid;gap:6px;}.choice-item{grid-template-columns:42px 1fr auto;padding:12px;border:1px solid var(--line);background:rgba(4,16,19,.48);}
.choice-item .distance { color:var(--accent);font:11px var(--mono); }
.dialog fieldset { border:0;margin:23px 0;padding:0; }.dialog legend{margin-bottom:10px;color:#c5dada;font-size:12px;font-weight:750;}
.lead-options { display:grid;grid-template-columns:repeat(4,1fr);gap:7px; }.lead-options input{position:absolute;opacity:0;pointer-events:none;}.lead-options span{height:45px;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;color:var(--muted);background:rgba(4,16,19,.58);font-size:11px;font-weight:800;cursor:pointer;}.lead-options input:checked+span{color:#04241e;border-color:transparent;background:var(--accent);}
.toast-stack { position:fixed;z-index:100;right:20px;bottom:20px;bottom:calc(20px + var(--safe-bottom));display:grid;gap:9px;width:min(370px,calc(100% - 40px));pointer-events:none; }
.toast { border:1px solid var(--line-strong);border-radius:14px;display:grid;grid-template-columns:8px 1fr;gap:11px;align-items:center;padding:13px 15px;color:#dff5f3;background:rgba(9,28,32,.97);box-shadow:0 18px 45px rgba(0,0,0,.5);font-size:11px;line-height:1.4;animation:toast-in .25s ease both; }.toast::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 9px var(--accent);}.toast.error::before{background:var(--red);box-shadow:0 0 9px var(--red);}.toast.warn::before{background:var(--amber);box-shadow:0 0 9px var(--amber);}@keyframes toast-in{from{opacity:0;transform:translateY(8px)}}

@media (max-width: 1120px) {
  .desktop-nav .nav-link { padding:0 10px; }.desktop-nav .nav-link svg{display:none;}
  .monitor-grid { grid-template-columns:minmax(0,1fr) 310px; }.board-columns,.departure-row{grid-template-columns:72px minmax(155px,1fr) 65px 115px 38px;}
}

@media (max-width: 880px) {
  .app-shell { padding-top:70px;padding-bottom:calc(76px + var(--safe-bottom)); }
  .topbar { height:70px;grid-template-columns:1fr auto;padding-left:17px;padding-right:17px; }.desktop-nav{display:none;}.status-pill{display:none;}
  .workspace { padding:18px 14px 36px; }.monitor-grid{grid-template-columns:1fr;}.side-column{grid-template-columns:1fr 1fr;}.locator-card{grid-row:span 2;}.source-card{align-self:start;}
  .mobile-nav { position:fixed;z-index:50;left:10px;right:10px;bottom:10px;bottom:calc(10px + var(--safe-bottom));height:64px;border:1px solid var(--line-strong);border-radius:20px;display:grid;grid-template-columns:repeat(5,1fr);padding:5px;background:rgba(6,19,22,.93);box-shadow:0 18px 55px rgba(0,0,0,.55);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px); }
  .mobile-nav button { border:0;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#668287;background:transparent;font-size:8px;font-weight:750;cursor:pointer; }.mobile-nav svg{width:20px;height:20px;}.mobile-nav button.active{color:var(--accent);background:rgba(48,226,192,.07);}
  .route-layout{grid-template-columns:1fr;}.card-list{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width: 620px) {
  :root { --radius:20px; }
  .brand-mark{width:39px;height:39px;border-radius:13px;}.brand-mark svg{width:24px;height:24px;}.brand small{display:none;}
  .workspace{padding-left:10px;padding-right:10px;}.hero-card{padding:21px 17px;min-height:unset;}.hero-top{display:block;}.clock-block{position:absolute;top:19px;right:17px;}.clock-block strong{font-size:22px;}.clock-block span{display:none;}.hero-top h1{max-width:calc(100% - 88px);font-size:28px;}.stop-heading-row{align-items:flex-start;}.stop-heading-row .round-button{width:37px;height:37px;}
  .command-row{margin-top:25px;grid-template-columns:1fr auto;}.button--location{grid-column:1/-1;min-width:0;}.button--location small{margin-left:auto;}.search-wrap kbd{display:none;}.search-wrap input{padding-right:14px;}.command-row>.button--ghost{width:48px;padding:0;}.command-row>.button--ghost span{display:none;}
  .board-head{padding:18px 16px 13px;}.updated-label{display:none;}.filter-row{padding-left:14px;padding-right:14px;}.board-columns{display:none;}.departure-row{grid-template-columns:56px minmax(0,1fr) auto 35px;gap:9px;padding:12px 14px;min-height:76px;}.line-badge{min-width:49px;max-width:56px;height:32px;font-size:11px;}.platform{display:none;}.departure-direction strong{font-size:12px;}.departure-time strong{font-size:16px;}.departure-time small{font-size:8px;}.alarm-button{width:34px;height:34px;}.skeleton-row{grid-template-columns:58px 1fr 80px;padding:12px 14px;}
  .side-column{grid-template-columns:1fr;}.locator-card{grid-row:auto;}.insight-card,.source-card{display:none;}
  .page-head{margin:8px 5px 22px;}.page-head h1{font-size:38px;}.page-head--actions{display:block;}.page-head--actions .button{margin-top:17px;width:100%;}.route-card{padding:23px 17px;}.route-card>label{padding-left:26px;}.route-line{left:25px;}.route-current{margin-left:26px;}.route-options{grid-template-columns:1fr 1fr;}.route-options label:first-child{grid-column:1/-1;}
  .card-list,.settings-grid{grid-template-columns:1fr;}.settings-card{padding:22px 19px;}.list-card{min-height:165px;}.lead-options{grid-template-columns:repeat(2,1fr);}.dialog{padding:26px 18px;}.choice-item{grid-template-columns:38px 1fr auto;}
  .toast-stack{right:12px;bottom:88px;bottom:calc(88px + var(--safe-bottom));width:calc(100% - 24px);}
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;} }
