
:root {
  color-scheme: light;
  --navy: #111b35;
  --navy-2: #172445;
  --ink: #15233b;
  --muted: #69758a;
  --line: #dfe4ec;
  --soft: #f4f7fb;
  --blue: #075fe4;
  --blue-dark: #064db7;
  --teal: #0b8f7b;
  --orange: #f0702f;
  --white: #ffffff;
  --danger: #b42318;
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--soft); }
body { margin: 0; color: var(--ink); background: var(--soft); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 42px; }
[hidden] { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 25px 18px; color: #eaf0ff;
  background: linear-gradient(180deg, var(--navy) 0%, #16223b 58%, #111a2e 100%);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--white); text-decoration: none; font-weight: 750; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--orange); border-radius: 7px; box-shadow: 0 7px 20px rgba(0,0,0,.18); }
.brand-mark::before { content: ""; width: 15px; height: 15px; border: 2px solid white; border-top-width: 5px; border-radius: 2px; }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; font-size: .98rem; letter-spacing: 0; }
.brand-copy small { display: block; color: #9eacc8; font-size: .75rem; font-weight: 500; }
.nav { margin-top: 42px; display: grid; gap: 7px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 6px; color: #bdc8dc; text-decoration: none; font-size: .92rem; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.09); color: var(--white); }
.nav-dot { width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.sidebar-meta { position: absolute; left: 18px; right: 18px; bottom: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #9eacc8; font-size: .78rem; }
.sidebar-meta strong { display: block; margin-bottom: 3px; color: #dfe7f6; font-size: .8rem; }

.main { min-width: 0; padding: 30px; }
.panel { max-width: 1500px; margin: 0 auto; background: var(--white); border: 1px solid #e1e6ee; border-radius: var(--radius); box-shadow: 0 14px 36px rgba(24,42,72,.07); overflow: hidden; }
.panel-head { padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.title-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(1.55rem, 2.2vw, 2.2rem); line-height: 1.18; letter-spacing: 0; }
.lede { margin: 0; max-width: 690px; color: var(--muted); }
.count { display: inline-flex; align-items: center; white-space: nowrap; padding: 7px 10px; background: #eaf7f4; color: #087663; border-radius: 5px; font-size: .82rem; font-weight: 750; }
.toolbar { margin-top: 22px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 10px; }
.field { width: 100%; min-height: 42px; border: 1px solid #cbd3df; border-radius: 5px; padding: 9px 12px; color: var(--ink); background: var(--white); }
.field:focus { outline: 3px solid rgba(7,95,228,.14); border-color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 5px; background: var(--blue); color: white; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--blue-dark); }
.button.secondary { border-color: #cbd3df; background: white; color: var(--ink); }
.button.secondary:hover { background: var(--soft); }
.button.danger { background: white; border-color: #f4b6b1; color: var(--danger); }
.button.small { min-height: 34px; padding: 6px 10px; font-size: .84rem; }
.language-switch { display: inline-flex; border: 1px solid #cbd3df; border-radius: 5px; overflow: hidden; background: white; }
.language-switch a { min-width: 38px; padding: 6px 8px; border-right: 1px solid #cbd3df; color: var(--muted); font-size: .76rem; font-weight: 800; text-align: center; text-decoration: none; }
.language-switch a:last-child { border-right: 0; }
.language-switch a:hover, .language-switch a[aria-current="page"] { background: var(--navy); color: white; }

.notice { margin: 18px 26px 0; padding: 11px 13px; border: 1px solid #b8e1d9; border-radius: 5px; background: #effaf7; color: #087663; font-weight: 650; }
.notice.error { border-color: #f3b9b3; background: #fff4f2; color: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; color: #6a7487; background: #fbfcfe; font-size: .78rem; font-weight: 800; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tbody tr:hover { background: #fafcff; }
.domain { color: #064db7; font-weight: 800; text-decoration: none; }
.domain:hover { text-decoration: underline; }
.metric { font-variant-numeric: tabular-nums; font-weight: 700; }
.pending { display: inline-block; padding: 3px 6px; border-radius: 4px; background: #fff4df; color: #9a5a00; font-size: .72rem; font-weight: 800; }
.date { color: var(--muted); font-size: .88rem; }
.actions { display: flex; gap: 7px; align-items: center; }
.actions form { margin: 0; }
.empty { padding: 58px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; }

.pagination { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pagination p { margin: 0; color: var(--muted); font-size: .88rem; }
.pages { display: flex; gap: 6px; }
.pages a, .pages span { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ccd4df; border-radius: 5px; text-decoration: none; font-weight: 750; }
.pages span { background: var(--blue); border-color: var(--blue); color: white; }

.newsletter { max-width: 1500px; margin: 20px auto 0; padding: 24px 26px; display: grid; grid-template-columns: 1fr minmax(360px, .85fr); align-items: center; gap: 34px; background: #eaf1ff; border: 1px solid #cbdcff; border-radius: var(--radius); }
.newsletter h2 { margin-bottom: 4px; font-size: 1.28rem; }
.newsletter p { margin: 0; color: #53627b; }
.newsletter form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.trap { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.footer { max-width: 1500px; margin: 0 auto; padding: 22px 2px 4px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .8rem; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8, 15, 31, .66); }
.newsletter-modal { position: relative; width: min(500px, 100%); padding: 32px; border-radius: var(--radius); background: white; box-shadow: 0 28px 80px rgba(0, 0, 0, .32); }
.newsletter-modal h2 { margin: 7px 34px 8px 0; font-size: 1.55rem; line-height: 1.2; }
.newsletter-modal p { color: var(--muted); }
.newsletter-modal form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 22px; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 38px; min-height: 38px; border: 1px solid #d7dde6; border-radius: 50%; background: white; color: var(--ink); font-size: 1.45rem; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--soft); }
.eyebrow { color: var(--orange); font-size: .72rem; font-weight: 850; text-transform: uppercase; }

.form-panel { max-width: 820px; }
.form-body { padding: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-group { display: grid; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .86rem; font-weight: 750; }
.hint { color: var(--muted); font-size: .78rem; }
.checkbox { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-actions { margin-top: 24px; display: flex; gap: 9px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--navy); }
.login-card { width: min(440px, 100%); background: white; border-radius: var(--radius); padding: 30px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.login-card .brand { color: var(--ink); margin-bottom: 26px; }
.login-card form { display: grid; gap: 16px; }
.login-card .button { width: 100%; }
.login-notice { margin: 18px 0 0; }

.newsletter-admin { max-width: 1220px; }
.status-strip { display: grid; grid-template-columns: 2fr repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.status-strip > div { padding: 18px 24px; border-right: 1px solid var(--line); }
.status-strip > div:last-child { border-right: 0; }
.status-strip strong, .status-strip span { display: block; }
.status-strip strong { font-size: 1.25rem; }
.status-strip span { color: var(--muted); font-size: .78rem; }
.provider-status { display: flex; align-items: center; gap: 12px; margin: 22px 26px 0; padding: 13px 15px; border-radius: 5px; }
.provider-status strong { white-space: nowrap; }
.provider-status span { color: inherit; font-size: .86rem; }
.provider-status.warning { border: 1px solid #f2cf96; background: #fff8e9; color: #7a4a00; }
.provider-status.ready { border: 1px solid #b8e1d9; background: #effaf7; color: #087663; }
.settings-form { border-top: 1px solid var(--line); margin-top: 24px; }
.settings-section { padding: 24px 26px; border-bottom: 1px solid var(--line); }
.settings-section h2 { margin-bottom: 15px; font-size: 1.1rem; }
.settings-section .form-group + .form-group { margin-top: 14px; }
.schedule-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.textarea { min-height: 104px; resize: vertical; }
.settings-actions { margin-top: 0; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-title .lede { font-size: .88rem; }
.email-preview { max-width: 760px; padding: 24px; border-left: 4px solid var(--orange); background: #f8fafc; }
.email-preview h3 { margin: 5px 0 7px; font-size: 1.35rem; }
.email-preview > p { color: var(--muted); }
.preview-list { margin: 20px 0; border-top: 1px solid var(--line); }
.preview-domain { display: grid; grid-template-columns: minmax(180px, 1fr) 70px 70px 110px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.preview-domain div span { display: block; color: var(--muted); font-size: .73rem; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding: 21px 14px; }
  .brand-copy, .nav a span:last-child, .sidebar-meta { display: none; }
  .brand, .nav a { justify-content: center; }
  .nav a { padding: 13px; }
  .main { padding: 20px; }
  .newsletter { grid-template-columns: 1fr; gap: 17px; }
}

@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: relative; height: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .brand-copy { display: block; }
  .brand-copy small { display: none; }
  .nav { margin: 0; display: flex; }
  .nav a { padding: 10px; }
  .nav a span:last-child { display: none; }
  .main { padding: 12px; }
  .panel-head { padding: 20px 17px 16px; }
  .title-row { display: block; }
  .title-tools { margin-top: 14px; justify-content: flex-start; }
  .toolbar { grid-template-columns: 1fr; }
  .table-wrap { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { padding: 7px 15px 16px; }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; padding: 17px 2px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; white-space: normal; min-width: 0; }
  td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
  td:first-child, td:last-child { grid-column: 1 / -1; }
  td:last-child .button { width: 100%; }
  .pagination { padding: 16px; align-items: flex-start; flex-direction: column; }
  .newsletter { margin-top: 12px; padding: 20px 17px; }
  .newsletter form { grid-template-columns: 1fr; }
  .newsletter-modal { padding: 26px 20px 22px; }
  .newsletter-modal form { grid-template-columns: 1fr; }
  .footer { padding: 18px 5px; flex-direction: column; gap: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .form-body { padding: 20px 17px; }
  .actions { flex-wrap: wrap; }
  .status-strip { grid-template-columns: repeat(3, 1fr); }
  .status-strip > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .status-strip > div { padding: 14px 16px; }
  .provider-status { margin: 17px 17px 0; align-items: flex-start; flex-direction: column; gap: 3px; }
  .provider-status strong { white-space: normal; }
  .settings-section { padding: 20px 17px; }
  .schedule-grid { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .preview-domain { grid-template-columns: 1fr 50px 50px; }
  .preview-domain > span:last-child { grid-column: 1 / -1; }
}
