:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #152646;
  background: #f6f7fb;
  color-scheme: light;
  --navy: #07366d;
  --purple: #47337e;
  --gold: #f1cb75;
  --muted: #53627c;
  --border: #dce2ed;
}
* { box-sizing: border-box; }
body { margin: 0; }
.frame, main { width: min(1180px, calc(100% - 48px)); margin: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.topbar .frame { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { display: grid; color: var(--purple); text-align: center; }
.brand strong { font-size: 1.75rem; line-height: 1.15; font-weight: 500; letter-spacing: .25em; margin-right: -.25em; }
.brand span { font-size: .66rem; color: #566620; letter-spacing: .3em; }
nav { display: flex; gap: clamp(12px, 3vw, 32px); flex-wrap: wrap; }
nav a { color: var(--navy); text-decoration: none; font-weight: 700; font-size: .88rem; }
nav a:hover { text-decoration: underline; }
main { padding: 32px 0 48px; }
.overview { background: linear-gradient(115deg, #07366d, #182d67 55%, #47337e); color: #fff; padding: clamp(24px, 4vw, 48px); border-radius: 18px; margin-bottom: 24px; }
.channel { color: var(--gold); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 750; margin: 4px 0; letter-spacing: -.06em; line-height: 1.05; }
.overview p { color: #e1e6f8; margin: 12px 0 24px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.metrics div { min-width: 0; padding: 14px 18px; border-radius: 12px; border: 1px solid #ffffff44; background: #ffffff12; display: flex; flex-direction: column-reverse; gap: 3px; }
.metrics dt { font-size: .83rem; color: #f0effa; }
.metrics dd { margin: 0; font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 750; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
h2 { margin: 0 0 18px; font-size: 1.3rem; color: var(--navy); letter-spacing: -.025em; }
p { line-height: 1.5; }
.layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: clamp(18px, 3vw, 30px); min-width: 0; box-shadow: 0 4px 16px #213a6b08; }
.history { margin-top: 20px; }
form, label { display: grid; gap: 7px; }
form { gap: 15px; }
label { font-weight: 650; font-size: .92rem; }
input, textarea, select, button { font: inherit; }
input:not([type=checkbox]), textarea, select { width: 100%; border: 1px solid #aebbd0; border-radius: 9px; padding: 11px 12px; background: #fbfcff; color: inherit; }
input[type=number] { max-width: 140px; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #7154af; outline-offset: 2px; }
button { justify-self: start; background: var(--navy); color: #fff; border: 0; border-radius: 9px; padding: 11px 17px; cursor: pointer; font-weight: 750; }
button:hover:enabled { background: #18487f; }
#start { background: var(--gold); color: #182745; }
#start:hover:enabled { background: #f7d68d; }
button:disabled { opacity: .55; cursor: default; }
.check { display: flex; align-items: start; font-weight: 450; }
.check input { accent-color: var(--navy); }
.hint { color: var(--muted); font-size: .83rem; margin: -7px 0 0; }
output:not(:empty) { display: block; font-size: .9rem; }
output:empty, #connection-error:empty { display: none; }
#connection-error { padding: 10px 14px; color: #7a3511; background: #fff3d9; border-radius: 9px; }
.phone, details { border-top: 1px solid var(--border); padding: 14px 0 0; margin-top: 14px; overflow-wrap: anywhere; }
.phone img { display: block; width: 200px; max-width: 100%; }
.phone p { margin: 5px 0 8px; color: var(--muted); }
summary { cursor: pointer; font-weight: 700; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: 8px; border-bottom: 1px solid var(--border); }
.message { white-space: pre-wrap; }
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .frame, main { width: calc(100% - 28px); }
  .topbar .frame { padding: 14px 0; flex-wrap: wrap; }
  .metrics { gap: 6px; }
  .metrics div { padding: 8px; }
  .metrics dt { font-size: .72rem; }
}
.phone-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.phone-tabs button, #edit-campaign { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.phone-tabs button[aria-pressed="true"], .phone-tabs button:hover { background: var(--navy); color: #fff; }
dialog { width: min(580px, calc(100% - 28px)); max-height: 88vh; color: inherit; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
dialog::backdrop { background: #101a36a8; }
dialog img { display: block; max-width: 100%; max-height: 225px; object-fit: contain; margin-top: 14px; }
dialog pre { max-height: 155px; overflow: auto; }
.preview-message { padding: 12px; background: #f6f7fb; border-radius: 8px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.login { max-width: 440px; margin: 44px auto; }
.login h1 { font-size: 2rem; margin-bottom: 22px; }
.online-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
