/* Rider Alerts — concept prototype for GoTriangle RFI 1012-27-107. Built to match design C («dispatch map»). */
@font-face { font-family: "Open Sans"; src: url("../assets/fonts/OpenSans.woff2") format("woff2"); font-weight: 300 800; font-stretch: 75% 100%; font-display: swap; }

:root {
  --navy: #0D1F2C;
  --navy-2: #13293a;
  --map-bg: #182632;
  --map-street: #2c3d4c;
  --map-street-2: #34485a;
  --green: #00A94F;
  --green-dk: #006838;
  --green-btn: #1E8E3E;
  --yellow: #E3CD3B;
  --yellow-soft: #FBE7A1;
  --blue-pill: #3B82F6;
  --ink: #1b2733;
  --ink-2: #4a5866;
  --ink-3: #6b7885;
  --line: #d9dee3;
  --line-2: #e8ecef;
  --soft: #f3f5f7;
  --panel: #ffffff;
  --ok: #138a3e;
  --warn-ink: #7a5a00;
  --bad: #b42318;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 13px; color: var(--ink); background: var(--navy); line-height: 1.35; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #5aa9ff; outline-offset: 2px; }
a { color: #0b63b5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 18px; height: 66px; padding: 0 18px 0 16px; color: #fff; position: relative; z-index: 30; background: var(--navy); }
.logo-plate { background: #fff; border-radius: 8px; padding: 5px 9px; display: flex; align-items: center; height: 46px; flex: none; }
.logo-plate img { height: 36px; width: auto; display: block; }
.top .sep { width: 1px; height: 38px; background: rgba(255,255,255,.35); flex: none; }
.top h1 { font-size: 27px; font-weight: 700; margin: 0; letter-spacing: -.2px; white-space: nowrap; flex: none; }
.nav { display: flex; gap: 4px; flex: none; }
.nav a { color: #cfe0ec; text-decoration: none; font-weight: 600; font-size: 13px; padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(0,169,79,.22); box-shadow: inset 0 -2px 0 var(--green); }
.tri-band { flex: 1 1 auto; min-width: 0; height: 16px; overflow: hidden; opacity: .95; }
.tri-band svg { display: block; height: 16px; width: 100%; }
.pill-proto { background: var(--yellow); color: #1c1c1c; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 7px; white-space: nowrap; flex: none; }
.user { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; padding: 4px 4px 4px 14px; border-left: 1px solid rgba(255,255,255,.35); flex: none; position: relative; }
.user img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.85); }
.user b { font-weight: 700; font-size: 15px; white-space: nowrap; }
.user .chev { width: 14px; height: 14px; }
.menu { position: absolute; z-index: 60; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.3); min-width: 260px; padding: 6px; }
.menu[hidden] { display: none; }
.menu .mi { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--ink); text-decoration: none; }
.menu .mi:hover { background: var(--soft); }
.menu .mhead { padding: 8px 10px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

/* ---------- console layout (design C) ---------- */
.console { display: grid; gap: 10px; padding: 0 10px 0 10px;
  grid-template-columns: minmax(250px, 17%) minmax(0, 1fr) minmax(430px, 30.5%);
  grid-template-rows: minmax(0, 1fr) var(--chh, 272px);
  grid-template-areas: "ag map alert" "ch ch alert";
  height: calc(100vh - 66px - 30px); min-height: 800px; }
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.p-ag { grid-area: ag; padding: 12px 12px 8px; overflow: auto; }
.p-map { grid-area: map; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--map-bg); }
.p-alert { grid-area: alert; padding: 12px 16px 10px; overflow: auto; display: flex; flex-direction: column; }
.channels { grid-area: ch; display: grid; gap: 8px; grid-template-columns: 1.13fr 1fr 1fr 0.95fr 0.48fr; min-height: 0; }

/* agencies */
.ag-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0 4px 6px; }
.ag-head h2 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.ag-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.icon-btn { background: var(--soft); border: 1px solid var(--line); border-radius: 7px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; flex: none; }
.icon-btn svg { width: 16px; height: 16px; }
.agency { border-radius: 8px; margin-bottom: 6px; position: relative; }
.agency .addbtn { position: absolute; right: 32px; top: 5px; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 16px; line-height: 1; padding: 0; font-weight: 700; }
.agency .addbtn:hover { color: var(--ink); border-color: #9aa4ad; }
.agency .ah { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--soft); border: 0; border-radius: 8px 8px 0 0; padding: 6px 8px 1px 10px; text-align: left; }
.agency .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--green); flex: none; }
.agency .dot.warn { background: #F2B71B; }
.agency .ah b { font-size: 17px; font-weight: 700; flex: 1; letter-spacing: -.2px; padding-right: 30px; }
.agency .ah .chev { width: 16px; height: 16px; transition: transform .15s; }
.agency[data-open="false"] .ah .chev { transform: rotate(-90deg); }
.agency .feedline { background: var(--soft); padding: 0 10px 5px 31px; font-size: 12px; color: var(--ink-2); display: block; text-decoration: none; }
.agency .feedline:hover { text-decoration: underline; }
.st-ok { color: var(--ok); font-weight: 700; }
.st-warn { color: var(--warn-ink); font-weight: 700; }
.st-off { color: #6b7280; font-weight: 700; }
.st-bad { color: var(--bad); font-weight: 700; }
.agency .warnbox { display: flex; gap: 8px; background: #FBE18A; color: #2b2300; font-size: 12px; font-weight: 600; padding: 5px 9px; margin: 0 6px 4px; line-height: 1.25; border-radius: 6px; text-decoration: none; }
.agency .warnbox svg { width: 18px; height: 18px; flex: none; }
.agency .body { border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 8px 8px; padding: 2px 0; }
.agency[data-open="false"] .body, .agency[data-open="false"] .warnbox { display: none; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 5px 10px; font-size: 13.5px; }
.rrow input[type=checkbox] { width: 19px; height: 19px; accent-color: #1565c0; margin: 0; flex: none; }
.rrow label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.rrow .x { margin-left: auto; background: none; border: 0; color: var(--ink-3); font-size: 15px; padding: 0 4px; }
.rpill { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 22px; padding: 0 8px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.stopline { font-size: 12px; color: var(--ink-2); padding: 0 10px 6px 39px; }
.stopline button { background: none; border: 0; color: #0b63b5; padding: 0; font-size: 12px; text-decoration: underline; }
.addline { display: block; background: none; border: 0; color: #0b63b5; font-size: 12.5px; padding: 4px 10px 6px; text-align: left; }

/* map */
.p-map svg.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map .street { fill: none; stroke: var(--map-street); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.map .street.major { stroke: var(--map-street-2); stroke-width: 3.6; }
.map .campus { fill: #1f5a37; fill-opacity: .82; }
.map .route { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; }
.map .route-casing { fill: none; stroke: #0b1620; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.map .route.dim { opacity: .28; }
.map .closed-base { fill: none; stroke: #111; stroke-width: 15; stroke-linecap: butt; }
.map .closed { fill: none; stroke: url(#hazard); stroke-width: 13; stroke-linecap: butt; }
.map .stopdot { fill: #fff; stroke: #0b1620; stroke-width: 3; cursor: pointer; }
.map .stopdot.closed-stop { stroke: #111; }
.map .stoprng { fill: none; stroke: #ffe14d; stroke-width: 3.5; }
.map .minor-stop { fill: #fff; stroke: #0b1620; stroke-width: 2; }
.map .lbl-city { fill: #c7d2dc; font-size: 38px; font-weight: 600; letter-spacing: .5px; }
.map .lbl-campus { fill: #e9f2ec; font-size: 21px; font-weight: 600; text-anchor: middle; }
.map .callout-stop rect { fill: #13222f; stroke: #ffe14d; stroke-width: 2.5; }
.map .callout-stop text { fill: #fff; font-size: 15px; font-weight: 700; text-anchor: middle; }
.map .callout-stop path { fill: #ffe14d; }
.map .callout-route rect { stroke: #fff; stroke-width: 2.5; }
.map .callout-route text { fill: #fff; text-anchor: middle; font-weight: 700; }
.map .callout-route .num { font-size: 22px; }
.map .callout-route .ag { font-size: 14px; }
.map .closed-tag rect { fill: #ffe14d; stroke: #111; stroke-width: 1.5; }
.map .closed-tag text { fill: #111; text-anchor: middle; font-weight: 800; }
.map .clickable { cursor: pointer; }
.map-chip { position: absolute; right: 12px; bottom: 12px; background: #fff; color: var(--ink); border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); }
.scalebar { position: absolute; left: 18px; bottom: 16px; color: #e7eef4; font-size: 12px; }
.scalebar .bar { height: 7px; border: 2px solid #e7eef4; border-top: 0; margin-top: 2px; position: relative; }
.scalebar .bar::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 5px; border-left: 2px solid #e7eef4; }
.scalebar .lbls { display: flex; justify-content: space-between; }
.map-attrib { position: absolute; left: 18px; top: 10px; color: #94a7b6; font-size: 10.5px; }
.map-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 32px; height: 32px; border-radius: 7px; border: 0; background: #fff; font-size: 18px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); }
.popover { position: absolute; z-index: 40; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.35); padding: 12px 14px; width: 320px; font-size: 13px; }
.popover[hidden] { display: none; }
.popover h3 { margin: 0 0 4px; font-size: 14px; }
.popover .meta { color: var(--ink-2); font-size: 12px; }
.popover .pair { margin-top: 8px; background: #eef7f1; border: 1px solid #cbe8d5; border-radius: 7px; padding: 7px 9px; font-size: 12.5px; }
.popover .row-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.popover .close { position: absolute; top: 6px; right: 6px; background: none; border: 0; font-size: 18px; color: var(--ink-3); width: 28px; height: 28px; }

/* finder */
.finder input[type=search] { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.finder .res { max-height: 300px; overflow: auto; margin-top: 8px; }
.finder .res h4 { margin: 8px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); }
.finder .hit { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; text-align: left; padding: 6px 6px; border-radius: 6px; font-size: 13px; }
.finder .hit:hover { background: var(--soft); }
.finder .hit .ag { margin-left: auto; font-size: 11.5px; color: var(--ink-2); background: var(--soft); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.finder .hit .on { color: var(--ok); font-weight: 700; font-size: 11.5px; }
.finder .note { font-size: 12px; color: var(--ink-2); margin-top: 6px; }

/* alert panel */
.al-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; position: relative; }
.al-head h2 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.2px; }
.status-btn { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font-size: 13.5px; }
.status-btn .sdot { width: 12px; height: 12px; border-radius: 50%; background: #9aa4ad; }
.status-btn.published .sdot { background: var(--green); }
.status-btn.scheduled .sdot { background: #1565c0; }
.status-btn .chev { width: 14px; height: 14px; }
.al-head .menu { right: 0; top: 40px; }
.fld { margin-bottom: 6px; }
.fld > label, .fld > .lbl { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.fld .req { font-weight: 400; }
.inp { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-size: 13.5px; background: #fff; min-height: 30px; }
button.inp { text-align: left; }
.sub { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select.inp { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231b2733' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 30px; }
.inp.invalid { border-color: var(--bad); box-shadow: 0 0 0 2px rgba(180,35,24,.15); }
.langrow { display: flex; align-items: center; gap: 10px; margin: 6px 0 6px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.tabs button { border: 0; background: #f6f7f8; padding: 6px 26px; font-weight: 600; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--green-btn); color: #fff; }
.langnote { font-size: 12px; color: var(--ink-2); font-style: italic; margin-left: auto; text-align: right; }
.editor { border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.toolbar { display: flex; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--line-2); background: #f7f8f9; border-radius: 7px 7px 0 0; }
.toolbar button { width: 30px; height: 26px; border: 0; background: none; border-radius: 5px; display: grid; place-items: center; padding: 0; }
.toolbar button:hover, .toolbar button[aria-pressed="true"] { background: #e3e7eb; }
.toolbar svg { width: 16px; height: 16px; }
.rte { padding: 6px 14px; min-height: 96px; font-size: 13.5px; line-height: 1.42; outline: none; }
.rte p { margin: 0 0 4px; }
.rte ul, .rte ol { margin: 4px 0 0; padding-left: 22px; }
.es-title { margin: 8px 12px 0; }
.ai { margin-top: 8px; }
.ai .lbl { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.ai .lbl svg { width: 18px; height: 18px; color: var(--green); }
.ai .row { display: flex; gap: 8px; }
.ai .row .inp { flex: 1; font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; padding: 7px 13px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn.outline-green { border: 2px solid var(--green-btn); color: var(--green-btn); padding: 5px 12px; }
.btn.primary { background: var(--green-btn); border-color: var(--green-btn); color: #fff; }
.btn.primary:disabled { background: #9db8a5; border-color: #9db8a5; cursor: not-allowed; }
.btn:disabled { cursor: not-allowed; opacity: .75; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.ai .note { font-size: 11.5px; color: var(--ink-2); font-style: italic; margin-top: 5px; }
.checks { margin-top: 8px; background: #eef6f0; border: 1px solid #d4e9da; border-radius: 8px; padding: 8px 12px 6px; }
.checks.blocked { background: #fdf1ef; border-color: #f2cfc9; }
.checks h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; }
.chk { display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 8px; padding: 2px 0; font-size: 13.5px; }
.chk svg { width: 19px; height: 19px; margin-top: 1px; }
.chk .why { grid-column: 2 / 4; font-size: 12px; color: var(--bad); margin-top: -2px; }
.activity { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }
.activity > button { display: flex; align-items: center; gap: 8px; width: 100%; background: #fff; border: 0; border-radius: 8px; padding: 8px 10px; font-weight: 700; font-size: 13.5px; text-align: left; }
.activity > button .t { margin-left: auto; font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.activity > button .chev { width: 14px; height: 14px; transition: transform .15s; }
.activity > button[aria-expanded="false"] .chev.lead { transform: rotate(-90deg); }
.activity ol { list-style: none; margin: 0; padding: 0 10px 8px; }
.activity li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line-2); }
.activity li img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.activity li .tm { color: var(--ink-3); width: 64px; flex: none; }
.actions { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.actions .primary { flex: 1.25; padding: 10px 14px; font-size: 15px; }
.actions .btn:not(.primary) { flex: .85; font-size: 14.5px; }
.logged { text-align: right; font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.pubbanner { margin-top: 8px; background: #e7f6ec; border: 1px solid #bfe3cb; color: #0f5130; border-radius: 7px; padding: 7px 10px; font-size: 12.5px; }
.pubbanner[hidden] { display: none; }

/* channels */
.ch { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 11px; position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.ch-h { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.ch-h svg { width: 24px; height: 24px; flex: none; color: var(--green-btn); }
.ch-h b { font-size: 14px; letter-spacing: -.1px; }
.ch-h .s { font-size: 13px; color: var(--ink-2); display: block; }
.ch-h .s2 { font-size: 12px; color: var(--ink-2); display: block; }
.ch .open { position: absolute; inset: 0; background: transparent; border: 0; border-radius: var(--radius); z-index: 1; }
.ch .open:hover { box-shadow: inset 0 0 0 2px #7fb6e6; }
.ch .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.tag.ok { background: #dff3e6; color: var(--ok); }
.tag.warn { background: #fbe7a1; color: #5f4600; }
.tag.off { background: #e5e7eb; color: #4b5563; }
.tag.pub { background: var(--green-btn); color: #fff; }
.mail { border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; overflow: hidden; flex: 1; min-height: 0; position: relative; }
.mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.mail .subj { padding: 6px 9px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mail .mb { padding: 6px 9px; line-height: 1.35; }
.mail .mb p { margin: 0 0 3px; }
.mail .mb ul { margin: 2px 0 0; padding-left: 18px; }
.code { background: #f4f5f6; border: 1px solid var(--line-2); border-radius: 6px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; line-height: 2; padding: 7px 9px; flex: 1; white-space: pre-wrap; word-break: break-word; }
.widget { border: 1px solid var(--line); border-radius: 6px; padding: 8px; flex: 1; font-size: 12.5px; }
.widget .wh { background: var(--green-btn); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 4px; font-size: 14px; }
.widget .wp { display: flex; gap: 8px; margin: 10px 2px 8px; flex-wrap: wrap; }
.widget .wp .rpill { min-width: 48px; height: 26px; font-size: 14px; }
.newdot { font-size: 9.5px; font-weight: 800; color: #5f4600; background: var(--yellow); border-radius: 3px; padding: 0 3px; margin-left: 3px; vertical-align: super; }
.phone { flex: 1; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.phone .dev { width: 92%; max-width: 236px; border: 7px solid #1d232a; border-bottom: 0; border-radius: 26px 26px 0 0; padding: 6px 8px 0; background: #fff; }
.phone .sb { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; padding: 0 6px 6px; }
.phone .alertcard { border-radius: 8px; background: #fde8e8; padding: 6px 8px; color: #b42318; font-weight: 700; display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.phone .alertcard svg { width: 16px; height: 16px; }
.phone .rl { display: flex; justify-content: space-between; font-weight: 700; font-size: 12.5px; padding: 8px 4px 2px; }
.phone .tx { font-size: 11.5px; padding: 0 4px 8px; line-height: 1.32; }
.sms .opt { font-size: 12.5px; color: var(--ink-2); margin: 6px 0 10px; }
.switch { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font-weight: 600; font-size: 14px; color: var(--ink-2); position: relative; z-index: 2; }
.switch .track { width: 46px; height: 26px; border-radius: 13px; background: #d6dadf; position: relative; transition: background .15s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.switch[aria-checked="true"] .track { background: var(--green-btn); }
.switch[aria-checked="true"] .knob { left: 23px; }
.smsprev { font-size: 11.5px; background: #eef1f4; border-radius: 10px; padding: 6px 8px; margin-top: 10px; }

/* footer */
.foot { color: #9fb0bf; font-size: 11px; text-align: center; padding: 8px 12px; line-height: 1.3; height: 30px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(7,15,22,.62); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-back[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px; position: relative; }
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .mclose { position: absolute; top: 10px; right: 10px; background: none; border: 0; font-size: 22px; width: 36px; height: 36px; color: var(--ink-3); }
.modal .msub { color: var(--ink-2); margin-bottom: 12px; }
.modal pre { background: #f4f5f6; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; font-size: 12.5px; line-height: 1.5; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal .foot-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.modal ul.plain { padding-left: 18px; margin: 6px 0; }
.modal .card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.modal .card h3 { margin: 0 0 6px; font-size: 14px; }
.when-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.when-grid label { font-weight: 600; font-size: 12.5px; display: block; margin-bottom: 3px; }

.toast { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); background: #10251a; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 90; font-size: 13.5px; box-shadow: 0 8px 28px rgba(0,0,0,.35); max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }

/* ---------- secondary pages ---------- */
.page { padding: 4px 10px 0; min-height: calc(100vh - 66px - 30px); }
.page .panel { padding: 18px 20px; margin-bottom: 10px; }
.page h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.2px; }
.page h3 { margin: 0 0 8px; font-size: 16px; }
.page .lead { color: var(--ink-2); margin: 0 0 12px; font-size: 13.5px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 8px 8px; font-weight: 700; }
.tbl td { border-bottom: 1px solid var(--line-2); padding: 9px 8px; vertical-align: top; }
.tblwrap { overflow-x: auto; }
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.feedcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.feedcard .fh { display: flex; align-items: center; gap: 8px; }
.feedcard .fh b { font-size: 17px; }
.feedcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 10px 0 8px; font-size: 12.5px; }
.feedcard dt { color: var(--ink-3); }
.feedcard dd { margin: 0; font-weight: 600; word-break: break-word; }
.feedcard ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.feedcard li { display: flex; gap: 6px; padding: 3px 0; }
.feedcard li svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.recheck { background: #fff8e1; border: 1px solid #f1dc8f; border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 12.5px; }
.recheck .ri { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid #f1e3b0; }
.recheck .ri:first-of-type { border-top: 0; }
.recheck .ri span { flex: 1; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.person { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.person img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.person .ags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-weight: 600; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.filters button { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 5px 12px; font-weight: 600; font-size: 12.5px; }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.suggest { border: 2px dashed #8fcaa4; background: #f3fbf6; border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.suggest svg { width: 22px; height: 22px; color: var(--green); flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .n { font-size: 24px; font-weight: 700; }
.stat .l { color: var(--ink-2); font-size: 12.5px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 8px; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.step .k { font-size: 11px; font-weight: 800; color: var(--green-dk); letter-spacing: .6px; text-transform: uppercase; }
.mapgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px 14px; margin-top: 8px; }
.mapgrid label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 2px; }
.okline { color: var(--ok); font-weight: 700; }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) {
  .user b span.role { display: none; }
  .tabs button { padding: 6px 16px; }
  .actions { gap: 8px; }
  .actions .btn { padding: 9px 9px; min-width: 0; font-size: 13.5px; }
  .actions .primary { font-size: 14px; }
  .widget .wh { font-size: 13px; padding: 5px 9px; }
  .console { --chh: 252px; grid-template-columns: minmax(250px, 17.5%) minmax(0, 1fr) minmax(470px, 33%); }
  .actions .btn svg { display: none; }
  .actions .primary svg { display: block; width: 16px; height: 16px; }
  .actions .primary { flex: 0 0 auto; }
  .actions .btn:not(.primary) { flex: 1 1 0; }
  .rrow { font-size: 13px; }
  .code { font-size: 11.5px; line-height: 1.75; }
  .ch-h { margin-bottom: 6px; }
}
@media (max-width: 1360px) {
  .tri-band { display: none; }
  .top { gap: 12px; }
  .console { --chh: auto; grid-template-columns: minmax(230px, 18%) minmax(0, 1fr) minmax(440px, 36%); grid-template-rows: minmax(520px, 1fr) auto; }
  .channels { grid-template-columns: 1fr 1fr 1fr; }
  .channels .sms { grid-column: auto; }
  .cards4, .people, .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .console { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .p-map { height: 460px; order: -1; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 14px; row-gap: 8px; }
  .nav { order: 5; width: 100%; overflow-x: auto; }
  .user b { display: none; }
  .user { margin-left: auto; padding-left: 8px; }
  .channels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 13px; }
  .top h1 { font-size: 21px; }
  .logo-plate { height: 40px; padding: 4px 7px; }
  .logo-plate img { height: 30px; }
  .top .sep { display: none; }
  .pill-proto { font-size: 12px; padding: 5px 8px; }
  .user img { width: 38px; height: 38px; }
  .p-map { height: 360px; }
  .channels { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .actions { flex-wrap: wrap; }
  .actions .primary { flex: 1 1 100%; }
  .tabs button { padding: 6px 18px; }
  .langrow { flex-wrap: wrap; }
  .langnote { margin-left: 0; text-align: left; }
  .cards4, .people, .stats, .steps, .mapgrid, .modal .grid2, .when-grid { grid-template-columns: 1fr; }
  .foot { height: auto; }
  .page .panel { padding: 14px 14px; }
  .scalebar { display: none; }
  .popover { width: calc(100% - 24px); left: 12px !important; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tbl.stack td { display: block; border: 0; padding: 3px 4px; }
}

@media (max-height: 960px) and (min-width: 1101px) {
  .toolbar { padding: 3px 8px; }
  .rte { font-size: 13px; line-height: 1.36; min-height: 84px; }
  .langrow { margin: 4px 0; }
  .ai .note { font-size: 11px; margin-top: 3px; }
  .checks h3 { font-size: 14.5px; margin-bottom: 2px; }
  .chk { padding: 1px 0; font-size: 13px; }
  .al-head h2 { font-size: 23px; }
  .actions .primary, .actions .btn { padding-top: 8px; padding-bottom: 8px; }
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
a.btn.outline-green { color: var(--green-btn); }
.recheck .ri { flex-wrap: wrap; }
.recheck .ri span:first-child { flex: 1 1 100%; }
.stat .n.small { font-size: 15px; padding-top: 6px; }
