*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --primary: #4580f7;
    --primary-hover: #3366e0;
    --text: #0a0a0a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error: #ef4444;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

header nav, header .nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

header nav a, header .nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

header nav a:hover {
    color: var(--primary);
}

/* Consultant badge */
.consultant-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.35rem;
    vertical-align: middle;
}

main {
    max-width: 1000px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-links span, .footer-links a {
    white-space: nowrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a::before {
    content: "\00b7";
    margin-right: 0.5rem;
    color: var(--text-muted);
}

footer a:hover {
    color: var(--primary);
}

/* Legal pages (Privacy, Terms) */
.legal-page {
    max-width: 720px;
    margin: 0 auto;
}

.legal-page h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.legal-updated {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.legal-page h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.legal-page p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.legal-page ul {
    margin: 0.5rem 0 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.legal-page a {
    color: var(--primary);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

/* Login */
.login-container {
    max-width: 420px;
    margin: 4rem auto;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.login-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.login-container input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-container input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
    flex-shrink: 0;
}

.login-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-container button {
    width: 100%;
    padding: 0.625rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.login-container button:hover {
    background: var(--primary-hover);
}

.error {
    color: var(--error);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Hero section */
.hero {
    margin-bottom: 1.5rem;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 700px;
}

.hero-sub {
    margin-top: 0.5rem;
}

.hero-sub a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.hero-sub a:hover {
    text-decoration: underline;
}

/* CTA card (propensity upsell) */
.cta-card {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.cta-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Result header with inline save button */
.result-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-counts-inline {
    display: inline;
}

.save-counts-btn {
    padding: 0.2rem 0.7rem;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    transition: transform 0.15s, box-shadow 0.15s;
}

.save-counts-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

/* Saved districts list */
.saved-counts-list {
    margin-bottom: 1.5rem;
}

.saved-counts-list h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.saved-count-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.saved-count-item:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}

.saved-count-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Send an Email section */
.breakdown-sub {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.send-all-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.price-btn-lg {
    padding: 0.375rem 1.25rem;
    font-size: 0.85rem;
}

/* Price buttons in party table */
.price-btn {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.price-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

/* Saved button (replaces price-btn after click) */
.saved-btn {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-saved {
    background: #ede9fe;
    color: #5b21b6;
}

.status-awaiting-deposit {
    background: #fef3c7;
    color: #92400e;
    animation: pulse-deposit 2s ease-in-out infinite;
}

@keyframes pulse-deposit {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Payment column */
.payment-paid {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.payment-link {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #78350f;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s;
}

.payment-link:hover {
    transform: scale(1.05);
}

/* Propensity rows */
.propensity-row td {
    border-bottom: none;
    padding-bottom: 0.125rem;
}

.propensity-party-row td {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
    border-bottom: none;
}

.propensity-party-row:last-child td,
.propensity-row + .propensity-party-row:has(+ .propensity-row) td,
tr.propensity-party-row:has(+ tr.propensity-row) td {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.375rem;
}

/* Add separator before each new tier group */
.propensity-row ~ .propensity-row td {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}

/* Propensity teaser (blurred counts) */
.propensity-teaser {
    position: relative;
}

.propensity-explainer {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.propensity-explainer strong {
    color: var(--text);
}

.blurred-value {
    filter: blur(8px);
    user-select: none;
    opacity: 0.5;
}

.teaser-overlay {
    text-align: center;
    padding-top: 0.75rem;
}

/* Count Reports */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.search-section {
    background: #3AABE0;
    padding: 2rem;
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    color: #ffffff;
}

.search-section .btn-primary {
    background: #ffffff;
    color: #3AABE0;
    font-weight: 700;
}

.search-section .btn-primary:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.search-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.search-field {
    flex: 1;
    position: relative;
}

.search-field label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: var(--text);
}

.search-field input.selected {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--text);
    font-weight: 600;
    padding-right: 2.5rem;
}

.clear-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clear-btn:hover {
    background: #e2e8f0;
    color: var(--text);
}

.search-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 12px rgba(69, 128, 247, 0.3);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Autocomplete dropdown */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 300px;
    overflow-y: auto;
    color: var(--text);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f1f5f9;
}

.autocomplete-item .district-name {
    font-weight: 500;
}

.autocomplete-item .district-type {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.autocomplete-empty {
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* Results */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.result-header {
    margin-bottom: 1.5rem;
}

.result-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.result-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breakdowns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.breakdown {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.breakdown h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.breakdown table {
    width: 100%;
    border-collapse: collapse;
}

.breakdown th, .breakdown td {
    padding: 0.375rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.breakdown th {
    font-weight: 600;
    color: var(--text-muted);
}

.breakdown td:last-child, .breakdown th:last-child {
    text-align: right;
}

.placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

.dino-spinner {
    display: none;
}

.dino-spinner.htmx-request {
    display: inline !important;
}

.spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Email List Actions (on count results page) */
.email-actions {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.email-actions h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Filter controls */
.email-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 75px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.filter-group select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--surface);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Email count + generate button target */
.email-count-target {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ZeroBounce credit display */
.credit-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.credit-warning {
    color: var(--error);
    font-weight: 500;
}

/* Filters column in jobs table */
.filters-cell {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: normal !important;
    max-width: 150px;
}

/* Jobs Table */
.jobs-table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
}

.jobs-table th, .jobs-table td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    white-space: nowrap;
}

.jobs-table th {
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
}

.jobs-table td:nth-child(n+4) {
    text-align: right;
}

.jobs-table th:nth-child(n+4) {
    text-align: right;
}

.error-row td {
    border-bottom: 1px solid var(--border);
}

.error-detail {
    color: var(--error);
    font-size: 0.8rem;
    white-space: normal !important;
    padding: 0.375rem 0.75rem 0.625rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-generating_csv,
.status-uploading_to_zerobounce,
.status-validating,
.status-downloading_results,
.status-uploading_to_sendgrid {
    background: #fef3c7;
    color: #92400e;
}

.status-complete {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fce4ec;
    color: #b71c1c;
}

/* Elapsed time display next to status badge */
.elapsed-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.375rem;
}

/* Status note below badge (e.g. Greylisted explanation) */
.status-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-style: italic;
    white-space: normal;
    line-height: 1.3;
}

/* ── AI Email Draft Modal ── */
.draft-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.draft-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.draft-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 0;
}

.draft-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.draft-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.draft-modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
}

.draft-modal-body {
    padding: 1.25rem 2rem 2rem;
}

.draft-context {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.draft-context-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.84rem;
}

.draft-context-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.draft-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    margin-top: 1rem;
}

.draft-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
}

.draft-input:focus,
.draft-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(69, 128, 247, 0.1);
}

.draft-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.draft-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.draft-btn-secondary {
    padding: 0.5rem 1.25rem;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.draft-btn-secondary:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.draft-error {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: var(--radius);
    font-size: 0.84rem;
    margin-bottom: 1rem;
}

.draft-rules-hint {
    padding: 0.6rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: #92400e;
    margin-bottom: 1rem;
}

.draft-rules-hint strong {
    color: #78350f;
}

.draft-placeholders-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.draft-placeholders-hint code {
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}

/* Draft buttons in My Lists table */
.draft-btn-new {
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, var(--primary), #6ba0ff);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.draft-btn-new:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(69, 128, 247, 0.3);
}

.draft-btn-edit {
    padding: 0.2rem 0.6rem;
    background: #d1fae5;
    color: #065f46;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.draft-btn-edit:hover {
    transform: scale(1.05);
}

/* ── Admin Console ── */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.admin-tab {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

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

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-action-btn {
    padding: 0.2rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: transform 0.1s, box-shadow 0.1s;
}

.admin-action-btn:hover {
    transform: scale(1.05);
}

.admin-action-confirm {
    background: #d1fae5;
    color: #065f46;
}

.admin-action-approve {
    background: #dbeafe;
    color: #1e40af;
}

.admin-action-verify {
    background: #fef3c7;
    color: #92400e;
}

.ip-flag {
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Nav links — already styled in header section */

/* Progress bar for count streaming */
.progress-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 1rem;
}

.progress-status {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.progress-track {
    width: 100%;
    height: 22px;
    background: #d1d5db;
    border-radius: 11px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}

.progress-bar {
    height: 100%;
    min-width: 2%;
    background: linear-gradient(90deg, #4580f7, #6ba0ff, #93bbff);
    border-radius: 11px;
    transition: width 0.4s ease;
    box-shadow: 0 1px 4px rgba(69,128,247,0.4);
}

.progress-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.75rem;
}

/* Account checklist */
.account-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-step {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}

.checklist-step:hover {
    box-shadow: var(--shadow-md);
}

.checklist-step.complete {
    border-color: #86efac;
}

.checklist-step.locked {
    opacity: 0.6;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-icon.complete {
    background: #059669;
    color: white;
}

.step-icon.incomplete {
    background: #fca5a5;
    color: #991b1b;
}

.step-icon.locked {
    background: #e2e8f0;
    color: var(--text-muted);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.step-locked {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-style: italic;
}

.step-summary {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-summary p {
    margin-bottom: 0.125rem;
}

.step-waiting {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.step-form label {
    display: block;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    margin-top: 0.5rem;
}

.step-form input,
.step-form textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-form input:focus,
.step-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    height: auto;
    margin-top: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.84rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ── Deposit Gate UI ── */
.deposit-gate-box {
    display: flex;
    gap: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.deposit-gate-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.deposit-gate-content {
    flex: 1;
}

.deposit-covers-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0 0;
}

.deposit-covers-list li {
    font-size: 0.84rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.deposit-covers-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: 700;
}

.deposit-required-notice {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.deposit-required-notice p {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.deposit-required-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: #fecaca;
    color: #991b1b;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.deposit-required-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #d1d5db, #e5e7eb);
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}

.deposit-lock {
    font-size: 0.65rem;
}

.deposit-nudge {
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    background: #fffbeb;
    border: 1px dashed #fbbf24;
    border-radius: var(--radius);
    font-size: 0.84rem;
    color: #92400e;
    text-align: center;
}

.deposit-nudge a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.deposit-nudge a:hover {
    text-decoration: underline;
}

/* ── Credit Balance Card ── */
.credit-balance-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
    max-width: 250px;
}

.credit-balance-amount {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.credit-balance-amount.positive { color: #059669; }
.credit-balance-amount.zero { color: var(--text-muted); }
.credit-balance-amount.negative { color: var(--error); }

.credit-balance-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.credit-pricing-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ── Admin campaign cards ── */
.admin-campaign-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-campaign-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.admin-campaign-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.15s;
}

.admin-campaign-card-header:hover {
    background: #f0f4f8;
}

.admin-campaign-card-info {
    flex: 1;
    min-width: 0;
}

.admin-campaign-card-name {
    font-size: 0.9rem;
    display: block;
}

.admin-campaign-card-user {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-campaign-card-badges {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-campaign-card-balance {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
}
.admin-campaign-card-balance.positive { color: #059669; background: #d1fae5; }
.admin-campaign-card-balance.zero { color: var(--text-muted); background: #f1f5f9; }

.admin-badge-sm {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.admin-badge-green { background: #d1fae5; color: #065f46; }
.admin-badge-blue { background: #dbeafe; color: #1d4ed8; }
.admin-badge-yellow { background: #fef3c7; color: #92400e; }
.admin-badge-gray { background: #f1f5f9; color: var(--text-muted); }

.admin-campaign-toggle {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 1rem;
    text-align: center;
}

.admin-campaign-card-detail {
    border-top: 1px solid var(--border);
    background: white;
}

/* ── Admin detail form ── */
.admin-detail-grid {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-detail-section {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 0.75rem;
}

.admin-detail-section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.admin-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.admin-detail-row label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-detail-input {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    width: 100%;
}

/* ── Send tracking ── */
.sends-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.sends-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.sends-ok {
    background: #d1fae5;
    color: #065f46;
}

.sends-empty {
    background: #fee2e2;
    color: #991b1b;
}

.btn-buy-sends {
    margin-top: 0.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-buy-sends:hover {
    background: var(--primary-hover);
}

/* ══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════ */

#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    font-size: 0.85rem;
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { border-left: 3px solid #059669; }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--primary); }
.toast-warning { border-left: 3px solid #f59e0b; }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 0.2rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════
   WHAT'S NEXT CARD
   ══════════════════════════════════════════ */

.whats-next { margin-bottom: 1.5rem; }

.wn-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.wn-setup { background: #f0f9ff; border-color: #bae6fd; }
.wn-action { background: #f0fdf4; border-color: #bbf7d0; }
.wn-waiting { background: #fffbeb; border-color: #fde68a; }
.wn-alert { background: #fef2f2; border-color: #fecaca; }
.wn-ready { background: #f8fafc; border-color: var(--border); }

.wn-icon { font-size: 1.75rem; flex-shrink: 0; margin-top: 0.1rem; }

.wn-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }

.wn-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.wn-body .btn-primary { margin-top: 0.25rem; }

/* ══════════════════════════════════════════
   CAMPAIGN DASHBOARD
   ══════════════════════════════════════════ */

.campaign-dashboard { max-width: 900px; margin: 0 auto; }

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dash-greeting { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-subtext { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.15rem; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.dash-stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.dash-stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.dash-quick-actions { margin-bottom: 2rem; }
.dash-quick-actions h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }

.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.dash-action-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
}

.dash-action-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(69, 128, 247, 0.1);
    transform: translateY(-2px);
}

.dash-action-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.dash-action-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
.dash-action-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.dash-section { margin-bottom: 2rem; }

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.dash-section-header h3 { font-size: 1rem; font-weight: 700; }

.dash-drafts-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.dash-draft-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.dash-draft-item:last-child { border-bottom: none; }

.dash-draft-info { display: flex; flex-direction: column; gap: 0.15rem; }
.dash-draft-info strong { font-size: 0.85rem; }
.dash-draft-subject { font-size: 0.8rem; color: var(--text-muted); }
.dash-draft-date { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

.dash-domain-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-wrap: wrap;
}

.dash-domain-name { font-weight: 700; font-size: 0.9rem; }
.dash-domain-email { font-size: 0.8rem; color: var(--text-muted); }

/* ══════════════════════════════════════════
   ACCOUNT PAGE — Two-Column Layout
   ══════════════════════════════════════════ */

.acct-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.acct-card.acct-locked {
    opacity: 0.5;
    pointer-events: none;
}

.acct-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.acct-card-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
}

.acct-step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    background: var(--border);
    flex-shrink: 0;
}

.acct-step-dot.done { background: #059669; }
.acct-step-dot.locked { background: #d1d5db; }

.acct-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.85rem;
    align-items: center;
}

.acct-form { margin-top: 0.25rem; }

.acct-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
    margin-top: 0.35rem;
}

.acct-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

.acct-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(69,128,247,0.1); }

.acct-locked-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Right sidebar */
.acct-balance-box {
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.acct-balance-amount {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.acct-balance-amount.positive { color: #059669; }
.acct-balance-amount.zero { color: var(--text-muted); }
.acct-balance-amount.negative { color: var(--error); }

.btn-fund {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
}
.btn-fund:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.acct-balance-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.acct-side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.acct-side-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════ */

/* ── Header logo (all sizes) ── */
.header-logo {
    height: 100px;
}

/* ── Mobile menu button (hidden on desktop) ── */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ── Tablet: 769–1024px ── */
@media (max-width: 1024px) {
    .header-logo { height: 60px; }
    header { padding: 0.75rem 1.5rem; }
    header nav { gap: 0.75rem; font-size: 0.8rem; }
    main { padding: 0 1rem; }

    .dashboard-sidebar { width: 200px; min-width: 200px; }
    .sidebar-link { padding: 0.55rem 1rem; font-size: 0.85rem; }
    .dashboard-content { padding: 1.25rem 1.5rem; }

    .pf-card-hero { gap: 1.5rem; }
    .pf-screenshot { max-width: 320px; }
}

/* ── Mobile: 768px and below ── */
@media (max-width: 768px) {
    /* Toast */
    #toast-container { bottom: 0.75rem; right: 0.75rem; left: 0.75rem; }
    .toast { min-width: unset; }

    /* Dashboard */
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-actions-grid { grid-template-columns: 1fr; }
    .dash-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

    /* What's Next */
    .wn-card { flex-direction: column; gap: 0.5rem; }

    /* Header — clean, centered, no nav on mobile */
    .header-logo { height: 80px; }
    header {
        padding: 1rem 1rem 0.25rem;
        flex-wrap: nowrap;
        justify-content: center;
        border-bottom: none;
    }

    /* Hide hamburger and all nav on mobile */
    .mobile-menu-btn { display: none !important; }
    .nav-links { display: none !important; }

    /* Main content — tight gap between header and search */
    main { margin: 0.25rem auto 1rem; padding: 0 0.6rem; }

    /* Search section — full-bleed feel, balanced spacing */
    .search-section {
        padding: 1.25rem 1rem 1.5rem;
        margin-bottom: 1rem;
        border-radius: 14px;
    }
    .search-row { flex-direction: column; gap: 0.6rem; }
    .search-row .btn-primary {
        width: 100%;
        padding: 0.85rem 1rem;
        font-size: 1.05rem;
        font-weight: 700;
        border-radius: 14px;
        letter-spacing: 0.01em;
    }
    .search-field { width: 100%; }
    .search-field label {
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 0.2rem;
        letter-spacing: 0.02em;
    }
    .search-field input {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 14px;
    }

    /* Feature header — balanced with logo above */
    .feature-section-header { margin-bottom: 0.75rem; }
    .feature-section-header h3.desktop-hero { display: none !important; }
    .feature-section-header h3.mobile-hero {
        display: block !important;
        font-size: 1.35rem;
        line-height: 1.15;
        margin-bottom: 0.3rem;
        font-weight: 800;
    }
    .feature-section-header p {
        font-size: 0.82rem;
        margin-bottom: 0;
        line-height: 1.5;
        opacity: 0.92;
    }
    .page-title { font-size: 1.15rem; margin-bottom: 0.75rem; }

    /* 3-step visual — hide on mobile */
    .steps-visual { display: none !important; }

    /* Collapsed search after results load — show just district name */
    .search-section.search-collapsed {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    .search-section.search-collapsed .search-field label { display: none; }
    .search-section.search-collapsed .search-row { gap: 0.4rem; }
    .search-section.search-collapsed .search-field input {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }
    .search-section.search-collapsed .btn-primary {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    .search-section.search-collapsed .feature-section-header { display: none; }

    /* Count results — compact mobile */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .breakdowns { grid-template-columns: 1fr; gap: 0.75rem; }
    .breakdown { padding: 0.75rem; }
    .breakdown h3 { font-size: 0.9rem; margin-bottom: 0.4rem; }
    .breakdown-sub { font-size: 0.75rem; margin-bottom: 0.5rem; }
    .breakdown th, .breakdown td { padding: 0.25rem 0.35rem; font-size: 0.8rem; }
    .filter-row { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .email-count-target { flex-direction: column; align-items: stretch; }

    /* Result header — prominent on mobile */
    .result-header { margin-bottom: 0.75rem; }
    .result-header h2 { font-size: 1.15rem; }
    .result-header p { font-size: 0.8rem; }

    /* CTA card — compact on mobile */
    .cta-hero { padding: 1rem !important; border-radius: 12px !important; }
    .cta-hero .cta-hero-stats { gap: 0.75rem !important; }
    .cta-hero .cta-hero-count { font-size: 1.5rem !important; }
    .cta-hero .cta-hero-price { font-size: 1.75rem !important; }
    .cta-hero .cta-hero-btn { padding: 0.6rem 1.25rem !important; font-size: 0.9rem !important; }

    /* Propensity card — compact */
    .propensity-card { padding: 1rem !important; margin-top: 0.75rem !important; }

    /* Progress bar — compact */
    .progress-container { padding: 1.5rem 1rem; }
    .progress-pct { font-size: 0.95rem; }

    /* Tables — horizontal scroll */
    .jobs-table-wrapper, .breakdown-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .jobs-table { font-size: 0.75rem; min-width: 600px; }

    /* Premium features */
    .premium-features { padding: 1.5rem 0; }
    .premium-features-header { margin-bottom: 1.5rem; }
    .premium-features-header h2 { font-size: 1.4rem; }
    .premium-features-header p { font-size: 0.82rem; line-height: 1.5; }
    .pf-card { padding: 1.25rem; }
    .pf-card-hero { flex-direction: column; gap: 1rem; }
    .pf-card-hero .pf-card-content { padding: 0; }
    .pf-card-hero .pf-card-visual { padding: 0; }
    .pf-screenshot { max-width: 100%; border-radius: 8px; }
    .pf-row { grid-template-columns: 1fr; }
    .pf-card-half h3 { font-size: 1.1rem; }
    .pf-stats-row { gap: 1rem; }
    .pf-stat-value { font-size: 1.5rem; }

    .pf-social-proof {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    .pf-proof-divider { width: 48px; height: 1px; }

    /* ── Dashboard: sidebar → horizontal scroll tabs ── */
    .dashboard { flex-direction: column; }

    .dashboard-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-header { display: none; }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        gap: 0;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }

    .sidebar-link {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.6rem 1rem;
        font-size: 0.7rem;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        text-align: center;
        min-width: fit-content;
    }

    .sidebar-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }

    .sidebar-icon { font-size: 1.1rem; }
    .sidebar-count { margin-left: 0; margin-top: 0.1rem; }
    .sidebar-divider { display: none; }

    .dashboard-content {
        padding: 1rem;
        max-height: none;
        overflow-y: visible;
    }

    /* Email cards */
    .email-card { padding: 1rem; border-radius: 12px; }
    .email-card-header { flex-direction: column; gap: 0.5rem; }
    .email-card-stats { flex-wrap: wrap; gap: 1rem; }
    .email-card-stat { min-width: 60px; }

    /* Pipeline tracker */
    .pipeline-tracker { overflow-x: auto; padding-bottom: 0.25rem; }
    .pipeline-label { font-size: 0.5rem; }
    .pipeline-dot { width: 20px; height: 20px; font-size: 0.55rem; }

    /* Draft inline */
    .draft-inline-editor { padding: 0.75rem; }
    .draft-textarea { font-size: 0.85rem; }
    .draft-inline-footer { flex-wrap: wrap; }

    /* Pane sections */
    .pane-header h2 { font-size: 1.25rem; }

    /* Image gallery */
    .image-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    /* Forms (login, register, account) */
    .form-card { padding: 1.5rem; margin: 1rem auto; }
    .login-container {
        margin: 1rem auto;
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }
    .login-container h2 { font-size: 1.3rem; margin-bottom: 1rem; }
    .login-container input { font-size: 0.95rem; padding: 0.6rem 0.75rem; }
    .login-container button { padding: 0.75rem; font-size: 0.95rem; border-radius: 12px; }

    /* Account two-column → single column on mobile */
    div[style*="grid-template-columns:1fr 320px"] {
        grid-template-columns: 1fr !important;
    }

    /* Footer — stack links vertically on mobile */
    footer {
        padding: 1.25rem 0.75rem;
        font-size: 0.7rem;
        line-height: 2;
    }

    /* Legal pages (Privacy, TOS) — mobile */
    .legal-page { padding: 0 0.25rem; }
    .legal-page h2 { font-size: 1.2rem; }
    .legal-page h3 { font-size: 0.9rem; margin-top: 1.25rem; }
    .legal-page p { font-size: 0.82rem; line-height: 1.6; word-wrap: break-word; }
    .legal-page ul { font-size: 0.82rem; line-height: 1.6; margin-left: 1.25rem; }
    .legal-page a { word-break: break-all; }
}

/* ── Small phones: 480px and below ── */
@media (max-width: 480px) {
    .header-logo { height: 80px; }
    header { padding: 0.75rem 0.75rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .email-card-stats { gap: 0.75rem; justify-content: space-between; }

    .pf-stats-row { flex-direction: column; align-items: flex-start; }

    .image-gallery { grid-template-columns: 1fr; }

    .sidebar-link { padding: 0.5rem 0.75rem; font-size: 0.65rem; }
    .sidebar-icon { font-size: 0.95rem; }

    /* Search — ultra compact */
    .search-section { padding: 0.75rem; margin-bottom: 0.75rem; }
    .page-title { font-size: 1rem; margin-bottom: 0.5rem; }

    /* CTA card — stack vertically on small phones */
    .cta-hero { padding: 0.85rem !important; border-radius: 10px !important; margin-bottom: 0.75rem !important; }
    .cta-hero > div { flex-direction: column !important; gap: 0.75rem !important; }
    .cta-hero .cta-hero-count { font-size: 1.35rem !important; }
    .cta-hero .cta-hero-price { font-size: 1.5rem !important; }
    .cta-hero .cta-hero-stats { gap: 0.5rem !important; }
    .cta-hero .cta-hero-btn { padding: 0.5rem 1rem !important; font-size: 0.85rem !important; }

    /* Results — tighter */
    .result-header { margin-bottom: 0.5rem; }
    .result-header h2 { font-size: 1.05rem; }
    .breakdown { padding: 0.6rem; }
    .breakdown th, .breakdown td { padding: 0.2rem 0.25rem; font-size: 0.75rem; }
    .propensity-card { padding: 0.75rem !important; margin-top: 0.5rem !important; }
    .propensity-card h3 { font-size: 1rem !important; }
    .propensity-card table { font-size: 0.75rem; }
    .propensity-card th, .propensity-card td { padding: 0.2rem 0.3rem !important; }

    /* Price buttons — smaller */
    .price-btn { font-size: 0.65rem !important; padding: 0.2rem 0.5rem !important; }
}

/* ══════════════════════════════════════════
   MARKETING PAGES — Mobile Responsive
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Pricing page */
    .pricing-hero { padding: 1.5rem 1rem !important; }
    .pricing-hero h2 { font-size: 1.5rem !important; }
    .pricing-tiers { flex-direction: column !important; gap: 0.75rem !important; }
    .pricing-breakdown table { font-size: 0.75rem; }
    .pricing-breakdown td, .pricing-breakdown th { padding: 0.4rem 0.5rem !important; }

    /* Intelligence page */
    div[style*="display:flex"][style*="gap:2rem"] { flex-direction: column !important; gap: 1rem !important; }
    div[style*="display:grid"][style*="repeat(3"] { grid-template-columns: 1fr !important; }
    div[style*="display:grid"][style*="repeat(2"] { grid-template-columns: 1fr !important; }

    /* About page */
    div[style*="display:flex"][style*="min-width:280px"] { flex-direction: column !important; }

    /* Blog articles */
    article, div[style*="max-width:700px"] { padding: 0 0.5rem !important; }

    /* Dark intelligence card on homepage */
    .pf-card[style*="linear-gradient"] {
        padding: 1.25rem !important;
    }
    .pf-card[style*="linear-gradient"] h3 { font-size: 1.2rem !important; }
    .pf-card[style*="linear-gradient"] div[style*="font-size:1.75rem"] { font-size: 1.3rem !important; }

    /* 3-step visual */
    div[style*="display:flex"][style*="gap:0.5rem"][style*="justify-content:center"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    div[style*="color:var(--border)"][style*="font-size:1.2rem"] { display: none !important; }

    /* CTA cards in count results */
    .cta-card, div[style*="border-radius:16px"][style*="padding:2rem"] {
        padding: 1rem !important;
    }

    /* Count result CTA hero card */
    .cta-hero { padding: 1.25rem !important; margin-bottom: 1rem !important; }
    .propensity-card { padding: 1.25rem !important; margin-top: 1rem !important; }

    /* Propensity card tables */
    div[style*="overflow-x:auto"] table { font-size: 0.7rem; }

    /* Voter preview */
    .voter-preview table { font-size: 0.7rem; }
    .voter-preview th, .voter-preview td { padding: 0.3rem !important; }

    /* Opportunities page */
    div[style*="max-width:800px"] { padding: 0 0.5rem !important; }

    /* Account page steps */
    .checklist-step { padding: 0.75rem !important; }
    .step-content h3 { font-size: 0.95rem !important; }

    /* Admin console */
    .admin-detail-input { font-size: 0.8rem !important; }

    /* General flex rows that need stacking */
    div[style*="display:flex"][style*="gap:1.5rem"]:not(.sidebar-nav):not(.nav-links) {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 480px) {
    /* Pricing hero */
    .pricing-hero h2 { font-size: 1.25rem !important; }
    div[style*="font-size:3rem"] { font-size: 2rem !important; }

    /* Social proof */
    .pf-social-proof { padding: 1rem !important; }
    .pf-social-proof span { font-size: 1.25rem !important; }

    /* Intelligence stats */
    div[style*="font-size:1.75rem"] { font-size: 1.2rem !important; }

    /* Footer */
    footer { line-height: 1.8; }
}

/* ── Campaigns Collage Banner ── */
.campaigns-banner {
    margin: 1.5rem 0;
    text-align: center;
}

.campaigns-collage {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 280px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.campaigns-collage img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: top;
    display: block;
    filter: saturate(0.85);
}

.collage-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 2.5rem 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.collage-stat {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.collage-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ── Instantly-style Feature Cards ── */
.feature-section {
    margin: 3rem 0;
}

/* Mobile/desktop hero text toggle */
.feature-section-header h3.mobile-hero { display: none; }
.feature-section-header h3.desktop-hero { display: flex; }

.feature-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.feature-section-header h3 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.feature-section-header p {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.feature-section-header a.btn-primary {
    color: white;
}

.feature-section-header p a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

/* ══════════════════════════════════════════
   PREMIUM FEATURES — Instantly.ai inspired
   ══════════════════════════════════════════ */

.premium-features {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 0;
}

.premium-features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.premium-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3AABE0;
    background: rgba(58, 171, 224, 0.1);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.premium-features-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-features-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Card base ── */
.pf-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 2.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.pf-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Hero cards (with side-by-side layout) */
.pf-card-hero {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.pf-card-content { flex: 1; }
.pf-card-visual { flex: 1; }

/* Two-up row */
.pf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pf-card-half { margin-bottom: 0; }

/* ── Badges ── */
.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.pf-badge-blue { background: rgba(58, 171, 224, 0.12); color: #2891c4; }
.pf-badge-green { background: rgba(5, 150, 105, 0.1); color: #059669; }
.pf-badge-purple { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.pf-badge-amber { background: rgba(217, 119, 6, 0.1); color: #d97706; }

/* ── Typography ── */
.pf-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.pf-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* ── Glowing stat pills ── */
.pf-stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    min-width: 80px;
}

.pf-stat-green {
    background: rgba(5, 150, 105, 0.08);
}

.pf-stat-purple {
    background: rgba(124, 58, 237, 0.08);
}

.pf-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pf-stat-green .pf-stat-value { color: #059669; }
.pf-stat-purple .pf-stat-value { color: #7c3aed; }

.pf-stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ── Screenshot visual ── */
.pf-screenshot {
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}

/* ── Mock table (discover / targeting cards) ── */
.pf-mock-table {
    background: #fafbfc;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 0.25rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 340px;
}

.pf-mock-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.pf-mock-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
}

.pf-mock-row:last-child { border-bottom: none; }
.pf-mock-row:hover { background: rgba(58, 171, 224, 0.04); }

.pf-mock-row-highlight {
    background: rgba(217, 119, 6, 0.06);
    border-radius: 8px;
    border-bottom-color: transparent;
}

.pf-party-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.pf-dot-red { background: #ef4444; }
.pf-dot-blue { background: #3b82f6; }
.pf-dot-gray { background: #94a3b8; }
.pf-dot-amber { background: #f59e0b; }

.pf-party-name { font-weight: 600; color: var(--text); }
.pf-voter-count { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 500; }

.pf-action-btn {
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}

.pf-best-value {
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Inbox mock (delivery card) ── */
.pf-inbox-mock {
    background: #fafbfc;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 0.75rem;
}

.pf-inbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.25rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #059669;
}

/* ── Email subject mock (AI card) ── */
.pf-email-mock {
    background: #fafbfc;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.pf-email-subject {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.pf-email-dot {
    width: 8px;
    height: 8px;
    background: #7c3aed;
    border-radius: 50%;
    flex-shrink: 0;
}

.pf-email-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-left: 1.1rem;
}

/* ── Social proof bar ── */
.pf-social-proof {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 1rem;
    margin-top: 1rem;
}

.pf-proof-stat {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pf-proof-stat span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    display: block;
    letter-spacing: -0.02em;
}

.pf-proof-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* ── Campaign proof / scrolling ticker ── */
.campaign-proof {
    margin-top: 3rem;
    padding-bottom: 1rem;
}

.campaign-proof-header {
    text-align: center;
    margin-bottom: 2rem;
}

.campaign-proof-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 0.5rem;
}

.campaign-ticker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
}

/* Fade edges */
.campaign-ticker-wrapper::before,
.campaign-ticker-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.campaign-ticker-wrapper::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.campaign-ticker-wrapper::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.campaign-ticker {
    overflow: hidden;
    height: 80px;
}

.campaign-ticker-track {
    display: flex;
    width: max-content;
}

.campaign-ticker img {
    height: 80px;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
}

/* Scroll left animation */
.campaign-ticker-left .campaign-ticker-track {
    animation: tickerScrollLeft 30s linear infinite;
}

/* Scroll right animation */
.campaign-ticker-right .campaign-ticker-track {
    animation: tickerScrollRight 35s linear infinite;
}

@keyframes tickerScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes tickerScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ── Impersonation banner ── */
.impersonation-banner {
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 2px solid #f59e0b;
}

.impersonation-exit-btn {
    background: #92400e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.impersonation-exit-btn:hover {
    background: #78350f;
}

/* ── Pricing editor ── */
.pricing-editor {
    max-width: 600px;
}

.pricing-base-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.pricing-base-row label {
    font-size: 0.9rem;
    font-weight: 500;
}

.pricing-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    width: 140px;
}

.pricing-input-sm {
    width: 110px;
}

.admin-success-msg {
    background: #d1fae5;
    color: #065f46;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Email list creation form ── */
.email-list-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--surface);
    cursor: pointer;
}

/* ══════════════════════════════════════════
   DASHBOARD — SendGrid-Style Layout
   ══════════════════════════════════════════ */

main.dashboard-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

.dashboard {
    display: flex;
    min-height: calc(100vh - 180px);
}

/* ── Sidebar ── */
.dashboard-sidebar {
    width: 250px;
    min-width: 250px;
    background: #f8fafc;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 0.5rem 0;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: rgba(69, 128, 247, 0.04);
    color: var(--text);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(69, 128, 247, 0.06);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

.sidebar-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 1.5rem;
}

/* ── Content pane ── */
.dashboard-content {
    flex: 1;
    padding: 1.5rem 2.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

/* ── Pane common ── */
.pane-header {
    margin-bottom: 1.5rem;
}

.pane-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.pane-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pane-loading {
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Pane empty state ── */
.pane-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.pane-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.pane-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.pane-empty a {
    color: var(--primary);
    font-weight: 600;
}

/* ── Pane placeholder (Sent) ── */
.pane-placeholder {
    text-align: center;
    padding: 3rem 2rem;
}

.pane-placeholder h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pane-placeholder p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pane-placeholder-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.pane-feature-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pane-feature-icon {
    font-size: 1.1rem;
}

/* ── Drafts pane ── */
.draft-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.draft-list-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.draft-list-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.draft-list-item-header:hover {
    background: #f8fafc;
}

.draft-list-item-info {
    flex: 0 0 auto;
    min-width: 160px;
}

.draft-list-item-district {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.draft-list-item-filter {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.draft-list-item-meta {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.draft-list-item-subject {
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.draft-list-item-no-draft {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.draft-list-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.draft-list-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.draft-list-toggle {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.draft-list-item-editor {
    border-top: 1px solid var(--border);
    padding: 1rem;
    background: #fafbfc;
}

/* ── Images pane ── */
.image-upload-area {
    margin-bottom: 1.5rem;
}

.image-upload-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-upload-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.image-upload-input {
    display: none;
}

.image-upload-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.image-upload-btn:hover {
    background: #f0f0f0;
}

.image-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.image-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}

.image-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.image-card-info {
    padding: 0.5rem 0.6rem;
}

.image-card-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-card-actions {
    display: flex;
    gap: 0.4rem;
}

.image-copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.image-copy-btn:hover {
    background: var(--primary-hover);
}

.image-delete-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--text-muted);
}

.image-delete-btn:hover {
    background: #fef2f2;
    color: var(--error);
    border-color: var(--error);
}

/* ── Settings pane ── */
.settings-form {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.settings-field {
    margin-bottom: 1rem;
}

.settings-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.settings-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

.settings-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(69, 128, 247, 0.1);
}

.settings-value {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.settings-badge-success {
    background: #ecfdf5;
    color: #059669;
}

.settings-badge-pending {
    background: #fffbeb;
    color: #d97706;
}

.settings-actions {
    padding-top: 0.5rem;
}

.settings-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* ── Senders pane ── */
.sender-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
}

.sender-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sender-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sender-domain {
    font-weight: 600;
    font-size: 0.95rem;
}

.sender-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sender-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ── Domain Check (Admin) ── */
.domain-check-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.domain-check-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.domain-check-result {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.domain-check-available {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.domain-check-taken {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.domain-check-error {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* ── SEND AN EMAIL — Card Dashboard (used inside Lists pane) ── */

.email-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Email card ── */
.email-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.email-card:hover {
    box-shadow: var(--shadow-md);
}

.email-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.email-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.email-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Pipeline tracker ── */
.pipeline-tracker {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pipeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
}

.pipeline-done .pipeline-dot {
    background: #059669;
}

.pipeline-active .pipeline-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(69, 128, 247, 0.2);
    animation: pulseDot 2s infinite;
}

.pipeline-failed .pipeline-dot {
    background: var(--error);
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(69, 128, 247, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(69, 128, 247, 0.1); }
}

.pipeline-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.pipeline-active .pipeline-label { color: var(--primary); }
.pipeline-done .pipeline-label { color: #059669; }

.pipeline-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    min-width: 24px;
    margin: 0 0.25rem;
    margin-bottom: 1rem;
}

.pipeline-line-done { background: #059669; }

/* ── Card error ── */
.email-card-error {
    background: #fef2f2;
    color: #991b1b;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* ── Stats row ── */
.email-card-stats {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.email-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.email-card-stat-value {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.email-card-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* ── Draft section ── */
.email-card-draft {
    margin-bottom: 0.5rem;
}

.draft-preview {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
}

.draft-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.draft-preview-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.draft-expand-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.draft-expand-btn:hover {
    background: var(--primary-hover);
}

.draft-preview-subject {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.draft-preview-body {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
}

.draft-cta {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Inline draft editor ── */
.draft-inline-editor {
    background: #f8fafc;
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
}

/* Multi-list chip picker */
.list-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.1rem;
    min-height: 1.75rem;
}

.list-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.25rem 0.25rem 0.7rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1d4ed8;
    max-width: 100%;
}

.list-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.list-chip-count {
    color: #3b82f6;
    font-weight: 500;
    font-size: 0.68rem;
    padding: 0 0.25rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 999px;
}

.list-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #1d4ed8;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.35rem;
    border-radius: 999px;
    transition: background 0.15s;
}

.list-chip-remove:hover {
    background: #dbeafe;
}

.draft-context-mini {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.draft-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.draft-field-row .draft-label { margin-bottom: 0; }

.draft-regen-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
}

.draft-regen-btn:hover {
    background: rgba(69, 128, 247, 0.06);
    border-color: var(--primary);
}

.draft-inline-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.draft-btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
}

.draft-btn-secondary:hover {
    background: var(--border);
}

/* ── Card footer ── */
.email-card-footer {
    padding-top: 0.25rem;
}

.email-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Empty state ── */
.email-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.email-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.email-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.email-empty-state a {
    color: var(--primary);
    font-weight: 600;
}

/* ── Sender result badges ── */
.sender-result {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
}
.sender-available { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.sender-taken { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.sender-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* end of styles */
