/* SPEEDBIRD Portal — extends /static/style.css */
[hidden] { display: none !important; }
.p-badge { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,138,61,.18); color: #ffb27d; margin-left: 4px; }
.p-user { align-items: center; gap: 6px; color: #c9d4e0; }
.p-user #who-call { padding: 0 8px; }
.p-main { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 80px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.p-main h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: .3em 0 .2em; letter-spacing: -.02em; }
.p-main h2 { font-size: 1.3rem; margin: 0 0 .4em; }
.p-main h3 { font-size: 1rem; margin: 1.2em 0 .4em; }

.p-login { display: grid; place-items: center; padding-top: 4vh; }
.p-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; }
.p-card form, .p-dialog form { display: grid; gap: 14px; margin-top: 18px; }
.p-main label, .p-dialog label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.p-main input, .p-main select, .p-main textarea, .p-dialog input { font: inherit; font-size: 15px; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; }
.p-main :is(input, select, textarea):focus, .p-dialog input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.p-err { color: #e5484d; font-weight: 600; margin: 0; }
.fine { font-size: 13px; color: var(--muted); }

.p-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.p-back { display: inline-block; margin-bottom: 8px; font-weight: 600; }
.p-note { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(217,72,15,.3); margin-bottom: 16px; font-size: 14px; }
.p-note.ok { background: rgba(39,201,63,.1); border-color: rgba(39,201,63,.35); }
.p-warn { padding: 12px 16px; border-radius: 10px; border-left: 4px solid #e5484d; background: rgba(229,72,77,.08); margin: 8px 0 16px; }

.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-node { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; color: var(--text); }
.p-node:hover { border-color: var(--accent); text-decoration: none; }
.p-node-top { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.p-node-top .p-pill { margin-left: auto; }
.p-calls { font-family: var(--mono); font-size: 14px; margin: 8px 0 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #8a96a6; flex: none; }
.dot.on { background: #27c93f; box-shadow: 0 0 0 4px rgba(39,201,63,.2); }
.p-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted); }
.p-pill.on { color: #1f9d3a; border-color: rgba(39,201,63,.4); background: rgba(39,201,63,.1); }
.p-pill.off { color: var(--muted); }
.lv-view { color: #0b5cad !important; } .lv-edit { color: #8a5a00 !important; } .lv-modem { color: #b5480c !important; } .lv-tx { color: #e5484d !important; }

.p-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: 8px 0 20px; }
.p-tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.p-tabs a:hover { color: var(--text); text-decoration: none; }
.p-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.p-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.p-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.p-panel h3 { margin: 0; }
.p-panel pre { margin: 0; max-height: 280px; overflow: auto; font-size: 12.5px; }
.p-ed textarea { font-family: var(--mono); font-size: 13px; min-height: 260px; }
.p-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.p-row input { width: auto; flex: 1; min-width: 160px; }
.p-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
.p-form label { flex: 1 1 160px; }
.p-form label.grow { flex: 3 1 260px; }
.p-form label.full { flex: 1 1 100%; }
.p-form label.chk { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.p-form label.chk input { width: auto; }
.p-result { margin-top: 12px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.p-result-h { padding: 6px 12px; font: 600 12px var(--mono); background: var(--surface-2); }
.p-result.ok .p-result-h { color: #1f9d3a; } .p-result.bad .p-result-h { color: #e5484d; }
.p-result pre { margin: 0; border: 0; border-radius: 0; max-height: 420px; }
.p-perm { margin-top: 24px; } .p-perm summary { cursor: pointer; font-weight: 600; }
.danger { color: #e5484d !important; border-color: rgba(229,72,77,.5) !important; }

.p-dialog { border: 1px solid var(--border); border-radius: 16px; padding: 24px; background: var(--surface); color: var(--text);
  width: min(620px, calc(100vw - 32px)); }
.p-dialog::backdrop { background: rgba(5,10,20,.6); }
.p-dialog h2 { margin: 0; }
.p-dlg-actions { display: flex; justify-content: flex-end; gap: 10px; }
.p-dialog .oneliner { margin: 8px 0; }
.p-dialog .ol-cmd { white-space: normal; word-break: break-all; font-size: 13px; }
.p-toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 50;
  background: #0d1b2a; color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.p-toast.bad { background: #8f1d21; }

.p-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #ff6a1a; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.p-captcha { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.p-captcha input { width: 90px !important; text-align: center; }
.p-sub { margin-top: 40px !important; }
.p-panel .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.p-panel .chk input { width: auto; }
.p-panel .btn { justify-self: start; }
@media (max-width: 860px) {
  .p-user[id="who"]:not([hidden]) { display: flex !important; position: static; flex-direction: row; flex-wrap: wrap; justify-content: flex-end;
    background: none; padding: 0; gap: 0; margin-left: auto; }
  .p-user a { padding: 6px 8px; font-size: 13px; }
  .topbar-inner { height: auto; min-height: 60px; flex-wrap: wrap; padding-block: 6px; }
}
.p-captcha label { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; }
.p-captcha label b { font-family: var(--mono); font-size: 16px; }
.p-mailapps table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.p-mailapps th, .p-mailapps td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.p-mailapps th { white-space: nowrap; font-weight: 600; width: 1%; }
.p-mailapps code { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

/* ---- v1.1: nav, account tabs, inbox, sessions, integrations, maps, BIRD Mesh */
.mainnav a.active { color: var(--accent); }
.p-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 2px; }
.mono { font-family: var(--mono); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.danger { color: #e5484d !important; }
.dot.bad { background: #e5484d; box-shadow: 0 0 0 4px rgba(229,72,77,.2); }
.p-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#v-account h2 { margin-top: 0; }
.p-sub { margin-top: 28px !important; }

.p-mail { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.p-msg { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; gap: 14px; padding: 11px 16px; color: var(--text);
  border-bottom: 1px solid var(--border); font-size: 14px; align-items: baseline; }
.p-msg:last-child { border-bottom: 0; }
.p-msg:hover { background: var(--accent-soft); text-decoration: none; }
.p-msg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.p-msg-when { color: var(--muted); font-size: 12.5px; }
.p-msg.unread .p-msg-from, .p-msg.unread .p-msg-subj { font-weight: 700; }
.p-msg.unread .p-msg-from::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
@media (max-width: 640px) { .p-msg { grid-template-columns: 1fr auto; } .p-msg-subj { grid-column: 1 / -1; grid-row: 2; } }
.p-kv { width: 100%; font-size: 14px; } .p-kv th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 12px 4px 0; width: 35%; }

.p-meter { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.p-meter span { display: block; height: 100%; width: 0; transition: width .2s; }
.p-meter .weak { background: #e5484d; } .p-meter .ok { background: #f59f00; } .p-meter .good { background: #27c93f; }
.p-sess { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.p-sess:last-child { border-bottom: 0; }

.p-events { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px 12px; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; }
.p-events legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.p-main label.chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.p-main label.chk input, .p-dialog label.chk input { width: auto; margin-top: 3px; flex: none; }
.p-integ-add { margin-top: 14px; }
.p-integ details { font-size: 14px; } .p-integ details label { margin: 4px 0; }
.p-integ .p-calls { word-break: break-all; }

.p-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.p-seg a { padding: 8px 14px; font-weight: 600; font-size: 14px; color: var(--muted); }
.p-seg a.active { background: var(--accent); color: #fff; }
.p-seg a:hover { text-decoration: none; }
.p-mapwrap { position: relative; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
#pmap { height: min(68vh, 620px); min-height: 320px; background: var(--surface-2, var(--surface)); }
.p-legend { position: absolute; left: 10px; bottom: 10px; z-index: 500; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 20px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--text); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.lg.st-mine { background: #d9480f; } .lg.st-member { background: #7048e8; } .lg.st { background: #1c7ed6; } .lg.nd { background: #2f9e44; } .lg.off { background: #8a96a6; }
.lv-bird { color: #7048e8 !important; border-color: rgba(112,72,232,.4) !important; }
.leaflet-popup-content { font-size: 13px; line-height: 1.45; }

.p-dialog-wide { max-width: 720px; width: calc(100% - 32px); }
.p-agree { max-height: 42vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 16px; background: var(--bg); font-size: 14px; line-height: 1.55; }
.p-agree h3 { font-size: 1.15rem; margin: .8em 0 .3em; } .p-agree h4 { font-size: 1rem; margin: 1em 0 .3em; } .p-agree h5 { margin: .8em 0 .2em; }
.p-agree ol, .p-agree ul { padding-left: 22px; margin: .3em 0; } .p-agree li { margin: .25em 0; }
.p-agree-box { margin: 14px 0; } .p-agree-box summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
#v-account .p-agree { max-height: none; }

/* ---- webmail (#/mail) */
.wm { display: grid; grid-template-columns: 190px minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.wm-folders { position: sticky; top: 12px; display: grid; gap: 2px; }
.wm-f { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 500; }
.wm-f:hover { background: var(--surface-2); text-decoration: none; }
.wm-f.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.wm-fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-alt { margin-top: 14px; padding: 0 10px; }
.wm-listcol { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.wm-search { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); }
.wm-search input { padding: 7px 10px !important; font-size: 14px !important; }
.wm-filter a { padding: 6px 10px; font-size: 13px; }
.wm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.wm-tools .btn-sm { padding: 4px 8px; font-size: 12.5px; }
.wm-tools .btn:disabled, .wm-move:disabled { opacity: .45; cursor: default; }
.wm-move { width: auto !important; padding: 4px 6px !important; font-size: 12.5px !important; border-radius: 8px !important; }
.wm-refresh { margin-left: auto; }
.p-main label.chk.wm-all { margin: 0 4px 0 2px; }
.wm-list { max-height: calc(100vh - 290px); min-height: 240px; overflow-y: auto; }
.wm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.wm-row:hover { background: var(--surface-2); }
.wm-row.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.wm-row > input { width: auto !important; margin-top: 3px; }
.wm-rmain { display: grid; gap: 1px; min-width: 0; color: var(--text); }
.wm-rmain:hover { text-decoration: none; }
.wm-rtop { display: flex; gap: 8px; justify-content: space-between; }
.wm-from, .wm-subj, .wm-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wm-from { font-size: 14px; } .wm-subj { font-size: 13.5px; } .wm-snip { font-size: 12.5px; color: var(--muted); }
.wm-when { flex: none; font-size: 12px; color: var(--muted); }
.wm-row.unread .wm-from, .wm-row.unread .wm-subj { font-weight: 700; }
.wm-row.unread .wm-from::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.wm-star { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--muted); padding: 0 2px; line-height: 1.2; }
.wm-star.on { color: #f59f00; }
.wm-pager { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); }
.wm-pager .btn:disabled { opacity: .4; }
.wm-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.wm-reader { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px 18px; min-height: 320px; }
.wm-rbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.wm-rbar .btn-sm { padding: 4px 9px; font-size: 13px; }
.wm-back { display: none; }
.p-main h2.wm-rsubj { font-size: 1.25rem; margin: 4px 0 8px; overflow-wrap: anywhere; }
.wm-rhead { border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.wm-rfrom { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.wm-rdate { margin-left: auto; }
.wm-k { display: inline-block; min-width: 28px; font-weight: 600; }
.wm-atts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.wm-att { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: var(--surface-2); max-width: 100%; overflow-wrap: anywhere; }
.wm-att:hover { border-color: var(--accent); text-decoration: none; }
.wm-remote, .wm-view { margin-bottom: 8px; }
.wm-view a.active { font-weight: 700; color: var(--text); }
.wm-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 var(--sans); margin: 0; }
.wm-frame { width: 100%; height: min(72vh, 900px); min-height: 360px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.wm-compose textarea { font: 14px/1.5 var(--sans); resize: vertical; min-height: 200px; }
.p-dialog textarea { width: 100%; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.p-dialog textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wm-compose form { gap: 10px !important; max-height: 88vh; overflow-y: auto; }
.wm-ch { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.wm-ch h2 { margin: 0; }
.wm-ccrow { margin-top: -6px; text-align: right; }
.wm-cc { display: grid; gap: 10px; }
.wm-parts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.wm-parts .chk { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 500; }
.wm-parts input { width: auto !important; }
.wm-attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wm-attach .btn { cursor: pointer; display: inline-block !important; font-weight: 600; }

.wm-guides { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.wm-guides a { padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); }
.wm-guides a:hover { color: var(--text); text-decoration: none; border-color: var(--accent); }
.wm-guides a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.wm-guide { max-width: 860px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 24px; line-height: 1.6; }
.wm-guide code { font-family: var(--mono); font-size: 13px; background: var(--code-bg); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.wm-steps { padding-left: 22px; margin: .4em 0 1em; } .wm-steps li { margin: .45em 0; }
.wm-pre { font-family: var(--mono); font-size: 13px; background: var(--code-bg); padding: 10px 12px; border-radius: 8px; margin: 8px 0; white-space: pre-wrap; }
.wm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.wm-tbl th, .wm-tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }

@media (max-width: 1100px) {
  .wm { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .wm-folders { grid-column: 1 / -1; position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .wm-folders #mf-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .wm-alt { display: none; }
}
@media (max-width: 760px) {
  .wm { grid-template-columns: minmax(0, 1fr); }
  .wm.reading .wm-listcol, .wm.reading .wm-folders { display: none; }
  .wm:not(.reading) .wm-reader { display: none; }
  .wm-back { display: inline-block; }
  .wm-list { max-height: none; }
  .wm-guide { padding: 16px; }
  .wm-tbl th:nth-child(4), .wm-tbl td:nth-child(4) { display: none; }
}
#v-mail .fine, #d-compose .fine { margin-top: 0; }
#v-mail p.fine { margin: .5em 0; }
.wm-search { flex-wrap: wrap; }
.wm-search input { flex: 1 1 140px; min-width: 0; width: auto !important; }
.wm-filter { flex: none; }
.wm-att { align-items: center; }

/* Portal inside the speedbird.io site layout (built by /opt/WEB/site/build.py into /portal/):
   the signed-in menu is a sub-bar under the site topbar. */
.p-subbar { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.p-subbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px 14px; min-height: 44px; }
.p-subbar .p-badge { margin-left: 0; color: var(--accent); background: var(--accent-soft); }
.p-subbar .p-user { color: var(--text); margin-left: auto; }
.p-subbar .p-user:not([hidden]) { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.p-subbar .p-user a { color: var(--accent-2); }
.p-subbar .p-user a[aria-current], .p-subbar .p-user a.active { font-weight: 700; }
@media (max-width: 860px) { .p-subbar .p-user { margin-left: 0; } }

/* webmail contacts + outbox (contacts.py, mailbatch.py) */
.ct-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.ct-bar input[type=search] { flex: 1 1 200px; min-width: 0; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.ct-scroll { overflow-x: auto; }
.ct-tbl td, .ct-tbl th { vertical-align: top; }
.ct-tbl td:first-child, .ct-tbl th:first-child { width: 32px; }
.ct-lab { display: inline-block; font-size: .78rem; border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; margin: 1px 3px 1px 0; opacity: .8; }
.ct-pick { max-height: 46vh; overflow: auto; border: 1px solid rgba(127,127,127,.3); border-radius: 8px; padding: 4px 8px; }
.ct-pick label { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid rgba(127,127,127,.15); }
.ct-pick label:last-child { border-bottom: 0; }
.ct-pick .fine { overflow-wrap: anywhere; }
.ct-prog { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: rgba(127,127,127,.25); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.ct-prog i { display: block; height: 100%; background: var(--accent, #e85d04); }
.p-dialog select { font: inherit; font-size: 15px; color: var(--text); background: var(--bg, transparent); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ct-bar label.chk, .p-dialog .ct-pick label { display: flex; grid-template-columns: none; gap: 8px; align-items: center; font-weight: 500; }
.ct-bar label.chk input, .ct-pick input[type=checkbox] { width: auto; }
.ct-pick:empty { display: none; }

/* admin view: the site admin console hosted in the Portal (adminrelay.py) */
.adm-host.sb-app { max-width: none; padding: 8px 0 32px; margin: 0; }
.adm-host .tabs { flex-wrap: wrap; }
.adm-host label { display: block; }
.adm-host label.inline, .adm-host .cx-cols label, .adm-host .cx-pop label { display: flex; }
.adm-host input[type=checkbox], .adm-host input[type=radio] { width: auto; }
.adm-host button.danger { color: #fff; }

/* operations view (ops.js) */
.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ops-card { margin: 0; }
.ops-card.ops-wide { grid-column: 1 / -1; }
.ops-card-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.ops-kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 14px; margin: 6px 0; }
.ops-kv dt { color: var(--muted); } .ops-kv dd { margin: 0; overflow-wrap: anywhere; }
.ops-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ops-map { height: 360px; border-radius: 10px; border: 1px solid var(--border); margin: 6px 0 14px; }
.ops-tbl td { font-size: 14px; }
.ops-console { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 820px) { .ops-console, .ops-chat, .ops-bull { grid-template-columns: 1fr !important; } }
.ops-targets label { display: flex !important; gap: 6px; align-items: flex-start; margin: 4px 0; font-weight: 500; }
.ops-targets input { width: auto !important; }
.ops-term { background: #0b1220; color: #d7e3f4; border-radius: 10px; padding: 10px; min-width: 0; }
.ops-out { margin: 0; height: 52vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: transparent; color: inherit; border: 0; }
.ops-in { display: flex; gap: 8px; align-items: center; border-top: 1px solid #23324a; padding-top: 8px; font-family: ui-monospace, monospace; }
.ops-in input { flex: 1; background: transparent !important; color: #fff !important; border: 0 !important; font: 14px ui-monospace, monospace !important; padding: 4px !important; }
.ops-ev { max-height: 40vh; overflow: auto; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; }
.ops-ev-row { padding: 3px 0; border-bottom: 1px solid rgba(127,127,127,.15); overflow-wrap: anywhere; }
.ops-ev-row.bad { color: #b91c1c; } .ops-ev-row.warn { color: #b45309; } .ops-ev-row.ok { color: #15803d; }
.ops-chat { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.ops-peers { border: 1px solid var(--border); border-radius: 10px; padding: 6px; max-height: 60vh; overflow: auto; }
.ops-peers a { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 8px; color: inherit; }
.ops-peers a.active, .ops-peers a:hover { background: var(--accent-soft); }
.ops-conv { min-width: 0; }
.ops-msgs { border: 1px solid var(--border); border-radius: 10px; padding: 8px; height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.ops-msg { max-width: 80%; padding: 6px 10px; border-radius: 10px; background: rgba(127,127,127,.12); overflow-wrap: anywhere; white-space: pre-wrap; }
.ops-msg.out { align-self: flex-end; background: var(--accent-soft); }
.ops-chatin { display: flex; gap: 8px; margin-top: 8px; }
.ops-chatin input:first-child { max-width: 9em; } .ops-chatin button { flex: none; }
.ops-bull { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
.ops-bull .ct-bar input, .ops-bull .ct-bar select { width: auto; }
.ops-via label { display: flex !important; gap: 6px; align-items: center; font-weight: 500; }
.ops-via input { width: auto !important; }
.ops-b { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.ops-b.priority { border-left-color: #2563eb; } .ops-b.immediate { border-left-color: #f59e0b; } .ops-b.flash { border-left-color: #dc2626; }
.ops-btext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.ops-watch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(127,127,127,.15); }
.ops-watch label { display: flex !important; gap: 4px; align-items: center; font-weight: 500; } .ops-watch input { width: auto !important; }

/* foundation (governance) */
.gov-list { display: grid; gap: 12px; }
.gov-item h3 { margin: 0; font-size: 1.05rem; }
.gov-top { display: flex; gap: 14px; align-items: flex-start; }
.gov-main { flex: 1; min-width: 0; }
.gov-body { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.gov-score { flex: 0 0 auto; min-width: 58px; text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; background: var(--bg); }
.gov-score b { display: block; font-size: 1.3rem; line-height: 1.1; } .gov-score span { font-size: 11px; color: var(--muted); }
.gov-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--border); }
.gov-bar .y { background: #27c93f; } .gov-bar .n { background: #e5484d; }
.gov-ballot a { cursor: pointer; }
.gov-mgr { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.gov-mgr select { width: auto; }
.gov-num { text-align: center; font-weight: 700; }
.gov-classes td { vertical-align: top; }
.gov-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.gov-tier { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; border-top-width: 4px; }
.gov-tier h4 { margin: 0 0 4px; }
.gov-tier-price { font-weight: 700; font-size: 1.15em; margin-bottom: 6px; }
.gov-tier ul { margin: 0; padding-left: 18px; font-size: .92em; }
.gov-tier-silver { border-top-color: #9aa3ad; }
.gov-tier-gold { border-top-color: #c9a227; }
.gov-tier-platinum { border-top-color: #6f7fa8; }
.gov-bylaws { max-height: none; }
.gov-focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 600px) { .gov-mgr { margin-left: 0; } .gov-classes th:nth-child(2), .gov-classes td:nth-child(2) { display: none; } }
.gov-tier-bronze { border-top-color: #b0703c; }
