:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #f2f4f7;
  --surface-hover: #f8f9fb;
  --sidebar: #0c0d10;
  --sidebar-surface: #17181d;
  --sidebar-hover: #202127;
  --text: #17181c;
  --text-secondary: #475467;
  --muted: #667085;
  --border: #e6e8ec;
  --border-strong: #d0d5dd;
  --accent: #5b5bd6;
  --accent-hover: #4f46c8;
  --accent-soft: #eeeeff;
  --success: #15803d;
  --success-soft: #ecfdf3;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 14px 36px rgba(16, 24, 40, 0.10);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-width: 248px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  color-scheme: light;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

code {
  color: #344054;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

hr {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: var(--border);
}

/* Application shell */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid #24252b;
  background: var(--sidebar);
  color: #ffffff;
}

.brand {
  display: grid;
  min-height: 76px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid #24252b;
  color: #ffffff;
  text-decoration: none;
}

.brand:hover { color: #ffffff; background: #111216; }

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(145deg, #6d6de3, #4f46c8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px rgba(46, 35, 170, 0.22);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
}

.brand-copy,
.user-copy { min-width: 0; }
.brand-copy strong,
.brand-copy small,
.user-copy strong,
.user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 0.8125rem; font-weight: 650; letter-spacing: -0.01em; }
.brand-copy small { margin-top: 1px; color: #858995; font-size: 0.6875rem; }

.version-badge {
  padding: 3px 6px;
  border: 1px solid #2e3038;
  border-radius: var(--radius-sm);
  background: #18191e;
  color: #979ba6;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 18px;
  scrollbar-color: #353740 transparent;
  scrollbar-width: thin;
}

.nav-section + .nav-section { margin-top: 16px; }

.nav-section-label {
  display: block;
  margin: 0 10px 5px;
  color: #696d78;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 34px;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: #a9adb7;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-link:hover { background: var(--sidebar-hover); color: #f5f6f8; }
.nav-link.is-active { background: #25262d; color: #ffffff; }

.nav-indicator {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4b4e58;
}
.nav-link.is-active .nav-indicator { background: #8c8cf0; box-shadow: 0 0 0 3px rgba(140, 140, 240, 0.12); }

.sidebar-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid #24252b;
  background: #0f1013;
}

.command-trigger {
  display: flex;
  min-height: 36px;
  justify-content: space-between;
  margin: 0 10px 12px;
  padding: 7px 9px;
  border-color: #30323a;
  background: #17181d;
  color: #a9adb7;
  box-shadow: none;
  font-size: 0.75rem;
}
.command-trigger:hover { border-color: #424550; background: #202127; color: #f5f6f8; }
.command-trigger kbd { border-color: #383a43; background: #24252b; color: #858995; }
.mobile-command { display: none; }

.user-summary { display: flex; min-width: 0; gap: 9px; align-items: center; }
.user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #343640;
  border-radius: 50%;
  background: #24252b;
  color: #eaecf0;
  font-size: 0.75rem;
  font-weight: 700;
}
.user-copy strong { color: #e9eaf0; font-size: 0.75rem; font-weight: 600; }
.user-copy small { color: #777b86; font-size: 0.6875rem; }
.sidebar-footer form { margin: 0; }
.sidebar-logout {
  min-height: 30px;
  padding: 5px 8px;
  border-color: #30323a;
  background: transparent;
  color: #9b9faa;
  font-size: 0.75rem;
}
.sidebar-logout:hover { border-color: #424550; background: #202127; color: #ffffff; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.mobile-topbar { display: none; }

.wrap {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 34px 36px 56px;
}

.guest-shell { min-height: 100vh; display: grid; align-items: center; }
.guest-shell .wrap { max-width: 520px; padding: 32px 20px; }

/* Typography and page headers */
.title {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.625rem, 2vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

h2 {
  margin: 0 0 16px;
  color: #27282d;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h3 {
  margin: 8px 0;
  color: #27282d;
  font-size: 0.9375rem;
  font-weight: 650;
}

.title .muted { max-width: 820px; margin: 6px 0 0; }
.muted { color: var(--muted); }
small { color: var(--muted); font-size: 0.75rem; font-weight: 400; line-height: 1.45; }
.danger { color: var(--danger); }

/* Surfaces and grids */
.card,
.stat,
.subcard {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.card {
  margin-bottom: 18px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.subcard { padding: 14px; border-radius: var(--radius-md); background: var(--surface-subtle); }
.narrow { max-width: 900px; margin: 30px auto; }
.login { width: 100%; max-width: 420px; margin: 0 auto; padding: 28px; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.login h1 { margin-bottom: 22px; }
.login form { display: grid; gap: 16px; }
.login button { width: 100%; margin-top: 4px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  position: relative;
  min-height: 110px;
  padding: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat::after {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
  content: "";
  opacity: 0.65;
}

.stat b { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.stat strong { display: block; margin-top: 12px; color: var(--text); font-size: 1.75rem; font-weight: 650; letter-spacing: -0.04em; }

.grid2,
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.padtop { margin-top: 16px; }
.rowline { padding: 12px 0; border-bottom: 1px solid var(--border); }
.kpi { margin-top: 6px; color: var(--text); font-size: 1.625rem; font-weight: 650; letter-spacing: -0.035em; }

/* Forms */
label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #344054;
  font-size: 0.875rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  font-size: 0.875rem;
  line-height: 1.4;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

textarea { min-height: 92px; resize: vertical; }
select[multiple] { min-height: 220px; padding: 6px; }
select[multiple] option { padding: 7px 8px; border-radius: 5px; }
input::placeholder,
textarea::placeholder { color: #98a2b3; }
input:hover,
select:hover,
textarea:hover { border-color: #b8bec8; }
input:focus,
select:focus,
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12); }
input[type="checkbox"],
input[type="radio"] { width: 16px; min-height: 16px; margin: 0; accent-color: var(--accent); box-shadow: none; }

button,
.button {
  display: inline-flex;
  min-height: 36px;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: #344054;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 100ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

button:hover,
.button:hover { border-color: #b8bec8; background: var(--surface-hover); color: var(--text); }
button:active,
.button:active { transform: translateY(1px); }
button:focus-visible,
.button:focus-visible,
summary:focus-visible,
.nav-link:focus-visible { outline: 3px solid rgba(91, 91, 214, 0.28); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.primary,
button.primary,
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(32, 23, 117, 0.18);
}
.primary:hover,
button.primary:hover,
.button.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: #ffffff; }
.primary-outline { border-color: #c9c8fa; background: var(--accent-soft); color: #4444b8; }
.primary-outline:hover { border-color: #aaa8f0; background: #e5e5ff; color: #3737a4; }
button.danger,
.button.danger { border-color: #f1c7c4; background: var(--danger-soft); color: var(--danger); }
button.danger:hover,
.button.danger:hover { border-color: #e5a8a4; background: #fee4e2; color: #912018; }

.inline { display: inline-flex; }
.actions,
.actions form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.stack { display: grid; min-width: 300px; gap: 12px; }
.options { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.options label,
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) { flex-direction: row; gap: 7px; align-items: center; font-weight: 500; }

/* Tables */
.table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; }
th,
td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th {
  background: #fafbfc;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--radius-md); }
th:last-child { border-top-right-radius: var(--radius-md); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
td { color: #344054; font-size: 0.8125rem; }
td b { color: var(--text); }
td.actions { min-width: 230px; }

/* Statuses, alerts and disclosure */
.state {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1;
}
.state.sent,
.state.delivered,
.state.read,
.state.connected,
.state.active { border-color: #bbebcb; background: var(--success-soft); color: var(--success); }
.state.uncertain,
.state.quarantined,
.state.paused { border-color: #fed7aa; background: var(--warning-soft); color: var(--warning); }
.state.confirmed_failed,
.state.expired,
.state.disconnected { border-color: #f7c5c2; background: var(--danger-soft); color: var(--danger); }
.state.ready,
.state.claimed,
.state.preparing,
.state.provider_attempted { border-color: #bfd5ff; background: var(--info-soft); color: var(--info); }
.state.cancelled,
.state.completed { border-color: var(--border); background: var(--surface-subtle); color: var(--text-secondary); }

.alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}
.alert.ok { border-color: #bbebcb; background: var(--success-soft); color: var(--success); }
.alert.error { border-color: #f7c5c2; background: var(--danger-soft); color: var(--danger); }

.toast-stack { position: fixed; top: 20px; right: 24px; z-index: 100; display: grid; width: min(390px, calc(100vw - 32px)); gap: 9px; pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0; box-shadow: 0 16px 38px rgba(16, 24, 40, 0.14); pointer-events: auto; animation: toast-in 180ms ease-out; }
.toast > span { min-width: 0; }
.toast > button { width: 28px; min-height: 28px; flex: 0 0 auto; padding: 2px; border-color: transparent; background: transparent; box-shadow: none; color: currentColor; font-size: 1rem; }
.toast.is-leaving { opacity: 0; transform: translateY(-5px); transition: opacity 180ms ease, transform 180ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

body.is-navigating::before { position: fixed; top: 0; right: 0; left: 0; z-index: 200; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), #8b8bee, transparent); background-size: 220% 100%; content: ""; animation: navigation-progress 900ms linear infinite; }
@keyframes navigation-progress { to { background-position: -220% 0; } }
form.is-submitting [type="submit"] { pointer-events: none; }
form.is-submitting [data-busy-label]::before { width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; opacity: 0.72; animation: ui-spin 650ms linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

details > summary { cursor: pointer; color: #344054; font-size: 0.8125rem; font-weight: 600; }
details > summary::marker { color: #98a2b3; }
.actions details { position: relative; }
.actions details > form { margin-top: 10px; }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.checks > div { padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.diaggrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.diaggrid > div { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stats > div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.stats span { color: var(--muted); font-size: 0.75rem; }
.stats strong { font-size: 1.375rem; letter-spacing: -0.03em; }

.section-bar { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.section-bar h2 { margin-bottom: 3px; }
.section-bar p { margin: 0; }
.create-disclosure > summary { display: flex; min-height: 26px; align-items: center; justify-content: space-between; list-style: none; }
.create-disclosure > summary::-webkit-details-marker { display: none; }
.create-disclosure > summary::after { color: #98a2b3; content: "+"; font-size: 1.125rem; font-weight: 400; }
.create-disclosure[open] > summary::after { content: "−"; }
.instance-action-cell { min-width: 260px; }
.instance-primary-actions,
.instance-primary-actions form,
.instance-utility-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.instance-primary-actions form,
.instance-utility-actions form { margin: 0; }
.instance-manage { margin-top: 9px; }
.instance-manage > summary { color: var(--accent); }
.instance-panel { display: grid; gap: 16px; width: min(430px, 74vw); margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); box-shadow: var(--shadow-md); }
.instance-panel-section { display: grid; gap: 9px; }
.instance-panel-section + .instance-panel-section { padding-top: 14px; border-top: 1px solid var(--border); }
.instance-panel-section > strong { color: #344054; font-size: 0.75rem; }
.inline-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 7px; }

/* Group cards */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.group-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.group-card:hover { transform: translateY(-1px); border-color: #d5d8de; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06); }
.group-card-main { display: grid; gap: 16px; padding: 18px; }
.group-card-head { display: flex; min-width: 0; gap: 12px; align-items: flex-start; }
.group-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d9d9fb;
  border-radius: 11px;
  background: var(--accent-soft);
  color: #4949bd;
  font-size: 0.8125rem;
  font-weight: 750;
}
.group-card-title { min-width: 0; flex: 1; }
.group-card-title h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-card-title p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.group-type { flex: 0 0 auto; }
.group-description { min-height: 42px; margin: 0; color: var(--text-secondary); font-size: 0.8125rem; }
.group-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.group-meta-item { padding: 10px; border-radius: var(--radius-md); background: var(--surface-subtle); }
.group-meta-item span { display: block; color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.group-meta-item strong { display: block; margin-top: 3px; color: #344054; font-size: 0.8125rem; font-weight: 600; }
.group-card-footer { margin-top: auto; border-top: 1px solid var(--border); background: #fcfcfd; }
.group-card-footer > details > summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 10px 18px; list-style: none; }
.group-card-footer > details > summary::-webkit-details-marker { display: none; }
.group-card-footer > details > summary::after { color: #98a2b3; content: "+"; font-size: 1rem; font-weight: 400; }
.group-card-footer > details[open] > summary::after { content: "−"; }
.group-card-config { display: grid; gap: 16px; padding: 0 18px 18px; }
.group-card-config form { min-width: 0; }
.group-card-config .options { gap: 8px 10px; }
.group-card-config .options label { padding: 5px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.75rem; }
.group-empty { grid-column: 1 / -1; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }

/* Funnel builder */
.funnel-title { align-items: center; }
.funnel-summary {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-xs);
}
.funnel-summary > div { min-width: 92px; padding: 8px 12px; border-radius: var(--radius-md); }
.funnel-summary > div + div { border-left: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.funnel-summary strong,
.funnel-summary span { display: block; }
.funnel-summary strong { color: var(--text); font-size: 1.125rem; font-weight: 650; letter-spacing: -0.025em; }
.funnel-summary span { margin-top: 1px; color: var(--muted); font-size: 0.6875rem; }
.funnel-compose-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); gap: 18px; align-items: start; }
.funnel-builder,
.funnel-launcher { min-width: 0; }
.funnel-chip,
.funnel-count {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #d9d9fb;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #4949bd;
  font-size: 0.6875rem;
  font-weight: 650;
  white-space: nowrap;
}
.funnel-count { border-color: var(--border); background: var(--surface-subtle); color: var(--muted); }
.funnel-form { display: grid; gap: 16px; }
.funnel-basics { margin-bottom: 2px; }
.funnel-basics label { position: relative; }
.label-optional { position: absolute; top: 0; right: 0; color: var(--muted); font-size: 0.6875rem; font-weight: 450; }
.funnel-steps-heading { display: flex; align-items: end; justify-content: space-between; padding: 14px 0 8px; border-bottom: 1px solid var(--border); }
.funnel-steps-heading h3 { margin: 0; }
.funnel-steps-heading p { margin: 2px 0 0; color: var(--muted); font-size: 0.75rem; }
.funnel-steps-heading > span { color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.funnel-steps { display: grid; }
.funnel-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.funnel-step:last-child { border-bottom: 0; }
.funnel-step::before { position: absolute; top: 44px; bottom: -16px; left: 15px; width: 1px; background: var(--border); content: ""; }
.funnel-step:last-child::before { display: none; }
.funnel-step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid #d7d8f8;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #4949bd;
  font-size: 0.75rem;
  font-weight: 700;
}
.funnel-field-label { min-height: 18px; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 42px; }
.input-suffix > span { position: absolute; top: 50%; right: 11px; color: var(--muted); font-size: 0.75rem; font-weight: 500; transform: translateY(-50%); pointer-events: none; }
.funnel-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #d9d9fb; border-radius: var(--radius-md); background: #f8f8ff; color: #4848a8; }
.funnel-note > span { display: grid; width: 19px; height: 19px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dedeff; font-family: Georgia, serif; font-size: 0.75rem; font-weight: 700; }
.funnel-note p { margin: 0; font-size: 0.75rem; }
.funnel-form-footer { display: flex; justify-content: flex-end; padding-top: 2px; }
.funnel-form-footer .primary { min-width: 120px; }
.funnel-launch-button { width: 100%; min-height: 42px; margin-top: 2px; }
.funnel-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; padding: 30px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-subtle); text-align: center; }
.funnel-empty strong { color: var(--text); font-size: 0.9375rem; }
.funnel-empty p { max-width: 360px; margin: 0 0 8px; color: var(--muted); font-size: 0.8125rem; }
.funnel-empty.compact { min-height: 138px; }
.funnel-warning { margin: -5px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning); font-size: 0.75rem; }
.funnel-list-card .section-bar { align-items: center; }
.funnel-list-card h2,
.funnel-builder .section-bar h2,
.funnel-launcher .section-bar h2 { margin: 3px 0 0; }
.table-subcopy { display: block; max-width: 420px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state.scheduled { border-color: #bfd5ff; background: var(--info-soft); color: var(--info); }
.state.running { border-color: #bbebcb; background: var(--success-soft); color: var(--success); }
.state.failed { border-color: #f7c5c2; background: var(--danger-soft); color: var(--danger); }
.state.needs_review { border-color: #fed7aa; background: var(--warning-soft); color: var(--warning); }

/* Campaign command center */
.page-kicker,
.section-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: 0.105em;
  line-height: 1.2;
}
.campaign-title { align-items: center; }
.campaign-title .muted { max-width: 660px; }
.campaign-preflight { border-color: #d9d9fb; background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%); }
.campaign-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--border); overflow: hidden; }
.campaign-metrics > div { padding: 14px 16px; background: var(--surface); }
.campaign-metrics span,
.campaign-metrics strong { display: block; }
.campaign-metrics span { color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.campaign-metrics strong { margin-top: 4px; color: var(--text); font-size: 1.375rem; font-weight: 675; letter-spacing: -0.035em; }
.preflight-notes { margin-bottom: 16px; padding: 10px 12px; border: 1px solid #fed7aa; border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning); }
.preflight-notes p { margin: 3px 0; font-size: 0.75rem; }
.compact-table table { min-width: 620px; }
.campaign-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.campaign-panel { margin: 0; padding: 0; overflow: hidden; }
.campaign-panel::before { display: block; height: 3px; background: linear-gradient(90deg, var(--accent), #8b8bee 70%, transparent); content: ""; }
.campaign-panel-scheduled::before { background: linear-gradient(90deg, #2563eb, #60a5fa 70%, transparent); }
.campaign-panel-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #ffffff, #fcfcfd); }
.campaign-panel-head h2 { margin: 1px 0 3px; font-size: 1.0625rem; }
.campaign-panel-head p { margin: 0; color: var(--muted); font-size: 0.75rem; }
.campaign-panel-icon { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border: 1px solid #d9d9fb; border-radius: 10px; background: var(--accent-soft); color: #4949bd; font-size: 1rem; font-weight: 700; }
.campaign-panel-scheduled .campaign-panel-icon { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.campaign-form { display: grid; gap: 18px; padding: 20px; }
.campaign-primary-fields,
.campaign-advanced-body { display: grid; gap: 15px; }
.campaign-primary-fields > label,
.campaign-advanced-body > label { position: relative; }
.campaign-primary-fields select[multiple] { min-height: 186px; }
.campaign-advanced { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.campaign-advanced > summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 10px 12px; color: var(--text-secondary); list-style: none; }
.campaign-advanced > summary::-webkit-details-marker { display: none; }
.campaign-advanced > summary::after { color: var(--muted); content: "+"; font-size: 1rem; font-weight: 400; }
.campaign-advanced[open] > summary::after { content: "−"; }
.campaign-advanced-body { padding: 2px 12px 14px; }
.campaign-checks { display: grid; gap: 9px; padding-top: 2px; }
.campaign-checks label { color: var(--text-secondary); font-size: 0.75rem; }
.campaign-submit-bar { display: flex; gap: 8px; justify-content: flex-end; padding-top: 2px; }
.campaign-submit-bar .primary { min-width: 126px; }
.schedule-days { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fafbfc; }
.schedule-days.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.10); }
.schedule-days.is-invalid > small { color: var(--danger); }
.schedule-time-error { color: var(--danger); font-size: 0.6875rem; font-weight: 650; }
.schedule-time-error:not([hidden]) { display: block; }
.schedule-days-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.schedule-days-head > span { color: #344054; font-size: 0.8125rem; font-weight: 600; }
.text-button { min-height: 28px; padding: 4px 7px; border-color: transparent; background: transparent; box-shadow: none; color: var(--accent); font-size: 0.75rem; }
.text-button:hover { border-color: #d9d9fb; background: var(--accent-soft); color: var(--accent-hover); }
.weekday-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekday-chip { display: block; cursor: pointer; }
.weekday-chip input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.weekday-chip span { display: grid; min-height: 36px; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease; }
.weekday-chip:hover span { border-color: #aaa8f0; }
.weekday-chip input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(32, 23, 117, 0.16); }
.weekday-chip input:focus-visible + span { outline: 3px solid rgba(91, 91, 214, 0.24); outline-offset: 2px; }
.schedule-days > small { display: block; margin-top: 8px; }
.controlled-test { border-color: #fed7aa; }
.controlled-test .section-bar { margin-bottom: 18px; }
.campaign-list-card { padding: 0; overflow: visible; }
.campaign-list-card > .section-bar { margin: 0; padding: 20px; }
.campaign-list-card .campaign-table { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: visible; }
.campaign-table table { min-width: 920px; }
.campaign-row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 142px; }
.row-menu { position: relative; }
.row-menu > summary { display: grid; width: 36px; min-height: 36px; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); font-size: 0.8125rem; letter-spacing: 0.08em; list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-popover { display: grid; width: 166px; gap: 4px; margin-top: 6px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
.row-menu-popover form { margin: 0; }
.row-menu-popover button { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; box-shadow: none; }
.campaign-empty { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 4px; padding: 30px; border-top: 1px solid var(--border); color: var(--text-secondary); text-align: center; }
.campaign-empty p { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.campaign-empty .button { margin-top: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Scheduling history */
.schedule-history-card { --schedule-accent: #079669; --schedule-accent-hover: #057a57; --schedule-soft: #ecfdf5; padding: 0; overflow: visible; }
.schedule-history-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; padding: 24px 24px 18px; }
.schedule-history-head h1 { margin: 3px 0 5px; font-size: 1.55rem; }
.schedule-history-head p,
.schedule-create-head p { max-width: 620px; margin: 0; color: var(--muted); font-size: 0.8125rem; }
.schedule-history-head .section-eyebrow,
.schedule-create-head .section-eyebrow { color: var(--schedule-accent, #079669); }
.schedule-history-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schedule-history-card .schedule-primary,
.schedule-create-card .schedule-primary { border-color: var(--schedule-accent, #079669); background: var(--schedule-accent, #079669); color: #fff; box-shadow: 0 5px 14px rgba(7, 150, 105, 0.17); }
.schedule-history-card .schedule-primary:hover,
.schedule-create-card .schedule-primary:hover { border-color: var(--schedule-accent-hover, #057a57); background: var(--schedule-accent-hover, #057a57); color: #fff; }
.schedule-scope-tabs { display: flex; gap: 6px; padding: 0 24px 16px; border-bottom: 1px solid var(--border); }
.schedule-scope-tabs a { display: flex; min-height: 40px; gap: 9px; align-items: center; padding: 8px 13px; border: 1px solid transparent; border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.8125rem; font-weight: 650; text-decoration: none; }
.schedule-scope-tabs a:hover { background: var(--surface-subtle); color: var(--text); }
.schedule-scope-tabs a strong { display: grid; min-width: 23px; height: 23px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 0.6875rem; }
.schedule-scope-tabs a.is-active { border-color: #9de3c8; background: var(--schedule-soft); color: #087452; }
.schedule-scope-tabs a.is-active strong { background: var(--schedule-accent); color: #fff; }
.schedule-history-toolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 0 24px 16px; border-bottom: 1px solid var(--border); }
.schedule-filter-pills { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.schedule-filter-pills :is(button, a) { display: inline-flex; min-height: 36px; gap: 8px; align-items: center; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.schedule-filter-pills :is(button, a) span { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 0.625rem; font-weight: 700; }
.schedule-filter-pills :is(button, a).is-active { border-color: #9de3c8; background: var(--schedule-soft); color: #087452; box-shadow: none; }
.schedule-filter-pills :is(button, a).is-active span { background: var(--schedule-accent); color: #fff; }
.schedule-history-search { display: flex; width: min(340px, 100%); }
.schedule-history-search label { flex: 1; }
.schedule-history-search input { min-height: 36px; padding-top: 7px; padding-bottom: 7px; border-radius: var(--radius-md) 0 0 var(--radius-md); background: #fafbfc; }
.schedule-history-search button { min-height: 36px; padding: 7px 10px; border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; box-shadow: none; font-size: 0.6875rem; }
.schedule-history-table { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: visible; }
.schedule-history-table table { min-width: 1120px; }
.schedule-history-table th { padding-top: 14px; padding-bottom: 10px; background: var(--surface); }
.schedule-history-table td { padding-top: 13px; padding-bottom: 13px; }
.schedule-history-table td:first-child { width: 28%; }
.schedule-history-table td:nth-child(2) { width: 22%; }
.schedule-history-table tbody tr:hover td { background: #fbfdfc; }
.schedule-history-table .schedule-date-divider td { padding: 9px 16px; border-top: 1px solid var(--border); border-bottom-color: var(--border); background: #f8faf9; color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; }
.schedule-history-table .schedule-date-divider td { display: flex; align-items: center; justify-content: space-between; }
.schedule-history-table .schedule-date-divider time { color: var(--text-secondary); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.schedule-pagination { display: flex; min-height: 58px; gap: 16px; align-items: center; justify-content: space-between; padding: 11px 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.75rem; }
.schedule-pagination > div { display: flex; gap: 9px; align-items: center; }
.schedule-pagination .button { min-height: 34px; padding: 6px 10px; }
.schedule-metric { color: var(--text); font-variant-numeric: tabular-nums; }
.schedule-metric.is-success { color: #087452; }
.schedule-metric.is-danger { color: var(--danger); }
.schedule-row-actions { min-width: 292px; white-space: nowrap; }
.schedule-row-actions form { margin: 0; }
.schedule-action-button { min-height: 32px; padding: 6px 9px; font-size: 0.6875rem; }
.schedule-filter-empty { border-top: 0; }

.schedule-create-card { --schedule-accent: #079669; --schedule-accent-hover: #057a57; padding: 0; border-color: #cceadd; overflow: hidden; box-shadow: 0 12px 36px rgba(16, 24, 40, 0.08); scroll-margin-top: 20px; }
.schedule-create-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 22px 24px 18px; border-bottom: 1px solid #dcefe7; background: linear-gradient(180deg, #fbfffd 0%, #f6fcf9 100%); }
.schedule-create-head h2 { margin: 3px 0 4px; font-size: 1.15rem; }
.schedule-close { width: 34px; min-height: 34px; padding: 0; border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); font-size: 1.25rem; }
.schedule-create-form { padding: 22px 24px 24px; }
.schedule-form-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr); gap: 24px; align-items: start; }
.schedule-destination-column { display: grid; gap: 15px; }
.schedule-destination-column > label { display: flex; flex-direction: column; }
.schedule-destination-column .smart-select-list { max-height: 330px; }
.schedule-submit-bar { padding-top: 18px; border-top: 1px solid var(--border); }
.schedule-validation-note { display: flex; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 18px 24px 0; padding: 10px 12px; border: 1px solid #a7e4ce; border-radius: var(--radius-md); background: var(--success-soft); color: var(--success); font-size: 0.75rem; }
.schedule-validation-note.has-warning { border-color: #fed7aa; background: var(--warning-soft); color: var(--warning); }
.metric-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.045em; text-transform: uppercase; }
.compact-kpi { margin-top: 2px; font-size: 1rem; line-height: 1.35; }
.schedule-detail-summary { display: grid; gap: 20px; padding: 24px; border-color: #cceadd; overflow: hidden; }
.schedule-detail-summary-head { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; }
.schedule-detail-summary-head h2 { margin: 4px 0; font-size: 1.35rem; }
.schedule-detail-summary-head p { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.schedule-detail-next { display: grid; min-width: 230px; gap: 3px; padding: 12px 14px; border: 1px solid #dcefe7; border-radius: var(--radius-md); background: #f6fcf9; }
.schedule-detail-next span,
.schedule-detail-next small { color: var(--muted); font-size: 0.6875rem; }
.schedule-detail-next strong { color: var(--text); font-size: 0.875rem; }
.schedule-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--border); overflow: hidden; }
.schedule-detail-metrics > div { display: grid; gap: 5px; padding: 14px 16px; background: var(--surface); }
.schedule-detail-metrics span { color: var(--muted); font-size: 0.6875rem; font-weight: 650; text-transform: uppercase; }
.schedule-detail-metrics strong { color: var(--text); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.schedule-detail-metrics strong.is-success { color: var(--success); }
.schedule-detail-metrics strong.is-danger { color: var(--danger); }
.schedule-detail-metrics strong.is-warning { color: var(--warning); }
.schedule-detail-progress { display: grid; gap: 7px; }
.schedule-detail-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 0.75rem; }
.schedule-detail-progress > div:last-child { height: 8px; border-radius: 999px; background: #e6e9ed; overflow: hidden; }
.schedule-detail-progress > div:last-child span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #079669, #22c55e); }
.schedule-execution-timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.schedule-execution-timeline li { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; padding-right: 14px; }
.schedule-execution-timeline li::after { position: absolute; top: 8px; right: 0; left: 20px; height: 2px; background: var(--border); content: ""; }
.schedule-execution-timeline li:last-child::after { display: none; }
.schedule-execution-timeline li > span { position: relative; z-index: 1; width: 17px; height: 17px; border: 4px solid var(--surface); border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 1px var(--border-strong); }
.schedule-execution-timeline li.is-complete > span { background: #22c55e; box-shadow: 0 0 0 1px #22c55e; }
.schedule-execution-timeline li.has-attention > span { background: #f59e0b; box-shadow: 0 0 0 1px #f59e0b; }
.schedule-execution-timeline li > div { position: relative; z-index: 1; display: grid; min-width: 0; gap: 2px; padding-right: 4px; background: var(--surface); }
.schedule-execution-timeline strong { overflow: hidden; color: var(--text-secondary); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-execution-timeline small { color: var(--muted); font-size: 0.6875rem; line-height: 1.4; }
.schedule-detail-retry { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 13px 14px; border: 1px solid #fed7aa; border-radius: var(--radius-md); background: var(--warning-soft); }
.schedule-detail-retry > div { display: grid; gap: 2px; }
.schedule-detail-retry strong { color: var(--warning); font-size: 0.8125rem; }
.schedule-detail-retry small { color: var(--text-secondary); }
.operational-table table { min-width: 760px; }
.health-list { display: grid; gap: 8px; }
.health-list > div { display: flex; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.health-list > div > span:last-child { display: grid; gap: 1px; }
.health-list strong { font-size: 0.8125rem; }
.health-list small { color: var(--muted); }
.health-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 4px rgba(102, 112, 133, 0.09); }
.health-dot.is-online { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12); }
.next-steps { display: grid; gap: 9px; margin: 0; padding-left: 24px; color: var(--text-secondary); }
.next-steps li { padding-left: 4px; }

.monthly-rule,
.schedule-summary { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fafbfc; }
.monthly-rule > span,
.schedule-summary > span { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.monthly-rule > strong,
.schedule-summary > strong { color: var(--text); font-size: 0.875rem; font-weight: 650; }
.schedule-summary { border-color: #d9d9fb; background: #f8f8ff; }
.schedule-summary > strong { color: #4545ad; }

.smart-select { border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.smart-select:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12); }
.smart-select.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1); }
.smart-select-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.smart-select-tools input { min-height: 36px; border-color: var(--border); background: var(--surface); }
.smart-select-list { display: grid; max-height: 248px; padding: 5px; overflow-y: auto; scrollbar-color: #c7cad1 transparent; scrollbar-width: thin; }
.smart-select-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 9px; border-radius: var(--radius-sm); cursor: pointer; }
.smart-select-option:hover { background: var(--surface-subtle); }
.smart-select-option:has(input:checked) { background: var(--accent-soft); }
.smart-select-option > span { display: grid; min-width: 0; gap: 1px; }
.smart-select-option b { overflow: hidden; color: var(--text); font-size: 0.8125rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.smart-select-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-select-footer { display: flex; min-height: 36px; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 10px; border-top: 1px solid var(--border); background: #fafbfc; color: var(--muted); font-size: 0.75rem; }
.smart-select-validation { color: var(--danger); font-weight: 600; }
.smart-select-empty { margin: 0; padding: 24px 12px; color: var(--muted); font-size: 0.8125rem; text-align: center; }
.mention-selection-warning { margin-top: 2px; padding: 9px 10px; border: 1px solid #fed7aa; border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning); font-size: 0.75rem; font-weight: 500; }

.command-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(76vh, 680px); padding: 0; border: 1px solid #d6d8df; border-radius: var(--radius-xl); background: var(--surface); box-shadow: 0 30px 90px rgba(12, 13, 16, 0.28); color: var(--text); overflow: hidden; }
.command-dialog::backdrop { background: rgba(12, 13, 16, 0.52); backdrop-filter: blur(4px); }
.command-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.command-head > span { color: var(--muted); font-size: 1.25rem; }
.command-head input { min-height: 42px; padding: 8px 0; border: 0; box-shadow: none; font-size: 1rem; }
.command-head button { min-height: 28px; padding: 4px 7px; background: var(--surface-subtle); color: var(--muted); font-size: 0.6875rem; }
.command-results { display: grid; max-height: min(58vh, 510px); gap: 2px; padding: 8px; overflow-y: auto; }
.command-section-label { margin: 8px 9px 3px; color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.command-results a { display: flex; min-height: 48px; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; }
.command-results a:hover,
.command-results a:focus { outline: 0; background: var(--accent-soft); color: var(--accent-hover); }
.command-results a > span:first-child { display: grid; min-width: 0; }
.command-results a b { color: inherit; font-size: 0.875rem; }
.command-results a small { color: var(--muted); }
.command-empty { margin: 0; padding: 38px 16px; color: var(--muted); text-align: center; }
.command-footer { display: flex; gap: 18px; justify-content: flex-end; padding: 9px 14px; border-top: 1px solid var(--border); background: #fafbfc; color: var(--muted); font-size: 0.6875rem; }
kbd { display: inline-flex; min-width: 21px; min-height: 20px; align-items: center; justify-content: center; padding: 2px 5px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); box-shadow: 0 1px 0 rgba(16,24,40,.06); color: var(--text-secondary); font-family: inherit; font-size: 0.6875rem; }

/* Responsive */
@media (max-width: 1180px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel-compose-grid { grid-template-columns: 1fr; }
  .campaign-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main-shell { margin-left: 0; }
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #24252b;
    background: rgba(12, 13, 16, 0.96);
    backdrop-filter: blur(14px);
  }
  .mobile-brand { display: flex; gap: 10px; align-items: center; color: #ffffff; text-decoration: none; }
  .mobile-brand:hover { color: #ffffff; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; }
  .mobile-brand strong { font-size: 0.8125rem; }
  .mobile-command { display: grid; width: 36px; min-height: 36px; place-items: center; margin-left: auto; margin-right: 8px; padding: 0; border-color: #30323a; background: #18191e; color: #d7d9df; font-size: 1.125rem; }
  .mobile-menu { position: relative; }
  .mobile-menu > summary { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #30323a; border-radius: var(--radius-md); color: #ffffff; font-size: 1.125rem; list-style: none; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu > nav {
    position: absolute;
    top: 44px;
    right: 0;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - 78px);
    padding: 12px;
    border: 1px solid #2c2e35;
    border-radius: var(--radius-lg);
    background: #111216;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
    overflow-y: auto;
  }
  .mobile-menu .mobile-logout { display: block; margin: 16px 0 2px; padding-top: 12px; border-top: 1px solid #2c2e35; }
  .mobile-menu .mobile-logout button { width: 100%; }
  .mobile-logout button { border-color: #30323a; background: #18191e; color: #c7cad1; }
  .wrap { padding: 28px 24px 48px; }
}

@media (max-width: 760px) {
  .wrap { padding: 24px 16px 40px; }
  .title { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .title > .actions,
  .title > form { width: 100%; }
  .title > .actions > *,
  .title > form > button { flex: 1; }
  h1 { font-size: 1.625rem; }
  .card { padding: 16px; }
  .grid2,
  .grid4 { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 96px; padding: 14px; }
  .stat strong { margin-top: 9px; font-size: 1.5rem; }
  .group-grid { grid-template-columns: 1fr; }
  .funnel-summary { width: 100%; }
  .funnel-summary > div { min-width: 0; flex: 1; }
  .funnel-step { grid-template-columns: 32px minmax(0, 1fr); }
  .funnel-delay { grid-column: 2; }
  .funnel-step::before { bottom: -61px; }
  .funnel-form-footer .primary { width: 100%; }
  .campaign-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-submit-bar { flex-direction: column-reverse; }
  .campaign-submit-bar > * { width: 100%; }
  .weekday-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .smart-select-tools { grid-template-columns: 1fr; }
  .smart-select-tools .text-button { width: 100%; min-height: 34px; border-color: var(--border); background: var(--surface); }
  .smart-select-list { max-height: 310px; }
  .toast-stack { top: 70px; right: 16px; left: 16px; width: auto; }
  .command-dialog { max-height: 82vh; }
  .command-footer { display: none; }
  .campaign-table { border: 0; overflow: visible; }
  .campaign-table table,
  .campaign-table tbody,
  .campaign-table tr,
  .campaign-table td { display: block; width: 100%; min-width: 0; }
  .campaign-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .campaign-table tbody { display: grid; gap: 10px; padding: 0 12px 12px; }
  .campaign-table tr { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
  .campaign-table td { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .campaign-table td::before { color: var(--muted); content: attr(data-label); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
  .campaign-table td:last-child { border-bottom: 0; }
  .campaign-row-actions { align-items: start; justify-content: start; }
  .campaign-row-actions .row-menu-popover { width: min(190px, 100%); }
  .schedule-history-head,
  .schedule-history-toolbar { align-items: stretch; flex-direction: column; }
  .schedule-history-head { padding: 20px 18px 16px; }
  .schedule-history-actions > * { flex: 1; }
  .schedule-history-toolbar { padding: 0 18px 16px; }
  .schedule-history-search { width: 100%; }
  .schedule-filter-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-filter-pills :is(button, a) { min-width: 0; justify-content: center; padding-right: 7px; padding-left: 7px; }
  .schedule-form-grid { grid-template-columns: 1fr; }
  .schedule-create-head { padding: 18px; }
  .schedule-create-form { padding: 18px; }
  .schedule-validation-note { align-items: flex-start; flex-direction: column; margin: 16px 18px 0; }
  .schedule-row-actions { min-width: 0; white-space: normal; }
  .operational-table { border: 0; overflow: visible; }
  .operational-table table,
  .operational-table tbody,
  .operational-table tr,
  .operational-table td { display: block; width: 100%; min-width: 0; }
  .operational-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .operational-table tbody { display: grid; gap: 10px; padding: 0 12px 12px; }
  .operational-table tr { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
  .operational-table td { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .operational-table td::before { color: var(--muted); content: attr(data-label); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
  .operational-table td:last-child { border-bottom: 0; }
  .operational-table td.actions { min-width: 0; }
  .stack { min-width: 0; }
  button,
  .button { min-height: 40px; }
  .actions { align-items: stretch; }
  td.actions { min-width: 190px; }
}

@media (max-width: 420px) {
  .schedule-filter-pills { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { min-height: 88px; }
  .group-meta { grid-template-columns: 1fr; }
  .funnel-step { gap: 9px; }
  .funnel-step-number { width: 30px; height: 30px; }
  .funnel-steps-heading > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* 0.2.9 · scheduling operations workspace */
.nav-advanced { margin-top: 16px; border-top: 1px solid #272930; padding-top: 8px; }
.nav-advanced > summary { display: flex; min-height: 34px; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-md); color: #858995; cursor: pointer; font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.055em; list-style: none; text-transform: uppercase; }
.nav-advanced > summary::-webkit-details-marker { display: none; }
.nav-advanced > summary:hover { background: var(--sidebar-hover); color: #d7d9df; }
.nav-advanced > summary span:last-child { font-size: 0.875rem; transition: transform 140ms ease; }
.nav-advanced[open] > summary span:last-child { transform: rotate(180deg); }
.nav-advanced-links { display: grid; gap: 1px; padding-top: 4px; }
.nav-advanced-links .nav-link { padding-left: 16px; font-size: 0.75rem; }

.toast-action { flex: 0 0 auto; padding: 5px 8px; border: 1px solid currentColor; border-radius: var(--radius-sm); color: currentColor; font-size: 0.6875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.toast-action:hover { color: currentColor; opacity: 0.75; }

.schedule-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.schedule-view-switch button { min-height: 31px; padding: 5px 10px; border: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: 0.75rem; }
.schedule-view-switch button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.schedule-toolbar-right { display: flex; gap: 8px; align-items: center; }
.schedule-filters { position: relative; }
.schedule-filters > summary { display: flex; min-height: 36px; gap: 7px; align-items: center; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); cursor: pointer; font-size: 0.75rem; font-weight: 600; list-style: none; }
.schedule-filters > summary::-webkit-details-marker { display: none; }
.schedule-filters > summary::after { color: var(--muted); content: "⌄"; }
.schedule-filters[open] > summary { border-color: #9de3c8; background: var(--schedule-soft); color: #087452; }
.schedule-filters[open] > summary::after { transform: rotate(180deg); }
.schedule-filters > summary span { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 999px; background: var(--schedule-accent); color: #fff; font-size: 0.625rem; }
.schedule-filter-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(620px, calc(100vw - 310px)); min-width: 520px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.schedule-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.schedule-filter-grid label { gap: 5px; color: var(--muted); font-size: 0.6875rem; font-weight: 650; }
.schedule-filter-grid input,
.schedule-filter-grid select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.schedule-filter-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); }
.schedule-failure-toggle { flex-direction: row; gap: 8px; align-items: center; color: var(--text-secondary); font-size: 0.75rem; }
.schedule-failure-toggle input { width: 16px; min-height: 16px; }

.schedule-bulk-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 0 24px 12px; padding: 10px 12px; border: 1px solid #bae8d5; border-radius: var(--radius-md); background: #f0fbf6; }
.schedule-bulk-bar > strong { color: #087452; font-size: 0.75rem; }
.schedule-bulk-bar > div { display: flex; gap: 7px; }
.schedule-bulk-bar select,
.schedule-bulk-bar button { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 0.75rem; }
.schedule-select-cell { width: 42px !important; min-width: 42px; text-align: center; }
.schedule-select-cell label { display: inline-flex; }
.schedule-select-cell input { width: 16px; min-height: 16px; margin: 0; }
.schedule-progress-cell { min-width: 150px; }
.schedule-progress { display: grid; min-width: 136px; gap: 4px; }
.schedule-progress-copy { display: flex; align-items: baseline; justify-content: space-between; }
.schedule-progress-copy strong { color: var(--text); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.schedule-progress-copy span { color: var(--muted); font-size: 0.625rem; font-variant-numeric: tabular-nums; }
.schedule-progress-bar { height: 5px; border-radius: 999px; background: #e8ecea; overflow: hidden; }
.schedule-progress-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0baa78, #22c991); transition: width 220ms ease; }
.schedule-progress > small { font-size: 0.625rem; }
.schedule-progress .schedule-uncertain { color: #9a6700; font-weight: 650; }
.schedule-edit-note { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid #bae8d5; border-radius: var(--radius-md); background: #f0fbf6; }
.schedule-edit-note strong { color: #087452; font-size: 0.75rem; }
.schedule-edit-note span { color: #39705e; font-size: 0.6875rem; line-height: 1.45; }

.schedule-calendar-panel { padding: 0 24px 24px; overflow-x: auto; }
.schedule-calendar-head { display: flex; min-width: 760px; align-items: center; justify-content: space-between; padding: 15px 0 12px; border-top: 1px solid var(--border); }
.schedule-calendar-head > div:first-child { display: grid; gap: 2px; }
.schedule-calendar-head > div:first-child strong { color: var(--text); font-size: 0.9375rem; }
.schedule-calendar-head > div:last-child { display: flex; gap: 6px; }
.schedule-calendar-head button { min-height: 32px; padding: 5px 9px; font-size: 0.6875rem; }
.schedule-calendar-weekdays,
.schedule-calendar-grid { display: grid; min-width: 760px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.schedule-calendar-weekdays { border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: #fafbfc; }
.schedule-calendar-weekdays span { padding: 9px; color: var(--muted); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.045em; text-align: center; text-transform: uppercase; }
.schedule-calendar-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.schedule-calendar-day { min-height: 118px; padding: 7px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.schedule-calendar-day.is-outside { background: #fafbfc; }
.schedule-calendar-day.is-outside > * { opacity: 0.45; }
.schedule-calendar-date { display: grid; width: 25px; height: 25px; place-items: center; margin-bottom: 4px; border-radius: 50%; color: var(--text-secondary); font-size: 0.6875rem; font-weight: 650; }
.schedule-calendar-day.is-today .schedule-calendar-date { background: var(--schedule-accent); color: #fff; }
.schedule-calendar-event { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px; align-items: center; margin-top: 4px; padding: 5px 6px; border-radius: var(--radius-sm); background: #eaf9f2; color: #087452; font-size: 0.625rem; line-height: 1.25; text-decoration: none; }
.schedule-calendar-event:hover { background: #d8f4e8; color: #066045; }
.schedule-calendar-event.is-paused { background: #fff6e8; color: #95610a; }
.schedule-calendar-event time { font-family: var(--font-mono); font-size: 0.5625rem; }
.schedule-calendar-event span { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.schedule-calendar-more { display: block; margin-top: 5px; color: var(--muted); font-size: 0.5625rem; }

@media (max-width: 980px) {
  .schedule-filter-popover { right: 0; width: min(620px, calc(100vw - 48px)); min-width: 0; }
  .schedule-toolbar-right { width: 100%; }
  .schedule-toolbar-right .schedule-history-search { flex: 1; }
}

@media (max-width: 760px) {
  .schedule-history-actions,
  .schedule-toolbar-right { width: 100%; }
  .schedule-view-switch { flex: 1; }
  .schedule-view-switch button { flex: 1; }
  .schedule-filters { position: static; }
  .schedule-filter-popover { position: static; width: 100%; margin-top: 8px; }
  .schedule-filter-grid { grid-template-columns: 1fr; }
  .schedule-bulk-bar { align-items: stretch; flex-direction: column; margin: 0 18px 12px; }
  .schedule-bulk-bar > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .campaign-table td.schedule-select-cell { display: flex; grid-template-columns: none; justify-content: flex-end; }
  .campaign-table td.schedule-select-cell::before { margin-right: auto; }
  .schedule-calendar-panel { padding: 0 18px 18px; }
  .toast { align-items: flex-start; flex-wrap: wrap; }
  .toast > span { width: calc(100% - 40px); }
  .toast-action { order: 3; }
}

/* 0.2.12 · operational health center */
.diagnostics-health { display: grid; gap: 18px; }
.diagnostics-head { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; }
.diagnostics-head h1 { margin: 4px 0 6px; }
.diagnostics-head p { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.diagnostics-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.diagnostics-head-actions form { margin: 0; }
.diagnostics-refresh-toggle { min-height: 36px; border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.diagnostics-refresh-toggle:hover { border-color: var(--border); background: var(--surface); color: var(--text-secondary); }
.diagnostics-refresh-toggle.is-paused { color: var(--warning); }
.diagnostics-overview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 17px 18px; border: 1px solid #b9ead7; border-radius: var(--radius-lg); background: #f1fbf7; }
.diagnostics-overview.is-warning { border-color: #fed7aa; background: #fff9ed; }
.diagnostics-overview.is-critical { border-color: #fecaca; background: #fff5f5; }
.diagnostics-overview-icon { width: 12px; height: 12px; border-radius: 50%; background: #16a36f; box-shadow: 0 0 0 6px rgba(22, 163, 111, 0.11); }
.diagnostics-overview.is-warning .diagnostics-overview-icon { background: #d99008; box-shadow: 0 0 0 6px rgba(217, 144, 8, 0.12); }
.diagnostics-overview.is-critical .diagnostics-overview-icon { background: #dc3545; box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.1); }
.diagnostics-overview strong { display: block; color: var(--text); font-size: 0.9375rem; }
.diagnostics-overview p { margin: 2px 0 0; color: var(--text-secondary); font-size: 0.75rem; }
.diagnostics-production { padding: 6px 9px; border: 1px solid #fecaca; border-radius: 999px; background: #fff; color: var(--danger); font-size: 0.6875rem; font-weight: 700; white-space: nowrap; }
.diagnostics-production.is-live { border-color: #b9ead7; color: var(--success); }
.diagnostics-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.diagnostics-service { display: grid; min-height: 132px; align-content: space-between; gap: 13px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.diagnostics-service > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.diagnostics-service .health-dot { background: #16a36f; box-shadow: 0 0 0 4px rgba(22, 163, 111, 0.11); }
.diagnostics-service.is-warning .health-dot { background: #d99008; box-shadow: 0 0 0 4px rgba(217, 144, 8, 0.12); }
.diagnostics-service.is-critical .health-dot { background: #dc3545; box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1); }
.diagnostics-service strong { color: var(--text); font-size: 0.8125rem; }
.diagnostics-service small { padding: 4px 6px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 0.625rem; font-weight: 700; }
.diagnostics-service.is-warning small { background: var(--warning-soft); color: var(--warning); }
.diagnostics-service.is-critical small { background: var(--danger-soft); color: var(--danger); }
.diagnostics-service p { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.diagnostics-service p b { color: var(--text); }
.diagnostics-service > a { color: var(--accent); font-size: 0.6875rem; font-weight: 650; text-decoration: none; }
.diagnostics-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr); gap: 16px; align-items: start; }
.diagnostics-queue-card,
.diagnostics-environment-card { padding: 20px; }
.diagnostics-queue-card .section-bar,
.diagnostics-environment-card .section-bar { margin-bottom: 16px; }
.diagnostics-queue-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.diagnostics-queue-metrics > a { display: grid; min-height: 124px; align-content: start; gap: 6px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); color: var(--text-secondary); text-decoration: none; }
.diagnostics-queue-metrics > a:hover { border-color: var(--border-strong); background: var(--surface); box-shadow: var(--shadow-xs); }
.diagnostics-queue-metrics span { font-size: 0.6875rem; font-weight: 650; }
.diagnostics-queue-metrics strong { color: var(--text); font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.diagnostics-queue-metrics strong.is-warning { color: var(--warning); }
.diagnostics-queue-metrics strong.is-danger { color: var(--danger); }
.diagnostics-queue-metrics small { color: var(--muted); font-size: 0.625rem; line-height: 1.45; }
.diagnostics-actions-list { display: grid; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.diagnostics-actions-list a { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; }
.diagnostics-actions-list a:hover { background: var(--surface-subtle); }
.diagnostics-actions-list span { color: var(--muted); font-size: 0.6875rem; font-weight: 650; }
.diagnostics-actions-list span.is-warning { color: var(--warning); }
.diagnostics-actions-list span.is-danger { color: var(--danger); }
.diagnostics-actions-list strong { color: var(--text-secondary); font-size: 0.75rem; }
.diagnostics-environment-card dl { display: grid; margin: 0; }
.diagnostics-environment-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--border); }
.diagnostics-environment-card dl > div:last-child { border-bottom: 0; }
.diagnostics-environment-card dt { color: var(--muted); font-size: 0.6875rem; }
.diagnostics-environment-card dd { max-width: 220px; margin: 0; color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.6875rem; overflow-wrap: anywhere; text-align: right; }
.diagnostics-check { display: inline-flex; padding: 3px 6px; border-radius: 999px; font-family: var(--font-sans); font-size: 0.625rem; font-weight: 750; }
.diagnostics-check.is-ok { background: var(--success-soft); color: var(--success); }
.diagnostics-check.is-error { background: var(--danger-soft); color: var(--danger); }
.diagnostics-probes { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.diagnostics-probes > strong { width: 100%; font-size: 0.75rem; }
.diagnostics-updated { margin: -4px 2px 0; color: var(--muted); font-size: 0.6875rem; text-align: right; }

@media (max-width: 1180px) {
  .diagnostics-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagnostics-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .schedule-detail-summary-head,
  .schedule-detail-retry,
  .diagnostics-head { align-items: stretch; flex-direction: column; }
  .schedule-detail-next { min-width: 0; }
  .schedule-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-execution-timeline { grid-template-columns: 1fr; gap: 11px; }
  .schedule-execution-timeline li { min-height: 38px; padding: 0; }
  .schedule-execution-timeline li::after { top: 17px; bottom: -12px; left: 8px; width: 2px; height: auto; }
  .schedule-execution-timeline li > div { padding: 0 0 8px; }
  .schedule-execution-timeline strong { white-space: normal; }
  .schedule-detail-retry button { width: 100%; }
  .diagnostics-head-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .diagnostics-head-actions > * { width: 100%; }
  .diagnostics-head-actions form button { width: 100%; }
  .diagnostics-refresh-toggle { grid-column: 1 / -1; }
  .diagnostics-overview { grid-template-columns: auto minmax(0, 1fr); }
  .diagnostics-production { grid-column: 2; justify-self: start; }
  .diagnostics-service-grid { grid-template-columns: 1fr; }
  .diagnostics-queue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagnostics-actions-list a { grid-template-columns: 72px minmax(0, 1fr); }
  .diagnostics-actions-list a > span:last-child { grid-column: 2; }
  .schedule-scope-tabs { padding-right: 18px; padding-left: 18px; }
  .schedule-pagination { align-items: flex-start; flex-direction: column; padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 420px) {
  .diagnostics-queue-metrics { grid-template-columns: 1fr; }
}

/* Explicit destination types; cache key follows APP_VERSION. */
.destination-kind{display:inline-flex;width:max-content;border:0;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:700;line-height:1.4}.destination-kind-group{background:#eaf2ff!important;color:#2455a5!important}.destination-kind-community{background:#f0eafd!important;color:#7040a8!important}.destination-kind-announcement{background:#fff3db!important;color:#855500!important}.group-kind-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.group-kind-filters .button{gap:8px}.group-kind-filters span{font-size:12px;opacity:.8}
