/* Admin workspace, 2026-10-02. A focused final layer over the legacy pages. */
:root { --admin-sidebar-width: 224px; --admin-gap: 16px; }
body { background: #f4f6f9; }
.workspace { margin-left: var(--admin-sidebar-width); }
.sidebar { width: var(--admin-sidebar-width); padding: 20px 12px 14px; }
.brand { padding-bottom: 18px; }
.brand strong { font-size: 16px; }
.brand small { font-size: 11px; }
.side-nav { flex: 1; min-height: 0; overscroll-behavior: contain; }
.nav-group-toggle { min-height: 32px; padding: 7px 10px; font-size: 11px; }
.nav-group .nav-link { min-height: 36px; padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.nav-icon { width: 24px; height: 24px; flex-basis: 24px; }
.sidebar-foot { flex-shrink: 0; padding-top: 12px; }
.sidebar-foot > p { margin-top: 8px; font-size: 9px; }
.system-state small { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { min-height: 64px; padding: 12px 24px; gap: 16px; background: #fff; box-shadow: none; }
.topbar-title { gap: 8px; min-width: 0; }
.topbar-title > div { min-width: 0; }
.topbar-title strong { font-size: 14px; white-space: nowrap; }
.topbar-title #topbar-parent { font-size: 12px; }
.topbar-actions { gap: 9px; flex-wrap: wrap; }
#menu-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 8px; }
#page-back, #page-home { width: 32px; height: 32px; min-height: 32px; font-size: 18px; border-radius: 8px; }
#page-back:disabled { opacity: .4; cursor: default; }
.workspace > main { width: 100%; max-width: 1760px; padding: 24px 28px 32px; }
.section-block > .section-title, .section-head { gap: 12px; }
.section-block h2 { font-size: 20px; }
.section-block > .panel { min-width: 0; }
.filter-bar, .section-toolbar { row-gap: 10px; }
button:not(:disabled), summary, .nav-link { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #6ee7b7; outline-offset: 3px;
}
[hidden] { display: none !important; }
.cockpit-heading { min-height: auto; padding-top: 0; padding-bottom: 4px; margin-bottom: 20px; align-items: center; }
.cockpit-heading .eyebrow { display: none; }
.cockpit-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.cockpit-heading .muted { margin-top: 7px; font-size: 12px; }
.cockpit-heading .update-meta { min-width: 190px; padding: 10px 14px; box-shadow: none; }
#summary.cards { margin-bottom: 16px; }
.overview-dashboard { gap: var(--admin-gap); }
.overview-health-banner { grid-template-columns: minmax(240px, 1fr) minmax(280px, .8fr); min-height: 72px; box-shadow: none; border-radius: 12px; }
.overview-health-message strong { font-size: 14px; }
.overview-health-message small { font-size: 11px; }
.overview-health-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-health-facts > div:nth-child(3) { display: none; }
.overview-health-facts strong { font-size: 17px; }
.overview-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.overview-kpi { min-width: 0; min-height: 106px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 2px 5px rgb(15 23 42 / 3%); }
.overview-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(15 23 42 / 7%); }
.overview-kpi > strong { display: block; margin-top: 5px; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.3; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.overview-kpi-label { font-size: 12px; }
.overview-kpi > small { font-size: 10px; }
.overview-kpi-mark { font-size: 10px; }
.overview-traffic-card { padding: 16px 18px; border-radius: 12px; background: #fff; box-shadow: none; gap: 12px; }
.overview-traffic-head strong { font-size: 15px; }
.overview-traffic-head > div:first-child > span { display: none; }
.overview-traffic-head small { font-size: 10px; }
.overview-traffic-period { gap: 2px; }
.overview-traffic-period strong { font-size: 18px; }
.overview-traffic-metrics > div { padding: 10px 15px; }
.overview-traffic-metrics strong { font-size: 20px; }
.overview-traffic-history { border-top: 1px solid #edf0f4; padding-top: 10px; min-width: 0; }
.overview-traffic-history > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #475569; font-size: 11px; list-style: none; }
.overview-traffic-history > summary::-webkit-details-marker { display: none; }
.overview-traffic-history > summary span { color: #94a3b8; font-size: 10px; }
.overview-traffic-history > summary::after { content: '⌄'; color: #64748b; }
.overview-traffic-history[open] > summary::after { transform: rotate(180deg); }
.overview-traffic-daily { max-height: 210px; overscroll-behavior: contain; }
.overview-cockpit-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.overview-trend-visual-card, .overview-live-card { min-width: 0; border-radius: 12px; box-shadow: none; padding: 18px; }
.overview-cockpit-card-head { align-items: flex-start; gap: 12px; }
.overview-cockpit-card-head strong { font-size: 15px; }
.overview-cockpit-card-head small { font-size: 10px; }
.overview-cockpit-card-head span:not(.status-chip) { font-size: 9px; letter-spacing: .05em; }
.overview-live-events { max-height: 220px; overscroll-behavior: contain; }
.operations-dashboard { margin: 16px 0; padding: 16px 18px; border-radius: 12px; box-shadow: none; background: #fff; }
.operations-dashboard > summary { list-style: none; }
.operations-dashboard > summary::-webkit-details-marker { display: none; }
.operations-dashboard-head { align-items: center; }
.operations-dashboard-head > div:first-child { display: block; }
.operations-dashboard-head .eyebrow { display: none; }
.operations-dashboard-head h2 { margin: 0 0 5px; font-size: 15px; }
.operations-dashboard-head p { font-size: 11px; }
.operations-fold-label { display: grid; text-align: right; gap: 5px; flex-shrink: 0; }
.operations-fold-label b { color: #0f766e; font-size: 12px; }
.operations-fold-label small { color: #94a3b8; font-size: 10px; }
.operations-dashboard-body { margin-top: 16px; border-top: 1px solid #edf0f4; padding-top: 16px; }
.operations-range { justify-content: flex-end; }
.operations-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.operations-kpis article { padding: 12px; border-radius: 10px; }
.operations-kpis strong { font-size: 23px; overflow-wrap: anywhere; }
.operations-visual-grid { grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); }
.dashboard-shortcuts, .operations-center { border-radius: 12px; box-shadow: none; }
.dashboard-shortcuts .eyebrow, .operations-center .eyebrow { display: none; }
.operations-center-head h2, .dashboard-shortcuts h2 { font-size: 15px; }
#detail { width: min(1080px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border-radius: 16px; overscroll-behavior: contain; }
.detail-navigation { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid #e2e8f0; background: #fff; }
#detail-back { flex-shrink: 0; padding: 7px 11px; font-size: 12px; border-radius: 8px; }
#detail-breadcrumb { flex: 1; color: #64748b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-navigation .close { position: static; flex-shrink: 0; width: 32px; height: 32px; min-height: 32px; padding: 0; margin-left: auto; font-size: 22px; }
#detail-content { padding: 24px; }
#detail-content .kv > div { min-width: 0; }
#detail-content .kv strong, #detail-content code { overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.pagination-toolbar, .pagination-actions { flex-wrap: wrap; gap: 8px; }
.notice.is-visible { margin-bottom: 16px; }
@media (min-width: 1041px) {
  body.nav-collapsed .sidebar { transform: translateX(-100%); }
  body.nav-collapsed .workspace { margin-left: 0; }
}
@media (max-width: 1280px) {
  .overview-health-banner { grid-template-columns: 1fr; gap: 12px; }
  .overview-kpi-grid { gap: 10px; }
  .overview-kpi { padding: 12px; }
  .overview-kpi > strong { font-size: 21px; }
  .overview-cockpit-grid { grid-template-columns: 1fr; }
  .operations-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .sidebar { transition: none; }
  .workspace { margin-left: 0; }
  .topbar { padding: 12px 18px; }
  .workspace > main { padding: 22px 20px 28px; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar-title { flex: 1; }
  .topbar-actions { gap: 7px; }
  .topbar-actions .connection-state, #role-badge, #quick-access kbd { display: none; }
  #quick-access { display: inline-flex; min-height: 32px; padding: 5px 9px; font-size: 11px; }
  #quick-access span { display: inline; }
  #refresh-current, #density-toggle { display: inline-grid; width: 32px; height: 32px; min-height: 32px; font-size: 16px; }
  #operator-auth { padding: 6px 10px; min-height: 32px; font-size: 11px; }
  .workspace > main { padding: 18px 14px 26px; }
  .cockpit-heading { display: grid; gap: 14px; margin-bottom: 16px; }
  .cockpit-heading h1 { font-size: 24px; }
  .cockpit-heading .update-meta { width: 100%; min-width: 0; }
  .overview-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-kpi.is-currency { grid-column: 1 / -1; order: 1; }
  .overview-health-banner { padding: 12px; }
  .overview-health-facts > div { padding: 6px 9px; }
  .overview-health-message strong { font-size: 13px; }
  .overview-traffic-card { padding: 14px; }
  .overview-traffic-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-traffic-metrics strong { font-size: 18px; }
  .overview-cockpit-card-head { flex-wrap: wrap; }
  .operations-dashboard-head { display: flex; flex-wrap: wrap; gap: 12px; }
  .operations-fold-label { text-align: left; }
  .operations-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-visual-grid { grid-template-columns: 1fr; }
  .operations-os-chart > div { grid-template-columns: 60px minmax(40px, 1fr) 90px; }
  #detail { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .detail-navigation { padding: 12px; gap: 8px; }
  #detail-breadcrumb { font-size: 10px; }
  #detail-content { padding: 16px; }
  #detail-content .kv { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topbar-title #topbar-parent { display: none; }
  .topbar-title > div::before { display: none; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .overview-health-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-traffic-period strong { font-size: 16px; }
  .overview-traffic-metrics > div { padding: 9px 10px; }
  .overview-trend-visual-card, .overview-live-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .overview-kpi:hover { transform: none; }
  .sidebar { transition: none; }
}
.wallet-id-link { display: inline; padding: 0; border: 0; background: transparent; color: var(--blue, #286b91); text-align: left; cursor: pointer; max-width: 100%; }
.wallet-id-link:hover, .table-row-title:hover { text-decoration: underline; }
.wallet-view-action { margin-bottom: 10px; white-space: nowrap; }
