/* bh-hub.css: the Hub's own rules on top of the Blue Hedge design system 0.2.0 (bh-app.css and bh-patterns.css,
   both copied by the design system's sync.sh). Hub-owned, not synced. Tokens only.
   What is here: the few element defaults the module pages lean on, small helpers the family has no class for yet,
   and module pieces (map dots, signature pad, phone job cards, the one-time secret). */

/* content type inside the shell */
.bh-main h1{font-size:28px;font-weight:600;letter-spacing:-.02em;line-height:1.2;margin:0}
.bh-main h3{font-size:15px;font-weight:600;margin:0}
.bh-main :is(ul,ol):not([class]){padding-left:20px}
.bh-main :is(ul,ol):not([class])>li+li{margin-top:4px}
.bh-main a:not([class]){font-weight:500}
.bh-main code,.bh-public__main code{background:var(--bh-surface-3);padding:1px 6px;border-radius:4px;font-size:13px;font-family:var(--bh-font-mono)}
.bh-code{font-family:var(--bh-font-mono);letter-spacing:.02em}
.bh-card>*+*,.bh-stack>p+p{margin-top:12px}
.bh-alert__body>*+*{margin-top:4px}
.bh-card+.bh-card,.bh-table-wrap+.bh-card,.bh-card+.bh-table-wrap{margin-top:16px}
.bh-card>h2:first-child,.bh-card>h3:first-child{margin-top:0}
.bh-alert__body p{margin:0}
details>summary{cursor:pointer;color:var(--bh-link);font-weight:500}

/* small helpers */
.bh-hrow{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
.bh-row3{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));align-items:start}
.bh-narrow{max-width:460px;margin-inline:auto}
.bh-urgent{color:var(--bh-error-text);font-weight:600}
.bh-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.bh-btn--on,.bh-btn--on:hover{background:var(--bh-selected);border-color:transparent;color:var(--bh-selected-ink);box-shadow:none}
.bh-linkbtn{font:inherit;background:none;border:0;padding:0;color:var(--bh-link);font-weight:500;cursor:pointer;text-align:left}
.bh-linkbtn:hover{text-decoration:underline}
.bh-linkbtn--danger{color:var(--bh-error-text)}
.bh-count{font-size:13px;color:var(--bh-ink-2)}

.bh-tabs--more{overflow:visible;flex-wrap:wrap}
.bh-subnav__more>summary{cursor:pointer}

/* forms written as <label>Text <input></label> */
label.bh-field{font-size:14px;font-weight:500;color:var(--bh-ink)}
label.bh-field small,.bh-check small{font-weight:400;color:var(--bh-ink-2)}
label.bh-field>.bh-input,label.bh-field>.bh-select,label.bh-field>.bh-textarea{font-weight:400}
.bh-form--row>.bh-btn{flex:none}
.bh-form--row>.bh-input,.bh-form--row>.bh-select{width:auto;flex:1 1 200px;max-width:420px}

/* tables the module pages write by hand */
.bh-table--text td{white-space:normal}
.bh-table--text td.bh-nowrap{white-space:nowrap}
.bh-table td .bh-input,.bh-table td .bh-select{height:32px;font-size:14px;padding:0 8px;width:auto;min-width:72px}
.bh-table td .bh-select{padding-right:28px}
.bh-table td .bh-textarea{min-height:40px}
.bh-table--kv th{width:30%;position:static;font-weight:500;white-space:normal;border-bottom-color:var(--bh-border-soft)}
.bh-table tfoot td,.bh-table tfoot th{font-weight:600;border-top:1px solid var(--bh-border)}

/* setup steps, settings slots, recovery codes, older timelines */
.bh-steps{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;counter-reset:s}
.bh-steps li{counter-increment:s;padding:4px 10px;border:1px solid var(--bh-border-soft);border-radius:6px;font-size:13px;color:var(--bh-ink-2);background:var(--bh-surface)}
.bh-steps li::before{content:counter(s) " · "}
.bh-steps li.on{color:var(--bh-selected-ink);background:var(--bh-selected);border-color:transparent;font-weight:600}
.bh-steps li.done{color:var(--bh-success-text)}
.bh-slots{display:grid;gap:8px}
.bh-slot{border:1px dashed var(--bh-border);border-radius:8px;padding:8px}
.bh-codes{font-family:var(--bh-font-mono);font-size:18px;line-height:1.8;background:var(--bh-surface-3);padding:12px 16px;border-radius:8px}
.bh-tl{list-style:none;padding:0;margin:0}
.bh-tl li{padding:8px 0;border-bottom:1px solid var(--bh-border-soft);font-size:14px}
.bh-tl time{color:var(--bh-ink-2);margin-right:8px}

/* the live map's unit dots: the state travels with its word in the units table */
.tm-dot{fill:var(--bh-ink-3);stroke:var(--bh-surface);stroke-width:2}
.tm-dot--moving{fill:var(--bh-success)}.tm-dot--idle{fill:var(--bh-warning)}.tm-dot--stopped{fill:var(--bh-blue-600)}

/* phone views: touch density */
body.phone .bh-main,body.phone .bh-public__main{max-width:680px}
body.phone .bh-btn{height:48px;font-size:15px}
body.phone .bh-btn--s{height:44px}
.bh-jobcard{display:block;background:var(--bh-surface);border:1px solid var(--bh-border-soft);border-radius:12px;box-shadow:var(--bh-shadow-1);padding:16px;color:var(--bh-ink);font-size:16px}
.bh-jobcard+.bh-jobcard{margin-top:10px}
.bh-jobcard:hover{text-decoration:none;border-color:var(--bh-border)}
.bh-jobcard__when{font-size:13px;color:var(--bh-ink-2)}
.bh-jobcard h3{margin:6px 0 4px;font-size:18px}
.sigpad{width:100%;height:180px;background:var(--bh-white);border:1px solid var(--bh-border);border-radius:8px;touch-action:none}

/* the one-time reveal of a temporary password and its QR code (Settings, People and sign-ins) */
.bh-once__secret{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bh-once__secret code{font-size:18px;letter-spacing:.04em;padding:6px 10px;border:1px solid var(--bh-border);border-radius:6px;user-select:all;word-break:break-all}
.bh-once__qr{background:var(--bh-white);padding:8px;border-radius:6px}

/* the front door's attention list (audit HUB-01) */
.bh-needs{list-style:none;margin:0;padding:0}
.bh-row>.bh-go{flex:none;display:inline-flex;align-items:center;gap:4px;color:var(--bh-link);font-size:14px;font-weight:600}

/* The public read-only demo (sd_core/demo_view.py): the sign-in card's "View the demo" block, the line in the demo
   bar, and the buttons of forms that post greyed out (the server refuses them anyway; signing out stays). */
.bh-signin__view{display:flex;flex-direction:column;gap:8px}
.bh-signin__as{margin:0;font-size:13px;color:var(--bh-ink-2)}
.bh-signin__as a{color:var(--bh-ink);font-weight:600}
.bh-env__ro{display:inline-flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis}
.bh-env__out{display:inline;margin:0}
.bh-env__out button{background:none;border:0;padding:0;font:inherit;color:inherit;text-decoration:underline;cursor:pointer}
.bh-ro form[method="post" i]:not([action="/logout"]) :is(button,input[type="submit"]){opacity:.45;pointer-events:none;cursor:not-allowed}

.bh-scheme__moon{display:none}.bh-scheme[data-bh-dark="0"] .bh-scheme__sun{display:none}.bh-scheme[data-bh-dark="0"] .bh-scheme__moon{display:inline-block}

.gh__start{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin:0 0 10px;padding:8px 14px;border:1px solid var(--bh-border-soft);border-radius:8px;background:var(--bh-surface);font-size:14px}
.gh__start a.is-done{color:var(--bh-ink-2);text-decoration:line-through}
.gh__start form{margin:0 0 0 auto}
