/* Coulisses: what runs in the background, read at a glance. Same tokens and components as the administration. */
.backstage-tabs { margin:4px 0 26px; border-bottom:1px solid var(--line); }
.backstage-health { display:flex; align-items:flex-start; gap:14px; padding:16px 20px; border-radius:14px; border:1px solid var(--line); background:var(--surface); margin:0 0 24px; }
.backstage-health strong { display:block; font-size:15px; }
.backstage-health p { color:var(--muted); font-size:13px; margin-top:2px; }
.backstage-health.is-ok { background:var(--green-tint); border-color:#cdebdc; }
.backstage-health.is-alert { background:#fff7f7; border-color:#f4cfcf; }
.backstage-dot { flex-shrink:0; width:10px; height:10px; margin-top:6px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(18,160,100,.14); }
.is-alert .backstage-dot { background:var(--red); box-shadow:0 0 0 4px rgba(220,47,47,.14); }
.backstage-alerts { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:13.5px; }
.backstage-alerts a { color:#9b1c1c; text-decoration:underline; text-underline-offset:3px; }
.backstage-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.backstage-tile { padding:20px 22px; display:flex; flex-direction:column; gap:10px; min-width:0; color:inherit; text-decoration:none; }
a.backstage-tile:hover { border-color:var(--line-strong); }
.backstage-tile h2 { font-size:15px; }
.backstage-tile p { font-size:13px; color:var(--muted); line-height:1.6; }
.backstage-tile .backstage-figure { font-size:26px; font-weight:650; color:var(--text); font-variant-numeric:tabular-nums; }
.backstage-section { margin-top:34px; }
.backstage-section>.section-head { margin-bottom:14px; }
.backstage-section>.section-head p { color:var(--muted); font-size:13px; margin-top:3px; }
.backstage-lead { color:var(--muted); font-size:13px; line-height:1.7; max-width:760px; margin:-6px 0 18px; }

/* What will leave: one line per sweep, its sends folded beneath. */
.forecast { display:flex; flex-direction:column; gap:10px; }
.forecast details { background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.forecast summary { list-style:none; display:grid; grid-template-columns:150px minmax(0,1fr) auto; align-items:center; gap:18px; padding:14px 18px; cursor:pointer; }
.forecast summary::-webkit-details-marker { display:none; }
.forecast summary:hover { background:var(--surface-2); border-radius:12px; }
.forecast-when { font-weight:600; font-variant-numeric:tabular-nums; }
.forecast-when small { display:block; font-weight:400; color:var(--muted); font-size:12px; }
.forecast-what strong { display:block; }
.forecast-what small { color:var(--muted); font-size:12px; }
.forecast-count { text-align:right; white-space:nowrap; font-size:13px; }
.forecast-count b { font-size:18px; font-variant-numeric:tabular-nums; margin-right:4px; }
.forecast-none { color:var(--muted); }
.forecast details[open] summary { border-bottom:1px solid var(--line); border-radius:12px 12px 0 0; }
.forecast .data-table { margin:0; }
.forecast-email { display:block; }
.forecast-empty { padding:14px 18px; color:var(--muted); font-size:13px; }

/* A send's page: its facts beside the message as the member reads it. */
.delivery-layout { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.4fr); gap:20px; align-items:start; }
.delivery-facts { padding:20px 22px; }
.delivery-facts dl { display:grid; grid-template-columns:auto 1fr; gap:10px 18px; margin:0; font-size:13.5px; }
.delivery-facts dt { color:var(--muted); }
.delivery-facts dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.delivery-message { padding:0; overflow:hidden; }
.delivery-message header { padding:14px 20px; border-bottom:1px solid var(--line); background:var(--surface-2); font-size:13px; }
.delivery-message header strong { display:block; font-size:15px; color:var(--text); margin-top:2px; }
.delivery-message pre { margin:0; padding:20px; white-space:pre-wrap; overflow-wrap:anywhere; font-family:inherit; font-size:14px; line-height:1.7; color:var(--text-2); }
.delivery-message .sms-bubble { margin:20px; max-width:360px; padding:14px 16px; border-radius:16px 16px 16px 4px; background:#eef1f5; white-space:pre-wrap; font-size:14px; line-height:1.55; }
.delivery-message footer { padding:10px 20px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }

/* Who receives the most. */
.pressure-list { list-style:none; margin:0; padding:0; }
.pressure-list li { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1.6fr) auto; gap:16px; align-items:center; padding:12px 18px; border-top:1px solid var(--line); }
.pressure-list li:first-child { border-top:0; }
.pressure-list small { display:block; color:var(--muted); font-size:12px; }
.pressure-kinds { font-size:12px; color:var(--muted); line-height:1.6; }
.pressure-total { text-align:right; white-space:nowrap; font-size:13px; }
.pressure-total b { font-size:17px; font-variant-numeric:tabular-nums; }

/* The clients' settings: a notification per row, a client per column. */
.settings-matrix th[scope="col"] { white-space:nowrap; vertical-align:bottom; }
.settings-matrix th[scope="col"] a { color:var(--text); }
.settings-matrix th[scope="col"] small { display:block; font-weight:400; color:var(--muted); font-size:11px; }
.settings-matrix th[scope="row"] { font-weight:500; min-width:220px; }
.settings-matrix th[scope="row"] small { display:block; font-weight:400; color:var(--muted); font-size:11.5px; }
.settings-matrix .group-row th { background:var(--surface-2); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.settings-matrix td { text-align:center; white-space:nowrap; font-variant-numeric:tabular-nums; }
.cell-off { color:#b4bdc8; }
.cell-on { display:inline-flex; flex-direction:column; align-items:center; gap:2px; font-size:13px; }
.cell-on small { color:var(--muted); font-size:11px; }
.cell-zero { color:var(--amber-ink); }
.cell-default { color:var(--muted); font-size:12px; }
.check-yes { color:var(--green-ink); font-weight:700; }
.check-no { color:#c3cad3; }

/* Scheduled tasks. */
.tasks-table td { vertical-align:top; }
.tasks-table small { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.task-command { font-family:var(--font-mono, ui-monospace, monospace); font-size:11px; color:var(--faint); }
.task-summary { font-size:12.5px; color:var(--text-2); max-width:420px; }
.backstage-filters { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 16px; }
.backstage-filters select { min-height:40px; max-width:100%; }

@media (max-width:1100px) { .backstage-grid { grid-template-columns:1fr; } .delivery-layout { grid-template-columns:1fr; } }
@media (max-width:760px) {
  .forecast summary { grid-template-columns:1fr; gap:6px; }
  .forecast-count { text-align:left; }
  .pressure-list li { grid-template-columns:1fr; gap:6px; }
  .pressure-total { text-align:left; }
}
.page-head .task-command { font-size:12px; margin-top:4px; }
/* A message folded in a row: the subject, then the text the member reads. */
.message-fold { margin-top:4px; max-width:620px; }
.message-fold summary { cursor:pointer; color:var(--text-2); font-size:13px; list-style:none; }
.message-fold summary::before { content:"▸ "; color:var(--muted); }
.message-fold[open] summary::before { content:"▾ "; }
.message-fold pre { margin:8px 0 4px; padding:12px 14px; background:var(--surface-2); border-radius:10px; white-space:pre-wrap; overflow-wrap:anywhere; font-family:inherit; font-size:13px; line-height:1.6; color:var(--text-2); }
.message-fold .sms-bubble { margin:8px 0 4px; max-width:360px; padding:12px 14px; border-radius:14px 14px 14px 4px; background:#eef1f5; white-space:pre-wrap; font-size:13px; line-height:1.55; }
.message-cell { min-width:280px; }
