:root {
  --navy-950: #0e1238; --navy-900: #171a55; --navy-800: #24266f;
  --cyan-500: #10cde0; --violet-500: #7955df; --violet-600: #6542c7;
  --ink: #20213c; --muted: #666a82; --border: #dfe2ed; --surface: #fff;
  --background: #f5f6fb; --danger: #a1324a; --shadow: 0 14px 38px rgba(17, 21, 63, .08);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 92% 2%, rgba(121, 85, 223, .08), transparent 28rem), var(--background); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: #5740b5; }
button, input, select, textarea { font: inherit; }
.app-header { color: #fff; background: radial-gradient(circle at 82% 10%, rgba(121, 85, 223, .46), transparent 28%), linear-gradient(115deg, var(--navy-950), var(--navy-800)); border-bottom: 3px solid var(--cyan-500); box-shadow: 0 8px 24px rgba(17, 21, 63, .16); }
.app-header__inner, .page-shell, .app-footer { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.app-header__inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand img { width: 58px; height: 58px; object-fit: contain; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; box-shadow: 0 7px 22px rgba(4,8,39,.3), 0 0 0 3px rgba(16,205,224,.18); }
.brand span { display: grid; line-height: 1.12; }
.brand strong { font-size: 1.16rem; }
.brand small { margin-top: 5px; color: #cceff3; font-size: .78rem; }
.top-nav { display: flex; align-items: center; gap: 8px; }
.top-nav a, .nav-button { padding: 9px 11px; border: 0; border-radius: 8px; color: #fff; background: transparent; text-decoration: none; font-size: .82rem; font-weight: 650; cursor: pointer; }
.top-nav a:hover, .nav-button:hover { background: rgba(255,255,255,.11); }
.top-nav form { margin: 0; }
.page-shell { padding-block: 38px 52px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.eyebrow { margin: 0 0 8px; color: var(--violet-600); font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy-950); font-size: clamp(1.8rem,3vw,2.45rem); letter-spacing: -.035em; line-height: 1.1; }
h2 { margin: 0; color: var(--navy-950); font-size: 1.08rem; letter-spacing: -.012em; }
.intro { max-width: 720px; margin: 9px 0 0; color: var(--muted); line-height: 1.55; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.actions, .inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-actions { margin-top: 18px; }
.button, button.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; color: #fff; background: var(--violet-500); box-shadow: 0 6px 16px rgba(101,66,199,.17); text-decoration: none; font-weight: 750; cursor: pointer; }
.button:hover { background: var(--violet-600); }
.button--secondary { background: var(--navy-900); box-shadow: 0 6px 16px rgba(17,21,63,.15); }
.button--secondary:hover { background: var(--navy-800); }
.button--ghost { border-color: #ccd1e1; color: var(--navy-900); background: #fff; box-shadow: none; }
.button--ghost:hover { background: #f4f2fc; }
.button--danger { background: var(--danger); }
.button--warning { color: #4a2f00; background: #ffd97a; box-shadow: 0 6px 16px rgba(229,162,26,.25); }
.button--warning:hover { background: #f5c957; }
button.button--secondary { background: var(--navy-900); box-shadow: 0 6px 16px rgba(17,21,63,.15); }
button.button--secondary:hover { background: var(--navy-800); }
button.button--ghost { border-color: #ccd1e1; color: var(--navy-900); background: #fff; box-shadow: none; }
button.button--ghost:hover { background: #f4f2fc; }
button.button--danger { background: var(--danger); }
button.button--warning { color: #4a2f00; background: #ffd97a; box-shadow: 0 6px 16px rgba(229,162,26,.25); }
button.button--warning:hover { background: #f5c957; }
.run-bar { display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap; margin-top: 4px; padding: 16px 18px; border: 1px solid #f0c14f; border-radius: 14px; background: linear-gradient(90deg, #fff5d6, #fffbee); }
.run-bar--paused { border-color: #cfd3e3; background: #f6f6fb; }
.run-bar__info { flex: 1 1 220px; min-width: 0; }
.run-bar__state { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; color: var(--navy-950); font-size: .95rem; }
.run-bar--running .run-bar__state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e5a21a; box-shadow: 0 0 0 0 rgba(229,162,26,.5); animation: run-pulse 1.6s infinite; }
.run-bar--paused .run-bar__state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #8b90a8; }
.run-bar__count { display: block; margin-top: 7px; color: #4d5170; font-size: .82rem; }
.button--pause { min-height: 52px; padding-inline: 24px; font-size: 1rem; }
.button--pause svg { flex: 0 0 auto; }
@keyframes run-pulse { 70% { box-shadow: 0 0 0 9px rgba(229,162,26,0); } 100% { box-shadow: 0 0 0 0 rgba(229,162,26,0); } }
.step--active { position: relative; margin-inline: -12px; padding-inline: 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(16,205,224,.08), transparent 70%); box-shadow: inset 3px 0 0 var(--cyan-500); }
.step--active .step__number { background: var(--violet-500); box-shadow: 0 0 0 4px rgba(121,85,223,.18); }
.name-chip { display: inline-block; margin-top: 4px; padding: 5px 10px; border: 1px dashed #b9a7ee; border-radius: 8px; color: var(--navy-950); background: #f4f2fc; font-size: .9rem; font-weight: 700; user-select: all; word-break: break-word; }
.downloads-menu { position: relative; }
.downloads-menu summary { list-style: none; }
.downloads-menu summary::-webkit-details-marker { display: none; }
.downloads-menu summary::after { content: "▾"; margin-left: 4px; font-size: .8rem; }
.downloads-menu[open] summary { background: #f4f2fc; }
.downloads-menu__list { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; display: grid; min-width: 230px; padding: 6px; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.downloads-menu__list a { padding: 10px 12px; border-radius: 8px; color: var(--navy-900); font-weight: 650; text-decoration: none; }
.downloads-menu__list a:hover { background: #f4f2fc; }
.downloads-menu summary:focus-visible, .downloads-menu__list a:focus-visible { outline: 3px solid rgba(16,205,224,.55); outline-offset: 2px; }
.button:disabled, button.button:disabled { opacity: .45; cursor: not-allowed; }
.notice { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #bdebf0; border-radius: 10px; color: #155663; background: #e8fbfd; }
.notice--error { color: #852b3d; border-color: #efc1ca; background: #fff0f2; }
.notice--warning { color: #825d13; border-color: #eedba8; background: #fff5dc; }
.safety-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 13px 15px; border: 1px solid #eedba8; border-radius: 11px; color: #715516; background: #fff7df; }
.safety-banner::before { content: ""; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #e5a21a; box-shadow: 0 0 0 4px rgba(229,162,26,.14); }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 22px; }
.kpi { padding: 18px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(17,21,63,.05); }
.kpi strong, .kpi span { display: block; }
.kpi strong { color: var(--navy-950); font-size: 1.65rem; line-height: 1; }
.kpi span { margin-top: 7px; color: var(--muted); font-size: .77rem; }
.card { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 21px; border-bottom: 1px solid #e9ebf3; }
.card__body { padding: 21px; }
.card + .card { margin-top: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; border-bottom: 1px solid #eaecf3; text-align: left; vertical-align: middle; }
th { color: var(--navy-950); background: #eef9fb; font-size: .72rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
tbody tr:hover { background: #fbfaff; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; text-decoration: none; }
td a:hover { text-decoration: underline; }
.dashboard-campaigns__header { align-items: flex-start; }
.dashboard-period-filter { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 17px 18px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, #faf9ff, #f7fcfd); }
.dashboard-period-filter > div { min-width: 190px; }
.dashboard-period-filter label { margin-top: 0; }
.dashboard-period-filter input[type="month"] { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #cdd2e1; border-radius: 9px; color: var(--ink); background: #fff; }
.dashboard-period-filter input[type="month"]:focus { outline: 0; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(16,205,224,.2); }
.campaign-report-cell { width: 1%; white-space: nowrap; text-align: right; }
.button--table { min-height: 36px; padding: 7px 12px; border-radius: 8px; font-size: .78rem; letter-spacing: .01em; }
.campaign-report-unavailable { color: #8b90a8; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.empty-state { padding: 44px 24px; text-align: center; }
.empty-state h2 { margin-bottom: 7px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; color: #5540ad; background: #ece8fb; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.badge--safe, .badge--completed, .badge--delivered { color: #176046; background: #e6f7ef; }
.badge--failed, .badge--uncertain { color: #8d2f44; background: #fdecef; }
.badge--queued, .badge--running, .badge--accepted, .badge--submitting { color: #175f6c; background: #e4f8fb; }
.badge--paused { color: #775710; background: #fff2ce; }
.badge--sim { color: #0b6a75; background: #e2f8fb; box-shadow: inset 0 0 0 1px #a9e6ee; }
.badge--real { color: #7a4a00; background: #ffe7b3; box-shadow: inset 0 0 0 1px #f0c14f; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; vertical-align: middle; }
.mode-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.mode-pill--sim { color: #0b6a75; background: #e2f8fb; box-shadow: inset 0 0 0 1px #8fdde8; }
.mode-pill--real { color: #6b3f00; background: #ffd97a; box-shadow: inset 0 0 0 1px #e0a800, 0 0 0 3px rgba(229,162,26,.18); }
.two-column { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.7fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.form-card { max-width: 880px; padding: 25px; }
label { display: block; margin: 16px 0 7px; color: var(--navy-950); font-size: .85rem; font-weight: 750; }
input[type="text"], input[type="email"], input[type="file"], select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cdd2e1; border-radius: 9px; color: var(--ink); background: #fff; }
input[type="date"] { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cdd2e1; border-radius: 9px; color: var(--ink); background: #fff; }
.report-company-filter { display: flex; align-items: end; gap: 12px; margin-bottom: 20px; }
.report-company-filter label { margin: 0 0 7px; }
.report-company-filter select { min-width: 240px; }
.report-grid { display: grid; gap: 20px; }
.report-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.report-form > div { min-width: 170px; }
.report-form label { margin-top: 0; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 12px; margin-top: 22px; }
.report-summary > div { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); }
.report-summary strong, .report-summary span { display: block; }
.report-summary strong { font-size: 1.45rem; color: var(--navy-950); }
.report-summary span { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.sendgrid-status-chart { margin: 22px 0 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(110deg, #faf9ff, #f5fbfc); }
.sendgrid-status-chart figcaption strong, .sendgrid-status-chart figcaption span { display: block; }
.sendgrid-status-chart figcaption strong { color: var(--navy-950); }
.sendgrid-status-chart figcaption span { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.sendgrid-status-chart__list { display: grid; gap: 12px; padding: 0; margin: 17px 0 0; list-style: none; }
.sendgrid-status-chart__list li { display: grid; grid-template-columns: minmax(150px, 220px) minmax(90px, 1fr) auto 52px; gap: 10px; align-items: center; }
.sendgrid-status-chart__label { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--navy-900); }
.sendgrid-status-chart__dot { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--status-color); }
.sendgrid-status-chart__meter { height: 12px; overflow: hidden; border-radius: 999px; background: #e3e6f0; }
.sendgrid-status-chart__meter span { display: block; width: var(--status-width); min-width: 3px; height: 100%; border-radius: inherit; background: var(--status-color); }
.sendgrid-status-chart__list strong { min-width: 2ch; color: var(--navy-950); text-align: right; }
.sendgrid-status-chart__list small { color: var(--muted); text-align: right; }
.report-download { margin-top: 18px; }
.report-card__header { justify-content: flex-start; gap: 14px; align-items: flex-start; border-bottom: 0; padding-bottom: 4px; }
.report-icon { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--violet-600); background: #ece8fb; }
.report-icon--cyan { color: #0a8f9c; background: #e2f8fb; }
.report-card .help { margin-top: 4px; color: #4d5170; font-size: .875rem; }
.report-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: .8rem; }
.report-presets button { padding: 5px 12px; border: 1px solid #cfd3e3; border-radius: 999px; color: var(--navy-900); background: #fff; font-size: .8rem; font-weight: 650; cursor: pointer; }
.report-presets button:hover { border-color: var(--cyan-500); background: #e8fbfd; }
.report-presets button:focus-visible, .report-card .button:focus-visible { outline: 3px solid rgba(16,205,224,.55); outline-offset: 2px; }
.report-card input[type="date"]:focus, .report-company-filter select:focus { border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(16,205,224,.2); }
.report-card { border-top: 3px solid var(--violet-500); }
.report-card:nth-child(2) { border-top-color: var(--cyan-500); }
.report-company-filter { border-left: 4px solid var(--cyan-500); }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(121,85,223,.14); }
.helptext, .help { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.errorlist { margin: 7px 0 0; padding: 10px 13px 10px 30px; border-radius: 9px; color: #852b3d; background: #fff0f2; }
.back-link { display: inline-flex; margin-bottom: 18px; color: #5740b5; text-decoration: none; font-weight: 700; }
.step-list { display: grid; }
.step { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 13px; padding: 20px 0; border-bottom: 1px solid #eceef4; }
.step:first-child { padding-top: 0; }
.step:last-child { padding-bottom: 0; border-bottom: 0; }
.step__number { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy-900); font-size: .78rem; font-weight: 800; }
.step h3 { margin: 5px 0 7px; color: var(--navy-950); font-size: .96rem; }
.step p { margin: 0 0 12px; }
.inline-form { display: grid; gap: 10px; }
.detail-list { display: grid; gap: 13px; margin: 0; }
.detail-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.detail-list dt { color: var(--muted); font-size: .8rem; }
.detail-list dd { margin: 0; font-weight: 650; word-break: break-word; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e8eaf2; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--cyan-500),var(--violet-500)); }
.progress-copy { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: .76rem; }
.preview-frame { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; }
.error-box { margin-top: 16px; padding: 13px; border: 1px solid #efc1ca; border-radius: 10px; color: #852b3d; background: #fff0f2; white-space: pre-wrap; }
.muted { color: var(--muted); }
.small { font-size: .78rem; }
code { padding: 2px 5px; border-radius: 5px; color: var(--navy-900); background: #f0f1f7; }
img, svg, iframe { max-width: 100%; }
h1, h2, h3, dd, td { overflow-wrap: anywhere; }
.app-header { position: relative; }
.nav-toggle { display: none; width: 46px; height: 46px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; background: rgba(255,255,255,.08); cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,.16); }
.nav-toggle:focus-visible, .top-nav a:focus-visible, .nav-button:focus-visible { outline: 3px solid var(--cyan-500); outline-offset: 2px; }
.nav-toggle__bar { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Pantallas de acceso y confirmación */
.auth-body { background: radial-gradient(circle at 85% 8%, rgba(121,85,223,.5), transparent 32rem), radial-gradient(circle at 10% 95%, rgba(16,205,224,.22), transparent 26rem), linear-gradient(160deg, var(--navy-950), var(--navy-800)); }
.auth-shell { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 28px 16px; }
.auth-card { width: min(440px, 100%); padding: 34px 32px 28px; border-top: 4px solid var(--cyan-500); border-radius: 18px; background: #fffaf1; box-shadow: 0 26px 60px rgba(4,8,39,.42); }
.auth-card--center { text-align: center; }
.auth-card .eyebrow { text-align: center; margin-top: 14px; }
.auth-card h1 { text-align: center; font-size: 1.55rem; }
.auth-logo { display: block; width: 84px; height: 84px; margin: -66px auto 0; object-fit: contain; border: 3px solid #fffaf1; border-radius: 50%; background: #fff; box-shadow: 0 10px 26px rgba(4,8,39,.35), 0 0 0 4px rgba(16,205,224,.3); }
.auth-lead { margin: 10px 0 20px; color: #4d5170; text-align: center; line-height: 1.55; }
.auth-card .error-box { margin: 0 0 8px; }
.auth-card input[type="text"], .auth-card input[type="password"], .auth-card input:not([type]) { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cdd2e1; border-radius: 9px; background: #fff; }
.auth-card input:focus { border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(16,205,224,.22); }
.password-field { position: relative; }
.password-field input { padding-right: 84px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 34px; padding: 0 11px; border: 0; border-radius: 7px; color: var(--violet-600); background: transparent; font-size: .8rem; font-weight: 750; cursor: pointer; }
.password-toggle:hover { background: #ece8fb; }
.password-toggle:focus-visible { outline: 3px solid rgba(16,205,224,.55); }
.auth-submit { width: 100%; min-height: 48px; margin-top: 22px; font-size: 1rem; }
.auth-help { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: .88rem; }
.auth-footer { margin: 0; color: #cceff3; font-size: .78rem; letter-spacing: .04em; }
.auth-check { display: inline-grid; width: 54px; height: 54px; place-items: center; margin: 14px 0 6px; border-radius: 50%; color: #0b6a75; background: #e2f8fb; box-shadow: 0 0 0 6px rgba(16,205,224,.14); }
@media (max-width: 480px) { .auth-card { padding: 30px 20px 24px; } }

@media (max-width: 880px) { .two-column { grid-template-columns: 1fr; } .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .page-heading { align-items: start; flex-direction: column; } }
@media (max-width: 680px) { .app-header__inner,.page-shell,.app-footer { width: min(100% - 28px,1160px); } .app-header__inner { min-height: 74px; } .brand img { width: 48px; height: 48px; } .brand small { display: none; } .page-shell { padding-top: 27px; } .kpi { padding: 15px; } .card__header,.card__body { padding: 17px; } th,td { padding: 12px 14px; } .detail-list div { grid-template-columns: 1fr; gap: 3px; } .app-footer { flex-direction: column; gap: 5px; } }

@media (max-width: 680px) {
  .app-header__inner { flex-wrap: nowrap; }
  .nav-toggle { display: inline-flex; }
  .top-nav { flex-wrap: wrap; }
  .js .top-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 14px 16px; border-bottom: 3px solid var(--cyan-500); background: var(--navy-950); box-shadow: 0 16px 28px rgba(4,8,39,.35); }
  .js .top-nav.is-open { display: flex; }
  .js .top-nav a, .js .top-nav .nav-button { display: block; width: 100%; min-height: 46px; padding: 13px 14px; text-align: left; font-size: .95rem; }
  .js .top-nav form { margin: 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); }
  .brand strong { font-size: 1.02rem; }
  .actions { width: 100%; }
  .actions .button { flex: 1 1 auto; }
  .button, button.button, input[type="text"], input[type="email"], input[type="file"], input[type="date"], select, textarea { min-height: 46px; }
  input, select, textarea { font-size: 16px; }
  .report-company-filter { flex-direction: column; align-items: stretch; }
  .report-company-filter select { min-width: 0; }
  .report-form > div { flex: 1 1 140px; min-width: 0; }
  .dashboard-period-filter { align-items: stretch; }
  .dashboard-period-filter > div, .dashboard-period-filter .button { width: 100%; }
  .report-form .button, .report-download { width: 100%; }
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sendgrid-status-chart__list li { grid-template-columns: minmax(120px, 1fr) minmax(72px, 1.4fr) auto 46px; gap: 7px; }
  .inline-actions .button, .downloads-menu, .downloads-menu summary { flex: 1 1 100%; }
  .downloads-menu__list { position: static; margin-top: 6px; box-shadow: none; }
  .run-bar { flex-direction: column; align-items: stretch; }
  .run-bar__info { flex: 0 0 auto; }
  .run-bar form, .button--pause { width: 100%; }
  .card__header { flex-wrap: wrap; }
  .report-card__header { flex-wrap: nowrap; }
  .form-card { padding: 17px; }
  .preview-frame { min-height: 340px; }
}
@media (max-width: 400px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr; }
  .brand img { width: 42px; height: 42px; }
  .brand span { min-width: 0; }
  h1 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
