/* Paladio Runtime — v1 implementation-focused build */
:root {
  --bg-0: #0A0C10;
  --bg-1: #0E1117;
  --bg-2: #141821;
  --bg-3: #1B2030;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.18);

  --fg-0: #EEF1F6;
  --fg-1: #C2C8D2;
  --fg-2: #828A98;
  --fg-3: #5A6271;
  --fg-4: #3D4452;

  --blue: oklch(0.70 0.14 240);
  --blue-soft: oklch(0.70 0.14 240 / 0.14);
  --blue-line: oklch(0.70 0.14 240 / 0.35);
  --teal: oklch(0.76 0.10 195);
  --teal-soft: oklch(0.76 0.10 195 / 0.14);
  --amber: oklch(0.78 0.14 75);
  --amber-soft: oklch(0.78 0.14 75 / 0.16);
  --red: oklch(0.68 0.18 25);
  --red-soft: oklch(0.68 0.18 25 / 0.16);
  --green: oklch(0.74 0.14 152);
  --green-soft: oklch(0.74 0.14 152 / 0.16);
  --violet: oklch(0.66 0.13 295);
  --violet-soft: oklch(0.66 0.13 295 / 0.16);

  --font-sans: "Geist", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg-0); color: var(--fg-0); font-family: var(--font-sans); font-size: 13px; line-height: 1.45; -webkit-font-smoothing: antialiased; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }

/* Form controls (governance profile picker, etc.) */
.input,
select.input {
  padding: 7px 32px 7px 10px;
  min-height: 32px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background-color: var(--bg-2);
  color: var(--fg-0);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23828A98' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.input:focus,
select.input:focus {
  outline: none;
  border-color: var(--blue-line);
  box-shadow: 0 0 0 1px var(--blue-soft);
}
.input:disabled,
select.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.input option,
select.input option {
  background-color: var(--bg-2);
  color: var(--fg-0);
}

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* App */
.app { display: grid; grid-template-rows: 44px 1fr 22px; height: 100vh; }

/* ---------- HEADER ---------- */
.hdr {
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.hdr .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.brand-btn {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.brand-btn:hover { color: var(--fg-0); }
.brand-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.hdr .mark { width: 16px; height: 16px; position: relative; }
.hdr .mark::before { content: ""; position: absolute; inset: 0; background: var(--blue); transform: rotate(45deg); border-radius: 2px; }
.hdr .mark::after { content: ""; position: absolute; inset: 4px; background: var(--bg-1); transform: rotate(45deg); border-radius: 1px; }
.hdr .sep { width: 1px; height: 18px; background: var(--line); }
.hdr .tabs { display: flex; gap: 0; }
.hdr .tab {
  padding: 0 12px; height: 44px;
  display: flex; align-items: center; gap: 7px;
  color: var(--fg-2); font-size: 12.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.hdr .tab:hover { color: var(--fg-0); }
.hdr .tab.active { color: var(--fg-0); border-bottom-color: var(--blue); }
.hdr .tab .dot { width: 6px; height: 6px; border-radius: 50%; }
.hdr .tab[data-id="flux"] .dot { background: var(--blue); }
.hdr .tab[data-id="fabric"] .dot { background: var(--violet); }
.hdr .tab[data-id="fidelity"] .dot { background: var(--teal); }
.hdr .tab[data-id="forge"] .dot { background: var(--amber); }

.hdr-stats { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.hdr-stat { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-2); }
.hdr-stat strong { color: var(--fg-0); font-family: var(--font-mono); font-weight: 500; }
.hdr-stat .lbl { font-size: 10.5px; color: var(--fg-3); }

.search {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg-2);
  font-family: var(--font-mono); font-size: 11px;
  width: 200px;
}
.search input { flex: 1; background: none; border: none; outline: none; color: var(--fg-0); font-family: var(--font-mono); font-size: 11px; }
.search .kbd { font-size: 9.5px; padding: 0 4px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--fg-3); }

/* ---------- MAIN ---------- */
.main { overflow: hidden; min-height: 0; }
.screen { height: 100%; overflow: auto; }

/* ---------- PANELS ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}
.panel-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  min-height: 34px;
}
.panel-hd h3 { margin: 0; font-size: 12px; font-weight: 600; }
.panel-hd .num {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
  padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px;
}
.panel-hd .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.panel-bd { padding: 12px; flex: 1; min-height: 0; overflow: auto; }
.panel-bd.flush { padding: 0; }

/* ---------- COMMON ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 6px;
  font-size: 10.5px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 3px;
  color: var(--fg-1);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.chip.blue { color: var(--blue); border-color: var(--blue-line); background: var(--blue-soft); }
.chip.violet { color: var(--violet); border-color: oklch(0.66 0.13 295 / 0.35); background: var(--violet-soft); }
.chip.teal { color: var(--teal); border-color: oklch(0.76 0.10 195 / 0.35); background: var(--teal-soft); }
.chip.amber { color: var(--amber); border-color: oklch(0.78 0.14 75 / 0.35); background: var(--amber-soft); }
.chip.red { color: var(--red); border-color: oklch(0.68 0.18 25 / 0.35); background: var(--red-soft); }
.chip.green { color: var(--green); border-color: oklch(0.74 0.14 152 / 0.35); background: var(--green-soft); }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 4px;
  color: var(--fg-0);
  transition: 0.12s;
}
.btn:hover { border-color: var(--line-3); background: var(--bg-3); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.primary:hover { filter: brightness(1.08); background: var(--blue); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--fg-1); }
.btn.danger { background: var(--red-soft); border-color: oklch(0.68 0.18 25 / 0.3); color: var(--red); }
.btn.sm { padding: 2px 7px; font-size: 11px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.eyebrow { font-size: 9.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 11px; }
.kv .k { color: var(--fg-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.kv .v { color: var(--fg-0); font-family: var(--font-mono); }

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
table.data .cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.data .cell-stack {
  min-width: 0;
}
table.data th {
  text-align: left;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-3);
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-1);
  position: sticky; top: 0;
}
table.data td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-1);
  vertical-align: middle;
}
table.data tr:hover td { background: var(--bg-2); }

/* ---------- STATUS BAR ---------- */
.statusbar {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  display: flex; align-items: center;
  padding: 0 14px;
  gap: 12px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--fg-3);
}
.statusbar .right { margin-left: auto; display: flex; gap: 12px; }
.statusbar .sep { width: 1px; height: 10px; background: var(--line); }

.flux-nav-link {
  font-size: 11.5px;
  color: var(--fg-2);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
}
.flux-nav-link:hover { color: var(--fg-0); border-color: var(--line-2); }

/* ---------- DAG node ---------- */
.dag-node {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-2);
  position: relative;
}
.dag-node.active { border-color: var(--blue-line); background: linear-gradient(90deg, var(--blue-soft), var(--bg-2) 60%); }
.dag-node.done { border-color: oklch(0.74 0.14 152 / 0.35); }
.dag-node.paused { border-color: oklch(0.78 0.14 75 / 0.5); background: linear-gradient(90deg, var(--amber-soft), var(--bg-2) 50%); }
.dag-node.pending { opacity: 0.55; }
.dag-node .label { flex: 1; min-width: 0; }
.dag-node .name { font-size: 12px; font-weight: 500; }
.dag-node .meta { font-size: 10px; color: var(--fg-3); font-family: var(--font-mono); }
.dag-node .ico { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; background: var(--bg-3); flex-shrink: 0; }
.dag-node .ico.b-blue { background: var(--blue-soft); color: var(--blue); }
.dag-node .ico.b-green { background: var(--green-soft); color: var(--green); }
.dag-node .ico.b-amber { background: var(--amber-soft); color: var(--amber); }
.dag-node .ico.b-violet { background: var(--violet-soft); color: var(--violet); }

.dag-connector {
  margin: 3px 0 3px 21px;
  width: 1px; height: 14px;
  background: var(--line-2);
}
.dag-connector.active { background: var(--blue); }
.dag-connector.done { background: var(--green); opacity: 0.5; }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50%      { box-shadow: 0 0 0 4px transparent; }
}
.pulse { width: 6px; height: 6px; border-radius: 50%; display: inline-block; color: var(--green); background: currentColor; animation: pulseDot 2s ease-out infinite; }
.pulse.amber { color: var(--amber); }
.pulse.red { color: var(--red); }
.pulse.blue { color: var(--blue); }

@keyframes dashFlow { to { stroke-dashoffset: -32; } }
.dash-flow { stroke-dasharray: 4 6; animation: dashFlow 1.6s linear infinite; }

@keyframes streamIn {
  from { opacity: 0; transform: translateY(-3px); background: var(--blue-soft); }
  to   { opacity: 1; transform: translateY(0); background: transparent; }
}
.row-fresh { animation: streamIn 0.6s ease; }

/* Mapping review row */
.map-row {
  display: grid;
  grid-template-columns: 1fr 16px 1fr auto auto;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.map-row:hover { background: var(--bg-2); }
.map-row .arrow { color: var(--fg-3); display: grid; place-items: center; }
.map-row .conf {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
}
.map-row .conf .bar {
  width: 50px; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden;
}
.map-row .conf .fill { height: 100%; }
.map-row .src { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-1); }
.map-row .dst { font-family: var(--font-mono); font-size: 11.5px; color: var(--teal); }

/* Event feed row */
.evt {
  display: grid; grid-template-columns: 64px 14px 1fr auto;
  gap: 10px; align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.evt .ts { color: var(--fg-3); font-family: var(--font-mono); font-size: 10.5px; }
.evt .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2); }
.evt .meta { color: var(--fg-3); font-family: var(--font-mono); font-size: 10.5px; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 100px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* Grids */
.grid { display: grid; gap: 12px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

.metric {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  overflow: hidden;
}
.metric .label {
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.metric .value { font-size: 22px; font-weight: 600; font-family: var(--font-mono); letter-spacing: -0.02em; margin-top: 4px; }
.metric .delta { font-size: 10.5px; font-family: var(--font-mono); color: var(--fg-3); margin-top: 4px; }
.metric .delta.pos { color: var(--green); }
.metric .delta.neg { color: var(--red); }
.metric .spark { position: absolute; right: 0; bottom: 0; left: 0; height: 28px; opacity: 0.55; }

.sublabel {
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.audit-ledger-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  min-height: 0;
}
.audit-ledger-row {
  display: grid;
  grid-template-columns: 110px 24px minmax(0, 1.5fr) minmax(0, 1fr) minmax(48px, 80px);
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.audit-ledger-row:nth-child(even) { background: rgba(255, 255, 255, 0.01); }
.audit-actor-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.flux-trace-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.flux-dag-legend {
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
}

/* ---------- SUB-TABS (in-screen) ---------- */
.subtabs {
  display: flex; gap: 2px; padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  align-items: center;
}
.subtab {
  padding: 7px 11px;
  font-size: 12px; color: var(--fg-2);
  border-radius: 4px 4px 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.subtab:hover { color: var(--fg-0); }
.subtab.active {
  color: var(--fg-0);
  background: var(--bg-0);
  border-color: var(--line);
}
.subtab .badge {
  font-family: var(--font-mono); font-size: 10px;
  padding: 0 5px; border-radius: 3px;
  background: var(--bg-3); color: var(--fg-2);
}
.subtab.active .badge { background: var(--blue-soft); color: var(--blue); }
.subtab .ico { color: var(--fg-3); }
.subtab.active .ico { color: var(--fg-1); }
.subtabs .right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }

/* ---------- CONNECTOR CARDS ---------- */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.conn-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  transition: 0.12s;
  position: relative;
}
.conn-card:hover { border-color: var(--line-2); background: var(--bg-2); }
.conn-card.installed { border-color: oklch(0.74 0.14 152 / 0.3); }
.conn-card .top {
  display: flex; align-items: flex-start; gap: 10px;
}
.conn-mark {
  width: 32px; height: 32px; border-radius: 5px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-3);
  color: var(--fg-1);
  border: 1px solid var(--line-2);
}
.conn-card .nm { font-size: 13px; font-weight: 600; }
.conn-card .meta { font-size: 10.5px; color: var(--fg-3); font-family: var(--font-mono); }
.conn-card .desc { font-size: 11.5px; color: var(--fg-2); line-height: 1.5; min-height: 32px; }
.conn-card .foot { display: flex; align-items: center; gap: 6px; }

/* ---------- CONFIDENCE DONUT ---------- */
.donut {
  position: relative; width: 38px; height: 38px;
  flex-shrink: 0;
}
.donut svg { transform: rotate(-90deg); }
.donut .pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-1); font-weight: 500;
}

/* ---------- CITATION / HITL ROWS ---------- */
.hitl-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 22px 220px 1fr 50px auto;
  gap: 18px;
  align-items: center;
  background: var(--bg-1);
  position: relative;
  transition: background 100ms;
}
.hitl-row:hover { background: var(--bg-2); }
.hitl-row.focused { background: var(--bg-2); }
.hitl-row.focused::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--blue);
}
.hitl-row .label-cell .grp {
  font-size: 9.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.07em;
  font-family: var(--font-mono);
}
.hitl-row .label-cell .nm {
  font-size: 12.5px; color: var(--fg-0);
  font-weight: 500; margin-top: 2px;
}
.hitl-row .label-cell .k {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-3); margin-top: 2px;
}
.hitl-row .val {
  font-size: 13px; font-family: var(--font-mono);
  color: var(--fg-0);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hitl-row .val.missing { color: var(--fg-3); font-style: italic; }
.hitl-row .src-toggle {
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--fg-2);
  padding: 2px 6px 2px 4px;
  border-radius: 3px;
  cursor: pointer;
}
.hitl-row .src-toggle:hover { background: var(--bg-3); color: var(--fg-0); }
.hitl-row .note {
  display: flex; gap: 6px; margin-top: 7px;
  font-size: 11px; color: var(--fg-2); line-height: 1.5;
}

.citation {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-0);
  overflow: hidden;
  max-width: 640px;
}
.citation .hd {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.citation .mark {
  width: 18px; height: 18px; border-radius: 3px;
  background: var(--blue);
  color: var(--bg-0);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.citation .ti { font-size: 12px; font-weight: 500; }
.citation .dm { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 1px; }
.citation .bd {
  padding: 10px 12px;
  font-size: 12px; color: var(--fg-1); line-height: 1.5;
  border-left: 2px solid var(--line-2);
  font-style: italic;
}
.citation .agent-note {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--fg-2);
  display: flex; gap: 6px;
  background: var(--amber-soft);
}

/* HITL action buttons */
.icon-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg-2); color: var(--fg-1);
  cursor: pointer; transition: 0.1s;
}
.icon-btn:hover { background: var(--bg-3); border-color: var(--line-2); }
.icon-btn.approve:hover { color: var(--green); border-color: oklch(0.74 0.14 152 / 0.4); }
.icon-btn.reject:hover  { color: var(--red); border-color: oklch(0.68 0.18 25 / 0.4); }
.icon-btn.flag:hover    { color: var(--amber); border-color: oklch(0.78 0.14 75 / 0.4); }

/* Sticky bulk bar */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  position: sticky; top: 0; z-index: 5;
}
.bulk-bar .kbd {
  font-family: var(--font-mono); font-size: 9.5px;
  padding: 1px 5px;
  border: 1px solid var(--line-2); border-radius: 3px;
  color: var(--fg-2);
  background: var(--bg-0);
}
.bulk-bar input[type="checkbox"] { accent-color: var(--blue); width: 14px; height: 14px; cursor: pointer; }

/* HITL group divider */
.hitl-group {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px 8px;
  font-size: 9.5px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-family: var(--font-mono);
}
.hitl-group .line { flex: 1; height: 1px; background: var(--line); }

/* Status pills (review badges) */
.review-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 10.5px; font-weight: 500;
  border: 1px solid;
}
.review-badge.approved { background: var(--green-soft); color: var(--green); border-color: oklch(0.74 0.14 152 / 0.3); }
.review-badge.rejected { background: var(--red-soft); color: var(--red); border-color: oklch(0.68 0.18 25 / 0.3); }
.review-badge.edited   { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.review-badge.flagged  { background: var(--amber-soft); color: var(--amber); border-color: oklch(0.78 0.14 75 / 0.3); }

/* Endpoint table row coloring */
.method {
  display: inline-block;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  padding: 1px 5px; border-radius: 2px;
  min-width: 38px; text-align: center;
}
.method.get  { background: var(--blue-soft); color: var(--blue); }
.method.post { background: var(--green-soft); color: var(--green); }
.method.put  { background: var(--amber-soft); color: var(--amber); }
.method.del  { background: var(--red-soft); color: var(--red); }

/* ============================================================
   FORGE — Agent runtime control plane additions
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); }
.crumbs .c { color: var(--fg-2); }
.crumbs .crumb-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--fg-2);
  cursor: pointer;
}
.crumbs .crumb-btn:hover { color: var(--fg-0); }
.crumbs .crumb-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}
.crumbs .c.here { color: var(--fg-0); cursor: default; }
.crumbs .div { color: var(--fg-4); }

/* ---------- Summary stat tiles ---------- */
.statgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stat-tile {
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.stat-tile .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; }
.stat-tile .top { display: flex; align-items: center; justify-content: space-between; }
.stat-tile .lbl { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.stat-tile .big { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.stat-tile .sub { font-size: 10.5px; color: var(--fg-3); }

/* ---------- Status / health dots in tables ---------- */
.sdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.statusword { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; }

/* ---------- Registry row link styling ---------- */
tr.agent-row { cursor: pointer; }
tr.agent-row td:first-child { border-left: 2px solid transparent; }
tr.agent-row:hover td:first-child { border-left-color: var(--blue); }
.agent-name { font-weight: 500; color: var(--fg-0); white-space: nowrap; }
.agent-id { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Detail header ---------- */
.dhdr {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.dhdr .avatar {
  width: 40px; height: 40px; border-radius: 7px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--amber-soft); color: var(--amber);
  border: 1px solid oklch(0.78 0.14 75 / 0.3);
}
.dhdr .title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dhdr .idline { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.dhdr .facts { margin-left: auto; display: flex; align-items: stretch; gap: 0; }
.dhdr .fact { padding: 0 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.dhdr .fact .k { font-size: 9.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.dhdr .fact .v { font-size: 12px; color: var(--fg-1); font-family: var(--font-mono); }
.dhdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  align-self: stretch;
}

/* ---------- Detail tabs (compact pill bar) ---------- */
.dtabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.dtabs-scroll {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding: 0 14px;
  overflow-x: auto;
}
.dtabs-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  background: var(--bg-1);
}
.agent-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--blue-soft), var(--bg-1) 55%);
}
.agent-action-bar .hint {
  font-size: 12px;
  color: var(--fg-2);
  flex: 1;
  min-width: 200px;
}
.dtab {
  padding: 9px 13px; font-size: 12.5px; color: var(--fg-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 7px;
}
.dtab:hover { color: var(--fg-0); }
.dtab.active { color: var(--fg-0); border-bottom-color: var(--amber); }
.dtab .ico { color: var(--fg-3); }
.dtab.active .ico { color: var(--amber); }

.dtab-section-label {
  align-self: center;
  padding: 0 10px 0 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
  white-space: nowrap;
}

.trace-meta-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-1);
}

@media (max-width: 900px) {
  .trace-meta-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Lifecycle stepper ---------- */
.lifecycle { display: flex; align-items: center; gap: 0; }
.lc-step { display: flex; align-items: center; gap: 9px; }
.lc-node {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 5px;
  background: var(--bg-2); color: var(--fg-2); white-space: nowrap;
}
.lc-node .num { font-family: var(--font-mono); font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-3); }
.lc-node.done { border-color: oklch(0.74 0.14 152 / 0.35); color: var(--fg-1); }
.lc-node.done .num { background: var(--green-soft); color: var(--green); }
.lc-node.current { border-color: var(--green); background: var(--green-soft); color: var(--green); box-shadow: 0 0 0 1px oklch(0.74 0.14 152 / 0.3); }
.lc-node.current .num { background: var(--green); color: var(--bg-0); }
.lc-bar { width: 30px; height: 1.5px; background: var(--line-2); margin: 0 4px; }
.lc-bar.done { background: oklch(0.74 0.14 152 / 0.5); }

/* ---------- Capability can / cannot ---------- */
.cap-list { display: flex; flex-direction: column; gap: 2px; }
.cap-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--bg-2); font-size: 12.5px;
}
.cap-item .ic { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; flex-shrink: 0; }
.cap-item.can .ic { background: var(--green-soft); color: var(--green); }
.cap-item.cannot .ic { background: var(--red-soft); color: var(--red); }
.cap-item.cannot { color: var(--fg-2); }

/* ---------- Preserved controls checklist ---------- */
.preserved-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  border: 1px solid oklch(0.74 0.14 152 / 0.22); border-radius: 5px;
  background: oklch(0.74 0.14 152 / 0.06); font-size: 12px;
}
.preserved-item .ic { color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.preserved-item.pending { border-color: var(--line); background: var(--bg-2); color: var(--fg-3); }
.preserved-item.pending .ic { color: var(--fg-4); }

.memory-ownership { display: flex; flex-direction: column; gap: 8px; }
.memory-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 5; background: var(--bg-1);
}
.memory-row.not-portable { background: var(--bg-2); }
.memory-row.highlight-drop { border-color: oklch(0.72 0.16 25 / 0.35); }
.memory-layer { font-size: 12.5px; font-weight: 500; color: var(--fg-0); }
.memory-note { font-size: 10.5px; color: var(--fg-3); margin-top: 2px; }
.memory-handoff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.memory-handoff-step {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1);
}
.memory-handoff-step.complete { border-color: oklch(0.76 0.10 145 / 0.35); }
.memory-handoff-step.pending { opacity: 0.92; }
.memory-handoff-step-num {
  width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: var(--bg-2); color: var(--fg-2);
}
.memory-handoff-step-title { font-size: 12.5px; font-weight: 600; color: var(--fg-0); }
.memory-handoff-step-detail { font-size: 11.5px; color: var(--fg-2); margin-top: 4px; }
.memory-handoff-proposal { font-size: 11px; color: var(--amber); margin-top: 8px; }
.memory-json-block {
  margin: 0; padding: 12px; border-radius: 5px; background: var(--bg-2);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.5; overflow: auto;
}
.memory-handoff-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid oklch(0.76 0.10 75 / 0.3); border-radius: 6;
  background: linear-gradient(90deg, var(--amber-soft), var(--bg-1) 70%);
}
.memory-runtime-map { display: flex; flex-direction: column; gap: 8px; }
.memory-runtime-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1);
}
.memory-runtime-row.current {
  border-color: oklch(0.70 0.14 240 / 0.35);
  background: linear-gradient(90deg, var(--blue-soft), var(--bg-1) 75%);
}
.memory-runtime-row.writer:not(.current) { border-color: oklch(0.72 0.12 290 / 0.25); }
.memory-runtime-row.consumer:not(.current) { border-color: oklch(0.74 0.14 152 / 0.25); }
.trace-memory-chip {
  margin-top: 4px; font-size: 10px; color: var(--amber); line-height: 1.35;
}

/* ---------- Trace columns (side-by-side) ---------- */
.trace-col { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1); display: flex; flex-direction: column; min-height: 0; }
.trace-col .head { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.trace-pending {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  min-height: 220px;
  color: var(--fg-2);
}
.trace-evt {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.trace-evt .seq { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); text-align: right; }
.trace-evt .ev { font-family: var(--font-mono); font-size: 11.5px; }
.trace-evt .ms { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.trace-evt.approval { background: var(--amber-soft); }
.trace-evt.pause { background: oklch(0.68 0.18 25 / 0.06); }

/* ---------- Audit ledger timeline (detail) ---------- */
.audit-tl { position: relative; padding-left: 22px; }
.audit-tl::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.audit-row { position: relative; padding: 9px 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.audit-row .node { position: absolute; left: -22px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); border: 2px solid var(--bg-1); }
.audit-row .ev { font-family: var(--font-mono); font-size: 12px; color: var(--fg-0); }
.audit-row .detail { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.audit-row .ts { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); white-space: nowrap; }
.audit-row.rt .node { background: var(--violet); }
.audit-row.rt .ev { color: var(--violet); }

/* ---------- Health metric tiles ---------- */
.health-tile { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1); padding: 14px 16px; }
.health-tile .lbl { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.health-tile .big { font-family: var(--font-mono); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1; }
.health-tile .meter { height: 4px; background: var(--bg-3); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.health-tile .meter .fill { height: 100%; }

/* ---------- Overview cards ---------- */
.ov-card { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1); padding: 13px 14px; display: flex; flex-direction: column; gap: 8px; }
.ov-card .ch { display: flex; align-items: center; gap: 9px; }
.ov-card .ico { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; flex-shrink: 0; }
.ov-card .ck { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ov-card .cv { font-size: 14px; font-weight: 600; margin-top: 1px; }
.ov-card .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }

/* ---------- Profile section (governance) ---------- */
.profile-sec { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-1); overflow: hidden; }
.profile-sec .ph { padding: 9px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; background: var(--bg-2); }
.profile-sec .ph h4 { margin: 0; font-size: 11.5px; font-weight: 600; }
.profile-sec .pb { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }

.governance-profile-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.governance-profile-picker-label {
  font-size: 12px;
  color: var(--fg-2);
  flex-shrink: 0;
}
.governance-profile-picker select.input {
  min-width: 240px;
  max-width: 100%;
}
.governance-profile-picker--empty {
  flex-direction: column;
  align-items: stretch;
  margin-top: 20px;
  gap: 10px;
}
.governance-profile-picker--empty select.input {
  min-width: 280px;
  width: 100%;
}
.ref-item { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.ref-item .mono { color: var(--fg-1); }
.ref-pill { font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-2); color: var(--fg-1); }
.ref-link { color: var(--fg-1); text-decoration: none; }
.ref-link:hover { color: var(--teal); text-decoration: underline; }
.ref-pill.ref-link { display: inline-block; }

/* ---------- Section label ---------- */
.seclabel { display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); margin-bottom: 8px; }
.seclabel .line { flex: 1; height: 1px; background: var(--line); }

/* ---------- Registry API states ---------- */
.state-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.state-banner.error {
  background: var(--red-soft);
  color: var(--fg-1);
}
.state-banner.error .btn { margin-left: 8px; }

.stat-tile.skeleton .big { opacity: 0.35; }

.table-skeleton-row td { padding: 14px 12px; }
.skel-bar {
  display: block;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s ease-in-out infinite;
}
@keyframes skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.empty-state { padding: 48px 18px !important; text-align: center; }
.empty-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 360px;
  margin: 0 auto;
}

/* ---------- Detail API states ---------- */
.detail-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-0);
}
.detail-not-found .nf-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg-3);
  margin-bottom: 16px;
}
.detail-not-found .nf-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg-0);
}
.detail-not-found .nf-msg {
  font-size: 12.5px;
  color: var(--fg-2);
  max-width: 420px;
  margin: 10px 0 20px;
  line-height: 1.55;
}
.detail-error-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-0);
}

.skeleton-bar,
.skeleton-pulse {
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s ease-in-out infinite;
  border-radius: 3px;
}
.skeleton-bar { display: block; }

.overview-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ov-card.skeleton {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
}

/* ---------- ENTERPRISE SHELL / LOGIN ---------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, oklch(0.70 0.14 240 / 0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, oklch(0.78 0.14 75 / 0.08), transparent 40%),
    var(--bg-0);
}
.login-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.login-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-2);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand .mark {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.login-brand .mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: rotate(45deg);
  border-radius: 2px;
}
.login-brand .mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--bg-1);
  transform: rotate(45deg);
  border-radius: 1px;
}
.login-title {
  font-size: 18px;
  font-weight: 600;
}
.login-title span {
  color: var(--amber);
}
.login-sub {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-top: 2px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-field input {
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.login-field input:focus {
  outline: none;
  border-color: var(--blue-line);
}
.login-submit {
  width: 100%;
  margin-top: 4px;
}
.login-demo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.login-demo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-align: left;
}
.login-demo-item:hover {
  border-color: var(--line-2);
  background: var(--bg-3);
}
.login-demo-role {
  font-size: 12px;
  font-weight: 600;
}
.login-demo-email {
  font-size: 10.5px;
  color: var(--fg-3);
}
.login-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--fg-3);
}

/* ---------- PROFILE MENU ---------- */
.profile-menu {
  position: relative;
  margin-left: 4px;
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 12px;
}
.profile-trigger:hover {
  border-color: var(--line-2);
}
.profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
}
.profile-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  padding: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-email {
  font-size: 11px;
  color: var(--fg-2);
  word-break: break-all;
}
.profile-tenant {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.profile-logout {
  width: 100%;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 12px;
}
.profile-logout:hover {
  border-color: var(--line-2);
}

