:root {
  --primary: #A00101; --primary-dark: #500000; --primary-light: #A00101;
  --primary-surface: rgba(160,1,1,0.10); --primary-border: rgba(160,1,1,0.20); --primary-glow: rgba(160,1,1,0.30);
  --bg-primary: #030303; --bg-secondary: #0a0a0a; --bg-tertiary: #141414; --bg-card: #0a0a0a;
  --bg-hover: rgba(255,255,255,0.06); --bg-input: rgba(20,20,20,0.9);
  --border: #1e1e1e; --border-input: #2a2a2a; --border-table: #2a2a2a; --border-shell: #1e1e1e;
  --text-primary: #ffffff; --text-secondary: #e0e0e0; --text-muted: rgba(255,255,255,0.65); --text-placeholder: #6b6b6b;
  --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --info: #3b82f6;
  --sidebar-w: 228px; --header-h: 64px;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12); --shadow-xl: 0 20px 50px rgba(0,0,0,.15);
  --font-sans: 'DM Sans', system-ui, sans-serif; --font-mono: 'JetBrains Mono', monospace;
  --transition: 200ms ease; --transition-slow: 300ms ease-in-out;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 20px; }

/* LAYOUT */
.layout { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); background: var(--bg-secondary); border-right: 1px solid var(--border-shell);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 30; overflow-y: auto; scrollbar-width: none; transition: width 0.22s ease;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-logo {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  padding: 20px 16px 18px; border-bottom: 1px solid var(--border-shell); margin-bottom: 10px;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(160,1,1,0.4); margin-right: 10px; flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.logo-text span { color: var(--primary); }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-sep { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; padding: 12px 12px 4px; opacity: 0.5; }
.nav-item {
  display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-md); color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap;
  text-align: left; width: 100%; border: none; background: none; position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff;
  box-shadow: inset 2px 0 0 rgba(255,80,80,0.55), 0 0 14px rgba(160,1,1,0.28);
}
.nav-item.active:hover { background: linear-gradient(135deg, #600000, #B50202); }
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 17px; height: 17px; stroke-width: 1.5; flex-shrink: 0; }
.nav-label { flex: 1; line-height: 1.3; }
.nav-badge-count {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.nav-item.active .nav-badge-count { background: rgba(255,255,255,0.25); }
.nav-separator { height: 1px; background: var(--border-shell); margin: 8px 0; }
.sidebar-footer { display: flex; justify-content: stretch; padding: 8px 10px 16px; margin-top: auto; border-top: 1px solid var(--border-shell); }
.sidebar-footer .nav-item { border: none; background: none; width: 100%; }

/* COLLAPSE BTN */
.sidebar-collapse-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-shell);
  background: var(--bg-secondary); color: var(--text-muted); cursor: pointer;
  transition: left 0.22s ease, background 0.15s; flex-shrink: 0;
  position: fixed; left: calc(var(--sidebar-w) - 14px); top: 72px; z-index: 40; box-shadow: var(--shadow-sm);
}
.sidebar-collapse-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.sidebar-collapse-btn svg { width: 13px; height: 13px; transition: transform 0.22s; }
body.sidebar-collapsed .sidebar { width: 64px; }
body.sidebar-collapsed .main { margin-left: 64px; }
body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-sep { display: none !important; }
body.sidebar-collapsed .sidebar-nav { padding: 8px 6px; align-items: center; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 10px 8px; }
body.sidebar-collapsed .sidebar-logo { padding: 16px 8px; justify-content: center; }
body.sidebar-collapsed .logo-text { display: none; }
body.sidebar-collapsed .sidebar-footer { justify-content: center; padding: 8px 6px 16px; }
body.sidebar-collapsed .sidebar-collapse-btn { left: calc(64px - 14px); }
body.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
body.sidebar-collapsed .nav-badge-count { display: none; }

/* MAIN */
.main { margin-left: var(--sidebar-w); transition: margin-left var(--transition-slow); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* HEADER */
.header {
  height: var(--header-h); background: var(--bg-secondary); border-bottom: 1px solid var(--border-shell);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.header-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.header-right { display: flex; align-items: center; gap: 4px; }
.header-title { font-size: 20px; font-weight: 400; color: var(--text-secondary); }
.header-divider { width: 1px; height: 24px; background: var(--border-shell); margin: 0 8px; }
.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-xl); border: none;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon svg { width: 18px; height: 18px; stroke-width: 1.5; }
.avatar {
  width: 36px; height: 36px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}

/* PAGE CONTENT */
.page-content { padding: 24px; flex: 1; animation: fadeIn 300ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* STAT CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-2xl);
  padding: 20px; position: relative; overflow: hidden; min-height: 120px;
  transition: background-color var(--transition), box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-icon { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--text-muted); margin-bottom: 12px; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.stat-change { font-size: 12px; font-weight: 500; margin-top: 4px; }
.stat-change.up { color: #4ade80; } .stat-change.down { color: #f87171; }

/* CARDS */
.card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px; }
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--radius-lg); font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all var(--transition); white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; stroke-width: 1.5; }
.btn-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; box-shadow: 0 0 12px rgba(160,1,1,0.4); }
.btn-primary:hover { box-shadow: 0 0 20px rgba(160,1,1,0.6); background: linear-gradient(135deg, #600000, #B50202); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-shell); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-success { background: rgba(16,185,129,.15); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.btn-success:hover { background: rgba(16,185,129,.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-md); }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border-input); border-radius: var(--radius-lg);
  background: var(--bg-input); color: var(--text-primary); font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-placeholder); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-surface); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; font-family: var(--font-sans); }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-danger { background: rgba(239,68,68,.12); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-info { background: rgba(59,130,246,.12); color: var(--info); }
.badge-orange { background: var(--primary-surface); color: var(--primary); }

/* TABS */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-shell); margin-bottom: 24px; }
.tab-btn { padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; transition: all var(--transition); margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* TABLE */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 500; font-size: 13px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-table); white-space: nowrap; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-table); color: var(--text-primary); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* GRID UTILS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; } .hidden { display: none !important; }

/* SECTIONS */
.section { display: none; }
.section.active { display: block; animation: fadeIn 300ms ease-out; }

/* CAMPANHAS */
.camp-country-btn {
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 10px 6px; font-size: 18px; color: var(--text-muted); cursor: pointer; text-align: center;
  transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.camp-country-btn span { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.camp-country-btn:hover { border-color: var(--primary); background: var(--bg-hover); }
.camp-country-btn:hover span { color: var(--text-primary); }
.camp-country-btn.selected { border-color: var(--primary); background: var(--primary-surface); }
.camp-country-btn.selected span { color: #fff; }
.camp-meta-row { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.camp-meta-row:last-child { border-bottom: none; }
.camp-meta-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; width: 110px; flex-shrink: 0; }
.camp-meta-val { font-size: 13px; color: var(--text-primary); cursor: pointer; flex: 1; border-bottom: 1px dashed transparent; transition: border-color .15s; }
.camp-meta-val:hover { border-bottom-color: var(--text-muted); }

/* NICHE SELECTOR */
.niche-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.niche-btn {
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; text-align: center; transition: all .2s;
}
.niche-btn:hover { border-color: var(--primary); color: var(--text-primary); background: var(--bg-hover); }
.niche-btn.selected { border-color: var(--primary); background: var(--primary-surface); color: #fff; }
.niche-icon { font-size: 22px; display: block; margin-bottom: 6px; }

/* COUNTRY GRID */
.country-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.country-btn {
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 8px 6px; font-size: 12px; color: var(--text-muted); cursor: pointer; text-align: center; transition: all .2s;
}
.country-btn:hover { border-color: var(--success); color: var(--text-primary); }
.country-btn.selected { border-color: var(--success); background: rgba(16,185,129,.1); color: var(--success); }

/* SCORE BAR */
.score-bar-wrap { margin-bottom: 12px; }
.score-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); }
.score-bar { height: 6px; background: var(--bg-tertiary); border-radius: 99px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 99px; }

/* CHECK LIST */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); font-size: 13px; background: var(--bg-tertiary); border: 1px solid var(--border); }
.check-item.ok { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.05); }
.check-item.warn { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.04); }
.check-item.bad { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.04); }
.check-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.check-text strong { display: block; font-weight: 500; margin-bottom: 2px; color: var(--text-primary); }
.check-text span { color: var(--text-muted); font-size: 12px; }

/* EMAIL PREVIEW */
.email-preview { background: #fff; border-radius: var(--radius-lg); overflow: hidden; color: #111; font-size: 13px; line-height: 1.6; border: 1px solid var(--border); }
.email-header-bar { background: #f1f5f9; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #64748b; }
.email-header-bar strong { color: #1e293b; }
.email-body { padding: 16px 14px; }
.email-hero { background: linear-gradient(135deg, #500000, #A00101); padding: 20px; text-align: center; color: white; border-radius: var(--radius-md); margin-bottom: 12px; }
.email-hero h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.email-hero p { font-size: 12px; opacity: .85; }
.email-cta { background: #f59e0b; color: #000; font-weight: 700; padding: 9px 20px; border-radius: var(--radius-md); display: inline-block; margin-top: 10px; font-size: 12px; }
.email-text-block { color: #374151; margin-bottom: 10px; font-size: 12px; }
.email-footer { border-top: 1px solid #e2e8f0; padding-top: 10px; font-size: 11px; color: #94a3b8; text-align: center; }

/* TEMPLATE CARDS */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.template-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; cursor: pointer; transition: all .2s; text-align: center; }
.template-card:hover { border-color: var(--primary); }
.template-card { padding: 10px 10px 8px; cursor: pointer; }
.template-card.active { border-color: var(--primary); background: var(--primary-surface); }
.template-icon { font-size: 22px; margin-bottom: 6px; }
.template-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.template-desc { font-size: 10px; color: var(--text-muted); }
/* Template miniature previews */
.tpl-preview { width:100%; height:52px; border-radius:6px; margin-bottom:7px; overflow:hidden; position:relative; }
.tpl1-prev { background:linear-gradient(180deg,#1a3c6b 36%,#fff 36%); border:1px solid #e5e7eb; border-top:3px solid #A00101; }
.tpl1-prev::before { content:''; position:absolute; top:7px; left:50%; transform:translateX(-50%); width:44%; height:7px; background:rgba(255,255,255,.85); border-radius:3px; }
.tpl1-prev::after  { content:''; position:absolute; top:30px; left:50%; transform:translateX(-50%); width:38%; height:10px; background:#A00101; border-radius:3px; }
.tpl2-prev { background:linear-gradient(180deg,#007837 30%,#fff 30%); border:1px solid #e5e7eb; }
.tpl2-prev::before { content:'✓'; position:absolute; top:5px; left:50%; transform:translateX(-50%); width:16px;height:16px;background:#005a2b;border-radius:50%;font-size:9px;color:#fff;line-height:16px;text-align:center; }
.tpl2-prev::after  { content:''; position:absolute; top:28px; left:12px; right:12px; height:10px; background:#f8faf8; border:1px solid #d8ead8; border-radius:4px; }
.tpl3-prev { background:#0f0f1a; border:1px solid #2a2a3a; }
.tpl3-prev::before { content:''; position:absolute; top:6px; left:50%; transform:translateX(-50%); width:55%; height:8px; background:linear-gradient(90deg,#A00101,#ff4444); border-radius:4px; }
.tpl3-prev::after  { content:''; position:absolute; top:24px; left:50%; transform:translateX(-50%); width:45%; height:10px; background:rgba(255,255,255,.15); border-radius:4px; }
.tpl4-prev { background:#fff; border:1px solid #e5e7eb; }
.tpl4-prev::before { content:''; position:absolute; top:0; left:0; right:0; height:22px; background:linear-gradient(90deg,#f59e0b,#ef4444); border-radius:6px 6px 0 0; }
.tpl4-prev::after  { content:''; position:absolute; top:28px; left:10%; width:80%; height:6px; background:#e5e7eb; border-radius:3px; }
.tpl5-prev { background:linear-gradient(135deg,#7c3aed 0%,#1e1b4b 100%); border:1px solid #4c1d95; }
.tpl5-prev::before { content:''; position:absolute; top:8px; left:8px; width:3px; height:36px; background:linear-gradient(180deg,#a78bfa,#7c3aed); border-radius:99px; }
.tpl5-prev::after  { content:''; position:absolute; top:10px; left:18px; width:55%; height:7px; background:rgba(255,255,255,.7); border-radius:3px; box-shadow:0 12px 0 rgba(255,255,255,.4); }
.tpl6-prev { background:#f8fafc; border:1px solid #e2e8f0; }
.tpl6-prev::before { content:''; position:absolute; top:0; left:0; right:0; height:16px; background:#1e293b; border-radius:6px 6px 0 0; }
.tpl6-prev::after  { content:''; position:absolute; top:20px; left:8%; width:84%; height:5px; background:#e2e8f0; border-radius:2px; box-shadow:0 9px 0 #e2e8f0, 0 18px 0 #cbd5e1; }
.tpl7-prev { background:#fff; border:1px solid #fecaca; }
.tpl7-prev::before { content:''; position:absolute; top:0; left:0; right:0; height:10px; background:#A00101; border-radius:6px 6px 0 0; }
.tpl7-prev::after  { content:''; position:absolute; top:16px; left:8%; width:84%; height:7px; background:#1e293b; border-radius:3px; box-shadow:0 11px 0 rgba(160,1,1,.3), 0 26px 0 #e2e8f0, 0 35px 0 #e2e8f0; }
.tpl8-prev { background:#f8fafc; }
.tpl8-prev::before { content:''; position:absolute; top:0; left:0; right:0; height:13px; background:#0f172a; border-radius:6px 6px 0 0; }
.tpl8-prev::after  { content:''; position:absolute; top:17px; left:8%; width:84%; height:8px; background:#1e293b; border-radius:3px; box-shadow:0 2px 0 #A00101, 0 14px 0 #e2e8f0, 0 23px 0 #e2e8f0; }
.tpl9-prev { background:linear-gradient(160deg,#0f172a,#1e1b4b); }
.tpl9-prev::before { content:''; position:absolute; top:8px; left:8%; width:84%; height:20px; background:rgba(255,255,255,.07); border-radius:6px; }
.tpl9-prev::after  { content:''; position:absolute; top:12px; left:14%; width:50%; height:6px; background:#f59e0b; border-radius:3px; box-shadow:0 10px 0 rgba(255,255,255,.15), 0 20px 0 rgba(255,255,255,.08); }
.tpl0-prev { background:linear-gradient(135deg,#f59e0b,#ef4444,#a855f7,#3b82f6,#10b981); }
.tpl0-prev::before { content:'🎲'; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:20px; line-height:1; }
.tpl0-prev::after  { display:none; }

/* DELIV ROWS */
.deliv-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg-tertiary); border-radius: var(--radius-md); border: 1px solid var(--border); font-size: 13px; margin-bottom: 7px; }
.deliv-row.ok { border-color: rgba(16,185,129,.3); }
.deliv-row.warn { border-color: rgba(245,158,11,.3); }
.deliv-row.bad { border-color: rgba(239,68,68,.3); }
.pill { font-size: 11px; font-weight: 600; padding: 3px 11px; border-radius: 99px; white-space: nowrap; }
.pill-ok { background: rgba(16,185,129,.15); color: var(--success); }
.pill-warn { background: rgba(245,158,11,.15); color: var(--warning); }
.pill-bad { background: rgba(239,68,68,.15); color: var(--danger); }
.pill-info { background: rgba(59,130,246,.15); color: var(--info); }

/* INBOX SCORE */
.inbox-score-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; background: var(--bg-tertiary); border-radius: var(--radius-xl); border: 1px solid var(--border); margin-bottom: 16px; }
.inbox-number { font-family: var(--font-mono); font-size: 56px; font-weight: 700; line-height: 1; color: var(--success); }
.inbox-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.inbox-sub { font-size: 12px; color: var(--success); margin-top: 4px; }

/* METRICS */
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.metric-box { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; text-align: center; }
.metric-val { font-family: var(--font-mono); font-weight: 700; font-size: 20px; margin-bottom: 2px; }
.metric-name { font-size: 11px; color: var(--text-muted); }

/* AI CHAT */
.ai-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.ai-msg { padding: 11px 14px; border-radius: var(--radius-lg); font-size: 13px; line-height: 1.55; max-width: 90%; }
.ai-msg.ai { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-primary); align-self: flex-start; }
.ai-msg.ai::before { content: '🤖 '; }
.ai-msg.user { background: var(--primary-surface); border: 1px solid var(--primary-border); color: var(--text-secondary); align-self: flex-end; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row .form-control { flex: 1; }
.quick-btns { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* POSTMASTER */
.pm-gauge-wrap { display: flex; flex-direction: column; align-items: center; padding: 20px 16px 12px; }
.pm-gauge { position: relative; width: 180px; height: 100px; margin-bottom: 10px; }
.pm-gauge svg { width: 180px; height: 100px; }
.pm-gauge-label { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); text-align: center; }
.pm-gauge-val { font-family: var(--font-mono); font-size: 36px; font-weight: 700; line-height: 1; }
.pm-gauge-sub { font-size: 11px; color: var(--text-muted); }
.pm-verdict { font-size: 13px; font-weight: 600; margin-top: 6px; padding: 5px 16px; border-radius: 99px; }
.verdict-excellent { background: rgba(16,185,129,.12); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.verdict-warn { background: rgba(245,158,11,.12); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.pm-progress { height: 4px; background: var(--bg-tertiary); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.pm-progress-fill { height: 100%; border-radius: 99px; background: var(--primary); transition: width 1.2s ease; }
.pm-step { font-size: 12px; color: var(--text-muted); min-height: 18px; }
.rendering-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.render-box { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.render-header { padding: 8px 12px; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.render-body { padding: 12px; height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.render-subject { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.render-snippet { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.blacklist-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.bl-item { padding: 8px 10px; border-radius: var(--radius-md); font-size: 11px; display: flex; align-items: center; gap: 6px; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-muted); }
.bl-item.clean { border-color: rgba(16,185,129,.2); }
.bl-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--success); }

/* BIBLIOTECA */
.lib-country-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.lib-ctab { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-lg); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-muted); border: 1px solid var(--border); background: var(--bg-tertiary); transition: all .2s; }
.lib-ctab:hover { color: var(--text-primary); border-color: var(--primary-border); }
.lib-ctab.active { background: var(--primary-surface); border-color: var(--primary-border); color: var(--text-primary); }
.lib-ctab .cnt { background: var(--border); color: var(--text-muted); font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.lib-ctab.active .cnt { background: var(--primary); color: white; }
.lib-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.lib-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lib-filter-select { background: var(--bg-tertiary); border: 1px solid var(--border-input); border-radius: var(--radius-lg); padding: 9px 12px; color: var(--text-primary); font-size: 13px; outline: none; cursor: pointer; }
.lib-filter-select:focus { border-color: var(--primary); }
.lib-search { background: var(--bg-input); border: 1px solid var(--border-input); border-radius: var(--radius-lg); padding: 9px 14px; color: var(--text-primary); font-size: 13px; outline: none; width: 220px; }
.lib-search:focus { border-color: var(--primary); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lib-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; transition: all .25s; cursor: pointer; position: relative; }
.lib-card:hover { border-color: var(--primary-border); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(160,1,1,.15); }
.lib-card-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.lib-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.lib-card-subject { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; flex: 1; }
.lib-score-badge { display: flex; align-items: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }
.lib-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-meta-tag { font-size: 11px; padding: 2px 9px; border-radius: 99px; }
.lib-meta-niche { background: var(--primary-surface); color: var(--primary); border: 1px solid var(--primary-border); }
.lib-meta-type { background: rgba(245,158,11,.1); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }
.lib-meta-country { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); }
.lib-card-body { padding: 12px 16px; }
.lib-card-preview { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.lib-stat { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: 7px 6px; text-align: center; border: 1px solid var(--border); }
.lib-stat-val { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.lib-stat-name { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.lib-card-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.lib-date { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.lib-actions { display: flex; gap: 6px; }
.lib-action-btn { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 5px 10px; font-size: 11px; color: var(--text-muted); cursor: pointer; transition: all .2s; }
.lib-action-btn:hover { border-color: var(--primary-border); color: var(--primary); }
.lib-pin { position: absolute; top: 12px; right: 12px; font-size: 13px; }
.lib-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); grid-column: 1/-1; }
.lib-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: slideInRight 250ms ease; max-width: 340px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── CHECKBOX OPTIONS PANEL ────────────────────────── */
.options-panel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.opt-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 12px; border-radius: var(--radius-lg);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s; user-select: none;
}
.opt-item:hover { border-color: var(--primary-border); background: var(--bg-hover); }
.opt-item.checked { border-color: var(--primary-border); background: var(--primary-surface); }
.opt-check {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-input);
  background: var(--bg-input); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; transition: all .2s;
}
.opt-item.checked .opt-check { background: var(--primary); border-color: var(--primary); }
.opt-check svg { width: 11px; height: 11px; stroke: white; stroke-width: 2.5; opacity: 0; transition: opacity .15s; }
.opt-item.checked .opt-check svg { opacity: 1; }
.opt-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.opt-info { flex: 1; }
.opt-title { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.opt-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.opt-sub { display: none; }
.opt-sub-panel {
  grid-column: 1 / -1;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-border);
  animation: fadeIn 200ms ease;
  margin-top: 0;
}


/* ─── TAGS REFERENCE PANEL ──────────────────────────── */
.tags-panel { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tags-section-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; padding: 0 2px; }
.tags-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tag-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: var(--radius-md); font-size: 12px;
  background: var(--bg-tertiary); border: 1px solid var(--border); cursor: pointer;
  transition: all .2s; gap: 6px;
}
.tag-item:hover { border-color: var(--primary-border); background: var(--primary-surface); }
.tag-item:active { transform: scale(.97); }
.tag-code { font-family: var(--font-mono); font-size: 11px; color: var(--primary); font-weight: 500; flex: 1; }
.tag-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.tag-copy-btn { background: none; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; padding: 0; flex-shrink: 0; }
.tag-copy-btn:hover { color: var(--primary); }
.tags-platform-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tptab { padding: 5px 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); border: 1px solid var(--border); background: var(--bg-tertiary); transition: all .2s; }
.tptab.active { background: var(--primary-surface); border-color: var(--primary-border); color: var(--text-primary); }
.tptab-content { display: none; }
.tptab-content.active { display: block; }

/* ─── IMAGE UPLOAD AREA ─────────────────────────────── */
.img-upload {
  border: 2px dashed var(--border-input); border-radius: var(--radius-lg);
  padding: 20px; text-align: center; cursor: pointer; transition: all .2s;
  background: var(--bg-input);
}
.img-upload:hover { border-color: var(--primary); background: var(--primary-surface); }
.img-upload-icon { font-size: 28px; margin-bottom: 8px; }
.img-upload-text { font-size: 13px; color: var(--text-muted); }
.img-upload-sub { font-size: 11px; color: var(--text-placeholder); margin-top: 4px; }
.img-preview-wrap { display: none; position: relative; }
.img-preview-wrap img { width: 100%; border-radius: var(--radius-md); max-height: 120px; object-fit: cover; }
.img-preview-remove { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.7); border: none; border-radius: 50%; width: 24px; height: 24px; color: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ─── PREVIEW DYNAMIC BLOCKS ────────────────────────── */
.prev-img-block { margin-bottom: 12px; }
.prev-img-block img { width: 100%; border-radius: 6px; object-fit: cover; max-height: 100px; }
.prev-name { color: #A00101; font-weight: 700; }
.prev-company { background: #fef3c7; color: #92400e; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.prev-value { color: #059669; font-weight: 700; font-family: monospace; }

/* ─── RANGE SLIDER ──────────────────────────────────── */
.text-length-slider { width: 100%; accent-color: var(--primary); }
.length-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-top: 3px; }


/* ─── AI GENERATION ─────────────────────────────────── */
.ai-loading-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  backdrop-filter: blur(6px); z-index: 500;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
}
.ai-loading-overlay.active { display: flex; }
.ai-spinner {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.ai-loading-step  { font-size: 13px; color: var(--text-muted); min-height: 20px; transition: all .3s; }
.ai-loading-bar-wrap { width: 280px; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.ai-loading-bar { height: 100%; background: linear-gradient(90deg, var(--primary-dark), var(--primary)); border-radius: 99px; transition: width 0.6s ease; width: 0%; }

/* ─── GENERATED EMAIL RESULT ─────────────────────────── */
.result-panel {
  background: var(--bg-secondary); border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl); padding: 0; overflow: hidden;
  margin-top: 0; margin-bottom: 16px; display: none; animation: fadeIn .3s ease;
}
.result-panel.active { display: block; }
/* Quando o resultado está ativo, esconde o preview estático e o seletor de template */
.result-panel.active ~ #card-template-style,
.result-panel.active ~ #card-preview-static { display: none !important; }
.result-tabs { display: flex; border-bottom: 1px solid var(--border); }
.result-tab {
  padding: 12px 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .2s;
}
.result-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.result-tab-content { display: none; padding: 20px; }
.result-tab-content.active { display: block; }
.result-subject {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  padding: 7px 12px; background: var(--bg-tertiary);
  border-radius: var(--radius-md); margin-bottom: 10px;
  border-left: 3px solid var(--primary);
}
.result-email-preview { background: #fff; border-radius: var(--radius-lg); overflow: hidden; color: #111; font-size: 13px; line-height: 1.7; }
.result-email-header { background: #f8fafc; padding: 10px 16px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #64748b; }
.result-email-body { padding: 20px; }
.result-code { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; max-height: 400px; overflow-y: auto; }
.result-actions { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--bg-tertiary); flex-wrap: wrap; }

/* ─── AC FIELDS ─────────────────────────────────────── */
.ac-field-row { display: flex; align-items: center; gap: 10px; }
.ac-field-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; width: 100px; flex-shrink: 0; }
.ac-field-wrap { flex: 1; display: flex; gap: 6px; align-items: center; }
.ac-field-input { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 11px; font-size: 13px; color: var(--text-primary); font-family: var(--font-sans); cursor: text; }
[data-theme="light"] .ac-field-input { background: #f5f6f8; }
.ac-copy-btn { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 10px; cursor: pointer; font-size: 13px; transition: background .15s; flex-shrink: 0; }
.ac-copy-btn:hover { background: var(--primary-surface); border-color: var(--primary-border); }

/* LANG COPY BAR */
.lang-copy-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 99px; color: var(--text-muted); cursor: pointer;
  transition: all .15s; flex-shrink: 0; white-space: nowrap;
}
.lang-copy-btn:hover { border-color: var(--primary-border); color: var(--text-primary); background: var(--primary-surface); }
.lang-copy-btn.lang-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.lang-copy-btn.lang-loading { opacity: .6; cursor: wait; }
[data-theme="light"] .lang-copy-btn { background: #f5f5f5; border-color: #ddd; }
[data-theme="light"] .lang-copy-btn.lang-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── AI ANALYSIS RESULT ─────────────────────────────── */
.analysis-result { display: none; animation: fadeIn .3s ease; }
.analysis-result.active { display: block; }
.score-circle {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 20px; font-weight: 700;
  flex-shrink: 0;
}
.score-good { background: rgba(16,185,129,.12); border: 2px solid rgba(16,185,129,.4); color: var(--success); }
.score-ok   { background: rgba(245,158,11,.12);  border: 2px solid rgba(245,158,11,.4);  color: var(--warning); }
.score-bad  { background: rgba(239,68,68,.12);   border: 2px solid rgba(239,68,68,.4);   color: var(--danger); }

/* ─── AI CHAT REAL ───────────────────────────────────── */
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 11px 14px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); opacity: .4; animation: blink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.4} 40%{opacity:1} }

/* ════════════════════════════════════════════════════════
   TEMA CLARO
════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary:    #f0f2f5;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #f5f6f8;
  --bg-card:       #ffffff;
  --bg-hover:      rgba(0,0,0,0.04);
  --bg-input:      #ffffff;
  --border:        #e4e6ea;
  --border-input:  #d0d3da;
  --border-table:  #e4e6ea;
  --border-shell:  #e4e6ea;
  --text-primary:  #111827;
  --text-secondary:#374151;
  --text-muted:    #6b7280;
  --text-placeholder:#a0aec0;
  --primary-surface: rgba(160,1,1,0.07);
  --primary-border:  rgba(160,1,1,0.18);
  --primary-glow:    rgba(160,1,1,0.2);
}
[data-theme="light"] body { color: #111827; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c9cdd4; }
[data-theme="light"] .sidebar { background: #ffffff; box-shadow: 2px 0 12px rgba(0,0,0,.06); }
[data-theme="light"] .header { background: #ffffff; box-shadow: 0 1px 0 #e4e6ea; }
[data-theme="light"] .card { box-shadow: 0 1px 4px rgba(0,0,0,.06); }
[data-theme="light"] select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
[data-theme="light"] .email-preview { border-color: #d0d3da; }
[data-theme="light"] .niche-btn { background: #f5f6f8; }
[data-theme="light"] .country-btn { background: #f5f6f8; }
[data-theme="light"] .template-card { background: #f5f6f8; }
[data-theme="light"] .opt-item { background: #f5f6f8; }
[data-theme="light"] .opt-sub-panel { background: #f5f6f8; border-color: #e4e6ea; }
[data-theme="light"] .tptab { background: #ececec; color: #374151; }
[data-theme="light"] .tptab.active { background: var(--primary); color: #fff; }
[data-theme="light"] .tag-item { background: #ffffff; border-color: #e4e6ea; }
[data-theme="light"] .deliv-row { background: #f5f6f8; }
[data-theme="light"] .result-code { background: #f5f6f8; }

/* ════════════════════════════════════════════════════════
   FORM COMPACTO — seção Criar Email
════════════════════════════════════════════════════════ */
#section-criar .card { padding: 14px 16px; }
#section-criar .card-header { margin-bottom: 10px; }
#section-criar .card-title { font-size: 13px; }
#section-criar .card + .card { margin-top: 10px; }

/* nicho */
#section-criar .niche-grid { grid-template-columns: repeat(2,1fr); gap: 7px; }
#section-criar .niche-btn { padding: 10px 8px; font-size: 12px; border-radius: var(--radius-md); }
#section-criar .niche-icon { font-size: 18px; margin-bottom: 4px; }

/* país */
#section-criar .country-grid { grid-template-columns: repeat(4,1fr); gap: 5px; }
#section-criar .country-btn { padding: 6px 4px; font-size: 11px; }

/* forms */
#section-criar .form-group { margin-bottom: 10px; }
#section-criar .form-label { font-size: 11px; margin-bottom: 4px; font-weight: 600; letter-spacing: .2px; text-transform: uppercase; color: var(--text-muted); }
#section-criar .form-control { padding: 8px 11px; font-size: 13px; border-radius: var(--radius-md); }
#section-criar textarea.form-control { min-height: 70px; }

/* section headers */
#section-criar .section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
#section-criar .section-required {
  font-size: 10px; color: var(--primary); font-weight: 600;
}

/* opt items — minimalista */
#section-criar .options-panel { gap: 5px; }
#section-criar .opt-item { padding: 7px 10px; gap: 7px; align-items: center; border-radius: var(--radius-md); }
#section-criar .opt-icon { display: none; }
#section-criar .opt-desc { display: none; }
#section-criar .opt-title { font-size: 12px; margin-bottom: 0; font-weight: 500; }
#section-criar .opt-check { width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0; margin-top: 0; }
#section-criar .opt-check svg { width: 9px; height: 9px; }

/* template cards */
#section-criar .template-card { padding: 7px 7px 6px; }
#section-criar .tpl-preview { height: 42px; margin-bottom: 5px; }

/* compact template grid in main generator */
#card-template-style .template-grid { gap: 5px; margin-bottom: 0; }
#card-template-style .template-card { padding: 5px 5px 4px; }
#card-template-style .tpl-preview { height: 30px; margin-bottom: 4px; }
#card-template-style .template-name { font-size: 10px; margin-bottom: 1px; }
#card-template-style .template-desc { font-size: 9px; }
#section-criar .template-name { font-size: 11px; margin-bottom: 1px; }
#section-criar .template-desc { font-size: 10px; }

/* page header */
#section-criar .page-title { font-size: 17px; }
#section-criar .page-subtitle { font-size: 12px; }
#section-criar .page-header { margin-bottom: 14px; }

/* btn gerar */
#section-criar .btn { padding: 9px 16px; font-size: 13px; }

