/* ═══════════════════════════════════════════════════════════════
   INBOX / NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */

.ibx-layout {
  display: grid;
  grid-template-columns: 220px 1fr 360px;
  gap: 0;
  border: 1px solid var(--b1);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--s1);
  margin-bottom: 16px;
}

/* ── FILTER RAIL ───────────────────────────────────────── */
.ibx-rail {
  border-right: 1px solid var(--b1);
  padding: 16px 0;
  display: flex; flex-direction: column;
  gap: 18px;
  background: var(--s2);
}
.rail-block {
  padding: 0 14px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.rail-title {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--t3);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--b1);
}
.rail-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  font-size: 12px;
  color: var(--t2);
  cursor: pointer;
  border-radius: var(--r-m);
  transition: color 0.2s, background 0.2s;
}
.rail-item:hover { background: color-mix(in srgb, var(--t1) 4%, transparent); color: var(--t1); }
/* selected filter: v3 .navg a.on surface, --t1 text */
.rail-item.active {
  background: color-mix(in srgb, var(--t1) 8%, transparent);
  color: var(--t1);
}
.rail-item.active .rail-n { color: var(--t1); }
/* severity dots: urgent = fail, warning = hold, info (.ok) = outline, info is not a state */
.rail-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--t2);
  background: transparent;
}
.rail-pip.warn { border-color: var(--hold); background: var(--hold); }
.rail-pip.err { border-color: var(--fail); background: var(--fail); }
.rail-icon {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t3);
  text-align: center;
  line-height: 1;
}
.rail-item.active .rail-icon { color: var(--t1); }
.rail-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-n {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.05em;
}
.rail-check {
  width: 10px; height: 10px;
  border: 1px solid var(--b3);
  border-radius: 3px;
  background: transparent;
}
.rail-check.on {
  background: var(--t1);
  border-color: var(--t1);
}
.rail-check.on::after {
  content: "✓";
  display: block;
  text-align: center;
  font-size: 8px;
  line-height: 8px;
  color: var(--bg);
  font-family: var(--mono);
}

/* ── FEED ──────────────────────────────────────────────── */
.ibx-feed {
  border-right: 1px solid var(--b1);
  display: flex; flex-direction: column;
  min-width: 0;
}
.ibx-feed-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--b1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--s2);
}
.ibx-tabs { display: flex; gap: 4px; }
.ibx-tabs .tab {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  font-family: var(--mono);
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-c);
  transition: color 0.2s, background 0.2s;
}
.ibx-tabs .tab:hover { color: var(--t1); }
.ibx-tabs .tab.active {
  color: var(--t1);
  background: color-mix(in srgb, var(--t1) 7%, transparent);
  border-color: var(--b3);
}
.tab-n {
  font-size: 9px;
  background: var(--b2);
  color: var(--t1);
  padding: 1px 5px;
  border-radius: var(--r-chip);
}
.ibx-tabs .tab.active .tab-n { background: var(--t1); color: var(--bg); }
.ibx-bulk { display: flex; gap: 6px; }

.ibx-bucket-head {
  padding: 14px 18px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bk-line {
  flex: 1;
  height: 1px;
  background: var(--b1);
}
.bk-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--t3);
}
.bk-n {
  font-size: 9px;
  background: var(--b2);
  color: var(--t1);
  padding: 1px 5px;
  border-radius: var(--r-chip);
}

.ibx-list {
  display: flex;
  flex-direction: column;
}
.ibx-row {
  display: grid;
  grid-template-columns: 4px 28px 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--b1);
  position: relative;
  cursor: pointer;
}
.ibx-row:last-child { border-bottom: 0; }
.ibx-row:hover { background: var(--s2); }
/* read rows step back by text tone, not opacity (keeps text above the alpha floor) */
.ibx-row.read .ibx-title { color: var(--t2); }
.ibx-row.read .ibx-icon { color: var(--t2); }
.ibx-row.unread::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
}
.ibx-row.unread.sev-urgent::before { background: var(--fail); }
.ibx-row.unread.sev-warn::before   { background: var(--hold); }
.ibx-row.unread.sev-info::before   { background: var(--t3); }

/* state dots: no glow, no blink; info (.ok) is an outline */
.ibx-pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--t2);
  background: transparent;
  margin-top: 5px;
}
.ibx-pip.warn { border-color: var(--hold); background: var(--hold); }
.ibx-pip.err  { border-color: var(--fail); background: var(--fail); }

.ibx-icon {
  font-family: var(--mono);
  font-size: 16px;
  text-align: center;
  color: var(--t1);
  line-height: 1;
  margin-top: 1px;
  width: 28px; height: 28px;
  border: 1px solid var(--b2);
  border-radius: var(--r-m);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--s2);
}
.ibx-row.unread .ibx-icon {
  background: var(--s3);
  border-color: var(--b3);
}

.ibx-content { min-width: 0; }
.ibx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--t3);
}
/* severity badge = v3 .chip: state text on its wash, info stays neutral.
   The edge is an inset outline so the badge keeps its old box size. */
.ibx-sev {
  font-weight: 700;
  padding: 1px 6px;
  letter-spacing: 0.15em;
  outline: 1px solid var(--b2);
  outline-offset: -1px;
  border-radius: var(--r-chip);
}
.ibx-sev.sev-urgent { color: var(--fail); background: var(--fail-wash); outline-color: color-mix(in oklch, var(--fail) 35%, transparent); }
.ibx-sev.sev-warn   { color: var(--hold); background: var(--hold-wash); outline-color: color-mix(in oklch, var(--hold) 35%, transparent); }
.ibx-sev.sev-info   { color: var(--t2); }
.ibx-src {
  color: var(--t1);
  font-weight: 600;
}
.ibx-fac {
  color: var(--t2);
  font-weight: 600;
}
.ibx-time { font-size: 9px; }
/* unread = new: the live dot, --t1 with --glow */
.ibx-dot {
  width: 6px; height: 6px;
  background: var(--t1);
  box-shadow: var(--glow);
  border-radius: 50%;
}

.ibx-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  line-height: 1.3;
}
.ibx-row.read .ibx-title { font-weight: 500; }
.ibx-body {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 8px;
  text-wrap: pretty;
}
.ibx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ibx-id {
  font-size: 9px;
  letter-spacing: 0.05em;
  align-self: flex-start;
  margin-top: 2px;
}

/* ── DETAIL PANE ───────────────────────────────────────── */
.ibx-detail {
  background: var(--s2);
  display: flex;
  flex-direction: column;
}
.dt-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--b1);
}
.dt-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--t3);
  margin-bottom: 10px;
}
.dt-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--t1);
  margin-bottom: 12px;
}
.dt-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 2px 6px;
  border: 1px solid var(--t1);
  color: var(--t1);
}
.dt-tags .tag { border-color: var(--b3); border-radius: var(--r-chip); }
.dt-tags .tag.err { color: var(--fail); background: var(--fail-wash); border-color: color-mix(in oklch, var(--fail) 35%, transparent); }

.dt-block {
  padding: 14px 20px;
  border-bottom: 1px solid var(--b1);
}
.dt-block-title {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--t3);
  margin-bottom: 8px;
}
.dt-context {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.dt-row {
  display: flex;
  justify-content: space-between;
}
/* code block: the harness surface, syntax told apart by tone and weight, not hue */
.dt-code {
  background: var(--bg);
  color: var(--t2);
  border: 1px solid var(--b1);
  border-radius: var(--r-c);
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.dt-code .kw  { color: var(--t1); font-weight: 700; }
.dt-code .key { color: var(--t2); }
.dt-code .str { color: var(--t1); }
.dt-code .num { color: var(--t1); font-weight: 600; }
.dt-quote {
  font-size: 12px;
  line-height: 1.5;
  color: var(--t2);
  font-style: italic;
  border-left: 3px solid var(--b3);
  padding: 6px 0 6px 12px;
  text-wrap: pretty;
}
.dt-actions {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--b1);
}
.btn.block {
  display: block;
  width: 100%;
  text-align: center;
}
/* primary = v3 .btn-1 (also used by the deployments and evals screens) */
.btn.primary {
  background: var(--t1);
  color: var(--bg);
  border-color: var(--t1);
  box-shadow: var(--lift);
}
.dt-foot {
  padding: 12px 20px;
  font-size: 10px;
  letter-spacing: 0.05em;
  margin-top: auto;
}

/* small screen fallback */
@media (max-width: 1280px) {
  .ibx-layout {
    grid-template-columns: 200px 1fr 320px;
  }
}
