/* Looking Glass — Access Desk (people / world assign clarity; RBAC unchanged) */
body.admin-ops .access-model {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(66, 216, 200, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(12, 28, 36, 0.75), rgba(8, 14, 22, 0.9));
}
body.admin-ops .access-model-compact {
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  line-height: 1.4;
}
body.admin-ops .access-model-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #42d8c8;
  margin-bottom: 0.35rem;
}
body.admin-ops .access-model-list {
  margin: 0.25rem 0 0.5rem 1.1rem;
  padding: 0;
  color: #d7e2ef;
  font-size: 0.88rem;
  line-height: 1.45;
}
body.admin-ops .access-model-foot {
  margin: 0.35rem 0 0;
}
body.admin-ops .access-desk-grid {
  align-items: start;
}
body.admin-ops .access-wizard h3 {
  margin-top: 0;
}
body.admin-ops .access-rbac-table {
  font-size: 0.8rem;
}
body.admin-ops .access-rbac-table td,
body.admin-ops .access-rbac-table th {
  padding: 0.35rem 0.45rem;
  vertical-align: top;
}
body.admin-ops button.linkish {
  display: inline;
  background: none;
  border: none;
  color: #42d8c8;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
body.admin-ops button.linkish:hover {
  color: #9ef0e6;
}
body.admin-ops .tight-top {
  margin-top: 1rem;
}
body.admin-ops .mono {
  font-family: ui-monospace, Cascadia Mono, Consolas, monospace;
  font-size: 0.9em;
}

/* World Soft Ops + Platform package glass */
body.admin-ops .soft-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem 1rem;
  margin: 0.35rem 0 0.85rem;
  align-items: start;
}
body.admin-ops .soft-ops-card {
  border: 1px solid rgba(66, 216, 200, 0.18);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(160deg, rgba(10, 22, 30, 0.72), rgba(6, 12, 18, 0.88));
  min-height: 8rem;
}
body.admin-ops .soft-ops-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #9ef0e6;
}
body.admin-ops .soft-ops-card .row {
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0;
}
body.admin-ops .soft-ops-out {
  max-height: 22rem;
  overflow: auto;
  font-size: 0.78rem;
}
body.admin-ops #pkg-manifest-body td {
  font-size: 0.85rem;
}
body.admin-ops #pkg-face-truth {
  margin-top: 0.5rem;
  line-height: 1.4;
  border-left: 3px solid rgba(66, 216, 200, 0.45);
  padding-left: 0.55rem;
}

/* Looking Glass — life story strip (investor-readable, densify ops glass) */
body.admin-ops .life-story-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem 0.75rem;
  margin: 0.15rem 0 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line, rgba(120, 140, 160, 0.28));
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.42);
}

body.admin-ops .life-story-kicker {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted, #8a9bb0);
  padding-top: 0.12rem;
}

body.admin-ops .life-story-lines {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  flex: 1 1 12rem;
}

body.admin-ops .life-story-line {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text, #d7e2ef);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

body.admin-ops .life-story-line.muted {
  color: var(--muted, #8a9bb0);
}

body.admin-ops .life-story-line.story-warn {
  color: var(--warn, #e6b35a);
}

body.admin-ops .life-story-line.story-ok {
  color: var(--accent, #3dd6c6);
}

/* World Map — surface basemap/auth errors next to plate (not buried under folds) */
body.admin-ops .map-err-banner {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 120, 100, 0.45);
  border-radius: 8px;
  background: rgba(48, 16, 16, 0.75);
  color: #ffc8c0;
  white-space: pre-wrap;
  max-height: 6rem;
  overflow: auto;
}
body.admin-ops .map-edit-hint {
  margin: 0.5rem 0 0.75rem;
  line-height: 1.4;
}

/* ═══ Modern Looking Glass menu system (0.18.7-webui) ═══ */
body.admin-ops .nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  margin-right: 0.35rem;
  border: 1px solid var(--god-line, rgba(120,140,160,.35));
  border-radius: 8px;
  background: rgba(20, 28, 40, 0.9);
  color: #e8f0ff;
  font-size: 1.1rem;
  cursor: pointer;
}
body.admin-ops .top-right-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.admin-ops .workspace-crumb {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ef0e6;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(66, 216, 200, 0.28);
  background: rgba(20, 40, 38, 0.55);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.admin-ops .nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
}
body.admin-ops.nav-open .nav-backdrop {
  display: block;
}
body.admin-ops .sidebar-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
body.admin-ops .rail-toggle {
  min-width: 1.8rem !important;
  padding: 0.2rem 0.35rem !important;
}
body.admin-ops .nav-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem;
  margin: 0 0 0.65rem;
}
body.admin-ops .nav-pin {
  font-size: 0.68rem !important;
  min-height: 1.85rem !important;
  padding: 0.25rem 0.35rem !important;
  border-radius: 6px !important;
  text-align: left;
  justify-content: flex-start;
}
body.admin-ops .nav-pin.active {
  border-color: rgba(100, 227, 213, 0.4) !important;
  color: #e8fffc !important;
  background: rgba(100, 227, 213, 0.12) !important;
}
body.admin-ops .ops-sidebar .tab-group-label {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 0.15rem 0.2rem 0.2rem;
  padding: 0.28rem 0.42rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7184a5 !important;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
body.admin-ops .ops-sidebar .tab-group-label::after {
  content: "▾";
  font-size: 0.65rem;
  opacity: 0.7;
}
body.admin-ops .ops-sidebar .tab-group.is-collapsed .tab-group-label::after {
  content: "▸";
}
body.admin-ops .ops-sidebar .tab-group.is-collapsed .tab-group-btns {
  display: none;
}
body.admin-ops .ops-sidebar .tab-group-label:hover {
  background: rgba(120, 169, 255, 0.06);
  color: #a8bdd8 !important;
}
body.admin-ops .sidebar-account-link {
  display: block;
  margin-top: 0.55rem;
  padding: 0.35rem 0.4rem;
  text-decoration: none;
  color: #8fa3c1;
}
body.admin-ops .sidebar-account-link:hover {
  color: #9ef0e6;
}
body.admin-ops #login .totp-field.hidden {
  display: none !important;
}
body.admin-ops #login .primary-cta {
  width: 100%;
  background: linear-gradient(180deg, #2a9d8f 0%, #1a7068 100%);
  border: 1px solid rgba(66, 216, 200, 0.55);
  color: #f0fffc;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}

/* Collapsed rail = icon mode */
body.admin-ops.rail-collapsed {
  --god-rail-w: 3.6rem;
}
body.admin-ops.rail-collapsed .ops-sidebar .nav-label,
body.admin-ops.rail-collapsed .ops-sidebar .tab-group-label,
body.admin-ops.rail-collapsed .ops-sidebar .nav-quick,
body.admin-ops.rail-collapsed .ops-sidebar .nav-tools,
body.admin-ops.rail-collapsed .ops-sidebar .sidebar-boundary,
body.admin-ops.rail-collapsed .ops-sidebar .sidebar-account-link,
body.admin-ops.rail-collapsed .ops-sidebar .live-indicator {
  display: none !important;
}
body.admin-ops.rail-collapsed .ops-sidebar .tab-group.is-collapsed .tab-group-btns {
  display: flex !important;
}
body.admin-ops.rail-collapsed .ops-sidebar .tab-nav .tab-btn {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0.45rem 0.25rem;
}
body.admin-ops.rail-collapsed .ops-sidebar {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

/* Perf: off-screen panels */
body.admin-ops .tab-panel.hidden {
  content-visibility: hidden;
  contain: layout style paint;
}

/* Sticky bar density / ease */
body.admin-ops .sticky-bar .scope-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7184a5;
  margin-bottom: 0.15rem;
}
body.admin-ops .sticky-bar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
body.admin-ops .sticky-bar .world-select {
  min-height: 2.2rem;
  border-radius: 8px;
}

/* Mobile / narrow: drawer menu */
@media (max-width: 960px) {
  body.admin-ops .nav-menu-btn {
    display: inline-flex;
  }
  body.admin-ops .ops-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.admin-ops .ops-sidebar {
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(88vw, 18rem);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }
  body.admin-ops.nav-open .ops-sidebar {
    transform: translateX(0);
  }
  body.admin-ops.rail-collapsed {
    --god-rail-w: 0px;
  }
  body.admin-ops .workspace-crumb {
    display: none;
  }
}

/* Command overview realign — grouped summaries, no chip-row overflow */
body.admin-ops .ops-canvas {
  min-width: 0;
  overflow-x: hidden;
}
body.admin-ops .cmd-summaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
  padding: 0;
  flex-wrap: nowrap;
  overflow: visible;
}
body.admin-ops .cmd-group {
  border: 1px solid rgba(66, 216, 200, 0.16);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: rgba(8, 14, 22, 0.55);
  min-width: 0;
}
body.admin-ops .cmd-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ad4c8;
  margin-bottom: 0.4rem;
}
body.admin-ops .cmd-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
}
body.admin-ops .sticky-bar .ctx-strip {
  flex-wrap: wrap;
  overflow-x: hidden;
}
@media (min-width: 1200px) {
  body.admin-ops .cmd-summaries {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
