:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #24283f;
  background: #f7f8ff;
  font-synthesis: none;
  --ink: #171a30;
  --muted: #68718b;
  --line: #e4e6f4;
  --echo-blue: #2564eb;
  --azure: #3bb1ff;
  --violet: #8a3ffc;
  --mist: #e8e6ff;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background .15s, box-shadow .15s; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; }
input, textarea, select {
  width: 100%;
  border: 1px solid #d6daec;
  border-radius: 7px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid #a9bcff; outline-offset: 1px; }
textarea { resize: vertical; line-height: 1.6; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--echo-blue); flex-shrink: 0; margin: 0; }
input[type=file] { font-size: 13px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 20px 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--ink); font-size: 30px; letter-spacing: -1px; line-height: 1.2; font-weight: 650; margin-bottom: 12px; }
h2 { color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -.3px; margin-bottom: 10px; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.6; }
.center { text-align: center; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.6px; color: var(--echo-blue); margin-bottom: 13px; }
.primary, .secondary {
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 11px 16px;
  font-weight: 650;
  font-size: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 42px;
}
.primary { background: var(--echo-blue); color: white; }
.primary:hover:not(:disabled) { background: #1d50c5; box-shadow: 0 3px 12px #2564eb30; }
.secondary { background: white; border-color: #d6daec; color: #414967; }
.secondary:hover:not(:disabled) { background: #f3f2ff; }
.full-width { width: 100%; }
.text-button, .icon-button { border: 0; background: transparent; color: var(--echo-blue); padding: 4px; font-size: 12px; font-weight: 600; }
.text-button:hover { text-decoration: underline; }
.text-link { color: var(--echo-blue); font-size: 13px; font-weight: 600; }
.badge { display: inline-flex; align-items: center; border-radius: 5px; font-size: 10px; font-weight: 650; line-height: 1.5; padding: 5px 8px; white-space: nowrap; }
.neutral { color: #58557f; background: #f1efff; border: 1px solid var(--mist); }
.good { color: #00634d; background: #e7f4ed; }
.blocked { color: #8e5b28; background: #fff2df; }
.danger { color: #a5363a; background: #ffedef; }
.workspace { display: flex; min-height: 100vh; }
.sidebar {
  width: 235px;
  flex-shrink: 0;
  background: linear-gradient(175deg, #fff 60%, #f0efff);
  border-right: 1px solid var(--line);
  color: var(--ink);
  padding: 32px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 31px; font-weight: 750; letter-spacing: -1.3px; padding: 0 10px; }
.brand-mark { display: block; width: 64px; height: 56px; flex-shrink: 0; object-fit: contain; }
.small-mark { width: 40px; height: 35px; }
.brand-tagline { font-size: 10px; color: var(--muted); margin: 12px 10px 0; }
.nav-caption { font-size: 9px; color: #7d829f; letter-spacing: 1.5px; margin: 34px 10px 16px; }
.nav-button { display: flex; align-items: center; gap: 12px; padding: 14px 13px; border: 0; border-radius: 6px; background: transparent; color: #68718b; width: 100%; text-align: left; font-size: 18px; margin: 5px 0; }
.nav-button span { font-size: 12px; font-weight: 550; }
.nav-button.active { background: var(--mist); color: #3349a8; box-shadow: inset 3px 0 var(--echo-blue); }
.nav-button:hover { background: #f1f0ff; color: #3349a8; }
.sidebar-bottom { margin-top: auto; padding: 35px 9px 0; }
.sidebar-bottom p { font-size: 11px; color: #78809b; line-height: 1.8; margin: 9px 0 25px; }
.independence { font-size: 11px; font-weight: 600; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--echo-blue); margin-right: 5px; }
.operator { border-top: 1px solid #dddef1; padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; align-items: center; }
.operator button { color: var(--echo-blue); }
.main { margin-left: 235px; flex: 1; min-width: 0; padding: 0 36px; }
.topbar { height: 74px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 1.2px; font-weight: 600; color: #7b829e; }
.topbar .badge { letter-spacing: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 36px 0 24px; }
.page-heading p.muted { font-size: 13px; margin-bottom: 0; }
.page-heading > .badge { font-size: 9px; letter-spacing: 1px; background: white; padding: 9px 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 26px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 19px 22px; display: flex; flex-direction: column; }
.stat > span { font-size: 11px; color: #646d87; font-weight: 550; }
.stat strong { font-size: 29px; font-weight: 600; color: var(--ink); margin: 7px 0; }
.stat small { font-size: 10px; color: #78809b; }
.stat:last-child { background: linear-gradient(120deg, #fff, #f1efff); border-color: #ded8fc; }
.stat:last-child strong { color: #6441c7; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; box-shadow: 0 2px 3px #30225f03; }
.compose-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.panel-heading { padding: 22px 22px 15px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; margin-bottom: 6px; }
.panel-heading p { margin: 0; }
.step { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #eeecff; color: #6341bf; width: 22px; height: 22px; font-size: 11px; }
.filters { display: flex; gap: 9px; padding: 17px 20px 13px; }
.filters input { min-width: 0; flex: 1.2; font-size: 12px; }
.filters select { min-width: 0; flex: 1; font-size: 12px; }
.selection-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 20px 13px; color: var(--muted); font-size: 10px; }
.selection-bar .text-button { font-size: 10px; margin-left: 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 9px; letter-spacing: .7px; color: #747d98; background: #f8f9ff; font-weight: 650; padding: 13px 15px; white-space: nowrap; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
td { padding: 15px; font-size: 12px; line-height: 1.5; border-bottom: 1px solid #eef0f8; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9f9ff; }
tr.selected { background: #f0f3ff; }
.check-cell { width: 40px; padding-left: 22px; padding-right: 2px; }
.contact-name { font-weight: 600; font-size: 12px; }
.contact-account { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.phone-cell { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.contacts-scroll { max-height: 440px; min-height: 150px; }
.panel-footer { border-top: 1px solid var(--line); padding: 15px 20px; font-size: 10px; }
.message-fields { padding: 0 22px 13px; }
.message-fields label { font-size: 11px; }
.message-fields input, .message-fields select, .message-fields textarea { font-size: 12px; }
.optional { float: right; color: #78809b; font-size: 10px; font-weight: 400; }
.message-meter { display: flex; justify-content: space-between; font-size: 9px; color: #78809b; margin-top: 8px; }
.tip { background: #f6f5ff; border: 1px solid var(--mist); border-radius: 6px; padding: 14px; margin: 22px 0; }
.tip strong { font-size: 10px; color: #544981; }
.tip p { font-size: 10px; color: #727793; margin: 5px 0 0; }
.message-fields > .small { font-size: 9px; margin: 10px 0 2px; }
.empty { padding: 45px 25px; text-align: center; color: #78809b; font-size: 12px; }
.empty strong { display: block; color: #485075; margin-bottom: 8px; }
.empty p { max-width: 320px; margin: 0 auto 18px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.padded { padding: 26px; }
.padded h2 { margin-top: 15px; }
.padded > p { font-size: 13px; }
.padded .small { font-size: 12px; }
code { font-size: 11px; background: #f2f2fc; padding: 2px 4px; overflow-wrap: anywhere; }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; line-height: 1.6; font-size: 12px; margin: 20px 0; }
.check-label input { margin-top: 3px; }
.status-box { font-size: 12px; line-height: 1.8; background: #f6f6ff; padding: 14px; border: 1px solid var(--line); border-radius: 6px; margin: 20px 0; }
.warning-text { color: #90632e; }
.suppression-panel { margin-top: 24px; }
.inline-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.inline-form label { margin: 0; }
.inline-form input { max-width: 230px; }
.page-footer { display: flex; justify-content: space-between; font-size: 10px; color: #747d98; margin: 35px 0 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.system-banners:empty { display: none; }
.system-banners { padding-top: 20px; }
.system-banner { padding: 12px 16px; border: 1px solid #f0dfc0; border-radius: 6px; background: #fff9ed; font-size: 12px; line-height: 1.6; color: #825c28; margin: 0 0 8px; }
.system-banner.error { background: #fff1f1; border-color: #f1cccc; color: #983b3b; }
.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(ellipse at 15% 15%, #3bb1ff22, transparent 45%),
    radial-gradient(ellipse at 85% 85%, #8a3ffc1c, transparent 50%),
    linear-gradient(135deg, #f8faff, var(--mist));
  padding: 25px;
}
.login-card { max-width: 450px; width: 100%; background: #ffffffed; border: 1px solid #fff; border-radius: 15px; padding: 40px; box-shadow: 0 20px 60px #39217d12; }
.login-brand { padding: 0; gap: 12px; font-size: 45px; letter-spacing: -2px; margin-bottom: 22px; }
.login-card h1 { font-size: 34px; margin-bottom: 20px; }
.login-card > .muted { font-size: 13px; }
.login-card .eyebrow { font-size: 9px; }
.login-card .primary { width: 100%; margin: 24px 0 15px; }
.brand-attributes { display: flex; justify-content: center; align-items: center; gap: 10px; color: #656480; font-size: 10px; margin: 6px 0 14px; }
.brand-attributes span { color: var(--violet); }
.login-card > .small { font-size: 10px; text-align: center; }
.login-card form label { font-size: 12px; }
#notice { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; width: max-content; max-width: min(650px, 90vw); border: 1px solid #b9c9fa; background: #eef3ff; color: #284993; padding: 15px 22px; border-radius: 8px; font-size: 13px; box-shadow: 0 10px 30px #252f7d20; }
#notice.error { border-color: #e7b6b6; background: #fff1f1; color: #9e3434; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; max-width: 620px; width: calc(100% - 32px); max-height: 90vh; box-shadow: 0 25px 100px #24204b50; color: var(--ink); }
dialog::backdrop { background: #19193477; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 22px; margin-bottom: 0; }
.dialog-heading .eyebrow { font-size: 9px; margin-bottom: 8px; }
.icon-button { font-size: 26px; color: #747d98; }
.dialog-content { padding: 24px 28px; }
.dialog-content > .muted { font-size: 13px; }
.sms-preview { background: #f0efff; border: 1px solid #ded9fa; border-radius: 12px 12px 12px 0; padding: 20px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-summary { font-size: 14px; font-weight: 650; margin: 24px 0 18px; }
details { font-size: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
.recipient-list { max-height: 180px; overflow: auto; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.confirmation { padding: 16px; background: #fff9ed; border-radius: 7px; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.detail-heading h2 { margin: 0; }
.history-body { white-space: pre-wrap; overflow-wrap: anywhere; background: #f6f6ff; padding: 15px; font-size: 13px; border-radius: 7px; margin: 20px 0; }
.settings-grid { align-items: start; }
.connection-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.connection-heading .eyebrow { margin-bottom: 8px; }
.connection-heading h2 { margin: 0 0 12px; }
.connection-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.connection-fields label { font-size: 12px; }
.connection-fields input { font-size: 13px; }
.field-help { margin: 7px 0 0; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.connection-test-result { font-size: 12px; line-height: 1.6; margin: 18px 0 0; }
.connection-test-result:empty { display: none; }
.success-text { color: #00634d; }
.error-text { color: #a5363a; }
.settings-nav { display: flex; gap: 10px; margin-bottom: 26px; overflow-x: auto; }
.settings-nav button { flex-shrink: 0; }
.settings-nav .active { background: var(--mist); border-color: #c7b9fa; color: #3349a8; }
.settings-page > .detail-heading { margin-bottom: 16px; }
.form-submit { margin-top: 24px; }
.users-panel { margin-top: 24px; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 180px; }
.mfa-qr { display: block; max-width: 100%; height: auto; margin: 20px auto; }
#mfa-secret { display: block; margin-top: 8px; user-select: all; }
.secret-output { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.webhook-details { margin-top: 22px; }
.webhook-details dl { font-size: 12px; line-height: 1.7; }
.webhook-details dt { font-weight: 600; margin-top: 10px; }
.webhook-details dd { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.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; }
[hidden] { display: none !important; }

@media (min-width: 1600px) {
  .main { padding: 0 55px; }
  .compose-grid { grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr); }
}
@media (max-width: 1200px) {
  .main { padding: 0 23px; margin-left: 205px; }
  .sidebar { width: 205px; padding-left: 12px; padding-right: 12px; }
  .compose-grid { grid-template-columns: minmax(0, 1fr); }
  .message-panel .message-fields { padding-bottom: 20px; }
  .message-fields textarea { min-height: 150px; }
  .page-heading > .badge { display: none; }
}
@media (max-width: 800px) {
  .workspace { display: block; }
  .sidebar { position: static; width: auto; padding: 18px 20px; display: block; }
  .brand { padding: 0; }
  .brand-tagline { margin-left: 0; font-size: 10px; }
  .nav-caption { display: none; }
  .sidebar nav { display: flex; gap: 5px; margin-top: 15px; overflow: auto; }
  .nav-button { width: auto; min-width: 82px; white-space: nowrap; padding: 9px 10px; font-size: 15px; gap: 6px; flex: 1; justify-content: center; }
  .nav-button span { font-size: 11px; white-space: normal; }
  .nav-button.active { box-shadow: inset 0 -2px var(--echo-blue); }
  .sidebar-bottom { display: block; margin-top: 12px; padding: 0 4px; }
  .sidebar-bottom p, .sidebar .independence { display: none; }
  .operator { padding-top: 10px; }
  .main { margin-left: 0; padding: 0 18px; }
  .topbar { height: 56px; font-size: 8px; }
  .topbar .badge { font-size: 9px; }
  .page-heading { padding: 28px 0 20px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p.muted { font-size: 12px; }
  .stat-grid { gap: 9px; }
  .stat { padding: 13px; }
  .stat > span { font-size: 10px; }
  .stat small { display: none; }
  .stat strong { font-size: 25px; }
  .two-column { grid-template-columns: 1fr; }
  .page-footer span { display: none; }
  .filters { flex-wrap: wrap; }
  .filters input, .filters select { flex-basis: 100%; }
  .selection-bar { flex-wrap: wrap; }
  .padded { padding: 20px; }
  .panel-heading { padding: 18px; }
  .message-fields { padding-left: 18px; padding-right: 18px; }
  .phone-cell { font-size: 10px; }
  .login-card { padding: 30px; }
  .sidebar .brand-mark { width: 40px; height: 35px; }
  .detail-heading { align-items: flex-start; }
}
