.admin-shell { width: min(1280px, calc(100% - 24px)); margin: 0 auto; padding: 18px 0 42px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { padding: 16px; border: 1px solid #174141; background: rgba(7, 16, 16, .94); }
.stat-card small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.stat-card strong { display: block; margin-top: 12px; color: var(--cyan); font-size: 27px; font-weight: 500; }
.note-panel { margin-top: 12px; }
.note-panel p { margin: 0; color: #91a6a6; font-size: 12px; line-height: 1.8; }
.account-workbench, .hermes-grid { display: grid; grid-template-columns: minmax(230px, .36fr) minmax(0, 1fr); gap: 12px; }
.account-picker { min-width: 0; }
.search-row, .inline-form { display: flex; gap: 6px; padding: 12px; border-bottom: 1px dashed var(--cyan-dim); }
.search-row input, .inline-form input { min-width: 0; height: 35px; }
.search-row .btn, .inline-form .btn { flex: 0 0 auto; min-height: 35px; }
.account-list { max-height: 680px; overflow: auto; }
.account-item { display: block; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid #102b2b; color: #9fb3b3; background: transparent; text-align: left; }
.account-item:hover, .account-item.active { color: var(--cyan); background: rgba(0,255,255,.06); box-shadow: inset 2px 0 var(--cyan); }
.account-item strong, .account-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item strong { font-size: 11px; font-weight: 500; }
.account-item small { margin-top: 6px; color: var(--muted); font-size: 9px; }
.account-detail { min-width: 0; padding: 16px; }
.empty-state { min-height: 360px; display: grid; align-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--cyan); font-size: 14px; font-weight: 500; }
.detail-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px dashed var(--cyan-dim); }
.detail-head h2 { margin: 0 0 7px; color: var(--cyan); font-size: 18px; font-weight: 500; }
.detail-head code { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.status-pill { padding: 5px 8px; border: 1px solid var(--green); color: var(--green); font-size: 9px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 13px 0; }
.facts div { min-width: 0; padding: 9px; border: 1px solid #153636; background: #030909; }
.facts dt { color: var(--muted); font-size: 8px; }
.facts dd { margin: 6px 0 0; color: #b4c6c6; font-size: 11px; overflow-wrap: anywhere; }
.data-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.data-card { min-width: 0; border: 1px solid #174141; background: #030909; }
.data-card > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px dashed var(--cyan-dim); }
.data-card h3 { margin: 0; color: var(--cyan); font-size: 12px; font-weight: 500; }
.data-card > header span { color: var(--muted); font-size: 9px; }
.record-list { max-height: 250px; overflow: auto; }
.record { padding: 10px 12px; border-bottom: 1px solid #102b2b; }
.record:last-child { border-bottom: 0; }
.record p { margin: 0; color: #b5c6c6; font-family: "Noto Serif SC", serif; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.record small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.record .record-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 6px; }
.record .btn { min-height: 26px; padding: 0 7px; font-size: 9px; }
.record.muted { color: var(--muted); font-size: 10px; padding: 15px 12px; }
.compose-form { display: grid; gap: 9px; padding: 12px; }
.compose-form textarea { min-height: 110px; }
.compose-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compose-row input[type="color"] { width: 43px; height: 35px; padding: 2px; }
.mailbox-card .record-list { max-height: 280px; }
.submissions-card { margin-top: 10px; }
.devices-card, .activity-card { margin-top: 10px; }
.edit-form { border-top: 1px dashed var(--cyan-dim); background: rgba(0,255,255,.025); }
.edit-caption { color: var(--amber); font-size: 10px; letter-spacing: .06em; }
.edit-caption span { float: right; color: var(--muted); }
.hermes-grid { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }

/* One title-and-navigation row; the content starts on the same baseline. */
.admin-page { --cyan: #69e4da; --cyan-mid: #397f79; --cyan-dim: #244641; --cyan-faint: #69e4da0c; --green: #7cdda7; --muted: #869b97; }
.admin-page::before { opacity: .07; }
.admin-page::after { display: none; }
.admin-shell { width: min(1380px, calc(100% - 64px)); padding: 26px 0 42px; }
.workspace-header { display: grid; grid-template-columns: minmax(220px, .3fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 22px; }
.workspace-heading { min-width: 0; }
.workspace-heading .eyebrow { margin: 0 0 10px; font-size: 10px; }
.workspace-heading h1 { margin: 0 0 10px; color: #e0efec; font-size: clamp(28px, 3vw, 36px); font-weight: 500; line-height: 1.2; }
.workspace-heading .lead { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.workspace-nav { min-width: 0; padding: 12px 14px; border: 1px solid #254a44; border-radius: 6px; background: linear-gradient(115deg, #0c1a18f0, #091210f0); }
.workspace-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-item { min-height: 40px; padding: 10px 16px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #a0b9b3; font-size: 12px; white-space: nowrap; transition: background .16s, color .16s; }
.nav-item:hover { color: #d3f7ef; background: #69e4da08; }
.nav-item.active { border-color: #397f79; background: #69e4da12; color: var(--cyan); }
.workspace-utilities { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #193a34; color: #66847d; font-size: 9px; }
.workspace-utilities > span { margin-right: auto; }
.nav-link { color: #a2b8b1; text-decoration: none; font-size: 10px; }
.nav-link:hover { color: var(--cyan); }
.nav-logout { padding: 3px 0 3px 12px; border: 0; border-left: 1px solid #254a44; background: transparent; color: #a2b8b1; font-size: 10px; }
.admin-page .hidden { display: none !important; }
.admin-page .panel { border: 1px solid #274b44; border-radius: 6px; box-shadow: none; background: #091310ed; overflow: hidden; }
.admin-page .panel-head { min-height: 52px; padding: 12px 16px; border-bottom: 1px solid #24463f; background: #0b1a15; }
.admin-page .panel-head h2 { font-size: 12px; font-weight: 500; }
.admin-page .panel-head h2::before { content: ""; }
.admin-page .panel-body { padding: 16px; }
.admin-page .btn { min-height: 34px; padding: 7px 12px; border-radius: 4px; font-size: 11px; }
.admin-page .btn::before, .admin-page .btn::after { content: none; }
.admin-page .btn-primary { color: #06221e; background: var(--cyan); border-color: var(--cyan); }
.admin-page .btn-primary:hover:not(:disabled) { color: #06221e; background: #a7f6e9; }
.admin-page input, .admin-page select, .admin-page textarea { min-width: 0; min-height: 38px; border: 1px solid #2a4941; border-radius: 4px; padding: 9px 11px; font-size: 12px; background: #050e0b; color: #c4d6cf; }
.admin-page button:focus-visible, .admin-page a:focus-visible, .admin-page input:focus-visible, .admin-page select:focus-visible, .admin-page textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.admin-page .notice:not(:empty) { display: block; font-size: 11px; overflow-wrap: anywhere; }
.account-workbench { grid-template-columns: minmax(240px, .32fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.account-picker { display: flex; flex-direction: column; }
.account-picker > .panel-head, .account-picker > .search-row { flex: 0 0 auto; }
.account-list { flex: 1 1 0; max-height: none; min-height: 260px; }
.account-item { padding: 14px; }
.account-item strong { font-size: 12px; color: #bdd5cc; }
.account-item small { color: #69867a; line-height: 1.6; }
.search-row, .inline-form { gap: 8px; padding: 12px 14px; border-bottom: 1px solid #1d3930; }
.account-detail { padding: 16px; }
.detail-head { border-bottom-style: solid; }
.detail-head h2 { font-size: 19px; overflow-wrap: anywhere; }
.status-pill { border-color: #2e6348; border-radius: 999px; color: var(--green); padding: 5px 9px; }
.facts { gap: 8px; margin: 16px 0; }
.facts div { padding: 12px; border-radius: 4px; background: #06110c; }
.facts dt { font-size: 9px; }
.facts dd { font-size: 12px; overflow-wrap: anywhere; }
.data-columns { gap: 12px; align-items: start; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.data-card { border-color: #234637; border-radius: 4px; background: #06110c; }
.data-card > header { min-height: 44px; border-bottom-style: solid; padding: 12px; }
.data-card > header span { overflow-wrap: anywhere; }
.record { border-bottom-color: #173124; }
.hermes-whitelist-entry { position: sticky; top: 0; z-index: 1; border-left: 3px solid var(--cyan); background: #0b2019; box-shadow: 0 4px 12px #020804aa; }
.hermes-whitelist-entry p { color: var(--cyan); }
.hermes-whitelist-entry small { color: #9bc9ac; }
.record small { font-size: 9px; }
.record.muted { font-size: 11px; }
.record-actions { flex-wrap: wrap; }
.compose-form { gap: 10px; }
.compose-row { flex-wrap: wrap; }
.compose-row input[type="color"] { min-height: 34px; }
.stat-grid, .log-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-height: 105px; padding: 16px; border-color: #254a39; border-radius: 5px; background: #0a170ff0; }
.stat-card small { color: #8da798; font-size: 10px; }
.stat-card strong { color: #d6f4df; font-size: 28px; }
.section-toolbar, .toolbar-actions { display: flex; align-items: center; gap: 8px; }
.section-toolbar { justify-content: space-between; margin-bottom: 14px; font-size: 11px; color: var(--muted); }
.helper { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 14px; align-items: start; }
.lab-main { display: grid; gap: 14px; min-width: 0; }
.lab-peers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.peer-card { display: grid; gap: 9px; min-width: 0; padding: 14px; border: 1px solid #294b3d; border-radius: 5px; background: #051109; }
.step-label { color: var(--cyan); font-size: 10px; letter-spacing: .08em; }
.peer-card label, .lab-compose > label { color: var(--muted); font-size: 11px; }
.peer-card select { width: 100%; }
.peer-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.peer-footer span { font-size: 10px; color: #9dbda7; }
.permission-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; color: #a4bdae; font-size: 11px; }
.lab-compose { display: grid; gap: 10px; }
.lab-compose textarea { width: 100%; resize: vertical; min-height: 96px; }
.compose-row .helper { margin: 0; }
.lab-mailbox { max-height: 380px; overflow: auto; }
.trace-panel { min-width: 0; position: sticky; top: 16px; }
.trace-caption { margin: 0; padding: 12px 16px; color: var(--muted); font-size: 10px; line-height: 1.6; border-bottom: 1px solid #224632; }
.lab-trace { margin: 0; padding: 0; list-style: none; max-height: 660px; overflow: auto; }
.lab-trace li { padding: 12px 16px; border-bottom: 1px solid #193826; font-size: 11px; }
.lab-trace strong, .lab-trace code, .lab-trace small { display: block; }
.lab-trace strong { color: #b6d5c0; font-size: 10px; font-weight: 500; }
.lab-trace code { margin-top: 6px; color: #79ad91; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 10px; }
.lab-trace small { margin-top: 6px; color: var(--muted); font-size: 9px; }
.lab-trace .trace-error strong { color: #f793a1; }
.log-summary { margin-bottom: 14px; }
.log-filters { margin-bottom: 14px; }
.auto-refresh { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.admin-page .auto-refresh input { min-height: 0; width: 14px; height: 14px; accent-color: var(--cyan); padding: 0; }
.log-channel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.mode-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid #294633; border-radius: 4px; }
.mode-switch button, .source-chip { padding: 7px 10px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #87a391; font-size: 11px; }
.mode-switch .active, .source-chip.active { background: #69e4da12; color: var(--cyan); border-color: #2d6752; }
.log-sources { display: flex; flex-wrap: wrap; gap: 5px; }
.source-chip { border-color: #23422d; }
.ops-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ops-filter-grid label { display: grid; gap: 7px; color: #8ca998; min-width: 0; font-size: 11px; }
.ops-filter-grid input, .ops-filter-grid select { width: 100%; }
.ops-search { grid-column: span 2; }
.advanced-filters { margin-top: 16px; font-size: 11px; color: var(--muted); }
.advanced-filters summary { cursor: pointer; }
.advanced-filters .ops-filter-grid { margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #24412b; font-size: 10px; color: var(--muted); }
.ops-table-wrap { overflow: auto; min-height: 230px; }
.ops-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ops-table th { padding: 12px 14px; text-align: left; background: #08180d; color: #789582; font-size: 10px; font-weight: 500; }
.ops-table th:nth-child(1) { width: 165px; }
.ops-table th:nth-child(2) { width: 135px; }
.ops-table th:nth-child(3) { width: 80px; }
.ops-table th:nth-child(5) { width: 100px; }
.ops-table th:nth-child(6) { width: 65px; }
.ops-table td { padding: 13px 14px; border-top: 1px solid #1c3926; vertical-align: top; font-size: 11px; overflow-wrap: anywhere; line-height: 1.6; }
.ops-table td small { display: block; color: #6d8a75; font-size: 9px; margin-top: 3px; }
.ops-table tr:hover { background: #69e4da05; }
.log-level { display: inline-block; padding: 2px 6px; border: 1px solid #315741; border-radius: 3px; color: #8fc5a4; font-size: 9px; }
.log-level[data-level="error"] { color: #ff8da3; border-color: #754351; }
.log-level[data-level="warning"] { color: #edc36f; border-color: #766538; }
.ops-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; border-top: 1px solid #24412c; color: var(--muted); font-size: 11px; }
.log-stream > .notice { margin: 12px 16px; }
.ops-dialog { width: min(720px, calc(100% - 32px)); max-height: 85vh; overflow: auto; padding: 0; border: 1px solid #3a6c4e; border-radius: 6px; color: var(--text); background: #08140c; }
.ops-dialog::backdrop { background: #020804bf; backdrop-filter: blur(3px); }
.ops-details { display: grid; grid-template-columns: 130px minmax(0, 1fr); margin: 0; padding: 8px 18px 20px; font-size: 11px; }
.ops-details dt, .ops-details dd { margin: 0; padding: 12px 0; border-bottom: 1px solid #1b3926; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.7; }
.ops-details dt { color: var(--muted); }
@media (max-width: 1050px) {
  .workspace-header { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
  .nav-item { padding: 9px 11px; }
  .lab-grid { grid-template-columns: 1fr; }
  .trace-panel { position: static; }
  .lab-trace { max-height: 340px; }
  .ops-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-shell { width: calc(100% - 28px); padding-top: 18px; }
  .workspace-header { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .workspace-heading .eyebrow { margin-bottom: 7px; }
  .workspace-heading h1 { font-size: 28px; }
  .workspace-nav { padding: 10px; }
  .nav-item { flex: 1 0 auto; font-size: 11px; padding: 8px 10px; }
  .account-workbench, .hermes-grid { grid-template-columns: 1fr; }
  .account-picker { position: static; }
  .account-list { flex: 0 1 auto; min-height: 0; max-height: 240px; }
  .lab-peers, .data-columns { grid-template-columns: 1fr; }
  .stat-grid, .log-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-filter-grid, .advanced-filters .ops-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-table { min-width: 800px; }
  .admin-page .panel-head { flex-wrap: wrap; gap: 9px; }
}
@media (max-width: 450px) {
  .workspace-utilities { flex-wrap: wrap; gap: 10px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-filter-grid, .advanced-filters .ops-filter-grid { grid-template-columns: 1fr; }
  .ops-search { grid-column: auto; }
  .ops-details { grid-template-columns: 1fr; }
  .ops-details dt { padding-bottom: 0; border-bottom: 0; }
}
.broadcast-compose-panel { align-self: start; }
.broadcast-note { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 16px 0 0; }
.broadcast-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 16px; color: var(--muted); font-size: 10px; border-bottom: 1px solid #24412c; }
.broadcast-list { max-height: 720px; overflow: auto; }
.broadcast-record { padding: 18px; }
.broadcast-record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.broadcast-record > p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.broadcast-status { font-size: 10px; padding: 3px 7px; border: 1px solid #3b6550; border-radius: 3px; color: var(--cyan); flex-shrink: 0; }
.broadcast-status[data-status="expired"] { color: #97a398; border-color: #435247; }
.broadcast-status[data-status="withdrawn"] { color: #e9ba8d; border-color: #705b44; }
.message-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px 16px; margin: 12px 0; }
.message-meta div { min-width: 0; }
.message-meta dt { color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.message-meta dd { margin: 0; color: #a5c0ad; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.broadcast-record-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.admin-page .btn-danger { color: #eca590; border-color: #654c42; }
.broadcast-editor textarea { min-height: 140px; }
.broadcast-editor .broadcast-note { margin: 0; }
@media (prefers-reduced-motion: reduce) { .admin-page *, .admin-page *::before, .admin-page *::after { animation: none !important; transition: none !important; } }
