:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --border: #dce4ef;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eaf1ff;
  --green: #087f5b;
  --green-soft: #e8f8f2;
  --amber: #a15c00;
  --amber-soft: #fff6e2;
  --red: #b42318;
  --red-soft: #fff0ef;
  --shadow: 0 24px 70px rgba(35, 55, 90, .13);
}

* { box-sizing: border-box; }
strong { font-weight: 600; }
html { min-height: 100%; background: #edf2f8; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(80, 120, 220, .12), transparent 29rem),
    linear-gradient(135deg, #f8fbff 0%, #eef3f9 48%, #e9eff7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 0.86fr) minmax(460px, 1.14fr);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 44px clamp(32px, 6vw, 88px);
  color: #fff;
  background: linear-gradient(155deg, #13223f 0%, #1b3766 58%, #2457a4 100%);
}
.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
}
.auth-brand::before { width: 430px; height: 430px; right: -170px; top: -110px; }
.auth-brand::after { width: 270px; height: 270px; left: -120px; bottom: -90px; }
.brand-mark { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 600; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: rgba(255,255,255,.1); }
.brand-copy { position: relative; z-index: 1; max-width: 530px; margin-top: clamp(100px, 18vh, 190px); }
.brand-copy .eyebrow { margin: 0 0 14px; color: #afc8f6; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; font-size: 11px; }
.brand-copy h1 { max-width: 620px; margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.02; letter-spacing: -.055em; }
.brand-copy > p { max-width: 520px; margin: 24px 0 0; color: #cfdbef; font-size: 16px; }
.assurance-list { display: grid; gap: 12px; margin-top: 35px; }
.assurance-item { display: flex; gap: 11px; align-items: center; color: #e4ebf7; }
.assurance-dot { width: 9px; height: 9px; border-radius: 50%; background: #7ee2b8; box-shadow: 0 0 0 5px rgba(126, 226, 184, .12); }

.auth-main { display: grid; place-items: center; padding: 34px; }
.auth-card { width: min(470px, 100%); padding: 35px; border: 1px solid rgba(190, 204, 224, .9); border-radius: 22px; background: rgba(255,255,255,.93); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.auth-card h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.auth-card .intro { margin: 8px 0 25px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: 12px; background: #edf2f7; }
.auth-tab { border: 0; border-radius: 9px; padding: 9px 11px; color: #667085; background: transparent; font-weight: 650; }
.auth-tab.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(26, 49, 86, .1); }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-weight: 650; }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  color: var(--ink);
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  outline: none;
}
.field input:focus, .field select:focus { border-color: #7da4ef; box-shadow: 0 0 0 4px rgba(37, 99, 235, .11); }
.help { color: var(--muted); font-size: 12px; }
.primary-button, .secondary-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  border: 0;
  font-weight: 600;
  font-size: 13px;
}
.primary-button { width: 100%; color: #fff; background: var(--blue); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { color: #344054; border: 1px solid var(--border); background: #fff; }
.text-button { color: var(--blue); background: transparent; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .65; }
.auth-footer { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.notice { padding: 12px 14px; margin: 0 0 17px; border: 1px solid var(--border); border-radius: 11px; background: var(--soft); }
.notice.error { color: #8f1d16; border-color: #f2b8b2; background: var(--red-soft); }
.notice.success { color: #086343; border-color: #b9e3d3; background: var(--green-soft); }
.code-input { text-align: center; letter-spacing: .42em; font-size: 24px; font-weight: 600; }
.code-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; }
.turnstile-slot { min-height: 66px; margin-bottom: 15px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 17px; color: #d7e2f3; background: #14223c; }
.sidebar .brand-mark { padding: 0 8px 24px; }
.sidebar-nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 11px; color: #aebdd3; background: transparent; text-align: left; text-decoration: none; }
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255,255,255,.09); }
.nav-icon { width: 21px; text-align: center; }
.sidebar-account { margin-top: auto; padding: 15px 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-account strong, .sidebar-account span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { margin-top: 3px; color: #91a4c0; font-size: 12px; }
.app-main { min-width: 0; padding: 30px clamp(20px, 4vw, 48px) 55px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 27px; }
.app-topbar h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.app-topbar p { margin: 4px 0 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.account-select { min-height: 40px; max-width: 250px; padding: 7px 34px 7px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(34,55,90,.06); }
.metric-card { padding: 19px; }
.metric-card span { color: var(--muted); }
.metric-card strong { display: block; margin-top: 7px; font-size: 20px; line-height: 1; letter-spacing: -.045em; }
.plan-name { font-size: 23px !important; }
.metric-card small { display: block; margin-top: 9px; color: var(--muted); }
.panel { overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin: 0; font-size: 17px; }
.panel-body { padding: 20px; }
.empty-state { display: grid; place-items: center; min-height: 300px; padding: 38px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 18px; color: var(--blue); background: var(--blue-soft); font-size: 25px; }
.empty-state h3 { margin: 0; font-size: 19px; }
.empty-state p { max-width: 510px; margin: 8px 0 19px; color: var(--muted); }
.plan-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; color: #31568f; background: var(--blue-soft); font-size: 11px; font-weight: 750; }
.foundation-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border: 1px solid #cddcf6; border-radius: 13px; color: #36547d; background: #f2f7ff; }
.foundation-note strong { display: block; margin-bottom: 2px; color: #263f64; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 30px; height: 30px; margin: 0 auto 12px; border: 3px solid #dce4ef; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { min-height: 100vh; padding: 20px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 15px; }
  .sidebar .brand-mark { padding-bottom: 13px; }
  .sidebar-nav { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .nav-link { justify-content: center; padding: 9px; font-size: 12px; }
  .nav-icon { display: none; }
  .sidebar-account { display: none; }
}
@media (max-width: 680px) {
  .auth-card { padding: 25px 21px; border-radius: 17px; }
  .app-main { padding: 22px 14px 40px; }
  .app-topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; }
  .account-select { flex: 1; min-width: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Customer dashboard — Milestone 4A.2 */
.app-brand { color: #fff; text-decoration: none; }
.nav-symbol { position: relative; width: 20px; height: 20px; flex: 0 0 20px; border: 1.5px solid currentColor; border-radius: 6px; opacity: .9; }
.nav-symbol.overview::before, .nav-symbol.sites::before, .nav-symbol.alerts::before, .nav-symbol.account::before { content: ""; position: absolute; inset: 4px; border-radius: 2px; border: 1.5px solid currentColor; }
.nav-symbol.sites { transform: rotate(45deg); border-radius: 4px; }
.nav-symbol.sites::before { transform: rotate(-45deg); }
.nav-symbol.alerts { border-radius: 50%; }
.nav-symbol.alerts::before { inset: 4px 8px 7px; border: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.nav-symbol.account { border-radius: 50%; }
.nav-symbol.account::before { inset: 3px 6px 9px; border-radius: 50%; }
.topbar-title { min-width: 0; }
.back-link { display: inline-flex; margin-bottom: 7px; color: var(--blue); font-size: 12px; font-weight: 600; text-decoration: none; }
.page-loading { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); }
.panel-header > div > p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-link, .evidence-link { color: var(--blue); font-size: 12px; font-weight: 600; text-decoration: none; }
.panel-link:hover, .evidence-link:hover { text-decoration: underline; }
.panel-body.no-padding { padding: 0; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card.compact strong { margin-top: 8px; font-size: 20px; line-height: 1.2; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 18px; align-items: start; }
.activity-panel, .section-gap, .detail-section { margin-top: 18px; }
.site-summary-list, .alert-list, .activity-list, .scan-list { display: grid; }
.site-summary-row, .alert-row { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 15px 20px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.site-summary-row:last-child, .alert-row:last-child { border-bottom: 0; }
.site-summary-row:hover, .alert-row:hover { background: #f8faff; }
.status-indicator { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 5px rgba(148,163,184,.12); }
.status-indicator.healthy, .activity-dot.healthy { background: #16a276; box-shadow: 0 0 0 5px rgba(22,162,118,.11); }
.status-indicator.warning, .activity-dot.warning { background: #e49a16; box-shadow: 0 0 0 5px rgba(228,154,22,.12); }
.status-indicator.critical, .activity-dot.critical { background: #d94b41; box-shadow: 0 0 0 5px rgba(217,75,65,.11); }
.site-summary-copy, .alert-copy { min-width: 0; flex: 1; }
.site-summary-copy strong, .site-summary-copy small, .alert-copy strong, .alert-copy small, .activity-row strong, .activity-row small { display: block; }
.site-summary-copy strong, .alert-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-summary-copy small, .alert-copy small, .activity-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.site-summary-status, .alert-meta { display: grid; justify-items: end; gap: 5px; text-align: right; }
.site-summary-status small, .alert-meta small { color: var(--muted); font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 9px; border: 1px solid #d8e0ec; border-radius: 999px; color: #536174; background: #f4f7fb; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-badge.healthy { color: #087253; border-color: #b8e3d3; background: var(--green-soft); }
.status-badge.warning { color: #8b5200; border-color: #f0d29a; background: var(--amber-soft); }
.status-badge.critical { color: #9d251c; border-color: #efbbb6; background: var(--red-soft); }
.alert-symbol { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; font-weight: 800; }
.alert-symbol.healthy { color: var(--green); background: var(--green-soft); }
.alert-symbol.warning { color: var(--amber); background: var(--amber-soft); }
.alert-symbol.critical { color: var(--red); background: var(--red-soft); }
.activity-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 5px rgba(148,163,184,.1); }
.activity-row time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.site-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.site-card { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 30px rgba(34,55,90,.06); }
.site-thumbnail { display: block; height: 178px; overflow: hidden; border-bottom: 1px solid var(--border); background: #e9eff7; }
.site-thumbnail img, .site-hero-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.thumbnail-placeholder { height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; background: linear-gradient(145deg, #edf3fb, #dce7f4); color: #3e6296; }
.thumbnail-placeholder span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #fff; background: #3b6eb5; font-size: 21px; font-weight: 800; }
.thumbnail-placeholder small { color: #657a98; }
.thumbnail-placeholder.large span { width: 68px; height: 68px; border-radius: 21px; font-size: 24px; }
.site-card-body { padding: 18px; }
.site-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.site-card-heading h2 { margin: 0 0 3px; font-size: 18px; letter-spacing: -.025em; }
.site-card-heading a { color: var(--muted); font-size: 12px; text-decoration: none; }
.site-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 13px; }
.site-card-stats > div { min-width: 0; padding: 10px; border-radius: 11px; background: var(--soft); }
.site-card-stats span, .site-card-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card-stats span { color: var(--muted); font-size: 10px; }
.site-card-stats strong { margin-top: 4px; font-size: 14px; }
.site-check-time { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.card-button { width: 100%; text-decoration: none; }
.site-hero { display: grid; grid-template-columns: 350px minmax(0, 1fr) minmax(170px, .45fr); align-items: stretch; overflow: hidden; }
.site-hero-preview { min-height: 190px; border-right: 1px solid var(--border); background: #e9eff7; }
.site-hero-copy { align-self: center; min-width: 0; padding: 25px; }
.site-hero-copy h2 { margin: 10px 0 3px; font-size: 25px; letter-spacing: -.035em; }
.site-hero-copy > a { color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.site-hero-copy p { margin: 15px 0 0; color: var(--muted); }
.site-hero-status { display: flex; gap: 7px; flex-wrap: wrap; }
.site-version-list { display: grid; align-content: center; padding: 22px; border-left: 1px solid var(--border); background: #fbfcfe; }
.site-version-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.site-version-list > div:last-child { border-bottom: 0; }
.site-version-list span { color: var(--muted); }
.count-pill { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 999px; color: #3c5f94; background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.monitor-list { display: grid; gap: 10px; }
.monitor-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px 20px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfe; }
.monitor-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.monitor-main strong, .monitor-main a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-main a { margin-top: 3px; color: var(--muted); font-size: 11px; text-decoration: none; }
.monitor-facts { display: grid; grid-template-columns: auto 75px 145px; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-align: right; }
.monitor-error { grid-column: 1 / -1; margin: 0; padding: 9px 11px; border-radius: 9px; color: #8f1d16; background: var(--red-soft); font-size: 12px; }
.history-block { margin-top: 23px; }
.history-block h3, .detail-two-column h3 { margin: 0 0 11px; font-size: 14px; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { color: #536174; background: #f7f9fc; font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong, .data-table td small { display: block; min-width: 160px; }
.data-table td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.form-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }
.form-card { padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.form-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.form-card h3 { margin: 4px 0 0; font-size: 15px; }
.provider-label { color: var(--blue); font-size: 10px; font-weight: 750; }
.form-card dl, .account-details { margin: 15px 0 0; }
.form-card dl > div, .account-details > div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-top: 1px solid var(--border); }
.form-card dt, .account-details dt { color: var(--muted); }
.form-card dd, .account-details dd { margin: 0; font-weight: 650; text-align: right; }
.sub-empty, .small-empty { display: grid; place-items: center; min-height: 130px; align-content: center; color: var(--muted); text-align: center; }
.small-empty span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 12px; color: var(--green); background: var(--green-soft); font-weight: 800; }
.small-empty p { max-width: 450px; margin: 0; }
.detail-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.alert-list.embedded { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.scan-list { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.scan-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.scan-row:last-child { border-bottom: 0; }
.scan-row strong, .scan-row small { display: block; }
.scan-row small { color: var(--muted); font-size: 10px; }
.scan-row time { color: var(--muted); font-size: 10px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.account-wide { grid-column: 1 / -1; }
.plan-card h3 { margin: 13px 0 5px; font-size: 25px; }
.plan-card p, .security-copy { color: var(--muted); }
.plan-summary { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.plan-summary span { padding: 7px 10px; border-radius: 9px; background: var(--soft); font-size: 12px; }
.danger-button { min-height: 40px; padding: 8px 15px; border: 1px solid #e6aaa4; border-radius: 999px; color: #9d251c; background: var(--red-soft); font-weight: 600; }
.notice.warning { color: #7c4b03; border-color: #ead09d; background: var(--amber-soft); }

@media (max-width: 1150px) {
  .metric-grid-four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .site-hero { grid-template-columns: 210px minmax(0,1fr); }
  .site-version-list { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--border); border-left: 0; }
  .site-version-list > div { padding: 6px 13px; border-right: 1px solid var(--border); border-bottom: 0; }
  .site-version-list > div:last-child { border-right: 0; }
}
@media (max-width: 800px) {
  .metric-grid-four { grid-template-columns: 1fr 1fr; }
  .site-hero { grid-template-columns: 1fr; }
  .site-hero-preview { height: 220px; border-right: 0; border-bottom: 1px solid var(--border); }
  .site-version-list { grid-template-columns: 1fr; }
  .site-version-list > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .detail-two-column, .account-grid { grid-template-columns: 1fr; }
  .account-wide { grid-column: auto; }
  .monitor-row { grid-template-columns: 1fr; }
  .monitor-facts { grid-template-columns: auto 75px 145px; justify-content: start; text-align: left; }
}
@media (max-width: 680px) {
  .metric-grid-four { grid-template-columns: 1fr; }
  .site-card-grid { grid-template-columns: 1fr; }
  .site-summary-row, .alert-row { align-items: flex-start; padding: 14px; }
  .site-summary-status, .alert-meta { justify-items: start; text-align: left; }
  .activity-row { grid-template-columns: 10px minmax(0,1fr); }
  .activity-row time { grid-column: 2; }
  .monitor-facts { grid-template-columns: 1fr 1fr; }
  .monitor-facts > :last-child { grid-column: 1 / -1; }
  .site-card-stats { grid-template-columns: 1fr; }
}
.gateway-summary { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); }
.gateway-summary > strong { color: #355b91; font-size: 11px; }
.gateway-summary > div { display: flex; flex-wrap: wrap; gap: 6px; }
.gateway-summary span { padding: 4px 8px; border-radius: 999px; color: #31568f; background: #fff; font-size: 10px; font-weight: 600; }

.transaction-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 23px 0 11px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--soft); }
.transaction-summary strong, .transaction-summary span { display: block; }
.transaction-summary > div > span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.transaction-control-list { display: grid; gap: 12px; }
.transaction-control-card { padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.transaction-control-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.transaction-control-heading h3 { margin: 4px 0 2px; font-size: 15px; }
.transaction-control-heading a { color: var(--muted); font-size: 11px; text-decoration: none; }
.transaction-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.transaction-control-grid > div { padding: 10px 12px; border-radius: 10px; background: #fff; }
.transaction-control-grid span, .transaction-actions label > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.transaction-control-grid strong { font-size: 12px; }
.transaction-actions { display: grid; grid-template-columns: auto minmax(210px, 1fr) auto; align-items: end; gap: 10px; margin-top: 13px; }
.transaction-actions label { min-width: 0; }
.transaction-actions select { width: 100%; min-height: 40px; padding: 7px 32px 7px 11px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #fff; }
.compact-button { width: auto; min-width: 120px; }
.control-note, .coverage-note { grid-column: 1 / -1; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.coverage-note { margin: 0; padding: 8px 10px; border-radius: 9px; color: #355b91; background: var(--blue-soft); }

@media (max-width: 800px) {
  .transaction-actions { grid-template-columns: 1fr; align-items: stretch; }
  .transaction-actions .secondary-button, .transaction-actions .primary-button { width: 100%; }
}
@media (max-width: 680px) {
  .transaction-summary, .transaction-control-heading { align-items: flex-start; flex-direction: column; }
  .transaction-control-grid { grid-template-columns: 1fr; }
}

.email-auth-card { display: grid; gap: 14px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, #f8fbff, #fff); }
.email-auth-card.is-empty { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.email-auth-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.email-auth-heading h3, .email-auth-card h3 { margin: 4px 0 5px; font-size: 16px; }
.email-auth-heading p, .email-auth-card.is-empty p { max-width: 760px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.email-auth-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.email-auth-grid > div { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.email-auth-grid > div > span:first-child { color: var(--muted); font-size: 10px; font-weight: 600; }
.email-auth-grid strong { font-size: 11px; text-align: right; }
@media (max-width: 800px) { .email-auth-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .email-auth-heading, .email-auth-card.is-empty { display: flex; align-items: flex-start; flex-direction: column; } .email-auth-grid { grid-template-columns: 1fr; } }
.transaction-result-detail { display: grid; grid-template-columns: minmax(135px, .35fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.transaction-result-detail > div span, .transaction-result-detail > div strong { display: block; }
.transaction-result-detail > div span { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.transaction-result-detail > div strong { font-size: 12px; }
.transaction-result-detail p { margin: 0; color: #536174; font-size: 12px; line-height: 1.55; }
.transaction-result-detail.warning { border-color: #ead09d; background: var(--amber-soft); }
.transaction-result-detail.critical { border-color: #efc2bd; background: var(--red-soft); }
.transaction-result-detail.healthy { border-color: #b9dfce; background: var(--green-soft); }
.transaction-history-table td:nth-child(3) { min-width: 320px; }
.transaction-history-table td:nth-child(3) strong { min-width: 0; }
.transaction-history-table td:nth-child(3) small { min-width: 0; max-width: 620px; white-space: normal; line-height: 1.45; }
@media (max-width: 680px) {
  .transaction-result-detail { grid-template-columns: 1fr; }
}


/* Customer detail summaries and right-side history drawers */
.panel-header-actions { display: flex; align-items: center; gap: 10px; }
.detail-link-button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--blue); background: #fff; font-weight: 600; white-space: nowrap; }
.detail-link-button:hover { border-color: #adc4ef; background: var(--blue-soft); }
.status-summary-block { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 18px 0 2px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--soft); }
.status-summary-block strong, .status-summary-block span { display: block; }
.status-summary-block > div > span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.activity-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.activity-summary-grid > div { padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfe; }
.activity-summary-grid span, .activity-summary-grid strong, .activity-summary-grid small { display: block; }
.activity-summary-grid span { color: var(--muted); font-size: 11px; }
.activity-summary-grid strong { margin-top: 5px; font-size: 17px; }
.activity-summary-grid small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.support-preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -7px 0 20px; padding: 13px 15px; border: 1px solid #d9c27d; border-radius: 13px; color: #6e4b00; background: #fff8df; }
.support-preview-banner strong, .support-preview-banner span { display: block; }
.support-preview-banner span { margin-top: 2px; font-size: 12px; }
.support-preview-banner small { white-space: nowrap; }
body.drawer-open { overflow: hidden; }
#detail-drawer-root:empty { display: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(17, 29, 50, .42); backdrop-filter: blur(2px); }
.detail-drawer { position: fixed; top: 0; right: 0; z-index: 91; display: flex; flex-direction: column; width: min(780px, 92vw); height: 100vh; border-left: 1px solid var(--border); background: #f7f9fc; box-shadow: -20px 0 60px rgba(23, 32, 51, .18); animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(36px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 24px 19px; border-bottom: 1px solid var(--border); background: #fff; }
.drawer-header > div > span { color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.drawer-header h2 { margin: 4px 0 4px; font-size: 23px; letter-spacing: -.025em; }
.drawer-header p { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-close { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: #475467; background: #fff; font-size: 25px; line-height: 1; }
.drawer-body { flex: 1; overflow: auto; padding: 20px 22px 42px; }
.drawer-section { margin-bottom: 20px; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section > h3 { margin: 0 0 12px; font-size: 15px; }
.drawer-body > .data-table-wrap, .drawer-section > .data-table-wrap { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.drawer-body .monitor-row { background: #fff; }
@media (max-width: 800px) {
  .activity-summary-grid { grid-template-columns: 1fr; }
  .support-preview-banner { align-items: flex-start; flex-direction: column; }
  .support-preview-banner small { white-space: normal; }
}
@media (max-width: 560px) {
  .detail-drawer { width: 100vw; }
  .drawer-header { padding: 18px; }
  .drawer-body { padding: 15px; }
  .panel-header { align-items: flex-start; }
  .panel-header-actions { align-items: flex-end; flex-direction: column; }
  .status-summary-block { align-items: flex-start; flex-direction: column; }
}

/* Customer website overview refinement — 0.16.13 */
.app-content-frame { width: 100%; max-width: 1600px; margin: 0 auto; }
.protected-image-shell { width: 100%; height: 100%; }
.protected-image-shell > img { width: 100%; height: 100%; object-fit: fill; object-position: center; }
.site-detail-layout { display: grid; gap: 18px; margin-top: 18px; }
.site-detail-row { min-width: 0; }
.site-detail-row-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.site-detail-row .detail-section, .site-detail-layout > .detail-section { width: 100%; height: 100%; margin-top: 0; }
.compact-section .panel-body { padding: 17px; }

.tracked-form-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.tracked-form-card { padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.tracked-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tracked-form-heading h3 { margin: 3px 0 2px; font-size: 15px; }
.tracked-form-heading a { display: block; max-width: 420px; overflow: hidden; color: var(--muted); font-size: 11px; text-decoration: none; text-overflow: ellipsis; }
.tracked-form-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.tracked-form-status-grid > div { min-width: 0; padding: 10px; border: 1px solid #e6ebf2; border-radius: 10px; background: #fff; }
.tracked-form-status-grid span, .tracked-form-status-grid strong, .tracked-form-status-grid small { display: block; }
.tracked-form-status-grid > div > span:first-child { margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.tracked-form-status-grid strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tracked-form-status-grid small { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tracked-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.tracked-form-actions .compact-button { min-width: 100px; }

.commerce-local-summary { display: grid; gap: 13px; }
.commerce-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.commerce-summary-heading h3 { margin: 3px 0 3px; font-size: 17px; }
.commerce-summary-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 11px; }
.commerce-check-list { display: grid; gap: 8px; }
.commerce-check-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.commerce-check-row > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.commerce-check-row > div:last-child { display: grid; justify-items: end; gap: 4px; flex: 0 0 auto; }
.commerce-check-row strong, .commerce-check-row small { display: block; }
.commerce-check-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.commerce-check-row small { color: var(--muted); font-size: 9px; }
.commerce-cloud-summary { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.commerce-cloud-empty { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 13px 14px; border: 1px dashed #cbd7e7; border-radius: 12px; background: var(--soft); }
.commerce-cloud-empty strong, .commerce-cloud-empty span { display: block; }
.commerce-cloud-empty span { margin-top: 3px; color: var(--muted); font-size: 11px; }

body.modal-open { overflow: hidden; }
#app-modal-root:empty { display: none; }
.app-modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(17, 29, 50, .48); backdrop-filter: blur(3px); }
.app-modal { position: fixed; top: 50%; left: 50%; z-index: 101; display: flex; flex-direction: column; width: min(680px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: #f8fafc; box-shadow: 0 30px 90px rgba(18, 34, 62, .28); transform: translate(-50%, -50%); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -47%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.app-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 21px 22px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.app-modal-header > div > span { color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.app-modal-header h2 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -.025em; }
.app-modal-header p { margin: 0; color: var(--muted); font-size: 12px; }
.app-modal-close { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: #475467; background: #fff; font-size: 24px; line-height: 1; }
.app-modal-body { overflow-y: auto; padding: 20px 22px; }
.app-modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid var(--border); background: #fff; }
.app-modal-footer .modal-primary { width: auto; min-width: 145px; }
.modal-status-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 15px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.modal-status-card span, .modal-status-card strong, .modal-status-card small { display: block; }
.modal-status-card span { color: var(--muted); font-size: 10px; }
.modal-status-card strong { margin-top: 3px; font-size: 15px; }
.modal-status-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.transaction-progress { display: grid; gap: 0; margin: 18px 0; padding: 0; list-style: none; }
.transaction-progress li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 11px; min-height: 52px; padding-bottom: 12px; }
.transaction-progress li:not(:last-child)::after { content: ""; position: absolute; top: 22px; bottom: -2px; left: 10px; width: 2px; background: #dce4ef; }
.progress-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.transaction-progress strong, .transaction-progress small { display: block; }
.transaction-progress strong { font-size: 12px; }
.transaction-progress small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.transaction-progress li.done .progress-marker { border-color: #16a276; background: var(--green-soft); }
.transaction-progress li.done .progress-marker::before { content: "✓"; color: var(--green); font-size: 12px; font-weight: 600; }
.transaction-progress li.active .progress-marker { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(37, 99, 235, .1); }
.transaction-progress li.active .progress-marker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.transaction-progress li.attention .progress-marker { border-color: var(--red); background: var(--red-soft); }
.transaction-progress li.attention .progress-marker::before { content: "!"; color: var(--red); font-size: 12px; font-weight: 600; }
.modal-explanation { padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.modal-explanation.warning { border-color: #ead09d; background: var(--amber-soft); }
.modal-explanation.critical { border-color: #efc2bd; background: var(--red-soft); }
.modal-explanation.healthy { border-color: #b9dfce; background: var(--green-soft); }
.modal-explanation strong { display: block; font-size: 11px; }
.modal-explanation p { margin: 4px 0 0; color: #536174; font-size: 11px; line-height: 1.55; }
.modal-inline-notice, .modal-disabled-reason { margin: 0 0 14px; padding: 11px 12px; border: 1px solid #cbdcf6; border-radius: 11px; color: #36547d; background: #f2f7ff; font-size: 11px; }
.modal-inline-notice.critical { color: #8f1d16; border-color: #efc2bd; background: var(--red-soft); }
.modal-disabled-reason { margin: 14px 0 0; color: var(--muted); border-color: var(--border); background: var(--soft); }
.upgrade-feature-card { padding: 18px; border: 1px solid #cddcf6; border-radius: 14px; background: linear-gradient(145deg, #f2f7ff, #fff); }
.upgrade-feature-card h3 { margin: 5px 0 6px; font-size: 18px; }
.upgrade-feature-card p { margin: 0; color: var(--muted); font-size: 12px; }
.schedule-current, .schedule-next-run { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.schedule-current span, .schedule-next-run span { color: var(--muted); font-size: 11px; }
.schedule-options { display: grid; gap: 9px; }
.schedule-options label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: flex-start; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; }
.schedule-options label:has(input:checked) { border-color: #98b8f4; background: var(--blue-soft); }
.schedule-options input { margin-top: 3px; }
.schedule-options strong, .schedule-options small { display: block; }
.schedule-options strong { font-size: 12px; }
.schedule-options small { margin-top: 2px; color: var(--muted); font-size: 10px; }

@media (max-width: 1180px) {
  .site-detail-row-two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tracked-form-status-grid { grid-template-columns: 1fr; }
  .tracked-form-actions { justify-content: stretch; }
  .tracked-form-actions .secondary-button { flex: 1; }
  .commerce-summary-heading, .commerce-cloud-empty { align-items: flex-start; flex-direction: column; }
  .app-modal { width: 100vw; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .app-modal-footer { margin-top: auto; }
}
.evidence-link { padding: 0; border: 0; background: transparent; cursor: pointer; }
