/* Design System v2 — content components (Figma "08.2 — DS v2 · Components", page 802:162).
   Phase 2 wave 1 uses them on the Admin list pages (UI_REVIEW.md). Tokens live in hma-shell.css.
   Every rule is scoped to .hma-v2 and v2-* classes so older page CSS cannot reach these elements. */

/* One content width for list pages (proposal 1). */
.hma-v2.v2-list .hma-content { max-width: none; padding: 28px 32px 40px; }
.hma-v2 .v2-list-stack { display: grid; gap: 20px; }

/* Card */
.hma-v2 .v2-card { display: grid; gap: 16px; min-width: 0; padding: 20px; border: 1px solid var(--hma-border-default); border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); box-shadow: var(--hma-shadow-card); }
.hma-v2 .v2-note { margin: -4px 0 0; color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }

/* Controls */
.hma-v2 .v2-input, .hma-v2 .v2-select { min-width: 0; height: var(--hma-control-md); padding: 0 12px; border: 1px solid var(--hma-border-control); border-radius: var(--hma-radius-md); background-color: var(--hma-bg-surface); color: var(--hma-text-primary); font-size: 14px; }
.hma-v2 .v2-select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c665f' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; }
.hma-v2 .v2-input::placeholder { color: var(--hma-text-secondary); }
.hma-v2 .v2-input:focus, .hma-v2 .v2-select:focus { border-color: var(--hma-focus); outline: 0; box-shadow: 0 0 0 3px var(--hma-focus-ring); }
.hma-v2 .v2-search { padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.75' fill='none' stroke='%235c665f' stroke-width='1.5'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%235c665f' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-position: 12px center; background-repeat: no-repeat; }
.hma-v2 .v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--hma-control-md); padding: 0 14px; border: 1px solid transparent; border-radius: var(--hma-radius-md); background: transparent; color: var(--hma-text-primary); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; }
.hma-v2 .v2-btn:focus-visible { outline: 2px solid var(--hma-focus); outline-offset: 2px; }
.hma-v2 .v2-btn:disabled, .hma-v2 .v2-btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.hma-v2 .v2-btn-sm { height: var(--hma-control-sm); padding: 0 12px; }
.hma-v2 .v2-btn-primary { background: var(--hma-action-primary); color: var(--hma-text-on-primary); }
.hma-v2 .v2-btn-primary:hover { background: var(--hma-action-primary-hover); color: var(--hma-text-on-primary); }
.hma-v2 .v2-btn-secondary { border-color: var(--hma-border-control); background: var(--hma-bg-surface); }
.hma-v2 .v2-btn-secondary:hover:not(:disabled) { background: var(--hma-bg-subtle); color: var(--hma-text-primary); }
.hma-v2 .v2-btn-ghost { color: var(--hma-text-link); }
.hma-v2 .v2-btn-ghost:hover { background: var(--hma-bg-subtle); color: var(--hma-text-link); }
.hma-v2 .v2-btn-danger { border-color: var(--hma-action-danger); background: var(--hma-bg-surface); color: var(--hma-action-danger); }
.hma-v2 .v2-btn-danger:hover { background: var(--hma-status-danger-bg); color: var(--hma-action-danger); }
.hma-v2 .v2-btn-danger-solid { background: var(--hma-action-danger); color: var(--hma-text-on-primary); }
.hma-v2 .v2-btn-danger-solid:hover { background: var(--hma-status-danger); color: var(--hma-text-on-primary); }
.hma-v2 .v2-row-menu { width: var(--hma-control-sm); padding: 0; color: var(--hma-text-secondary); font-size: 16px; }

/* Filter bar (inside the card) */
.hma-v2 .v2-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hma-v2 .v2-filter-bar .v2-search { flex: 0 1 320px; }
.hma-v2 .v2-filter-bar .v2-select { flex: 0 0 auto; min-width: 180px; max-width: 260px; }
.hma-v2 .v2-spacer { flex: 1 1 0; }

/* View tabs (v2 Tab 810:262) */
.hma-v2 .v2-view-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--hma-border-default); scrollbar-width: none; }
.hma-v2 .v2-view-tabs::-webkit-scrollbar { display: none; }
.hma-v2 .v2-view-tabs .v2-tab { display: flex; flex: none; align-items: center; height: var(--hma-control-lg); padding: 0 12px; border-bottom: 2px solid transparent; color: var(--hma-text-secondary); font-size: 14px; white-space: nowrap; text-decoration: none; }
.hma-v2 .v2-view-tabs .v2-tab:hover { color: var(--hma-text-primary); }
.hma-v2 .v2-view-tabs .v2-tab.active { border-bottom-color: var(--hma-action-primary); color: var(--hma-text-primary); font-weight: 600; }

/* KPI tiles (806:227) */
.hma-v2 .v2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.hma-v2 .v2-kpi { display: grid; gap: 6px; align-content: start; padding: 18px 20px; border: 1px solid var(--hma-border-default); border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); box-shadow: var(--hma-shadow-card); }
.hma-v2 .v2-kpi > span { color: var(--hma-text-secondary); font-size: 13px; font-weight: 500; }
.hma-v2 .v2-kpi > b { color: var(--hma-text-primary); font-size: 26px; font-weight: 700; line-height: 32px; }
.hma-v2 .v2-kpi > small { color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }

/* Table (806:246) */
.hma-v2 .v2-table-wrap { min-width: 0; overflow-x: auto; }
.hma-v2 .v2-table { width: 100%; border-collapse: collapse; color: var(--hma-text-primary); font-size: 13px; line-height: 18px; }
.hma-v2 .v2-table th { height: 36px; padding: 0 12px; background: var(--hma-bg-subtle); color: var(--hma-text-secondary); font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; }
.hma-v2 .v2-table th:first-child { border-radius: var(--hma-radius-md) 0 0 var(--hma-radius-md); }
.hma-v2 .v2-table th:last-child { border-radius: 0 var(--hma-radius-md) var(--hma-radius-md) 0; }
.hma-v2 .v2-table td { height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--hma-border-default); vertical-align: middle; }
.hma-v2 .v2-table td small { display: block; color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-table tr.is-selected td { background: var(--hma-status-success-bg); }
.hma-v2 .v2-table .v2-num { text-align: right; font-variant-numeric: tabular-nums; }
.hma-v2 .v2-table .v2-muted { color: var(--hma-text-secondary); }
.hma-v2 .v2-table .v2-actions { width: 1%; text-align: right; white-space: nowrap; }
.hma-v2 .v2-link { color: var(--hma-text-link); font-weight: 600; text-decoration: none; }
.hma-v2 .v2-link:hover { text-decoration: underline; }
.hma-v2 .v2-mono { display: inline-block; max-width: 100%; overflow: hidden; color: inherit; font-family: var(--hma-font-mono); font-size: 13px; vertical-align: bottom; white-space: nowrap; text-overflow: ellipsis; }
.hma-v2 .v2-table td .v2-mono { max-width: 320px; }
.hma-v2 .v2-text-danger { color: var(--hma-status-danger); }
.hma-v2 .v2-empty-row td { height: auto; padding: 28px 12px; color: var(--hma-text-secondary); text-align: center; }

/* Status chip (802:229): dot + word */
.hma-v2 .v2-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.hma-v2 .v2-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hma-v2 .v2-chip-success { background: var(--hma-status-success-bg); color: var(--hma-status-success); }
.hma-v2 .v2-chip-warning { background: var(--hma-status-warning-bg); color: var(--hma-status-warning); }
.hma-v2 .v2-chip-danger { background: var(--hma-status-danger-bg); color: var(--hma-status-danger); }
.hma-v2 .v2-chip-info { background: var(--hma-status-info-bg); color: var(--hma-status-info); }
.hma-v2 .v2-chip-neutral { background: var(--hma-status-neutral-bg); color: var(--hma-status-neutral); }

/* Pager (803:188) */
.hma-v2 .v2-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-pager-buttons { display: flex; gap: 8px; }

/* Mobile list cards (806:247) and filters sheet — shown below 768px. */
.hma-v2 .v2-mlist, .hma-v2 .v2-mfilters { display: none; }
.hma-v2 .v2-mcard { position: relative; display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--hma-border-default); border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); color: var(--hma-text-primary); text-decoration: none; }
.hma-v2 .v2-mcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.hma-v2 .v2-mcard-title { min-width: 0; overflow: hidden; color: var(--hma-text-primary); font-size: 15px; font-weight: 600; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
a.v2-mcard-title:hover { text-decoration: underline; }
.hma-v2 a.v2-mcard-title::after { content: ""; position: absolute; inset: 0; border-radius: var(--hma-radius-lg); }
.hma-v2 .v2-mcard form, .hma-v2 .v2-mcard .v2-btn { position: relative; z-index: 1; }
.hma-v2 .v2-mcard-meta { color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
.hma-v2 .v2-mcard .v2-btn { width: 100%; height: var(--hma-control-lg); }
.hma-v2 .v2-empty { margin: 0; padding: 24px 16px; border: 1px dashed var(--hma-border-default); border-radius: var(--hma-radius-lg); color: var(--hma-text-secondary); text-align: center; }
.hma-v2 .v2-filter-sheet > summary { list-style: none; }
.hma-v2 .v2-filter-sheet > summary::-webkit-details-marker { display: none; }
.hma-v2 .v2-sheet-panel { position: fixed; inset: auto 0 0 0; z-index: 1060; display: grid; gap: 16px; max-height: 85dvh; padding: 20px 16px 24px; overflow-y: auto; border-radius: 14px 14px 0 0; background: var(--hma-bg-surface); box-shadow: var(--hma-shadow-sheet); }
.hma-v2 .v2-filter-sheet[open]::before { content: ""; position: fixed; inset: 0; z-index: 1055; background: var(--hma-scrim); }
.hma-v2 .v2-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.hma-v2 .v2-sheet-head strong { color: var(--hma-text-primary); font-size: 18px; font-weight: 600; }
.hma-v2 .v2-sheet-head .v2-btn { height: var(--hma-control-lg); }
.hma-v2 .v2-sheet-fields { display: grid; gap: 12px; }
.hma-v2 .v2-sheet-fields label { display: grid; gap: 6px; color: var(--hma-text-primary); font-size: 13px; font-weight: 500; }
.hma-v2 .v2-sheet-fields .v2-select, .hma-v2 .v2-sheet-fields .v2-input { width: 100%; height: var(--hma-control-lg); }
.hma-v2 .v2-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hma-v2 .v2-sheet-actions .v2-btn { height: var(--hma-control-lg); }

.hma-v2 .v2-sheet-customers { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.hma-v2 .v2-sheet-customers legend { margin: 0 0 6px; font-size: 13px; font-weight: 500; }
.hma-v2 .v2-sheet-customers small { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-checklist { display: grid; max-height: 220px; overflow-y: auto; border: 1px solid var(--hma-border-default); border-radius: var(--hma-radius-md); }
.hma-v2 .v2-checklist label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--hma-border-default); font-size: 14px; font-weight: 400; }
.hma-v2 .v2-checklist label:last-child { border-bottom: 0; }
.hma-v2 .v2-checklist label[hidden] { display: none; }
.hma-v2 .v2-checklist input { width: 18px; height: 18px; accent-color: var(--hma-action-primary); }
.hma-v2 .v2-filter-bar .hma-node-filter-sheet:not([open]) > summary { display: inline-flex; align-items: center; height: var(--hma-control-md); padding: 0 14px; border: 1px solid var(--hma-border-control); border-radius: var(--hma-radius-md); background: var(--hma-bg-surface); font-size: 13px; font-weight: 500; cursor: pointer; }

.hma-v2 .v2-filter-bar .hma-global-node-filter-fields { align-items: start; }

/* Dialog (806:254) on Bootstrap's modal */
.hma-v2 .v2-dialog .modal-content { align-items: stretch; border: 0; border-radius: var(--hma-radius-lg); box-shadow: var(--hma-shadow-popover); }
.hma-v2 .v2-dialog .modal-body { display: grid; gap: 12px; padding: 24px 24px 8px; }
.hma-v2 .v2-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 24px; }
.hma-v2 .v2-dialog .v2-dialog-context { margin: -8px 0 0; color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-dialog p { margin: 0; font-size: 14px; line-height: 20px; }
.hma-v2 .v2-dialog .v2-check { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; }
.hma-v2 .v2-dialog .v2-check input { width: 18px; height: 18px; accent-color: var(--hma-action-danger); }
.hma-v2 .v2-dialog .modal-footer { justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; border: 0; }
.hma-v2 .v2-dialog .modal-footer > * { margin: 0; }

/* Platform Overview (IA concept 829:161 / 829:441): attention-first cards with short row lists. */
.hma-v2 .v2-kpi-warning > small { color: var(--hma-status-warning); }
.hma-v2 .v2-kpi-critical > small { color: var(--hma-status-danger); }
.hma-v2 .v2-overview-grid { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 20px 16px; align-items: start; }
.hma-v2 .v2-kpis + .v2-overview-grid { margin-top: 20px; }
.hma-v2 .v2-overview-side { display: grid; gap: 16px; min-width: 0; }
.hma-v2 .v2-overview-grid .v2-card { gap: 12px; }
.hma-v2 .v2-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hma-v2 .v2-card-head h2 { margin: 0; color: var(--hma-text-primary); font-size: 15px; font-weight: 600; line-height: 20px; }
.hma-v2 .v2-card-head p { margin: 2px 0 0; color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }
.hma-v2 .v2-card-link { flex: none; color: var(--hma-text-link); font-size: 13px; font-weight: 600; text-decoration: none; }
.hma-v2 .v2-card-link:hover { text-decoration: underline; }
.hma-v2 .v2-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.hma-v2 .v2-rows > li { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--hma-border-default); color: var(--hma-text-primary); font-size: 13px; line-height: 18px; }
.hma-v2 .v2-rows .v2-chip { flex: none; }
.hma-v2 .v2-row-text { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.hma-v2 .v2-row-text small, .hma-v2 .v2-row-aside, .hma-v2 .v2-row-time { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-row-title { color: var(--hma-text-primary); font-weight: 600; text-decoration: none; }
.hma-v2 a.v2-row-title:hover, .hma-v2 a.v2-row-plain:hover { color: var(--hma-text-link); text-decoration: underline; }
.hma-v2 .v2-row-plain { color: inherit; text-decoration: none; }
.hma-v2 .v2-row-grow { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.hma-v2 .v2-row-aside { flex: none; font-variant-numeric: tabular-nums; }
.hma-v2 .v2-row-time { flex: 0 0 76px; font-variant-numeric: tabular-nums; }
.hma-v2 .v2-facts b { flex: none; font-weight: 600; }
.hma-v2 .v2-facts .v2-row-grow { color: var(--hma-text-secondary); }
.hma-v2 .v2-rows-empty { color: var(--hma-text-secondary); }
.hma-v2 .v2-activity .v2-row-grow { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hma-v2 a.v2-link.v2-mono { color: var(--hma-text-link); }

/* Router Deployment sections (IA Router detail 836:920 + wave 2 823:247): header, key-value rows,
   filter chips, two-column card rows, guide steps, danger card. */
.hma-v2 .v2-stack { display: grid; gap: 20px; min-width: 0; }
.hma-v2 .v2-router-header { align-items: flex-start; margin-bottom: 20px; }
.hma-v2 .v2-router-header .v2-eyebrow { display: block; margin-bottom: 4px; color: var(--hma-text-secondary); }
.hma-v2 .v2-router-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hma-v2 .v2-router-header .v2-mono { color: var(--hma-text-secondary); font-size: 13px; }
.hma-v2 .v2-header-actions { display: flex; flex: none; align-items: center; gap: 12px; }
.hma-v2 .v2-header-actions small { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-router-grid { grid-template-columns: minmax(0,1fr) 400px; }
.hma-v2 .v2-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }
.hma-v2 .v2-settings-row { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; align-items: start; }
.hma-v2 .v2-kv { display: grid; margin: 0; }
.hma-v2 .v2-kv > div { display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--hma-border-default); }
.hma-v2 .v2-kv dt { flex: 0 0 176px; color: var(--hma-text-secondary); font-size: 13px; font-weight: 400; }
.hma-v2 .v2-kv dd { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; margin: 0; color: var(--hma-text-primary); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.hma-v2 .v2-kv dd .v2-btn { margin-left: auto; }
.hma-v2 .v2-kv dd.v2-text-danger { color: var(--hma-status-danger); }
.hma-v2 .v2-fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.hma-v2 .v2-fchip { display: inline-flex; align-items: center; gap: 6px; height: var(--hma-control-sm); padding: 0 12px; border: 1px solid var(--hma-border-control); border-radius: 999px; background: var(--hma-bg-surface); color: var(--hma-text-primary); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
.hma-v2 .v2-fchip span { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-fchip:hover { background: var(--hma-bg-subtle); color: var(--hma-text-primary); }
.hma-v2 .v2-fchip.active { border-color: var(--hma-text-primary); background: var(--hma-text-primary); color: var(--hma-bg-surface); }
.hma-v2 .v2-fchip.active span { color: inherit; opacity: .8; }
.hma-v2 .v2-scroll { min-width: 0; overflow-x: auto; }
.hma-v2 .v2-route-ok { color: var(--hma-status-success); }
.hma-v2 .v2-route-warn { color: var(--hma-status-warning); }
.hma-v2 .v2-route-muted { color: var(--hma-text-secondary); }
.hma-v2 .v2-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: v2-step; }
.hma-v2 .v2-steps li { display: flex; align-items: center; gap: 12px; color: var(--hma-text-primary); font-size: 14px; counter-increment: v2-step; }
.hma-v2 .v2-steps li::before { content: counter(v2-step); display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hma-status-success-bg); color: var(--hma-status-success); font-size: 12px; font-weight: 600; }
.hma-v2 .v2-field { display: grid; gap: 6px; color: var(--hma-text-primary); font-size: 13px; font-weight: 500; }
.hma-v2 .v2-field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.hma-v2 .v2-field-row .v2-field { flex: 1 1 240px; }
.hma-v2 .v2-check { display: flex; align-items: center; gap: 10px; color: var(--hma-text-primary); font-size: 13px; }
.hma-v2 .v2-check input { width: 18px; height: 18px; accent-color: var(--hma-action-primary); }
.hma-v2 .v2-card-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hma-v2 .v2-card-row p { margin: 0; color: var(--hma-text-secondary); font-size: 13px; }
.hma-v2 .v2-card-danger { border-color: var(--hma-action-danger); }
.hma-v2 .v2-card-danger .v2-card-head h2 { color: var(--hma-action-danger); }
.hma-v2 .v2-alert { margin: 0; padding: 10px 12px; border-radius: var(--hma-radius-md); font-size: 13px; }
.hma-v2 .v2-alert-danger { background: var(--hma-status-danger-bg); color: var(--hma-status-danger); }
.hma-v2 .v2-alert-info { background: var(--hma-status-info-bg); color: var(--hma-status-info); }
.hma-v2 .v2-alert-success { background: var(--hma-status-success-bg); color: var(--hma-status-success); }
.hma-v2 .v2-alert-warning { background: var(--hma-status-warning-bg); color: var(--hma-status-warning); }
.hma-v2 .v2-card .hma-live-log-panel { border-radius: var(--hma-radius-md); }
.hma-v2 .v2-card.collapse:not(.show) { display: none; }
.hma-v2 .hma-node-health-filters .v2-search { flex-basis: 260px; }
.hma-v2 .hma-node-health-filters .v2-select { min-width: 150px; }
.hma-v2 .v2-short { display: none; }
/* Maintained Node detail (wave 3, Figma 840:354): history headings and workspace tools. */
.hma-v2 .hma-history-heading, .hma-v2 .hma-history-card-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.hma-v2 .hma-history-heading > *, .hma-v2 .hma-history-card-heading > * { min-width: 0; max-width: 100%; }
.hma-v2 .hma-history-heading h2, .hma-v2 .hma-history-card-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.hma-v2 .hma-terminal-options select { min-height: 32px; }
.hma-v2 .v2-card > .card-body { padding: 0; }
.hma-v2 .hma-settings-filter button { height: var(--hma-control-sm); padding: 0 12px; border: 1px solid var(--hma-border-control); border-radius: 999px; background: var(--hma-bg-surface); color: var(--hma-text-primary); font-size: 13px; }
.hma-v2 .hma-settings-filter button.active { border-color: var(--hma-text-primary); background: var(--hma-text-primary); color: var(--hma-bg-surface); }
.hma-v2 .v2-card > *, .hma-v2 .v2-stack > * { min-width: 0; }
.hma-v2 .v2-stack > .v2-kpis + .v2-overview-grid { margin-top: 0; }
.hma-v2 .v2-radios { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.hma-v2 .v2-radios legend { margin-bottom: 4px; }
.hma-v2 .v2-field .v2-input, .hma-v2 .v2-field .v2-select { width: 100%; }
.hma-v2 .v2-field .password-control { display: flex; gap: 8px; }
.hma-v2 .v2-field .password-control .v2-input { flex: 1; min-width: 0; }

@media (max-width: 1199.98px) {
  .hma-v2 .v2-router-grid, .hma-v2 .v2-grid-2, .hma-v2 .v2-settings-row { grid-template-columns: minmax(0,1fr); }
  .hma-v2 .v2-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hma-v2 .v2-overview-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 767.98px) {
  .hma-v2.v2-list .hma-content { padding: 20px 16px 32px; }
  .hma-v2.v2-list .hma-page-heading { flex-wrap: wrap; }
  .hma-v2.v2-list .hma-page-heading > .btn, .hma-v2.v2-list .hma-page-heading > button { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 100%; width: 100%; min-height: var(--hma-control-lg); }
  .hma-v2.v2-list .hma-code-generate { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: end; gap: 8px; }
  .hma-v2.v2-list .hma-code-generate label { display: grid; gap: 4px; flex: 0 0 120px; }
  .hma-v2.v2-list .hma-code-generate .v2-input { height: var(--hma-control-lg); }
  .hma-v2.v2-list .hma-code-generate .btn { flex: 1; min-height: var(--hma-control-lg); }
  .hma-v2 .v2-kpis { gap: 12px; }
  .hma-v2 .v2-kpi { padding: 14px; }
  .hma-v2 .v2-card.v2-card-mobile-flat { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .hma-v2 .v2-table-wrap, .hma-v2 .v2-filter-bar.v2-desktop-only { display: none; }
  .hma-v2 .v2-filter-bar .v2-search, .hma-v2 .v2-filter-bar .v2-select { flex: 1 1 100%; height: var(--hma-control-lg); }
  .hma-v2 .v2-mlist { display: grid; gap: 12px; }
  .hma-v2 .v2-mfilters { display: flex; gap: 8px; }
  .hma-v2 .v2-mfilters .v2-search { flex: 1; height: var(--hma-control-lg); }
  .hma-v2 .v2-mfilters .v2-filter-sheet > summary.v2-btn { height: var(--hma-control-lg); }
  .hma-v2 .v2-pager { justify-content: center; text-align: center; }
  .hma-v2 .v2-pager > span:first-child { flex-basis: 100%; }
  .hma-v2 .v2-pager-buttons { flex: 1; }
  .hma-v2 .v2-pager-buttons .v2-btn { flex: 1; height: var(--hma-control-lg); }
  .hma-v2 .v2-overview-grid, .hma-v2 .v2-overview-side { gap: 16px; }
  .hma-v2 .v2-row-text { flex-direction: column; align-items: flex-start; }
  .hma-v2 .v2-overview-attention .v2-row-aside { display: none; }
  .hma-v2 .v2-rows > li { min-height: 44px; }
  .hma-v2 .v2-kpis + .v2-overview-grid { margin-top: 16px; }
  .hma-v2 .v2-activity .v2-row-grow { white-space: normal; }
  .hma-v2 .v2-stack { gap: 16px; }
  .hma-v2 .v2-router-header { flex-wrap: wrap; }
  .hma-v2 .v2-header-actions { flex: 1 1 100%; }
  .hma-v2 .v2-header-actions .v2-btn { flex: 1; height: var(--hma-control-lg); }
  .hma-v2 .v2-kv > div { flex-wrap: wrap; gap: 4px 12px; }
  .hma-v2 .v2-kv dt { flex-basis: 100%; }
  .hma-v2 .v2-fchips { flex-wrap: nowrap; overflow-x: auto; }
  .hma-v2 .v2-fchip { flex: none; height: var(--hma-control-md); }
  .hma-v2 .v2-card-row > .v2-btn, .hma-v2 .v2-field-row > .v2-btn, .hma-v2 .v2-card-row > form, .hma-v2 .v2-card-row > form > .v2-btn { flex: 1 1 100%; width: 100%; height: var(--hma-control-lg); }
  .hma-v2 .v2-router-header > div, .hma-v2 .v2-router-header .v2-header-actions { width: 100%; }
  .hma-v2 .v2-scroll.v2-keys { overflow: visible; }
  .hma-v2 .hma-key-table, .hma-v2 .hma-key-table tbody { display: block; width: 100%; }
  .hma-v2 .hma-key-table tbody tr { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .hma-v2 .hma-key-table tbody td:nth-child(n+3) { grid-column: 1 / -1; }
  .hma-v2 .hma-key-table tbody td { height: auto; }
  .hma-v2 .hma-key-table .inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
  .hma-v2 .hma-key-table .inline-form > .v2-btn { flex: 1 1 100%; }
  .hma-v2 .hma-key-table .password-control { flex: 1 1 100%; }
  .hma-v2 .router-overview .v2-kpi > b { font-size: 20px; line-height: 26px; }
  .hma-v2 .v2-long { display: none; }
  .hma-v2 .v2-short { display: inline; }
  .hma-v2 .v2-card-head { flex-wrap: wrap; }
  .hma-v2 .v2-card-head > .v2-header-actions { width: 100%; }
  .hma-v2 .v2-card-head.hma-live-log-heading { flex-direction: column; align-items: stretch; }
  .hma-v2 .v2-card-head.hma-live-log-heading > .v2-header-actions { flex: none; width: auto; }
  .hma-v2 .hma-terminal-tools input, .hma-v2 .hma-terminal-options select, .hma-v2 .hma-settings-filter button { min-height: var(--hma-control-lg); }
  .hma-v2 .hma-terminal-tools input { flex: 1 1 100%; grid-column: 1 / -1; width: 100%; }
  .hma-v2 .v2-card .v2-btn, .hma-v2 .v2-fchip { min-height: var(--hma-control-lg); }
  .hma-v2 .v2-field .v2-input, .hma-v2 .v2-field .v2-select, .hma-v2 .v2-card .v2-filter-bar .v2-select { height: var(--hma-control-lg); }
}

/* Customer workspace (Phase 3, Figma 854:161): the customer pages load only bootstrap, hma-theme,
   hma-shell and this sheet. Everything below is scoped to .hma-customer or v2-* classes. */
.hma-customer .hma-content { width: 100%; margin: 0; }
.hma-customer .hma-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.hma-customer .hma-page-heading .v2-mono { color: var(--hma-text-secondary); font-size: 13px; }
.hma-customer .v2-router-select { min-width: 280px; max-width: 360px; }
.hma-customer .v2-account-tabs { margin-bottom: 20px; }
.hma-v2 .autofill-sentinel { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; }
.hma-v2 .v2-kpis-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hma-v2 .v2-kpi-inline { margin: 0; color: var(--hma-text-primary); font-size: 22px; font-weight: 700; }
.hma-v2 .v2-empty-card { justify-items: center; padding: 48px 24px; text-align: center; }
.hma-v2 .v2-empty-card strong { color: var(--hma-text-primary); font-size: 16px; font-weight: 600; }
.hma-v2 .v2-empty-card p { max-width: 520px; margin: 0; color: var(--hma-text-secondary); font-size: 14px; }
.hma-v2 .v2-form-card { max-width: 640px; }
.hma-v2 .v2-form-narrow { max-width: 480px; }
.hma-v2 .v2-card-actions { justify-content: flex-start; }
.hma-v2 .v2-alert-warning { background: var(--hma-status-warning-bg); color: var(--hma-status-warning); }
.hma-v2 .v2-alert-success { background: var(--hma-status-success-bg); color: var(--hma-status-success); }
.hma-v2 .v2-textarea { height: auto; min-height: 64px; padding: 8px 12px; resize: vertical; }
.hma-v2 .v2-code-input { font-family: var(--hma-font-mono); letter-spacing: .5px; }
.hma-v2 .v2-secret { width: 120px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--hma-text-primary); font-family: var(--hma-font-mono); font-size: 13px; }
.hma-v2 .v2-secret[type="text"] { width: auto; min-width: 160px; }
.hma-v2 .v2-kv-stacked > div { flex-wrap: wrap; gap: 4px 12px; }
.hma-v2 .v2-kv-stacked dt { flex-basis: 100%; }
.hma-v2 .v2-kv dd .v2-chip { font-weight: 500; }
/* Logger counts on the Router Overview (replace the address grid, decision 1). */
.hma-v2 .v2-counts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.hma-v2 .v2-count { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--hma-radius-md); background: var(--hma-bg-subtle); color: var(--hma-text-primary); text-decoration: none; }
.hma-v2 a.v2-count:hover { outline: 1px solid var(--hma-border-control); }
.hma-v2 .v2-count b { font-size: 22px; font-weight: 700; line-height: 28px; }
.hma-v2 .v2-count span { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-count-success { color: var(--hma-status-success); }
.hma-v2 .v2-count-warning { color: var(--hma-status-warning); }
/* Row menu (⋯) on customer tables. */
.hma-v2 .v2-menu { position: relative; display: inline-block; }
.hma-v2 .v2-menu > summary { list-style: none; }
.hma-v2 .v2-menu > summary::-webkit-details-marker { display: none; }
.hma-v2 .v2-menu-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 40; display: grid; min-width: 232px; padding: 6px 0; border: 1px solid var(--hma-border-default); border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); box-shadow: var(--hma-shadow-popover); text-align: left; }
.hma-v2 .v2-menu-list button { min-height: 36px; padding: 8px 14px; border: 0; background: transparent; color: var(--hma-text-primary); font-size: 14px; text-align: left; white-space: nowrap; }
.hma-v2 .v2-menu-list button:hover, .hma-v2 .v2-menu-list button:focus-visible { background: var(--hma-bg-subtle); outline: 0; }
.hma-v2 .v2-menu-list .v2-menu-danger { color: var(--hma-status-danger); }
.hma-v2 .v2-row-actions { display: inline-flex; align-items: center; gap: 4px; }
/* Tables with a row menu must not clip it: they wrap their text instead of scrolling. */
.hma-v2 .customer-nodes .v2-scroll, .hma-v2 .customer-logger-keys .v2-scroll, .hma-v2 .v2-account .v2-table-wrap { overflow: visible; }
.hma-v2 .v2-mcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Maintained Nodes: selection bar, expanded details row. */
.hma-v2 .v2-selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--hma-text-secondary); font-size: 13px; }
.hma-v2 .v2-selection-bar [data-form-error] { flex-basis: 100%; margin: 0; color: var(--hma-status-danger); }
.hma-v2 .node-table .select-col { width: 36px; }
.hma-v2 .node-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--hma-action-primary); }
.hma-v2 .node-select-target { display: flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; }
.hma-v2 .node-table tr.is-expanded td { border-bottom-color: transparent; }
.hma-v2 .node-detail-row > td { padding: 4px 12px 16px 48px; background: var(--hma-bg-subtle); }
.hma-v2 .node-detail-groups { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.hma-v2 .node-detail-group h3 { margin: 8px 0 4px; color: var(--hma-text-secondary); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.hma-v2 .node-detail-group .v2-kv dt { flex-basis: 128px; }
.hma-v2 .node-live-status { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-pager .node-live-status { margin-right: auto; }
/* Logger keys */
.hma-v2 .v2-key-state { white-space: nowrap; }
.hma-v2 .v2-key-state .v2-chip { margin-right: 8px; }
/* Availability history bars (Monthly KPI card). */
.hma-v2 .v2-bars { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 16px; align-items: end; }
.hma-v2 .v2-bar-item { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; }
.hma-v2 .v2-bar-track { display: flex; align-items: flex-end; width: 56px; max-width: 100%; height: 128px; }
.hma-v2 .v2-bar { display: block; width: 100%; height: max(var(--availability, 0%), 6px); border-radius: 4px; background: var(--hma-action-primary); }
.hma-v2 .v2-bar.is-empty { height: 6px; background: var(--hma-border-default); }
.hma-v2 .v2-bar-item small { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .v2-bar-item b { color: var(--hma-text-primary); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
/* Customer dialogs: native dialog elements in the v2 dialog style (806:254). */
.hma-v2 dialog.v2-dlg { width: min(480px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); color: var(--hma-text-primary); box-shadow: var(--hma-shadow-popover); }
.hma-v2 dialog.v2-dlg::backdrop { background: var(--hma-scrim); }
.hma-v2 dialog.v2-dlg[open] { display: flex; flex-direction: column; }
.hma-v2 dialog.v2-dlg [hidden] { display: none !important; }
.hma-v2 dialog.v2-dlg.customer-dialog-suspended { visibility: hidden; }
.hma-v2 dialog.v2-dlg.customer-dialog-suspended::backdrop { background: transparent; }
.hma-v2 .v2-dlg > form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.hma-v2 .v2-dlg-body { display: grid; gap: 12px; padding: 24px 24px 8px; overflow-y: auto; }
.hma-v2 .v2-dlg h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 24px; overflow-wrap: anywhere; }
.hma-v2 .v2-dlg .v2-dialog-context { margin: -8px 0 0; color: var(--hma-text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.hma-v2 .v2-dlg p { margin: 0; font-size: 14px; line-height: 20px; }
.hma-v2 .v2-dlg .v2-dlg-note { color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }
.hma-v2 .v2-dlg .v2-alert { font-size: 13px; line-height: 18px; }
.hma-v2 .v2-dlg .v2-check { align-items: flex-start; }
.hma-v2 .v2-dlg .v2-check input { flex: none; margin-top: 1px; accent-color: var(--hma-action-danger); }
.hma-v2 .v2-dlg-link { justify-content: flex-start; padding: 0; }
.hma-v2 .v2-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; }
.hma-v2 .v2-dlg .password-control .v2-btn { flex: none; }

/* Admin Maintained Node dialogs in the v2 dialog style (Phase 3 leftover 1, Figma 863:1278 / 863:1436):
   Clock, Apply settings and File view keep their markup and hooks; Move uses .v2-dialog. */
.hma-v2 .v2-btn[hidden] { display: none; }
.hma-v2 .hma-clock-modal .modal-content { gap: 14px; padding: 22px 24px 20px; border: 0; border-radius: var(--hma-radius-lg); background: var(--hma-bg-surface); box-shadow: var(--hma-shadow-popover); color: var(--hma-text-primary); }
.hma-v2 .hma-clock-head { align-items: flex-start; }
.hma-v2 .hma-clock-head .eyebrow { display: block; margin: 0 0 2px; color: var(--hma-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.hma-v2 .hma-clock-head h2 { color: var(--hma-text-primary); font-size: 18px; font-weight: 600; line-height: 24px; }
.hma-v2 .hma-clock-intro, .hma-v2 .hma-files-view-sub, .hma-v2 .hma-files-view-note { color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }
.hma-v2 .hma-clock-rows > div { grid-template-columns: 150px minmax(0,1fr); padding: 10px 0; border-bottom: 1px solid var(--hma-border-default); }
.hma-v2 .hma-clock-rows dt { color: var(--hma-text-secondary); font-size: 13px; }
.hma-v2 .hma-clock-rows strong { color: var(--hma-text-primary); font-family: var(--hma-font-mono); font-size: 13px; }
.hma-v2 .hma-clock-rows small { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .hma-clock-rows strong.out-of-sync { color: var(--hma-status-warning); }
.hma-v2 .hma-clock-rows strong.in-sync { color: var(--hma-status-success); }
.hma-v2 .hma-clock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 16px; }
.hma-v2 .hma-clock-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hma-v2 .hma-clock-badge[hidden] { display: none; }
.hma-v2 .hma-clock-badge.out-of-sync { background: var(--hma-status-warning-bg); color: var(--hma-status-warning); }
.hma-v2 .hma-clock-badge.in-sync { background: var(--hma-status-success-bg); color: var(--hma-status-success); }
.hma-v2 .hma-clock-notice { gap: 4px; padding: 10px 12px; border: 0; border-radius: var(--hma-radius-md); font-size: 13px; line-height: 18px; }
.hma-v2 .hma-clock-notice strong { font-size: 14px; }
.hma-v2 .hma-clock-notice span { color: inherit; }
.hma-v2 .hma-clock-notice.warn { background: var(--hma-status-warning-bg); color: var(--hma-status-warning); }
.hma-v2 .hma-clock-notice.ok { background: var(--hma-status-success-bg); color: var(--hma-status-success); }
.hma-v2 .hma-clock-notice.err { background: var(--hma-status-danger-bg); color: var(--hma-status-danger); }
.hma-v2 .hma-clock-footer { gap: 8px; }
.hma-v2 .hma-clock-footnote { color: var(--hma-text-secondary); font-size: 12px; }
.hma-v2 .hma-apply-table th { height: 36px; padding: 0 12px; background: var(--hma-bg-subtle); color: var(--hma-text-secondary); font-size: 13px; font-weight: 500; text-transform: none; border: 0; }
.hma-v2 .hma-apply-table th:first-child { border-radius: var(--hma-radius-md) 0 0 var(--hma-radius-md); }
.hma-v2 .hma-apply-table th:last-child { border-radius: 0 var(--hma-radius-md) var(--hma-radius-md) 0; }
.hma-v2 .hma-apply-table td { padding: 10px 12px; border-bottom: 1px solid var(--hma-border-default); }
.hma-v2 .hma-apply-table td.before, .hma-v2 .hma-apply-table td.after { font-family: var(--hma-font-mono); }
.hma-v2 .hma-files-view-text { border: 0; border-radius: var(--hma-radius-md); background: var(--hma-bg-subtle); font-family: var(--hma-font-mono); font-size: 12px; line-height: 18px; }
.hma-v2 .v2-dialog .v2-dialog-list { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 20px; }
.hma-v2 .v2-dialog .v2-note { margin: 0; }
/* Admin Node Overview Error counters on phones (Phase 3 leftover 2, Figma 863:1476). */
.hma-v2 .v2-counters-summary { display: none; margin: 0; color: var(--hma-text-secondary); font-size: 12px; line-height: 16px; }
.hma-v2 .v2-counters-summary .v2-btn { height: auto; padding: 0; font-size: 12px; }

@media (max-width: 1199.98px) {
  .hma-v2 .node-detail-groups { grid-template-columns: minmax(0,1fr); gap: 4px; }
}
@media (max-width: 767.98px) {
  .hma-v2 .v2-counters:not(.show-all) .v2-kv > div.is-quiet { display: none; }
  .hma-v2 .v2-counters .v2-kv:not(:has(> div:not(.is-quiet))) { display: none; }
  .hma-v2 .v2-counters.show-all .v2-kv { display: grid; }
  .hma-v2 .v2-counters-summary { display: block; }
  .hma-v2 .v2-counters-summary .v2-btn { min-height: 44px; }
  .hma-v2 .hma-clock-rows > div { grid-template-columns: 110px minmax(0,1fr); }
  .hma-v2 .hma-clock-footer .v2-btn { width: 100%; height: var(--hma-control-lg); }
  .hma-v2 .hma-files-view-modal .hma-clock-footer .v2-btn { flex: 1; width: auto; }
  .hma-v2 #node-move .modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .hma-v2 #node-move .modal-footer .v2-btn { width: 100%; height: var(--hma-control-lg); }
}
@media (max-width: 767.98px) {
  .hma-customer .hma-page-heading { flex-direction: column; align-items: stretch; gap: 12px; }
  .hma-customer .v2-header-actions { flex-wrap: wrap; }
  .hma-customer .v2-header-actions [data-live-refresh] { display: none; }
  .hma-customer .v2-card > .v2-card-link { display: inline-flex; align-items: center; min-height: 44px; }
  .hma-customer .v2-router-select { width: 100%; min-width: 0; max-width: none; height: var(--hma-control-lg); }
  .hma-v2 .v2-kpis-3 { grid-template-columns: minmax(0,1fr); }
  .hma-v2 .v2-counts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hma-v2 .v2-bars { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .hma-v2 .v2-bar-item { grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; justify-items: start; gap: 10px; text-align: left; }
  .hma-v2 .v2-bar-item small { grid-column: 1; grid-row: 1; }
  .hma-v2 .v2-bar-track { grid-column: 2; grid-row: 1; width: 100%; height: 8px; border-radius: 4px; background: var(--hma-bg-subtle); }
  .hma-v2 .v2-bar { width: max(var(--availability, 0%), 4px); height: 8px; }
  .hma-v2 .v2-bar.is-empty { width: 4px; height: 8px; }
  .hma-v2 .v2-bar-item b { grid-column: 3; grid-row: 1; font-weight: 500; }
  .hma-v2 .v2-mfilters-form { flex: 1; }
  .hma-v2 .v2-mfilters-form .v2-search { width: 100%; height: var(--hma-control-lg); }
  .hma-v2 .v2-selection-bar .v2-btn { min-height: var(--hma-control-lg); }
  .hma-v2 .v2-menu-list button { min-height: 44px; }
  .hma-v2 .v2-row-menu { width: var(--hma-control-lg); height: var(--hma-control-lg); }
  .hma-v2 .v2-mcard-actions .v2-btn { width: 100%; height: var(--hma-control-lg); }
  /* Customer node and key tables become cards; one table keeps selection, polling and the row menu. */
  .hma-v2 .customer-nodes .node-table, .hma-v2 .customer-nodes .node-table tbody, .hma-v2 .customer-logger-keys .hma-key-table, .hma-v2 .customer-logger-keys .hma-key-table tbody { display: block; width: 100%; }
  .hma-v2 .customer-nodes .node-table thead, .hma-v2 .customer-logger-keys .hma-key-table thead { display: none; }
  .hma-v2 .customer-nodes .node-table tr[data-node-row] { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 4px 10px; padding: 12px 4px; border-bottom: 1px solid var(--hma-border-default); }
  .hma-v2 .customer-nodes .node-table tr[data-node-row] > td { height: auto; padding: 0; border: 0; }
  .hma-v2 .customer-nodes .node-table .select-col { grid-column: 1; grid-row: 1 / 4; width: 44px; }
  .hma-v2 .customer-nodes .node-select-target { width: 44px; height: 44px; }
  .hma-v2 .customer-nodes .node-table .node-address { grid-column: 2; grid-row: 1; font-size: 15px; }
  .hma-v2 .customer-nodes .node-table .node-status { grid-column: 3; grid-row: 1; }
  .hma-v2 .customer-nodes .node-table .node-menu-cell { grid-column: 4; grid-row: 1 / 4; }
  .hma-v2 .customer-nodes .node-table .node-station { grid-column: 2 / 4; grid-row: 2; color: var(--hma-text-secondary); font-size: 12px; }
  .hma-v2 .customer-nodes .node-table .node-model { display: none; }
  .hma-v2 .customer-nodes .node-table .node-scope { grid-column: 2; grid-row: 3; font-size: 12px; }
  .hma-v2 .customer-nodes .node-table .node-availability { grid-column: 3; grid-row: 3; font-size: 12px; text-align: right; }
  .hma-v2 .customer-nodes .node-table .node-availability small { display: none; }
  .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table tr[data-node-row] { grid-template-columns: minmax(0,1fr) auto auto; }
  .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-address, .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-station, .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-scope { grid-column: 1; }
  .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-status, .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-availability { grid-column: 2; }
  .hma-v2 .customer-nodes:not(.nodes-can-select) .node-table .node-menu-cell { grid-column: 3; }
  .hma-v2 .customer-nodes .node-table tr.node-detail-row { display: block; }
  .hma-v2 .customer-nodes .node-table tr.node-detail-row[hidden] { display: none; }
  .hma-v2 .customer-nodes .node-detail-row > td { display: block; padding: 4px 12px 12px; }
  .hma-v2 .customer-nodes .node-table .v2-empty-row { display: block; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--hma-border-default); }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td { height: auto; padding: 0; border: 0; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td:nth-child(1)::before { content: "Logger "; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td:nth-child(2) { grid-column: 1; color: var(--hma-text-secondary); font-size: 12px; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td:nth-child(3) { display: none; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td.v2-key-state { grid-column: 1; grid-row: 3; }
  .hma-v2 .customer-logger-keys .hma-key-table tbody td.v2-actions { grid-column: 2; grid-row: 1 / 4; width: auto; }
  .hma-v2 .customer-logger-keys .hma-key-table .v2-btn-sm { height: var(--hma-control-lg); }
  .hma-v2 dialog.v2-dlg { width: calc(100vw - 32px); }
  .hma-v2 .v2-dlg-body { padding: 20px 16px 8px; }
  .hma-v2 .v2-dlg-foot { flex-direction: column-reverse; padding: 16px; }
  .hma-v2 .v2-dlg-foot .v2-btn { width: 100%; height: var(--hma-control-lg); }
  .hma-v2 .v2-dlg .v2-input, .hma-v2 .v2-dlg .v2-select { height: var(--hma-control-lg); }
}
