/* ── VARIABLES ────────────────────────────────────────────────── */
:root {
  --bg:        #f7f9fb;
  --bg-alt:    #eef5f8;
  --card:      #ffffff;
  --border:    #dce8ef;
  --nav-surface:#173753;
  --accent:        #00A7B5;
  --accent-light:  #E5F7F8;
  --accent-text:   #007F8B;
  --text:       #173753;
  --text-sub:   #3d5871;
  --text-muted: #8fa3b8;
  --success:       #00A7B5;
  --success-light: #E5F7F8;
  --warning:       #B33C86;
  --warning-light: #F9E6F1;
  --danger:        #EA638C;
  --danger-light:  #FDEAF0;
  --purple:        #B33C86;
  --purple-light:  #F9E6F1;
  --shadow-sm: 0 1px 2px rgba(23,55,83,.08);
  --shadow:    0 1px 3px rgba(23,55,83,.08), 0 8px 24px rgba(23,55,83,.05);
  --shadow-lg: 0 16px 42px rgba(23,55,83,.14);
  --shadow-soft: 0 10px 34px rgba(23,55,83,.08);
  --radius:    8px;
  --radius-sm: 8px;
  --nav-h:     56px;
  --v2-text: var(--text);
  --v2-text-subtle: var(--text-sub);
}
[data-theme="midnight"] {
  --bg:        #10263a;
  --bg-alt:    #173753;
  --card:      #132d44;
  --border:    rgba(109,174,219,.20);
  --nav-surface:rgba(23,55,83,.94);
  --accent:        #00A7B5;
  --accent-light:  rgba(0,167,181,.14);
  --accent-text:   #6DAEDB;
  --text:       #f7fbff;
  --text-sub:   #c3d7e8;
  --text-muted: #91b3ca;
  --success:       #00A7B5;
  --success-light: rgba(0,167,181,.12);
  --warning:       #B33C86;
  --warning-light: rgba(179,60,134,.12);
  --danger:        #EA638C;
  --danger-light:  rgba(234,99,140,.13);
  --purple:        #EA638C;
  --purple-light:  rgba(179,60,134,.16);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 2px 8px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
  --shadow-soft: 0 10px 34px rgba(0,0,0,.34);
}
[data-theme="storm"] {
  --bg:        #10263a;
  --bg-alt:    #173753;
  --card:      #132d44;
  --border:    rgba(109,174,219,.20);
  --nav-surface:rgba(23,55,83,.94);
  --accent:        #00A7B5;
  --accent-light:  rgba(0,167,181,.14);
  --accent-text:   #6DAEDB;
  --text:       #f7fbff;
  --text-sub:   #c3d7e8;
  --text-muted: #91b3ca;
  --success:       #00A7B5;
  --success-light: rgba(0,167,181,.12);
  --warning:       #B33C86;
  --warning-light: rgba(179,60,134,.12);
  --danger:        #EA638C;
  --danger-light:  rgba(234,99,140,.13);
  --purple:        #EA638C;
  --purple-light:  rgba(179,60,134,.16);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow:    0 2px 10px rgba(0,0,0,.42);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.56);
  --shadow-soft: 0 10px 34px rgba(0,0,0,.38);
}

/* ── RESET / BASE ─────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; }
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text);
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
  background:linear-gradient(180deg,#f7f9fb 0%,#eef5f8 100%); }
a { color:var(--accent); text-decoration:none; }
input,button,select,textarea { font-family:inherit; }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

/* ── UTILITY ──────────────────────────────────────────────────── */
.text-sm   { font-size:12px; }
.text-xs   { font-size:11px; }
.text-sub  { color:var(--text-sub); }
.text-muted{ color:var(--text-muted); }
.fw-700    { font-weight:700; }
.page      { display:none; }
.hidden    { display:none !important; }
small { font-size: 80%; display: block; }

/* ── BADGES ───────────────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px;
  border-radius:99px; font-size:11px; font-weight:700; letter-spacing:.02em; white-space:nowrap; }
.badge-sm { padding:2px 7px; font-size:10px; border-radius:5px; }
.badge::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; flex-shrink:0; }
.badge-sm::before { display:none; }
.badge-success { background:var(--success-light); color:var(--success); }
.badge-danger  { background:var(--danger-light);  color:var(--danger);  }
.badge-warning { background:var(--warning-light); color:var(--warning); }
.badge-accent  { background:var(--accent-light);  color:var(--accent);  }
.badge-purple  { background:var(--purple-light);  color:var(--purple);  }
.badge-muted   { background:var(--bg-alt); color:var(--text-muted); }
.chk-ok { color:var(--success); font-weight:700; font-size:13px; }
.chk-no { color:var(--danger);  font-weight:700; font-size:13px; }

/* ── DNS TAGS ─────────────────────────────────────────────────── */
.dns-tag { display:inline-flex; align-items:center; gap:3px; padding:2px 8px;
  border-radius:5px; font-size:10px; font-weight:700; }
.dns-ok { background:var(--success-light); color:var(--success); }
.dns-no { background:var(--danger-light);  color:var(--danger);  }

/* ── CARDS ────────────────────────────────────────────────────── */
.card { background:var(--card); border:1px solid color-mix(in srgb,var(--border) 86%,#fff);
  border-radius:var(--radius); box-shadow:var(--shadow-soft); }
.card-pad { padding:22px 24px; }
.card-hd  { padding:16px 20px; border-bottom:1px solid color-mix(in srgb,var(--border) 82%,#fff);
  font-weight:800; font-size:13px; display:flex; align-items:center; justify-content:space-between; color:var(--text); }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 18px;
  border-radius:var(--radius-sm); border:none; cursor:pointer; font-size:13px;
  font-weight:600; font-family:inherit; transition:all .14s; white-space:nowrap; }
.btn:hover { opacity:.88; transform:translateY(-1px); }
.btn-primary  { background:#00A7B5; color:#fff; box-shadow:0 8px 22px rgba(0,167,181,.24); }
.btn-ghost    { background:#f7fbfd; color:var(--text-sub); border:1px solid var(--border); }
.btn-sm       { padding:6px 13px; font-size:12px; }
.btn-danger   { background:var(--danger-light); color:var(--danger); }
.btn-warning  { background:var(--warning-light); color:var(--warning); }
.btn-ai { background:var(--purple-light); color:var(--purple); border:1px solid color-mix(in oklch,var(--purple) 20%,transparent); }

/* ── INPUTS ───────────────────────────────────────────────────── */
.inp { width:100%; padding:9px 13px; background:var(--bg-alt);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  color:var(--text); font-size:13px; outline:none; transition:border-color .14s; }
.inp:focus { border-color:var(--accent); background:var(--card); }
.inp::placeholder { color:var(--text-muted); }
.inp-icon { position:relative; }
.inp-icon svg { position:absolute; left:11px; top:50%; transform:translateY(-50%); pointer-events:none; }
.inp-icon .inp { padding-left:34px; }
label.field-label { display:block; font-size:10px; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--text-muted); margin-bottom:5px; }

/* ── TABLES ───────────────────────────────────────────────────── */
.data-table { width:100%; border-collapse:collapse; }
.data-table th { padding:10px 16px; text-align:left; font-size:10px; font-weight:700;
  letter-spacing:.07em; text-transform:uppercase; color:var(--text-muted);
  border-bottom:1px solid var(--border); white-space:nowrap; }
.data-table td { padding:12px 16px; border-bottom:1px solid var(--border);
  vertical-align:middle; }
.data-table tr:last-child td { border-bottom:none; }
.data-table tbody tr { transition:background .1s; cursor:default; }
.data-table tbody tr:hover { background:var(--bg-alt); }

/* ── TABS ─────────────────────────────────────────────────────── */
.tab-row { display:flex; gap:2px; border-bottom:1px solid var(--border); margin-bottom:20px; }
.tab-btn { padding:9px 16px; border:none; background:transparent; cursor:pointer;
  font-size:13px; font-weight:500; color:var(--text-sub); font-family:inherit;
  border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .14s; }
.tab-btn.active { color:var(--text); font-weight:700; border-bottom-color:var(--accent); }
.tab-btn:hover:not(.active) { color:var(--text); }

/* ── STAT CARDS ───────────────────────────────────────────────── */
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
.stat-card { position:relative; background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
  border:1px solid color-mix(in srgb,var(--border) 88%,#fff); border-radius:var(--radius);
  padding:20px 22px; box-shadow:var(--shadow-soft); cursor:pointer; transition:all .15s; overflow:hidden; }
.stat-card::before { content:''; position:absolute; left:0; right:0; top:0; height:3px; background:#00A7B5; }
.stat-grid .stat-card:nth-child(2)::before { background:#6DAEDB; }
.stat-grid .stat-card:nth-child(3)::before { background:#B33C86; }
.stat-grid .stat-card:nth-child(4)::before { background:#EA638C; }
.stat-card:hover { border-color:color-mix(in srgb,var(--accent) 32%,var(--border)); transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.stat-label { font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:8px; }
.stat-value { font-size:28px; font-weight:800; letter-spacing:-.04em; line-height:1; }
.stat-sub { font-size:12px; color:var(--text-sub); margin-top:5px; }
.stat-trend { font-size:11px; font-weight:700; margin-top:3px; }
.trend-up   { color:var(--success); }
.trend-down { color:var(--danger); }
.color-accent  { color:var(--accent); }
.color-success { color:var(--success); }
.color-warning { color:var(--warning); }
.color-danger  { color:var(--danger); }
.color-purple  { color:var(--purple); }

/* ── NAV ──────────────────────────────────────────────────────── */
#nav-bar { position:sticky; top:0; z-index:200; height:var(--nav-h);
  background:linear-gradient(90deg,#173753 0%,#122d44 100%);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(109,174,219,.18);
  box-shadow:0 10px 30px rgba(23,55,83,.12);
  display:flex; align-items:center; padding:0 24px; gap:4px;
  transition:transform .18s ease, box-shadow .18s ease; will-change:transform; }
.nav-logo { display:flex; align-items:center; margin-right:18px;
  cursor:pointer; flex-shrink:0; text-decoration:none; }
.nav-logo-image { display:block; width:auto; height:26px; max-width:min(100%, 268px); content:url("../images/smtp_logo_white.png?v=2026042704"); }
[data-theme="midnight"] .nav-logo-image,
[data-theme="storm"] .nav-logo-image { content:url("../images/smtp_logo_white.png?v=2026042704"); }
.nav-links { display:flex; gap:2px; flex:1; }
.nav-link { padding:5px 12px; border-radius:7px; border:none; cursor:pointer;
  font-size:13px; font-weight:600; background:transparent; color:rgba(255,255,255,.72);
  font-family:inherit; transition:all .12s; }
.nav-link.active { background:rgba(0,167,181,.18); color:#fff; font-weight:800; }
.nav-link:hover:not(.active) { background:rgba(255,255,255,.08); color:#fff; }
.nav-right { display:flex; align-items:center; gap:8px; flex-shrink:0; position:relative; }
.trial-badge { padding:4px 10px; border-radius:99px; background:rgba(179,60,134,.20);
  color:#fff; font-size:11px; font-weight:800; cursor:pointer; white-space:nowrap; border:1px solid rgba(234,99,140,.28); }
.ai-badge { padding:4px 9px; border-radius:99px; background:rgba(234,99,140,.18);
  color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; gap:3px; border:1px solid rgba(234,99,140,.24); }
.ai-badge i { font-size:10px; }
.theme-toggle { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:999px;
  border:1px solid rgba(109,174,219,.25); background:rgba(255,255,255,.08); color:#fff;
  font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; transition:all .14s; }
.theme-toggle:hover { border-color:rgba(109,174,219,.48); background:rgba(255,255,255,.12); box-shadow:none; }
.theme-toggle i { color:#6DAEDB; font-size:12px; }
.theme-toggle.is-dark { background:rgba(0,167,181,.16); color:#fff; }
.user-avatar { width:30px; height:30px; border-radius:8px; background:#00A7B5;
  border:1.5px solid rgba(255,255,255,.24); display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-weight:800; color:#fff; font-size:13px; }
#user-menu { position:absolute; top:38px; right:0; background:var(--card);
  border:1px solid var(--border); border-radius:var(--radius); padding:6px;
  min-width:172px; z-index:300; box-shadow:var(--shadow-lg); display:none; }
.user-menu-item { display:block; width:100%; text-align:left; padding:7px 12px;
  border-radius:6px; background:none; border:none; cursor:pointer; font-size:13px;
  color:var(--text-sub); font-family:inherit; transition:all .1s; }
.user-menu-item:hover { background:var(--bg-alt); color:var(--text); }
.user-menu-item.danger:hover { background:var(--danger-light); color:var(--danger); }
.menu-divider { height:1px; background:var(--border); margin:4px 0; }
.user-info-row { padding:8px 12px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.user-name { font-size:13px; font-weight:700; color:var(--text); }
.user-email { font-size:11px; color:var(--text-muted); }

/* ── PAGE SHELL ───────────────────────────────────────────────── */
.page-inner { padding:30px 32px; width:100%; max-width:none; box-sizing:border-box; background:transparent; }
.page-hd { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:26px; }
.page-title-text { font-size:22px; font-weight:800; color:var(--text); letter-spacing:-.04em; }
.page-desc { font-size:13px; color:var(--text-sub); margin-top:4px; }
.smtp-dashboard-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }

.smtp-dashboard-layout {
  display:grid;
  grid-template-columns:minmax(0, 1.02fr) minmax(420px, .98fr);
  gap:20px;
  align-items:start;
}

.smtp-dashboard-main-column,
.smtp-dashboard-ai-column {
  display:grid;
  gap:28px;
  align-content:start;
}

.smtp-dashboard-layout > *,
.smtp-dashboard-main-column > *,
.smtp-dashboard-ai-column > *,
.smtp-dashboard-secondary-grid > *,
.smtp-widget-host,
.smtp-widget-host > * {
  min-width:0;
  max-width:100%;
}

.smtp-dashboard-secondary-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:28px;
  margin-top:28px;
  align-items:start;
}

.smtp-dashboard-block-stack {
  display:grid;
  gap:12px;
  align-content:start;
}

.smtp-dashboard-section-intro {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin:28px 0 12px;
  padding:0 2px 10px;
  border-bottom:1px solid var(--border);
  scroll-margin-top:96px;
}

.smtp-dashboard-section-kicker {
  color:var(--v2-text-subtle);
  font-size:10px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  margin-bottom:4px;
}

.smtp-dashboard-section-title {
  color:var(--v2-text);
  font-size:14px;
  font-weight:800;
  line-height:1.25;
}

.smtp-dashboard-section-copy {
  color:var(--v2-text-subtle);
  font-size:11px;
  line-height:1.45;
  max-width:620px;
  text-align:right;
}

.smtp-dashboard-ai-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.smtp-dashboard-ai-card {
  align-self:start;
}

.smtp-dashboard-layout .card,
.smtp-dashboard-secondary-grid .card,
.smtp-dashboard-layout .card-pad,
.smtp-dashboard-secondary-grid .card-pad {
  overflow:hidden;
}

.smtp-dashboard-main-column .smtp-widget-host > .card + .card,
.smtp-dashboard-ai-column .smtp-widget-host > .card + .card {
  margin-top:28px;
}

/* ── LOGIN ────────────────────────────────────────────────────── */
#page-login { min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:var(--bg);
  background-image:radial-gradient(ellipse 55% 40% at 20% 30%,color-mix(in oklch,var(--accent) 8%,transparent) 0%,transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 70%,color-mix(in oklch,var(--purple) 6%,transparent) 0%,transparent 65%); }
.login-wrap { width:400px; }
.login-logo { text-align:center; margin-bottom:28px; }
.login-logo-mark { width:44px; height:44px; border-radius:13px; background:var(--accent);
  display:inline-flex; align-items:center; justify-content:center; margin-bottom:12px;
  box-shadow:0 0 28px color-mix(in oklch,var(--accent) 40%,transparent); }
.login-brand { font-size:22px; font-weight:800; color:var(--text); letter-spacing:-.04em; }
.login-brand span { color:var(--accent); }
.login-tagline { font-size:12px; color:var(--text-sub); margin-top:4px; }
.login-card { background:var(--card); border:1px solid var(--border); border-radius:16px;
  padding:28px; box-shadow:var(--shadow-lg); }
.login-tabs { display:flex; background:var(--bg-alt); border-radius:9px; padding:3px; margin-bottom:22px; gap:3px; }
.login-tab { flex:1; padding:7px; border-radius:7px; border:none; cursor:pointer;
  font-size:12px; font-weight:600; font-family:inherit; background:transparent; color:var(--text-sub); transition:all .14s; }
.login-tab.active { background:var(--card); color:var(--text); box-shadow:var(--shadow-sm); }
.form-group { margin-bottom:12px; }
.login-foot { margin-top:8px; text-align:right; }
.login-foot-link { font-size:12px; color:var(--text-muted); cursor:pointer; }
.login-foot-link:hover { color:var(--accent); }
.login-submit { width:100%; padding:12px; margin-top:8px; border-radius:10px;
  border:none; cursor:pointer; background:var(--accent); color:#fff;
  font-size:14px; font-weight:700; font-family:inherit; letter-spacing:-.01em;
  box-shadow:0 4px 18px color-mix(in oklch,var(--accent) 40%,transparent);
  transition:all .14s; }
.login-submit:hover { transform:translateY(-1px); opacity:.9; }
.login-footer-note { text-align:center; margin-top:16px; font-size:11px; color:var(--text-muted); }
.login-footer-note a { color:var(--text-sub); }

/* ── CHART WRAPPERS ───────────────────────────────────────────── */
.chart-box { width:100%; overflow:hidden; }

/* ── DASHBOARD: REPUTATION ────────────────────────────────────── */
.rep-wrap { display:flex; align-items:center; gap:24px; }
.rep-score { font-size:44px; font-weight:900; letter-spacing:-.06em; color:var(--text); line-height:1; }
.rep-score span { font-size:16px; font-weight:400; color:var(--text-muted); }
.rep-meta { flex:1; }
.rep-label { font-size:13px; color:var(--success); font-weight:700; margin-bottom:12px; }
.rep-domain { display:flex; justify-content:space-between; font-size:12px;
  padding:5px 0; border-bottom:1px solid var(--border); }
.rep-domain:last-child { border-bottom:none; }

/* ── TOP SENDERS ──────────────────────────────────────────────── */
.sender-row { margin-bottom:13px; }
.sender-top { display:flex; justify-content:space-between; margin-bottom:5px; font-size:12px; }
.sender-bar { height:4px; border-radius:2px; background:var(--bg-alt); overflow:hidden; }
.sender-fill { height:100%; border-radius:2px; }

/* ── AI WIDGET ────────────────────────────────────────────────── */
.ai-widget { border:1px solid var(--border); border-radius:var(--radius);
  background:var(--card); padding:22px; }
.ai-widget-hd { display:flex; align-items:center; justify-content:space-between; }
.ai-widget-left { display:flex; align-items:center; gap:10px; }
.ai-icon { width:32px; height:32px; border-radius:9px; background:var(--purple-light);
  display:flex; align-items:center; justify-content:center; color:var(--purple); font-size:15px; flex-shrink:0; }
.ai-widget-title { font-size:14px; font-weight:700; color:var(--text); }
.ai-widget-sub { font-size:11px; color:var(--text-sub); margin-top:1px; }
.ai-idle-msg { text-align:center; padding:20px 0; color:var(--text-muted); font-size:13px; }
.ai-loading { padding:16px 0; }
.pulse-bar { height:11px; border-radius:6px; background:var(--bg-alt); margin-bottom:9px;
  animation:pulse 1.4s ease-in-out infinite; }
.pulse-bar:nth-child(1){width:80%} .pulse-bar:nth-child(2){width:60%;animation-delay:.15s}
.pulse-bar:nth-child(3){width:88%;animation-delay:.3s} .pulse-bar:nth-child(4){width:55%;animation-delay:.45s}
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:.85} }
.insights-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.insight-card { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:14px; }
.insight-header { display:flex; align-items:center; gap:6px; margin-bottom:7px; }
.insight-title { font-size:13px; font-weight:700; color:var(--text); margin-bottom:4px; }
.insight-body { font-size:12px; color:var(--text-sub); line-height:1.5; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── DOMAIN CARDS ─────────────────────────────────────────────── */
.domain-card { display:flex; align-items:center; gap:18px; background:var(--card);
  border:1px solid var(--border); border-radius:var(--radius); padding:18px 22px;
  box-shadow:var(--shadow); cursor:pointer; transition:all .15s; margin-bottom:10px; }
.domain-card:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow:var(--shadow-lg); }
.domain-status-dot { width:40px; height:40px; border-radius:11px; display:flex;
  align-items:center; justify-content:center; flex-shrink:0; }
.domain-dot { width:11px; height:11px; border-radius:50%; }
.domain-main { flex:1; min-width:0; }
.domain-name { font-size:16px; font-weight:800; letter-spacing:-.02em; margin-bottom:6px; }
.domain-dns { display:flex; gap:4px; }
.domain-stats { display:flex; gap:28px; flex-shrink:0; }
.domain-stat { text-align:center; }
.domain-stat-val { font-size:18px; font-weight:900; color:var(--text); }
.domain-stat-lbl { font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); margin-top:2px; }
.domain-chevron { color:var(--text-muted); margin-left:4px; }

.domains-table-card { overflow:hidden; }
.domains-table-wrap { overflow:auto; }
.domains-table {
  margin:0;
  table-layout:fixed;
}

.domains-table > thead > tr > th {
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.domains-table > tbody > tr > td {
  padding:18px;
  border-top:1px solid var(--border);
  vertical-align:middle;
}

.domain-row {
  cursor:pointer;
  transition:background .12s ease;
}

.domain-row:hover {
  background:color-mix(in oklch, var(--bg-alt) 82%, transparent);
}

.domain-row-main {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.domain-row-icon {
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-light);
  color:var(--accent);
  flex-shrink:0;
}

.domain-row-title {
  font-size:15px;
  font-weight:800;
  color:var(--text);
}

.domain-row-sub {
  margin-top:4px;
  font-size:12px;
  color:var(--text-sub);
}

.domain-reputation-badge {
  display:inline-flex;
  min-width:48px;
  justify-content:center;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.domain-reputation-badge.is-good {
  background:var(--success-light);
  color:var(--success);
}

.domain-reputation-badge.is-medium {
  background:var(--warning-light);
  color:var(--warning);
}

.domain-reputation-badge.is-bad {
  background:var(--danger-light);
  color:var(--danger);
}

.domain-validation-group {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.domain-validation-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:64px;
  padding:8px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  border:1px solid transparent;
}

.domain-validation-chip.is-valid {
  background:var(--success-light);
  color:var(--success);
  border-color:color-mix(in oklch, var(--success) 18%, transparent);
}

.domain-validation-chip.is-invalid {
  background:var(--danger-light);
  color:var(--danger);
  border-color:color-mix(in oklch, var(--danger) 18%, transparent);
}

.domain-status-copy {
  font-size:13px;
  line-height:1.65;
}

.domain-status-copy.is-healthy {
  color:var(--text-sub);
}

.domain-status-copy.is-warning {
  color:var(--danger);
}

.domain-row-action {
  text-align:right;
  white-space:nowrap;
}

.domain-config-note {
  padding:18px 20px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background:color-mix(in oklch, var(--accent-light) 26%, var(--card));
}

.domain-config-note h4 {
  margin:0 0 8px;
  font-size:15px;
  font-weight:800;
  color:var(--text);
}

.domain-config-note p {
  margin:0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.domain-config-note ul {
  margin:12px 0 0 18px;
  padding:0;
  color:var(--text-sub);
}

.domain-config-note li {
  margin-bottom:8px;
  font-size:12px;
  line-height:1.7;
}

.table-empty-state {
  min-height:240px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
  color:var(--text-sub);
}

.table-empty-state i {
  font-size:24px;
  color:var(--accent);
}

.table-empty-state strong {
  font-size:16px;
  color:var(--text);
}

.table-empty-state.compact {
  min-height:0;
  padding:18px 8px;
}

.deliverability-header-actions {
  display:flex;
  align-items:center;
  gap:10px;
}

.deliverability-chart-slot {
  padding-top:18px;
}

.deliverability-insights-grid {
  display:grid;
  gap:12px;
}

.deliverability-insight-card {
  padding:16px;
  border-radius:8px;
  border:1px solid color-mix(in srgb,var(--border) 86%,#fff);
  border-left:3px solid #6DAEDB;
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}

.deliverability-insight-card.is-risk,
.deliverability-insight-card.is-warning {
  border-left-color:#EA638C;
  background:color-mix(in srgb, #EA638C 7%, var(--card));
}

.deliverability-insight-card.is-setup {
  border-left-color:#B33C86;
  background:color-mix(in srgb, #B33C86 6%, var(--card));
}

.deliverability-insight-card.is-good,
.deliverability-insight-card.is-recommendation {
  border-left-color:#00A7B5;
  background:color-mix(in srgb, #00A7B5 7%, var(--card));
}

.deliverability-insight-kicker {
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.deliverability-insight-card h3 {
  margin:10px 0 0;
  font-size:16px;
  font-weight:800;
  color:var(--text);
}

.deliverability-insight-card p {
  margin:8px 0 0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.deliverability-source-list {
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:18px;
}

.deliverability-source-row {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--card);
}

.deliverability-source-ip {
  font-size:14px;
  font-weight:800;
  color:var(--text);
  word-break:break-word;
}

.deliverability-source-meta {
  margin-top:4px;
  font-size:12px;
  line-height:1.65;
  color:var(--text-sub);
}

.deliverability-source-badge {
  white-space:nowrap;
  padding:7px 12px;
  border-radius:999px;
  background:var(--danger-light);
  color:var(--danger);
  font-size:11px;
  font-weight:800;
}

.deliverability-setup {
  padding-top:18px;
}

.deliverability-setup-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-top:1px solid var(--border);
}

.deliverability-setup-row:first-child {
  padding-top:0;
  border-top:0;
}

.deliverability-setup-row span {
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.deliverability-setup-row strong {
  font-size:13px;
  line-height:1.6;
  color:var(--text);
  text-align:right;
  word-break:break-word;
}

.deliverability-code-block {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(109,174,219,.24);
  background: #173753;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.75;
  color: #ffffff;
  word-break: break-word;
}

.deliverability-setup-copy {
  margin:12px 0 0;
  font-size:12px;
  line-height:1.7;
  color:var(--text-sub);
}

.deliverability-table-wrap {
  max-width:100%;
  overflow:auto;
}

.deliverability-table {
  margin:0;
  width:100%;
}

.deliverability-table > thead > tr > th {
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.deliverability-table > tbody > tr > td {
  padding:16px;
  border-top:1px solid var(--border);
  vertical-align:middle;
  font-size:13px;
  line-height:1.65;
  color:var(--text-sub);
}

.deliverability-table > tbody > tr > td:first-child {
  color:var(--text);
  font-weight:700;
}

.deliverability-setup-v2 {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.deliverability-setup-v2-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.deliverability-setup-kicker {
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.deliverability-setup-v2-head h3 {
  margin:8px 0 0;
  font-size:22px;
  line-height:1.2;
  letter-spacing:-.04em;
  color:var(--text);
}

.deliverability-setup-v2-head p {
  margin:10px 0 0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.deliverability-setup-v2-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.deliverability-setup-metric-card {
  padding:16px;
  border-radius:8px;
  border:1px solid color-mix(in srgb,var(--border) 86%,#fff);
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}

.deliverability-setup-metric-card span {
  display:block;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.deliverability-setup-metric-card strong {
  display:block;
  margin-top:8px;
  font-size:18px;
  line-height:1.35;
  color:var(--text);
}

.deliverability-setup-metric-card small {
  display:block;
  margin-top:8px;
  font-size:12px;
  line-height:1.7;
  color:var(--text-sub);
}

.deliverability-rollout-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.deliverability-rollout-step {
  padding:16px;
  border-radius:8px;
  border:1px solid color-mix(in srgb,var(--border) 86%,#fff);
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}

.deliverability-rollout-step span {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border-radius:999px;
  background:var(--accent-light);
  color:var(--accent);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.deliverability-rollout-step strong {
  display:block;
  margin-top:12px;
  font-size:15px;
  line-height:1.45;
  color:var(--text);
}

.deliverability-rollout-step p {
  margin:10px 0 0;
  font-size:12px;
  line-height:1.75;
  color:var(--text-sub);
}

.deliverability-segment-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  padding-top:18px;
}

.deliverability-segment-card {
  padding:18px;
  border-radius:8px;
  border:1px solid color-mix(in srgb,var(--border) 86%,#fff);
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}

.deliverability-segment-card.is-identified {
  background:color-mix(in srgb, var(--success) 8%, var(--card));
}

.deliverability-segment-card.is-forwarded {
  background:color-mix(in srgb, var(--accent) 8%, var(--card));
}

.deliverability-segment-card.is-threat {
  background:color-mix(in srgb, var(--danger) 8%, var(--card));
}

.deliverability-segment-label {
  font-size:12px;
  font-weight:800;
  color:var(--text);
}

.deliverability-segment-value {
  margin-top:10px;
  font-size:34px;
  line-height:1;
  letter-spacing:-.05em;
  font-weight:900;
  color:var(--text);
}

.deliverability-segment-sub,
.deliverability-segment-meta {
  margin-top:8px;
  font-size:12px;
  line-height:1.7;
  color:var(--text-sub);
}

.deliverability-source-cell {
  display:flex;
  flex-direction:column;
  gap:4px;
}

.deliverability-source-cell strong {
  color:var(--text);
}

.deliverability-source-cell span {
  font-size:12px;
  color:var(--text-sub);
}

.deliverability-meter {
  min-width:140px;
}

.deliverability-meter-track {
  height:10px;
  border-radius:999px;
  background:rgba(148,163,184,.16);
  overflow:hidden;
}

.deliverability-meter-fill {
  height:100%;
  border-radius:999px;
}

.deliverability-meter-value {
  margin-top:8px;
  font-size:11px;
  font-weight:800;
  color:var(--text-sub);
}

.deliverability-policy-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.deliverability-policy-pill.is-neutral {
  background:rgba(148,163,184,.12);
  color:var(--text-sub);
}

.deliverability-policy-pill.is-warning {
  background:var(--warning-light);
  color:var(--warning);
}

.deliverability-policy-pill.is-danger {
  background:var(--danger-light);
  color:var(--danger);
}

.deliverability-risk-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  white-space:nowrap;
}

.deliverability-risk-pill.is-low,
.deliverability-risk-pill.is-good {
  background:var(--success-light);
  color:var(--success);
}

.deliverability-risk-pill.is-medium,
.deliverability-risk-pill.is-warning {
  background:var(--warning-light);
  color:var(--warning);
}

.deliverability-risk-pill.is-high,
.deliverability-risk-pill.is-danger {
  background:var(--danger-light);
  color:var(--danger);
}

/* ── DMARC: KPI ROW ───────────────────────────────────────────── */
.kpi-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:20px; }
.kpi-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 18px; box-shadow:var(--shadow); }
.kpi-label { font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:8px; }
.kpi-value { font-size:22px; font-weight:900; letter-spacing:-.04em; line-height:1; }
.kpi-trend { font-size:11px; font-weight:600; margin-top:4px; }

/* ── DMARC: RECORD VIEWER ─────────────────────────────────────── */
.record-code { background:var(--bg-alt); border:1px solid var(--border); border-radius:10px;
  padding:16px; font-family:monospace; font-size:12px; color:var(--text); line-height:1.8; word-break:break-all; }
.record-check { display:flex; gap:10px; align-items:flex-start; margin-bottom:10px; }
.record-check-icon { font-size:11px; font-weight:700; margin-top:1px; flex-shrink:0; }
.record-check-key { font-size:12px; font-weight:700; color:var(--text); }
.record-check-val { font-family:monospace; font-size:12px; color:var(--accent); }
.record-check-note { font-size:11px; color:var(--text-muted); margin-top:1px; }

/* ── UPGRADE PATH ─────────────────────────────────────────────── */
.upgrade-step { display:flex; gap:14px; align-items:flex-start; margin-bottom:16px; }
.step-circle { width:28px; height:28px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; border:2px solid; }
.step-title { font-size:13px; font-weight:700; }
.step-desc { font-size:11px; color:var(--text-muted); margin-top:1px; }

/* ── BILLING PLANS ────────────────────────────────────────────── */
.plan-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:22px; box-shadow:var(--shadow); transition:all .15s; }
.plan-card.popular { border-color:var(--accent); background:var(--accent-light); }
.plan-popular-label { font-size:9px; font-weight:800; letter-spacing:.1em; text-transform:uppercase;
  color:var(--accent); margin-bottom:8px; }
.plan-name { font-size:17px; font-weight:800; color:var(--text); }
.plan-price { font-size:28px; font-weight:900; letter-spacing:-.04em; margin:8px 0; }
.plan-price span { font-size:12px; font-weight:400; color:var(--text-muted); }
.plan-desc { font-size:12px; color:var(--text-sub); margin-bottom:16px; }
.plan-btn { width:100%; padding:9px; border-radius:8px; cursor:pointer; font-size:12px;
  font-weight:700; font-family:inherit; transition:all .14s; }
.plan-btn.primary { background:var(--accent); color:#fff; border:none; }
.plan-btn.outline { background:transparent; color:var(--text-sub); border:1px solid var(--border); }

/* ── SETTINGS ─────────────────────────────────────────────────── */
.user-row { display:flex; align-items:center; gap:14px; padding:12px 0;
  border-bottom:1px solid var(--border); }
.user-row:last-child { border-bottom:none; }
.user-av { width:34px; height:34px; border-radius:9px; background:var(--accent-light);
  display:flex; align-items:center; justify-content:center; font-size:13px;
  font-weight:800; color:var(--accent); flex-shrink:0; }
.user-row-name { font-size:13px; font-weight:700; color:var(--text); }
.user-row-email { font-size:11px; color:var(--text-muted); }
.api-key-row { display:flex; align-items:center; gap:14px; padding:13px 0;
  border-bottom:1px solid var(--border); }
.api-key-row:last-child { border-bottom:none; }
.api-key-mono { font-family:monospace; font-size:11px; color:var(--text-sub);
  background:var(--bg-alt); padding:3px 8px; border-radius:5px; display:inline-block; }

/* ── SMTP V2 RUNTIME ─────────────────────────────────────────── */
body.manager-v2,
body.page-body,
body.login-page,
body.terms-page {
  min-height:100vh;
  background:linear-gradient(180deg,var(--bg) 0%,var(--bg-alt) 100%);
  color:var(--text);
}

.loading { display:none !important; }
.nav-user-wrap { position:relative; }

.app-shell { min-height:100vh; }
.app-main { min-height:calc(100vh - var(--nav-h)); padding-bottom:36px; }
.app-footer {
  width:auto;
  margin:18px 32px 0;
  color:var(--text-muted);
  font-size:11px;
}

.trial-banner {
  position:fixed;
  left:24px;
  right:24px;
  bottom:24px;
  z-index:220;
  display:flex;
  justify-content:center;
  gap:6px;
  padding:12px 18px;
  border:1px solid color-mix(in oklch,var(--warning) 28%,transparent);
  border-radius:14px;
  background:color-mix(in oklch,var(--warning-light) 92%,var(--card));
  color:var(--warning);
  box-shadow:var(--shadow-lg);
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}

.manager-v2 #dynamic_content { padding-bottom:12px; }
.manager-v2 #dynamic_content > *:not(.page-inner):not(script):not(style) {
  max-width:none;
  margin-left:32px;
  margin-right:32px;
}

/* ── LEGACY GRID / UTILITIES ─────────────────────────────────── */
.container { width:100%; max-width:1200px; margin:0 auto; padding:0 15px; }
.container.margin { padding-top:54px; padding-bottom:24px; }
.row { margin-left:-15px; margin-right:-15px; }
.row::before, .row::after, .container::before, .container::after { content:""; display:table; }
.row::after, .container::after { clear:both; }
[class*="col-sm-"], [class*="col-md-"], [class*="col-lg-"], [class*="col-xs-"] {
  position:relative;
  min-height:1px;
  padding-left:15px;
  padding-right:15px;
  width:100%;
}

@media (min-width:768px) {
  .col-sm-0 { width:0; }
  .col-sm-2 { float:left; width:16.66666667%; }
  .col-sm-3 { float:left; width:25%; }
  .col-sm-4 { float:left; width:33.33333333%; }
  .col-sm-5 { float:left; width:41.66666667%; }
  .col-sm-6 { float:left; width:50%; }
  .col-sm-9 { float:left; width:75%; }
  .col-sm-10 { float:left; width:83.33333333%; }
  .col-sm-12 { float:left; width:100%; }
}

@media (min-width:992px) {
  .col-md-3 { float:left; width:25%; }
  .col-md-4 { float:left; width:33.33333333%; }
  .col-md-5 { float:left; width:41.66666667%; }
  .col-md-6 { float:left; width:50%; }
  .col-md-7 { float:left; width:58.33333333%; }
  .col-md-8 { float:left; width:66.66666667%; }
  .col-md-9 { float:left; width:75%; }
  .col-md-12 { float:left; width:100%; }
}

.text-left { text-align:left; }
.text-right { text-align:right; }
.text-center, center { text-align:center; }
.pull-left { float:left !important; }
.pull-right { float:right !important; }
.hidden-print { display:block; }
.img-responsive { display:block; max-width:100%; height:auto; }
.img-circle { border-radius:999px; }

/* ── LEGACY PAGE TITLES ──────────────────────────────────────── */
.page-title {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-top:28px;
  margin-bottom:24px;
}

.page-title .title-env .title {
  margin:0;
  font-size:24px;
  font-weight:800;
  letter-spacing:-.04em;
  color:var(--text);
}

.page-title .description {
  margin:6px 0 0;
  font-size:13px;
  color:var(--text-sub);
}

.breadcrumb-env { margin-left:auto; }
.breadcrumb {
  list-style:none;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--bg-alt);
  box-shadow:var(--shadow-sm);
}

.breadcrumb > li {
  font-size:11px;
  color:var(--text-muted);
}

.breadcrumb > li + li::before {
  content:"/";
  margin-right:8px;
  color:var(--text-muted);
}

.breadcrumb a { color:var(--text-sub); }
.breadcrumb .active a,
.breadcrumb .active strong { color:var(--text); }

/* ── LEGACY PANELS / TABLES ──────────────────────────────────── */
.panel {
  position:relative;
  margin-bottom:16px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.panel.panel-loading::after {
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.36);
  backdrop-filter:blur(1px);
}

.panel-heading {
  display:flex;
  align-items:center;
  gap:16px;
  padding:16px 20px;
  border-bottom:1px solid var(--border);
  background:transparent;
}

.panel-title {
  margin:0;
  font-size:14px;
  font-weight:700;
  color:var(--text);
}

.panel-body { padding:20px; }
.panel-options {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.panel-options a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--bg-alt);
  color:var(--text-sub);
}

.panel-options a:hover { background:var(--accent-light); color:var(--accent); }

.table-responsive {
  overflow:auto;
  border-radius:0 0 var(--radius) var(--radius);
}

.table {
  width:100%;
  margin:0;
  border-collapse:collapse;
  background:transparent;
}

.table > thead > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding:12px 16px;
  vertical-align:middle;
  border-top:1px solid var(--border);
}

.table > thead > tr > th {
  border-top:0;
  border-bottom:1px solid var(--border);
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text-muted);
  white-space:nowrap;
  text-align: left;
}

.table-striped > tbody > tr:nth-of-type(odd) { background:transparent; }
.table tbody tr:hover { background:var(--bg-alt); }
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td { border-left:0; border-right:0; }

/* ── INVOICE DOCUMENT ────────────────────────────────────────── */
.invoice-document-page {
  width:100%;
  max-width:1120px;
  margin:0 auto 36px;
}

.invoice-toolbar {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin:0 0 16px;
}

.invoice-document {
  width:100%;
  max-width:210mm;
  min-height:297mm;
  margin:0 auto;
  padding:46px 50px;
  background:#fff;
  color:#173753;
  border:1px solid #dce8ef;
  border-radius:8px;
  box-shadow:0 16px 42px rgba(23,55,83,.14);
  font-size:13px;
  line-height:1.48;
}

.invoice-document * {
  box-sizing:border-box;
}

.invoice-document-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:34px;
  padding-bottom:28px;
  border-bottom:3px solid #173753;
}

.invoice-doc-logo {
  display:block;
  width:56mm;
  max-width:100%;
  height:auto;
  margin-bottom:18px;
}

.invoice-doc-company {
  color:#3d5871;
  font-size:12px;
  line-height:1.55;
}

.invoice-doc-title-block {
  min-width:230px;
  text-align:right;
}

.invoice-doc-kicker,
.invoice-doc-label {
  color:#8fa3b8;
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}

.invoice-doc-title-block h2 {
  margin:6px 0 12px;
  color:#173753;
  font-size:26px;
  font-weight:800;
  line-height:1.16;
  letter-spacing:0;
}

.invoice-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}

.invoice-status.is-paid {
  background:#e5f7f8;
  color:#007f8b;
}

.invoice-status.is-open {
  background:#f9e6f1;
  color:#b33c86;
}

.invoice-document-meta {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin:24px 0 30px;
}

.invoice-document-meta > div {
  padding:14px 16px;
  background:#f7f9fb;
  border:1px solid #dce8ef;
  border-radius:8px;
}

.invoice-document-meta span,
.invoice-summary-row span,
.invoice-doc-meta-row span {
  display:block;
  color:#8fa3b8;
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}

.invoice-document-meta strong {
  display:block;
  margin-top:4px;
  color:#173753;
  font-size:14px;
  font-weight:800;
}

.invoice-address-grid {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  gap:18px;
  margin-bottom:30px;
}

.invoice-info-card {
  min-height:176px;
  padding:18px;
  border:1px solid #dce8ef;
  border-radius:8px;
  background:#fff;
}

.invoice-doc-address {
  margin-top:12px;
  color:#173753;
  font-size:14px;
  font-weight:700;
  line-height:1.55;
}

.invoice-doc-address div + div {
  margin-top:2px;
}

.invoice-doc-meta {
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #dce8ef;
}

.invoice-doc-meta-compact {
  margin-top:12px;
  padding-top:0;
  border-top:0;
}

.invoice-doc-meta-row {
  display:grid;
  grid-template-columns:112px minmax(0, 1fr);
  gap:12px;
  align-items:start;
  padding:6px 0;
}

.invoice-doc-meta-row + .invoice-doc-meta-row {
  border-top:1px solid #eef5f8;
}

.invoice-doc-meta-row strong {
  color:#173753;
  font-size:12px;
  font-weight:800;
  word-break:break-word;
}

.invoice-items {
  width:100%;
  border-collapse:collapse;
  margin-top:6px;
  border:1px solid #dce8ef;
  border-radius:8px;
  overflow:hidden;
}

.invoice-items th {
  padding:12px 14px;
  background:#173753;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
  text-align:left;
  text-transform:uppercase;
}

.invoice-items td {
  padding:16px 14px;
  border-top:1px solid #dce8ef;
  color:#173753;
  vertical-align:top;
}

.invoice-items td strong {
  display:block;
  margin-bottom:4px;
  font-size:13px;
  font-weight:800;
}

.invoice-items td span {
  display:block;
  color:#3d5871;
  font-size:12px;
}

.invoice-items .invoice-num {
  text-align:right;
  white-space:nowrap;
}

.invoice-summary {
  width:min(100%, 340px);
  margin:24px 0 0 auto;
  border:1px solid #dce8ef;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}

.invoice-summary-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:12px 16px;
}

.invoice-summary-row + .invoice-summary-row {
  border-top:1px solid #dce8ef;
}

.invoice-summary-row strong {
  color:#173753;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
}

.invoice-summary-total {
  background:#e5f7f8;
}

.invoice-summary-total span,
.invoice-summary-total strong {
  color:#007f8b;
  font-size:16px;
}

.invoice-note {
  display:grid;
  grid-template-columns:140px minmax(0, 1fr);
  gap:18px;
  margin-top:34px;
  padding:16px 18px;
  border:1px solid #dce8ef;
  border-radius:8px;
  background:#f7f9fb;
}

.invoice-note strong {
  color:#173753;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.invoice-note span {
  color:#3d5871;
  font-size:12px;
}

.invoice-document-footer {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-top:44px;
  padding-top:18px;
  border-top:1px solid #dce8ef;
  color:#3d5871;
  font-size:11px;
  line-height:1.5;
}

.invoice-document-footer strong,
.invoice-document-footer span {
  display:block;
}

.invoice-document-footer strong {
  color:#173753;
  font-size:12px;
  font-weight:800;
}

/* ── LEGACY FORMS ────────────────────────────────────────────── */
.form-group { margin-bottom:14px; }
.control-label { display:block; margin-bottom:6px; color:var(--text-sub); font-size:12px; font-weight:700; }

.form-control,
select.form-control,
textarea.form-control {
  width:100%;
  min-height:40px;
  padding:9px 13px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--bg-alt);
  color:var(--text);
  font-size:13px;
  box-shadow:none;
  transition:border-color .14s, background .14s;
}

textarea.form-control { min-height:120px; resize:vertical; }
.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  outline:none;
  border-color:var(--accent);
  background:var(--card);
  box-shadow:none;
}

.input-lg { min-height:46px; font-size:14px; }
.input-group { display:flex; width:100%; }
.input-group .form-control { border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-addon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  padding:0 12px;
  border:1px solid var(--border);
  border-right:0;
  border-radius:var(--radius-sm) 0 0 var(--radius-sm);
  background:var(--bg-alt);
  color:var(--text-muted);
}

.help-block { margin-top:6px; font-size:11px; color:var(--text-muted); }
.errors-container { margin-bottom:14px; }

/* ── LEGACY BUTTONS / LABELS ─────────────────────────────────── */
.btn-block { width:100%; justify-content:center; }
.btn-single { padding-left:14px; padding-right:14px; }
.btn-primary,
.btn-orange,
.btn-blue {
  background:var(--accent);
  color:#fff;
  border:0;
}

.btn-success {
  background:var(--success-light);
  color:var(--success);
  border:1px solid color-mix(in oklch,var(--success) 20%,transparent);
}

.btn-danger,
.btn-red {
  background:var(--danger-light);
  color:var(--danger);
  border:1px solid color-mix(in oklch,var(--danger) 20%,transparent);
}

.btn-warning,
.btn-orange.btn-warning {
  background:var(--warning-light);
  color:var(--warning);
  border:1px solid color-mix(in oklch,var(--warning) 20%,transparent);
}

.btn-white {
  background:var(--card);
  color:var(--text-sub);
  border:1px solid var(--border);
}

.btn-secondary,
.btn-info {
  background:var(--bg-alt);
  color:var(--text-sub);
  border:1px solid var(--border);
}

.btn-small { padding:5px 10px; font-size:11px; }
.btn-unstyled {
  padding:0;
  border:0;
  background:none;
  color:inherit;
  box-shadow:none;
}

.btn-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

/* ── BOOTSTRAP MODALS ─────────────────────────────────────────── */
.modal {
  position:fixed;
  inset:0;
  z-index:1040;
  display:none;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  outline:0;
}

.modal.in {
  display:block;
}

.modal.fade .modal-dialog {
  transform:translate3d(0, 18px, 0);
  transition:transform .2s ease, opacity .2s ease;
  opacity:0;
}

.modal.in .modal-dialog {
  transform:translate3d(0, 0, 0);
  opacity:1;
}

.modal-dialog {
  position:relative;
  z-index:1031;
  width:auto;
  max-width:640px;
  margin:56px auto;
  padding:0 16px;
  box-sizing:border-box;
  z-index: 1031;
}

.modal-content {
  position:relative;
  display:flex;
  flex-direction:column;
  width:100%;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-lg);
  background-clip:padding-box;
  overflow:hidden;
}

.modal-header,
.modal-body,
.modal-footer {
  padding:18px 22px;
}

.modal-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--border);
  background:var(--card);
}

.modal-title {
  margin:0;
  font-size:18px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--text);
}

.modal-body {
  color:var(--text-sub);
  background:var(--card);
}

.modal-footer {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  border-top:1px solid var(--border);
  background:var(--card);
}

.modal-body > :first-child,
.modal-body form > :first-child,
.modal-body .table:first-child {
  margin-top:0;
}

.modal-body > :last-child,
.modal-body form > :last-child {
  margin-bottom:0;
}

.modal-body form {
  margin:0;
}

.modal .form-group:last-child {
  margin-bottom:0;
}

.modal .form-group-separator {
  height:1px;
  margin:14px 0;
  background:linear-gradient(90deg, transparent 0%, var(--border) 12%, var(--border) 88%, transparent 100%);
}

.modal .control-label {
  margin-bottom:8px;
  color:var(--text);
}

.modal .help-block {
  margin-bottom:0;
}

.modal .form-control,
.modal select.form-control,
.modal textarea.form-control {
  background:var(--card);
}

.modal .input-group-addon {
  background:color-mix(in oklch, var(--bg-alt) 80%, var(--card));
}

.modal .table {
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  background:var(--card);
}

.modal .table > thead > tr > th,
.modal .table > tbody > tr > td,
.modal .table > tfoot > tr > td {
  padding:10px 12px;
}

.modal .table > tbody > tr:hover {
  background:color-mix(in oklch, var(--bg-alt) 72%, white 28%);
}

.modal .btn {
  min-height:40px;
}

.modal .modal-footer .btn {
  min-width:112px;
}

.modal .btn.btn-primary,
.modal .btn.btn-orange,
.modal .btn.btn-blue {
  box-shadow:0 10px 24px color-mix(in oklch, var(--accent) 22%, transparent);
}

.modal-backdrop {
  position:fixed;
  inset:0;
  z-index:1030;
  background:rgba(15, 23, 42, .56);
  backdrop-filter:blur(6px);
  opacity:0;
  transition:opacity .18s ease;
}

.modal-backdrop.in {
  opacity:1;
}

body.modal-open {
  overflow:hidden;
}

.close {
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text-muted);
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
  margin:-2px 0 0;
}

.close:hover {
  color:var(--text);
}

.label,
.label-red {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
}

.label-red {
  background:var(--danger-light);
  color:var(--danger);
}

.badge-white,
.badge-grey {
  background:var(--bg-alt);
  color:var(--text-sub);
}

.badge-orange {
  background:var(--warning-light);
  color:var(--warning);
}

/* ── LEGACY ALERTS / SEARCH ──────────────────────────────────── */
.alert {
  margin-bottom:16px;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:var(--bg-alt);
  color:var(--text-sub);
}

.alert-danger {
  background:var(--danger-light);
  border-color:color-mix(in oklch,var(--danger) 18%,transparent);
  color:var(--danger);
}

.alert-success {
  background:var(--success-light);
  border-color:color-mix(in oklch,var(--success) 18%,transparent);
  color:var(--success);
}

.alert-warning {
  background:var(--warning-light);
  border-color:color-mix(in oklch,var(--warning) 18%,transparent);
  color:var(--warning);
}

.search-env {
  margin-bottom:18px;
  padding:18px 20px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card);
  box-shadow:var(--shadow);
}

.search-env h4 {
  margin:0 0 10px;
  font-size:14px;
  font-weight:700;
  color:var(--text);
}

.search-env p { margin:0; color:var(--text-muted); font-size:12px; }
.search-env-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.search-env-head h4 {
  margin:0;
}

.search-env-count {
  white-space:nowrap;
}

.search-inline-form {
  position:relative;
}

.search-inline-form .form-control {
  padding-right:56px;
}

.search-inline-button {
  position:absolute;
  top:50%;
  right:10px;
  width:38px;
  height:38px;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:var(--bg-alt);
  color:var(--accent);
  transition:background .14s, color .14s, transform .14s;
}

.search-inline-button:hover {
  background:var(--accent-light);
  color:var(--accent);
  transform:translateY(-50%) scale(1.02);
}

.search-inline-button i {
  font-size:15px;
  line-height:1;
}
.mailbox-env { margin-bottom:18px; }

/* ── AUTH / TERMS ADAPTERS ───────────────────────────────────── */
.login-container {
  max-width:1180px;
  margin:0 auto;
  padding:48px 24px 36px;
}

.login-container .logo,
.container.margin .logo {
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin-bottom:22px;
}

.auth-brand-row {
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 0 24px;
}

.brand-logo-link {
  display:flex;
  justify-content:center;
  align-items:center;
  width:min(100%, var(--brand-logo-width, 280px));
  max-width:100%;
}

.brand-logo-image {
  display:block;
  width:200px;
  max-width:100%;
  height:auto;
}

.invoice-logo-image {
  display:block;
  max-width:100%;
  height:auto;
}

.login-form,
.terms-page .login-header,
.container.margin .panel {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-lg);
}

.login-form { padding:28px; }

.login-header {
  margin-bottom:20px;
  color:var(--text);
}

.login-header h2,
.login-header h4 {
  margin:0 0 8px;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.04em;
}

.login-header p,
.terms-page .login-header p,
.panel-body p,
.container.margin .panel p {
  margin:0 0 12px;
  color:var(--text-sub);
}

.terms-page .login-header {
  max-width:1100px;
  margin:0 auto;
  padding:28px;
}

.terms-page .login-header p strong { color:var(--text); }
.login-footer,
.main-footer {
  text-align:center;
  margin-top:16px;
  color:var(--text-muted);
}

.footer-inner,
.info-links { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.footer-text { font-size:11px; color:var(--text-muted); }

/* ── PLUGIN ADAPTERS ─────────────────────────────────────────── */
.bootstrap-tagsinput {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  width:100%;
  min-height:40px;
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--bg-alt);
  box-shadow:none;
}

.bootstrap-tagsinput input {
  min-width:120px;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text);
}

.bootstrap-tagsinput .tag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 9px;
  border-radius:999px;
  background:var(--accent-light);
  color:var(--accent);
  font-size:11px;
  font-weight:700;
}

.uk-htmleditor,
.uk-htmleditor iframe,
.uk-htmleditor-content {
  border-radius:var(--radius-sm);
}

.uk-htmleditor-navbar {
  background:var(--bg-alt);
  border-color:var(--border);
}

.uk-htmleditor-content {
  background:var(--card);
  color:#111827;
}

/* ── LINECONS FALLBACKS ──────────────────────────────────────── */
[class^="linecons-"]::before,
[class*=" linecons-"]::before {
  display:inline-block;
  font:normal normal normal 14px/1 FontAwesome;
  text-rendering:auto;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.linecons-mail::before { content:"\f0e0"; }
.linecons-database::before { content:"\f1c0"; }
.linecons-cog::before { content:"\f013"; }
.linecons-money::before { content:"\f0d6"; }
.linecons-comment::before { content:"\f075"; }
.linecons-heart::before { content:"\f004"; }
.linecons-user::before { content:"\f007"; }
.linecons-lock::before { content:"\f023"; }
.linecons-search::before { content:"\f002"; }
.linecons-shop::before { content:"\f07a"; }
.linecons-thumbs-up::before { content:"\f164"; }
.linecons-attach::before { content:"\f0c6"; }

/* ── SETTINGS / SUPPORT / TEMPLATES / RESELLER ──────────────── */
.status-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.status-pill.is-live {
  color:var(--success);
  background:var(--success-light);
}

.status-pill.is-warning {
  color:var(--warning);
  background:var(--warning-light);
}

.settings-shell,
.template-editor-layout {
  display:block;
}

.settings-main-grid,
.template-editor-layout {
  display:grid;
  grid-template-columns:minmax(0, 1.6fr) minmax(300px, .82fr);
  gap:18px;
}

.settings-main-column,
.settings-side-column,
.template-main-column,
.template-side-column {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.settings-panel,
.template-editor-card,
.template-side-card,
.reseller-analytics-card,
.support-hero-card,
.support-info-card,
.support-step-card,
.support-doc-card {
  border-radius:18px;
}

.settings-panel .panel-heading,
.template-editor-card .panel-heading,
.template-side-card .panel-heading,
.reseller-analytics-card .panel-heading,
.support-hero-card .panel-heading,
.support-info-card .panel-heading,
.support-step-card .panel-heading,
.support-doc-card .panel-heading {
  align-items:flex-start;
}

.settings-panel .panel-body,
.template-editor-card .panel-body,
.template-side-card .panel-body,
.reseller-analytics-card .panel-body,
.support-hero-card .panel-body,
.support-info-card .panel-body,
.support-step-card .panel-body,
.support-doc-card .panel-body {
  padding:22px;
}

.settings-panel-copy,
.template-panel-copy,
.reseller-panel-copy,
.support-info-copy,
.template-side-note {
  margin-top:6px;
  font-size:13px;
  line-height:1.7;
  color:var(--text-sub);
}

.settings-form-grid,
.template-form-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.settings-form-grid-single {
  grid-template-columns:1fr;
}

.settings-field,
.template-form-field {
  min-width:0;
}

.settings-field-full {
  grid-column:1 / -1;
}

.settings-panel-highlight {
  background:color-mix(in srgb, var(--accent) 4%, var(--card));
}

.settings-eyebrow,
.support-hero-eyebrow {
  margin-bottom:10px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent);
}

.settings-highlight-title,
.support-hero-title {
  margin:0;
  font-size:30px;
  line-height:1.08;
  letter-spacing:-.05em;
  color:var(--text);
}

.settings-meta-list,
.support-meta-list {
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
  list-style:none;
}

.settings-meta-list.settings-meta-list-compact {
  margin-top:10px;
  gap:8px;
}

.settings-meta-list li,
.support-meta-list li {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.settings-meta-list span,
.support-meta-list span {
  color:var(--text-muted);
  font-size:12px;
}

.settings-meta-list strong,
.support-meta-list strong {
  color:var(--text);
  font-size:13px;
  font-weight:700;
  text-align:right;
  word-break:break-word;
}

.settings-action-bar,
.template-action-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
  box-shadow:var(--shadow);
}

.settings-action-title {
  font-size:15px;
  font-weight:800;
  color:var(--text);
}

.support-layout {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.support-hero-card {
  overflow:hidden;
  background:color-mix(in srgb, var(--accent) 4%, var(--card));
}

.support-hero-card-soft {
  background:color-mix(in srgb, var(--warning) 4%, var(--card));
}

.support-hero-copy {
  max-width:760px;
  margin-top:12px;
  font-size:15px;
  line-height:1.75;
  color:var(--text-sub);
}

.support-hero-actions,
.support-quick-links {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.support-card-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:18px;
}

.support-card-grid-wide {
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.support-info-block {
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--text-sub);
  line-height:1.7;
}

.support-info-block strong {
  color:var(--text);
  font-size:16px;
}

.support-code-block {
  margin-top:16px;
  padding:18px;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
  background:#173753;
  color:#dbeafe;
  font-size:12px;
  line-height:1.7;
}

.support-step-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.support-step-card {
  overflow:hidden;
}

.support-step-image {
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--border);
  margin-bottom:16px;
}

.support-step-index {
  display:inline-flex;
  margin-bottom:10px;
  padding:5px 10px;
  border-radius:999px;
  background:var(--accent-light);
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.reseller-dashboard-grid {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.reseller-kpi-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-bottom:18px;
}

.reseller-kpi-card,
.reseller-chart-card {
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--card);
}

.reseller-kpi-card {
  padding:18px;
}

.reseller-kpi-label {
  font-size:12px;
  font-weight:700;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.reseller-kpi-value {
  margin-top:10px;
  font-size:34px;
  line-height:1;
  letter-spacing:-.05em;
  font-weight:800;
  color:var(--text);
}

.reseller-kpi-note {
  margin-top:10px;
  font-size:12px;
  line-height:1.6;
  color:var(--text-sub);
}

.reseller-chart-grid {
  display:grid;
  grid-template-columns:1.2fr .9fr;
  gap:14px;
}

.reseller-chart-card {
  padding:18px;
}

.reseller-chart-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}

.reseller-chart-head h4 {
  margin:0;
  font-size:16px;
  font-weight:800;
  color:var(--text);
}

.reseller-chart-head span {
  font-size:12px;
  color:var(--text-sub);
  line-height:1.6;
  text-align:right;
}

.reseller-chart-slot {
  padding-top:18px;
}

.reseller-note-card {
  padding-top:18px;
}

.reseller-note-metric {
  font-size:34px;
  line-height:1;
  letter-spacing:-.05em;
  font-weight:800;
  color:var(--text);
}

.reseller-note-label {
  margin-top:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.reseller-note-card p {
  margin:14px 0 0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.reseller-note-list {
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
  padding:18px 0 0;
}

.reseller-note-list li {
  position:relative;
  padding-left:18px;
  font-size:13px;
  line-height:1.7;
  color:var(--text-sub);
}

.reseller-note-list li::before {
  content:"";
  position:absolute;
  top:.6em;
  left:0;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--accent);
}

.chart-empty-state {
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--text-sub);
  font-size:13px;
}

.smtp-widget-host {
  min-height:140px;
}

.smtp-dashboard-ai-inline-host {
  margin-bottom:28px;
}

.smtp-widget-state {
  min-height:180px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--card);
  box-shadow:var(--shadow-soft);
  padding:18px;
}

.smtp-widget-state-error {
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  text-align:center;
}

.smtp-widget-state-title {
  font-size:15px;
  font-weight:800;
  color:var(--text);
}

.smtp-widget-state-copy {
  font-size:13px;
  line-height:1.7;
  color:var(--text-sub);
}

.smtp-widget-loading-grid {
  display:grid;
  gap:14px;
}

.smtp-widget-loading-grid.cols-2 {
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.smtp-widget-loading-grid.cols-4 {
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.smtp-widget-loading-card {
  min-height:160px;
}

.smtp-widget-loading-line {
  display:block;
  height:12px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(148,163,184,.10) 0%, rgba(148,163,184,.22) 50%, rgba(148,163,184,.10) 100%);
  background-size:200% 100%;
  animation:smtpWidgetShimmer 1.4s linear infinite;
}

.smtp-widget-loading-line + .smtp-widget-loading-line {
  margin-top:12px;
}

.smtp-widget-loading-line.short {
  width:34%;
}

.smtp-widget-loading-line.medium {
  width:58%;
}

.smtp-widget-loading-line.long {
  width:78%;
}

.smtp-widget-loading-line.tall {
  height:18px;
}

.smtp-widget-loading-block {
  height:220px;
  margin-top:18px;
  border-radius:14px;
  background:linear-gradient(90deg, rgba(148,163,184,.10) 0%, rgba(148,163,184,.22) 50%, rgba(148,163,184,.10) 100%);
  background-size:200% 100%;
  animation:smtpWidgetShimmer 1.4s linear infinite;
}

.smtp-widget-loading-card .smtp-widget-loading-block {
  height:160px;
}

@keyframes smtpWidgetShimmer {
  0% { background-position:200% 0; }
  100% { background-position:-200% 0; }
}

.template-editor-layout {
  align-items:start;
}

.template-chip-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.template-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--card);
  color:var(--text-sub);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:background .14s, color .14s, border-color .14s, transform .14s;
}

.template-chip:hover,
.template-chip.is-active {
  color:var(--accent);
  background:var(--accent-light);
  border-color:color-mix(in oklch, var(--accent) 18%, var(--border));
  transform:translateY(-1px);
}

.template-chip-soft {
  background:var(--bg-alt);
}

.panel-actions-inline {
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

.template-toggle {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--card);
  cursor:pointer;
}

.template-toggle + .template-toggle {
  margin-top:10px;
}

.template-toggle input {
  margin-top:3px;
  flex-shrink:0;
}

.template-toggle strong {
  display:block;
  color:var(--text);
  font-size:13px;
  font-weight:800;
}

.template-toggle small {
  display:block;
  margin-top:4px;
  color:var(--text-sub);
  font-size:12px;
  line-height:1.6;
}

.email-workspace {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.email-workspace-toolbar {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.email-toolbar-group {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.email-toolbar-label {
  margin-right:2px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.email-image-toolbar .js-email-image-upload {
  display:none;
}

.email-image-toolbar .template-chip {
  gap:7px;
}

.email-image-upload-state {
  max-width:260px;
  overflow:hidden;
  color:var(--text-muted);
  font-size:12px;
  font-weight:700;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.email-image-upload-state.is-loading {
  color:var(--accent);
}

.email-image-upload-state.is-success {
  color:var(--success);
}

.email-image-upload-state.is-error {
  color:var(--danger);
}

.email-editor-grid {
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(320px, .9fr);
  gap:18px;
  align-items:start;
}

.email-editor-grid.is-stack {
  grid-template-columns:1fr;
}

.email-code-column,
.email-preview-column {
  min-width:0;
}

.email-code-input,
.email-support-input {
  resize:vertical;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  line-height:1.7;
  background:color-mix(in oklch, var(--bg-alt) 72%, var(--card));
}

.email-code-input {
  min-height:560px;
}

.CodeMirror {
  min-height:560px;
  border:1px solid var(--border);
  border-radius:16px;
  background:color-mix(in oklch, var(--bg-alt) 72%, var(--card));
  color:var(--text);
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  line-height:1.7;
}

.CodeMirror-scroll {
  min-height:560px;
}

.CodeMirror-gutters {
  border-right:1px solid color-mix(in oklch, var(--border) 92%, transparent);
  background:transparent;
}

.CodeMirror-linenumber {
  color:var(--text-muted);
}

.CodeMirror-cursor {
  border-left-color:var(--accent);
}

.email-support-input {
  min-height:190px;
}

.email-support-input-lg {
  min-height:420px;
}

.email-preview-shell {
  width:100%;
  max-width:760px;
  margin-left:auto;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
  box-shadow:var(--shadow);
  overflow:hidden;
  transition:max-width .18s ease;
}

.email-preview-shell.is-desktop {
  max-width:760px;
}

.email-preview-shell.is-mobile {
  max-width:390px;
}

.email-preview-shell.is-wide {
  max-width:100%;
}

.email-preview-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  font-size:12px;
  color:var(--text-sub);
}

.email-preview-header strong {
  font-size:13px;
  font-weight:800;
  color:var(--text);
}

.email-preview-frame {
  display:block;
  width:100%;
  min-height:620px;
  border:0;
  background:#ffffff;
}

.smtp-log-modal {
  width:95%;
  max-width:980px;
}

.modal-loading-state {
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:14px;
  color:var(--text-sub);
}

.log-history-shell {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.log-history-header-card {
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
  padding:20px;
}

.log-history-user {
  display:flex;
  align-items:center;
  gap:14px;
}

.log-history-avatar {
  width:56px;
  height:56px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
}

.log-history-overline {
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.log-history-identity {
  margin-top:4px;
  font-size:18px;
  font-weight:800;
  color:var(--text);
}

.log-history-time {
  margin-top:6px;
  font-size:12px;
  color:var(--text-sub);
}

.log-history-summary-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}

.log-history-summary-item {
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--card);
}

.log-history-summary-item span {
  display:block;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.log-history-summary-item strong {
  display:block;
  margin-top:7px;
  font-size:13px;
  line-height:1.6;
  color:var(--text);
  word-break:break-word;
}

.log-history-timeline {
  display:flex;
  flex-direction:column;
  gap:14px;
}

.log-history-event {
  display:grid;
  grid-template-columns:44px minmax(0, 1fr);
  gap:14px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
}

.log-history-event-icon {
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.log-history-event.is-success .log-history-event-icon {
  color:var(--success);
  background:var(--success-light);
}

.log-history-event.is-warning .log-history-event-icon {
  color:var(--warning);
  background:var(--warning-light);
}

.log-history-event.is-danger .log-history-event-icon {
  color:var(--danger);
  background:var(--danger-light);
}

.log-history-event.is-brand .log-history-event-icon {
  color:var(--accent);
  background:var(--accent-light);
}

.log-history-event.is-neutral .log-history-event-icon {
  color:var(--text-sub);
  background:var(--bg-alt);
}

.log-history-event-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.log-history-event-top h5 {
  margin:0;
  font-size:16px;
  font-weight:800;
  color:var(--text);
}

.log-history-event-top span {
  font-size:12px;
  color:var(--text-muted);
  white-space:nowrap;
}

.log-history-event-body p {
  margin:8px 0 0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.log-history-event-note {
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--bg-alt);
  font-size:12px;
  line-height:1.6;
  color:var(--text-sub);
  word-break:break-word;
}

.retry-history-shell {
  display:flex;
  flex-direction:column;
  gap:16px;
}

.retry-history-card {
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--card);
}

.retry-history-icon {
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-light);
  color:var(--accent);
  flex-shrink:0;
}

.retry-history-card h5 {
  margin:0;
  font-size:16px;
  font-weight:800;
  color:var(--text);
}

.retry-history-card p {
  margin:8px 0 0;
  font-size:13px;
  line-height:1.75;
  color:var(--text-sub);
}

.retry-history-meta {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.retry-history-meta div {
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--card);
}

.retry-history-meta span {
  display:block;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.retry-history-meta strong {
  display:block;
  margin-top:7px;
  font-size:13px;
  line-height:1.6;
  color:var(--text);
  word-break:break-word;
}

.email-support-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.email-plain-card {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.template-danger-card .btn-danger {
  margin-top:8px;
}

.smtp-send-rhythm-card {
  padding-top:28px;
  overflow:hidden;
}

.smtp-send-rhythm {
  display:flex;
  flex-direction:column;
  gap:22px;
}

.smtp-send-rhythm-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.smtp-send-rhythm-kicker {
  margin:0 0 8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.smtp-send-rhythm-title {
  margin:0;
  font-size: clamp(18px, 2.0vw, 26px);
  line-height:1.05;
  letter-spacing:-.04em;
  color:var(--text);
}

.smtp-send-rhythm-subtitle {
  margin:10px 0 0;
  max-width:680px;
  color:var(--text-sub);
  font-size:15px;
  line-height:1.7;
}

.smtp-send-rhythm-insights {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.smtp-send-rhythm-insight-card {
  min-width:0;
  padding:18px 18px 16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
}

.smtp-send-rhythm-insight-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.smtp-send-rhythm-insight-badge {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  background:color-mix(in srgb, var(--accent) 10%, var(--card));
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.smtp-send-rhythm-insight-badge svg {
  width:14px;
  height:14px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
}

.smtp-send-rhythm-insight-caption {
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--text-muted);
  text-transform:uppercase;
  text-align:right;
}

.smtp-send-rhythm-insight-value {
  margin-bottom:8px;
  font-size:clamp(20px, 2vw, 28px);
  font-weight:800;
  line-height:1.1;
  letter-spacing:-.04em;
  color:var(--text);
  word-break:break-word;
}

.smtp-send-rhythm-insight-copy {
  color:var(--text-sub);
  font-size:13px;
  line-height:1.65;
}

.smtp-send-rhythm-block {
  padding-top:24px;
  border-top:1px solid var(--border);
}

.smtp-send-rhythm-block-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.smtp-send-rhythm-block-head h4 {
  margin:0;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--text);
}

.smtp-send-rhythm-block-head p {
  margin:6px 0 0;
  color:var(--text-sub);
  font-size:14px;
}

.smtp-send-rhythm-block-head.is-actions {
  align-items:flex-start;
}

.smtp-send-rhythm-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.smtp-send-rhythm-toggle {
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg-alt);
  color:var(--text-sub);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  user-select:none;
}

.smtp-send-rhythm-toggle input {
  display:none;
}

.smtp-send-rhythm-toggle-track {
  position:relative;
  width:36px;
  height:20px;
  border-radius:999px;
  background:rgba(148,163,184,.32);
  flex-shrink:0;
  transition:background .14s ease;
}

.smtp-send-rhythm-toggle-track::after {
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.2);
  transition:transform .14s ease;
}

.smtp-send-rhythm-toggle input:checked + .smtp-send-rhythm-toggle-track {
  background:linear-gradient(135deg, var(--accent), var(--purple));
}

.smtp-send-rhythm-toggle input:checked + .smtp-send-rhythm-toggle-track::after {
  transform:translateX(16px);
}

.smtp-send-rhythm-weekly-header {
  display:grid;
  grid-template-columns:96px minmax(0, 1fr) 120px;
  gap:14px;
  padding:0 4px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--text-muted);
  text-transform:uppercase;
}

.smtp-send-rhythm-weekly-header .is-right {
  text-align:right;
}

.smtp-send-rhythm-weekday-strip {
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:6px;
  align-items:center;
}

.smtp-send-rhythm-weekly-list {
  display:grid;
  gap:12px;
}

.smtp-send-rhythm-week-row {
  display:grid;
  grid-template-columns:96px minmax(0, 1fr) 120px;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--bg-alt);
}

.smtp-send-rhythm-week-label {
  font-size:15px;
  font-weight:800;
  color:var(--text);
}

.smtp-send-rhythm-week-bar {
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:6px;
  align-items:stretch;
}

.smtp-send-rhythm-week-segment {
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-height:56px;
  padding:8px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.16);
  border-radius:12px;
  cursor:default;
  transition:transform .14s ease, border-color .14s ease;
}

.smtp-send-rhythm-week-segment:hover {
  transform:translateY(-1px);
  border-color:color-mix(in srgb, var(--accent) 28%, var(--border));
}

.smtp-send-rhythm-week-segment::before {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.28), transparent 42%);
  pointer-events:none;
}

.smtp-send-rhythm-week-segment-day {
  position:absolute;
  top:8px;
  left:8px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  color:rgba(15,23,42,.55);
  text-transform:uppercase;
}

[data-theme="midnight"] .smtp-send-rhythm-week-segment-day,
[data-theme="storm"] .smtp-send-rhythm-week-segment-day {
  color:rgba(241,245,249,.55);
}

.smtp-send-rhythm-week-segment-value {
  position:relative;
  z-index:1;
  font-size:11px;
  font-weight:800;
  color:var(--text);
  opacity:0;
  transition:opacity .14s ease;
}

.smtp-send-rhythm-week-segment.show-value .smtp-send-rhythm-week-segment-value,
.smtp-send-rhythm-week-segment:hover .smtp-send-rhythm-week-segment-value {
  opacity:.92;
}

.smtp-send-rhythm-week-segment-spike {
  position:absolute;
  top:8px;
  right:8px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 4px rgba(255,255,255,.32);
}

.smtp-send-rhythm-week-total {
  text-align:right;
}

.smtp-send-rhythm-week-total strong {
  display:block;
  font-size:18px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--text);
}

.smtp-send-rhythm-week-total span {
  display:block;
  margin-top:4px;
  font-size:12px;
  color:var(--text-muted);
}

.smtp-send-rhythm-hourly-layout {
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(280px, .65fr);
  gap:18px;
  align-items:start;
}

.smtp-send-rhythm-matrix-shell {
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--bg-alt);
  overflow:hidden;
}

.smtp-send-rhythm-matrix-scroll {
  max-height:720px;
  overflow:auto;
}

.smtp-send-rhythm-hourly-grid {
  display:grid;
  grid-template-columns:88px repeat(7, minmax(0, 1fr));
  gap:4px;
  align-items:center;
  padding:14px;
}

.smtp-send-rhythm-colhead {
  position:sticky;
  top:0;
  z-index:2;
  padding:10px 4px 12px;
  border-bottom:1px solid var(--border);
  background:color-mix(in srgb, var(--bg-alt) 92%, transparent);
  backdrop-filter:blur(10px);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--text-muted);
  text-align:center;
  text-transform:uppercase;
}

.smtp-send-rhythm-matrix-corner {
  position:sticky;
  top:0;
  left:0;
  z-index:3;
  background:color-mix(in srgb, var(--bg-alt) 92%, transparent);
}

.smtp-send-rhythm-rowhead {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-height:26px;
  padding-right:10px;
  font-size:12px;
  font-weight:800;
  color:var(--text-sub);
  text-align:right;
}

.smtp-send-rhythm-rowhead.group-start::before {
  content:attr(data-group);
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  padding:4px 7px;
  border-radius:999px;
  background:color-mix(in srgb, var(--accent) 10%, var(--card));
  color:var(--accent);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.smtp-send-rhythm-cell {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0;
  overflow:hidden;
  appearance:none;
  border:1px solid rgba(148,163,184,.10);
  border-radius:8px;
  cursor:pointer;
  user-select:none;
  transition:transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.smtp-send-rhythm-cell:hover {
  transform:translateY(-1px);
  border-color:color-mix(in srgb, var(--accent) 26%, var(--border));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
}

.smtp-send-rhythm-cell.is-selected {
  border-color:color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent), inset 0 0 0 1px rgba(255,255,255,.22);
}

.smtp-send-rhythm-cell-value {
  position:relative;
  z-index:1;
  padding:0 3px;
  font-size:10px;
  font-weight:800;
  color:rgba(15,23,42,.86);
  opacity:0;
  transition:opacity .12s ease;
}

[data-theme="midnight"] .smtp-send-rhythm-cell-value,
[data-theme="storm"] .smtp-send-rhythm-cell-value {
  color:rgba(241,245,249,.9);
}

.smtp-send-rhythm-cell.show-value .smtp-send-rhythm-cell-value,
.smtp-send-rhythm-cell:hover .smtp-send-rhythm-cell-value,
.smtp-send-rhythm-cell.is-selected .smtp-send-rhythm-cell-value {
  opacity:1;
}

.smtp-send-rhythm-cell.peak::after {
  content:"Peak";
  position:absolute;
  top:4px;
  right:4px;
  padding:2px 5px;
  border-radius:999px;
  background:rgba(15,23,42,.86);
  color:#fff;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.smtp-send-rhythm-selection {
  min-height:100%;
  padding:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
}

.smtp-send-rhythm-selection-kicker {
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
  padding:6px 10px;
  border-radius:999px;
  background:color-mix(in srgb, var(--accent) 10%, var(--card));
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.smtp-send-rhythm-selection-title {
  margin:0;
  font-size:22px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:-.03em;
  color:var(--text);
}

.smtp-send-rhythm-selection-copy {
  margin:10px 0 18px;
  color:var(--text-sub);
  font-size:14px;
  line-height:1.7;
}

.smtp-send-rhythm-selection-stats {
  display:grid;
  gap:10px;
}

.smtp-send-rhythm-selection-stat {
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
  border-top:1px solid var(--border);
}

.smtp-send-rhythm-selection-stat:first-child {
  padding-top:0;
  border-top:0;
}

.smtp-send-rhythm-selection-stat span {
  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.10em;
}

.smtp-send-rhythm-selection-stat strong {
  color:var(--text);
  font-size:14px;
  text-align:right;
}

.smtp-send-rhythm-selection-note {
  margin-top:18px;
  padding:14px;
  border-radius:14px;
  background:color-mix(in srgb, var(--accent) 6%, var(--card));
  color:var(--text-sub);
  font-size:13px;
  line-height:1.65;
}

.smtp-send-rhythm-summary {
  padding:18px 20px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
}

.smtp-send-rhythm-summary-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.smtp-send-rhythm-summary-pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:color-mix(in srgb, var(--success) 10%, var(--card));
  color:var(--success);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.smtp-send-rhythm-summary-pill::before {
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:currentColor;
}

.smtp-send-rhythm-summary-meta {
  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
}

.smtp-send-rhythm-summary-lead {
  margin:0 0 12px;
  color:var(--text);
  font-size:15px;
  line-height:1.7;
}

.smtp-send-rhythm-summary-list {
  margin:0;
  padding-left:18px;
  color:var(--text-sub);
  font-size:14px;
  line-height:1.75;
}

.smtp-send-rhythm-summary-list li + li {
  margin-top:6px;
}

.smtp-send-rhythm-tooltip {
  position:fixed;
  z-index:50;
  max-width:260px;
  padding:9px 12px;
  border-radius:12px;
  background:rgba(15,23,42,.94);
  color:#fff;
  font-size:12px;
  line-height:1.5;
  pointer-events:none;
  box-shadow:0 12px 30px rgba(15,23,42,.20);
  opacity:0;
  transform:translateY(6px);
  transition:opacity .1s ease, transform .1s ease;
}

.smtp-send-rhythm-tooltip.is-visible {
  opacity:1;
  transform:translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width:991px) {
  #nav-bar { height:auto; padding:14px 16px; flex-wrap:wrap; gap:12px; }
  #nav-bar.nav-hidden-mobile { transform:translateY(calc(-100% - 8px)); box-shadow:none; }
  .nav-links { order:3; width:100%; flex-wrap:wrap; }
  .nav-right { width:100%; justify-content:flex-end; flex-wrap:wrap; }
  .manager-v2 #dynamic_content > *:not(.page-inner):not(script):not(style) {
    margin-left:16px;
    margin-right:16px;
  }
  .app-footer { margin-left:16px; margin-right:16px; }
  .page-inner { padding:22px 16px; }
  .modal-dialog { margin:18px auto; padding:0 12px; }
  .modal-header,
  .modal-body,
  .modal-footer { padding:16px; }
  .stat-grid, .grid-2, .grid-3, .insights-grid, .kpi-grid, .smtp-dashboard-layout, .smtp-dashboard-secondary-grid, .smtp-dashboard-ai-grid { grid-template-columns:1fr; }
  .smtp-dashboard-section-intro { align-items:flex-start; }
  .smtp-dashboard-section-copy { text-align:left; max-width:none; }
  .settings-main-grid,
  .template-editor-layout,
  .support-card-grid,
  .support-card-grid-wide,
  .support-step-grid,
  .reseller-kpi-grid,
  .reseller-chart-grid,
  .settings-form-grid,
  .template-form-grid,
  .email-editor-grid,
  .email-support-grid,
  .smtp-send-rhythm-insights,
  .smtp-send-rhythm-hourly-layout { grid-template-columns:1fr; }
  .email-preview-shell { max-width:100%; }
  .smtp-send-rhythm-weekly-header,
  .smtp-send-rhythm-week-row { grid-template-columns:1fr; }
  .smtp-send-rhythm-week-total { text-align:left; }
  .smtp-send-rhythm-selection { min-height:auto; }
  .smtp-send-rhythm-hourly-grid {
    grid-template-columns:66px repeat(7, minmax(34px, 1fr));
    gap:3px;
    padding:10px;
  }
  .smtp-send-rhythm-cell { min-height:24px; }
  .smtp-send-rhythm-rowhead { font-size:11px; }
  .smtp-send-rhythm-colhead { font-size:10px; }
}

@media print {
  @page {
    size:A4;
    margin:12mm;
  }

  html,
  body {
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
    background:#fff !important;
    color:#173753 !important;
  }

  body:has(.invoice-document) * {
    visibility:hidden !important;
  }

  body:has(.invoice-document) .invoice-document,
  body:has(.invoice-document) .invoice-document * {
    visibility:visible !important;
  }

  body:has(.invoice-document) .page-title,
  body:has(.invoice-document) .invoice-toolbar,
  body:has(.invoice-document) #nav-bar,
  body:has(.invoice-document) .main-footer,
  body:has(.invoice-document) .breadcrumb-env,
  body:has(.invoice-document) .hidden-print {
    display:none !important;
  }

  body:has(.invoice-document) .invoice-document-page {
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body:has(.invoice-document) .invoice-document {
    position:absolute;
    top:0;
    left:0;
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  .invoice-document-header,
  .invoice-document-meta,
  .invoice-address-grid,
  .invoice-summary,
  .invoice-note,
  .invoice-document-footer {
    break-inside:avoid;
    page-break-inside:avoid;
  }

  .invoice-items tr {
    break-inside:avoid;
    page-break-inside:avoid;
  }
}

@media (max-width:767px) {
  .login-container { padding:28px 14px; }
  .auth-brand-row { margin-bottom:18px; }
  .login-container .brand-logo-link,
  .container.margin .brand-logo-link { width:min(74vw, 190px) !important; }
  .page-hd { flex-direction:column; gap:12px; }
  .page-hd > .btn,
  .page-hd > button { width:100%; justify-content:center; }
  .smtp-dashboard-actions { width:100%; justify-content:stretch; }
  .smtp-dashboard-actions .btn { flex:1; justify-content:center; min-width:0; }
  .card-pad { padding:18px 16px; }
  .card-hd { flex-wrap:wrap; gap:8px; }
  .card-hd > :last-child { width:100%; white-space:normal; }
  .page-title { flex-direction:column; gap:12px; }
  .breadcrumb-env { margin-left:0; }
  .invoice-toolbar { justify-content:stretch; flex-direction:column; }
  .invoice-toolbar .btn { width:100%; justify-content:center; }
  .invoice-document {
    min-height:0;
    padding:26px 18px;
  }
  .invoice-document-header,
  .invoice-document-footer,
  .invoice-note {
    grid-template-columns:1fr;
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
  }
  .invoice-doc-title-block {
    min-width:0;
    width:100%;
    text-align:left;
  }
  .invoice-document-meta,
  .invoice-address-grid {
    grid-template-columns:1fr;
  }
  .invoice-doc-meta-row {
    grid-template-columns:1fr;
    gap:2px;
  }
  .invoice-items {
    display:block;
    overflow-x:auto;
    min-width:640px;
  }
  .trial-banner { left:14px; right:14px; bottom:14px; }
  .smtp-send-rhythm-card { padding:22px 18px; }
  .smtp-send-rhythm-header,
  .smtp-send-rhythm-block-head,
  .smtp-send-rhythm-summary-top { flex-direction:column; align-items:flex-start; }
  .smtp-send-rhythm-title { font-size:30px; }
  .smtp-send-rhythm-weekly-header,
  .smtp-send-rhythm-week-row { gap:10px; }
  .smtp-send-rhythm-week-row { padding:12px; }
  .smtp-send-rhythm-hourly-grid {
    grid-template-columns:58px repeat(7, minmax(34px, 1fr));
  }
  .smtp-send-rhythm-colhead,
  .smtp-send-rhythm-rowhead,
  .smtp-send-rhythm-week-segment-value,
  .smtp-send-rhythm-cell-value,
  .smtp-send-rhythm-summary-meta { font-size:10px; }
  [class*="col-sm-"], [class*="col-md-"] { float:none !important; width:100% !important; }
  .settings-action-bar,
  .template-action-bar,
  .email-workspace-toolbar,
  .support-hero-actions,
  .support-quick-links,
  .panel-actions-inline { align-items:stretch; flex-direction:column; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-report,
  .smtp-dashboard-ai-card #smtp-dashboard-ai-grid { grid-template-columns:1fr !important; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-status > div,
  .smtp-dashboard-ai-card #smtp-dashboard-ai-report > div > div:first-child { flex-direction:column; align-items:flex-start !important; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-report > div > div:first-child > div:last-child { min-width:0 !important; width:100%; text-align:left !important; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-status .smtp-ai-meta,
  .smtp-dashboard-ai-card #smtp-dashboard-ai-status [style*="white-space:nowrap"] { white-space:normal !important; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-watchlist { overflow-x:auto; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-watchlist table { min-width:0; width:100%; }
  .smtp-dashboard-ai-card #smtp-dashboard-ai-watchlist th,
  .smtp-dashboard-ai-card #smtp-dashboard-ai-watchlist td { white-space:normal; word-break:break-word; vertical-align:top; }
  .settings-meta-list li,
  .support-meta-list li { flex-direction:column; }
  .settings-meta-list strong,
  .support-meta-list strong,
  .reseller-chart-head span { text-align:left; }
  .deliverability-header-actions,
  .deliverability-source-row,
  .deliverability-setup-row,
  .deliverability-setup-v2-head { flex-direction:column; align-items:flex-start; }
  .deliverability-source-badge,
  .deliverability-setup-row strong { white-space:normal; text-align:left; }
  .deliverability-setup-v2-grid,
  .deliverability-rollout-grid,
  .deliverability-segment-grid { grid-template-columns:1fr; }
  .deliverability-table-wrap {
    overflow:visible;
  }
  .deliverability-table {
    display:block;
    width:100%;
    min-width:0 !important;
  }
  .deliverability-table > thead {
    display:none;
  }
  .deliverability-table > tbody {
    display:flex;
    flex-direction:column;
    gap:12px;
    width:100%;
  }
  .deliverability-table > tbody > tr {
    display:block;
    width:100%;
    border:1px solid var(--border);
    border-radius:16px;
    background:var(--card);
    overflow:hidden;
    box-shadow:0 8px 18px rgba(15,23,42,.04);
  }
  .deliverability-table > tbody > tr > td {
    display:grid;
    grid-template-columns:minmax(88px, 108px) minmax(0, 1fr);
    gap:10px 12px;
    align-items:start;
    width:100%;
    padding:12px 14px;
    border-top:1px solid var(--border);
    white-space:normal;
    word-break:break-word;
    box-sizing:border-box;
  }
  .deliverability-table > tbody > tr > td:first-child {
    border-top:0;
  }
  .deliverability-table > tbody > tr > td::before {
    content:attr(data-label);
    display:block;
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
    line-height:1.45;
    text-transform:uppercase;
    color:var(--text-muted);
  }
  .deliverability-table > tbody > tr > td[colspan] {
    display:block;
    padding:16px;
  }
  .deliverability-table > tbody > tr > td[colspan]::before {
    content:none;
  }
  .deliverability-source-cell {
    gap:6px;
  }
  .deliverability-source-cell strong,
  .deliverability-source-cell span {
    white-space:normal;
    word-break:break-word;
  }
  .deliverability-meter {
    min-width:0;
    width:100%;
    max-width:100%;
  }
  .deliverability-meter-track {
    height:9px;
  }
  .deliverability-risk-pill,
  .deliverability-policy-pill {
    min-width:0;
    max-width:100%;
    white-space:normal;
    text-align:center;
    justify-content:flex-start;
  }
  .search-env-head { flex-direction:column; align-items:flex-start; }
  .search-env-count { white-space:normal; }
  .log-history-summary-grid,
  .retry-history-meta { grid-template-columns:1fr; }
  .log-history-event-top { flex-direction:column; }
  .domains-table { min-width:820px; }
  .email-code-input { min-height:420px; }
  .email-preview-frame { min-height:520px; }
}
