/* Abfahrtsmonitor – Fahrgastansicht (mobil) und Leitstelle */
:root { --accent: #1456b8; --accent-soft: #e2ecfb; --brand: #123a6b; --amber: #8a5a00; }
@media (prefers-color-scheme: dark) { :root { --accent: #6aa5f5; --accent-ink: #06203f; --accent-soft: #162c4a; --brand: #0d2747; --amber: #ffbf3c; } }
.toast-host { bottom: 24px; }

.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
.top .inner { max-width: 720px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; gap: 12px; }
.top h1 { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sub { opacity: 0.8; font-size: 0.82rem; }
.top .btn { min-height: 38px; background: rgba(255, 255, 255, 0.12); border-color: transparent; color: #fff; padding: 0 12px; }
.top .btn[aria-pressed="true"] { background: #ffbf3c; color: #201400; }
.page { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 14px; }
.wide .inner, .page.wide { max-width: 1200px; }

.stoplist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stoplist a { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.stoplist a:last-child { border-bottom: 0; }
.stoplist a:hover { background: var(--surface-2); }
.stoplist .name { font-weight: 600; flex: 1; min-width: 0; }
.stoplist .lines { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.linie { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; color: #fff; font-weight: 750; font-size: 0.85rem; }
.linie.sm { min-width: 26px; height: 20px; font-size: 0.72rem; border-radius: 5px; }

.deps { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.deps li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.deps li:last-child { border-bottom: 0; }
.deps .ziel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deps .meta { font-size: 0.8rem; color: var(--muted); }
.deps .when { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deps .when small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--amber); }
.deps li.cancelled .ziel { text-decoration: line-through; color: var(--muted); }
.deps li.cancelled .when { color: var(--crit); }

.msg { border-left: 5px solid var(--accent); }
.msg.stoerung, .msg.ausfall { border-left-color: #e0a100; }
.msg h3 { font-size: 0.98rem; }
.msg p { font-size: 0.9rem; color: var(--text-2); margin-top: 4px; }

/* Leitstelle */
.login { max-width: 400px; margin: 0 auto; padding: 14vh 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav .inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; }
.nav button { flex: none; border: 0; background: none; padding: 13px 14px 11px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .cols2 { grid-template-columns: minmax(0, 1fr); } }
.card { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 0.88rem; font-weight: 600; }
.chips input { position: absolute; opacity: 0; }
.chips label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.formgrid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .formgrid { grid-template-columns: 1fr; } }
select[multiple] { min-height: 120px; }
.mlist > article { border-bottom: 1px solid var(--border); padding: 12px 0; }
.mlist > article:last-child { border-bottom: 0; }
.triprow { display: grid; grid-template-columns: 44px 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.triprow:last-child { border-bottom: 0; }
.triprow.cancelled .z { text-decoration: line-through; color: var(--muted); }
