/* Admin Console -> SMTP configuration -> Inbound Tasks by Email. The four regions inside
   `#ecfgInboundPanel` that wireOutboundLocalTabs() (admin-email.js) toggles; markup behaviour
   lives in admin-inbound-email.js. Reused, not invented (core rule 4): team rows
   (`.smtp-team*`), the toggle (`.pref-switch`/`.track`/`.knob`), org grouping
   (`.group-head-sub`/`.group-body-sub`), stat tiles (`.email-stat`/`.email-admin-grid`), the
   bench's gates/verdict/mode-strip (`.bench-*`/`.at-tabs`/`.at-tab`) and the ledger table
   (`.storage-scen`) are all the same objects the outbound side already draws — only what had no
   existing analog is new, below. */

/* `.inb-panel`, not `.sec-section`: admin-paneling.test.js counts every literal `sec-section`
   occurrence inside `#smtpPane` and asserts exactly 4. This paints the identical panel from the
   same tokens without that substring. Run that suite after any change here. */
.inb-panel{
  min-width: 0;
  background: var(--a-panel);
  border: 1px solid var(--a-line-soft);
  border-radius: var(--a-r-sm);
  padding: 16px 18px;
}
.inb-panel-head{
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 4px;
}
.inb-panel-head h3{ margin: 2px 0 6px; font-size: 14px; }

/* Two columns above 1180px — access+audit (left, want width) and service+bench (right, each
   under/beside a switch), matching the wireframe's 2:1 split. Below that, DOM order already
   reads service → access → audit → bench, the gate-leads-the-rest reasoning alt-admin-email.css
   also applies. */
.inb-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.inb-col{ display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 1181px){
  .inb-grid{ grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
  .inb-col-side{ order: 0; }
  .inb-col-main{ order: 1; }
}

/* ---------- service badge ----------
   Green when healthy, red when off — inbound being switched off is a hard state, not a
   degraded one, so it gets the same yes/no colours as the rest of this console rather than a
   warning yellow. `--a-green`/`--a-red` (this experience's own tokens), not `--green-soft`/
   `--warn-soft` — two vocabularies for one question is the drift core rule 4 exists to stop. */
/* Two classes, not one: `.badge` is declared in admin.html's own inline `<style>`, which comes
   after every `<link>` in cascade order, so a single-class badge would lose to it regardless of
   load order. `.badge.admin`/`.badge.pending` already solve it the same way — convention, not a
   specificity fight. */
.badge.inb-badge-on{
  background: var(--a-green-soft); color: var(--a-green); border: 1px solid var(--a-green);
}
.badge.inb-badge-off{
  background: var(--a-red-soft); color: var(--a-red); border: 1px solid var(--a-red);
}

/* ---------- the inbound address ----------
   A single copyable value, the inbound twin of a `.email-stat` cell but wide enough for an
   address that must never wrap mid-word. */
.inb-address{
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px 0; padding: 9px 10px;
  background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.inb-address code{ min-width: 0; overflow-wrap: anywhere; font-size: 11px; color: var(--text); }

/* ---------- bench fields ----------
   The subject/message pair needs a label above a full-width control, which `.bench-row` (label
   beside a short select) doesn't fit; everything else in the bench keeps `.bench-row`. */
.inb-field{ display: grid; gap: 5px; margin: 10px 0; }
.inb-field label{ font-size: 11px; font-weight: 700; color: var(--text-dim); }
.inb-field textarea{ resize: vertical; min-height: 64px; }

/* ---------- the ledger table ----------
   `.storage-scen` is the shared data-table look; these two are inbound-only reading aids it
   doesn't carry — a quiet caption under the masked sender, monospace for the evidence id. */
#inboundAuditTable .inb-sub{ margin-top: 2px; font-size: 11px; color: var(--text-faint); }
#inboundAuditTable .inb-mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text-faint);
}
/* `.result` colour states match the outbound console's own `.storage-badge` vocabulary. */
#inboundAuditTable .result{ font-weight: 700; }
#inboundAuditTable .result.success{ color: var(--green-text); }
#inboundAuditTable .result.warning{ color: var(--warn-text); }
#inboundAuditTable .result.danger{ color: var(--red-text); }

/* Org grouping sits inside a panel, not at the pane's own left margin — `.group-head-sub`'s 10px
   top margin was measured for the Boards pane, which doesn't already open with its own gap. */
.inb-panel > .group-head-sub:first-child{ margin-top: 0; }
