/* ===================================
   Domain Data Extractor - Style Sheet
   Premium Dark Theme with Glassmorphism
   =================================== */

:root {
    /* Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: 0 0 30px rgba(99, 102, 241, 0.3);

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.5);

    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 70px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Consistent dark, square scrollbars across the application. */
* {
    scrollbar-width: thin;
    scrollbar-color: #71717a #0b0b11;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #0b0b11;
}

*::-webkit-scrollbar-thumb {
    min-height: 34px;
    background: #71717a;
    border: 2px solid #0b0b11;
    border-radius: 0;
}

*::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

*::-webkit-scrollbar-corner {
    background: #0b0b11;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    /* Ensure good contrast */
}

/* ===================================
   App Layout
   =================================== */

.app-container {
    display: block;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    background: var(--bg-tertiary);
}

/* ===================================
   App Header (Top Nav)
   =================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 10px;
}

.logo:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.desktop-only {
    display: flex;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
}

/* ===================================
   Mobile Menu Overlay (BundleWP Style)
   =================================== */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: white;
    /* Full white background like BundleWP */
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dark mode support for menu */
@media (prefers-color-scheme: dark) {
    .mobile-menu-overlay {
        background: #0f172a;
        /* Slate 900 */
    }
}

/* Mobile Close Button */
.mobile-menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    /* Should be black/dark because overlay is white? Wait, overlay is white. Text-primary is usually white in dark mode. */
    cursor: pointer;
    z-index: 2002;
}

/* Override text color to black for white overlay context */
.mobile-menu-overlay .mobile-menu-close {
    color: #1a1a25;
    /* Dark color for visibility on white background */
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center links vertically */
    align-items: center;
    gap: 40px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.mobile-nav-item {
    font-size: 1.5rem;
    font-weight: 600;
    color: #64748b;
    /* Slate 500 */
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--accent-primary);
}

.mobile-menu-footer {
    width: 100%;
}

.btn-new-campaign {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 99px;
    /* Pill shape */
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-new-campaign:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* ===================================
   Main Content
   =================================== */

.main-content {
    margin-left: 0;
    padding: 110px 40px 40px;
    /* Increased top padding to 110px */
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    /* Center the content */
    width: 100%;
    box-sizing: border-box;
}

/* ===================================
   Pages
   =================================== */

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===================================
   Stats Grid
   =================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Smaller min-width for mobile */
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    /* Ensure it doesn't overflow */
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-icon.campaigns {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat-icon.domains {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.stat-icon.emails {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-icon.active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===================================
   Campaign List
   =================================== */

.recent-section h2,
.campaigns-container h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campaigns-list.full {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.campaign-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.campaign-card:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.campaign-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.campaign-info .meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.campaign-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(113, 113, 122, 0.2);
    color: var(--text-secondary);
}

.status-badge.running {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-badge.paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 0.875rem;
}

/* ===================================
   Campaign Details
   =================================== */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    transition: color var(--transition-fast);
}

.btn-back:hover {
    color: var(--text-primary);
}

.btn-back svg {
    width: 20px;
    height: 20px;
}

.campaign-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item .label {
    color: var(--text-muted);
}

.info-item .value.status {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.info-item .value.status-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
}

.campaign-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-action.start {
    background: var(--success);
    color: white;
}

.btn-action.start:hover {
    background: #059669;
}

.btn-action.pause {
    background: var(--warning);
    color: white;
}

.btn-action.export {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-action.export:hover {
    border-color: var(--accent-primary);
}

.hidden {
    display: none !important;
}

/* Progress Section */
.progress-section {
    margin-bottom: 32px;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-log {
    max-height: 150px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-log .log-entry {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.progress-log .log-entry:last-child {
    border-bottom: none;
}

.progress-log .log-entry.success {
    color: var(--success);
}

.progress-log .log-entry.error {
    color: var(--error);
}

/* Results Section */
.results-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

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

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
}

.results-table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

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

.results-table th,
.results-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table tbody tr:hover {
    background: var(--bg-glass);
}

.results-table td {
    font-size: 0.9rem;
}

.results-table .domain-cell {
    font-weight: 500;
    color: var(--accent-primary);
}

.results-table .data-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.results-table .data-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.results-table .source-link {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===================================
   User Guide
   =================================== */

.guide-content {
    max-width: 900px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.guide-step {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.guide-step:hover {
    border-color: var(--accent-primary);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.step-content ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.step-content li {
    margin-bottom: 4px;
}

.step-content pre {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.guide-tips {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.guide-tips h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.guide-tips ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.guide-tips li {
    margin-bottom: 8px;
}

/* ===================================
   Modal
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.small {
    max-width: 420px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

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

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

/* Wizard Progress */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.wizard-step.active {
    color: var(--accent-primary);
}

.wizard-step.completed {
    color: var(--success);
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.wizard-step.active .step-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.wizard-step.completed .step-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Wizard Content */
.wizard-content {
    display: none;
    padding: 28px;
}

.wizard-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mode-option {
    cursor: pointer;
}

.mode-option input {
    display: none;
}

.mode-card {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-normal);
}

.mode-card:hover {
    border-color: var(--accent-primary);
}

.mode-option.selected .mode-card,
.mode-option input:checked+.mode-card {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.mode-card svg {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.mode-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.upload-zone h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-zone .file-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
}

.uploaded-file svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.domain-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-remove-file {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--error);
    transition: all var(--transition-fast);
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-remove-file svg {
    width: 20px;
    height: 20px;
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-group {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.filter-toggle input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    position: relative;
    transition: all var(--transition-fast);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.filter-toggle input:checked+.toggle-slider {
    background: var(--accent-primary);
}

.filter-toggle input:checked+.toggle-slider::after {
    left: 23px;
    background: white;
}

.toggle-label {
    flex: 1;
}

.toggle-label strong {
    display: block;
    font-weight: 500;
}

.toggle-label small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-options {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-options label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-options select {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.media-options {
    flex-wrap: wrap;
}

.media-options>div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-options label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Crawl Settings */
.crawl-settings {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.crawl-settings h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.setting-row label {
    color: var(--text-secondary);
}

.setting-row select {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

/* Review Section */
.review-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.review-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.review-label {
    min-width: 140px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.review-value {
    font-weight: 500;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-tag {
    padding: 4px 10px;
    background: var(--accent-primary);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.review-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
}

.review-note svg {
    width: 24px;
    height: 24px;
    color: var(--info);
    flex-shrink: 0;
}

.review-note p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.btn-secondary,
.btn-primary,
.btn-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

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

.btn-secondary:hover:not(:disabled) {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary svg,
.btn-primary svg,
.btn-success svg {
    width: 18px;
    height: 18px;
}

/* Export Modal */
.export-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 28px;
}

.export-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.export-option:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.export-option svg {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
}

.export-option span {
    font-weight: 600;
}

.export-option small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===================================
   Toast Notifications
   =================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.info {
    border-color: var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.toast-icon svg {
    width: 14px;
    height: 14px;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    color: var(--text-muted);
    padding: 4px;
}

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

.toast-close svg {
    width: 16px;
    height: 16px;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {

    /* Hide desktop nav elements */
    .desktop-nav,
    .desktop-only {
        display: none;
    }

    /* Show mobile toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        /* Ensure visible on dark header */
        width: 44px;
        /* Larger touch target */
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-footer {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: 20px;
    }

    .mobile-menu-footer .btn-new-campaign {
        width: 100%;
        justify-content: center;
    }

    .app-header {
        padding: 0 16px;
        /* Reduced padding on mobile */
    }

    .main-content {
        padding: 85px 16px 30px;
        /* Reduced side padding (40px -> 16px) */
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .campaign-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .campaign-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }

    .export-options {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Settings Page - FIXED
   =================================== */

#pageSettings {
    padding: 0 24px 24px !important;
    overflow-x: hidden;
}

#pageSettings .page-header {
    margin-bottom: 24px;
}

#pageSettings .page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

#pageSettings .settings-container {
    width: 100%;
    max-width: 650px;
}

#pageSettings .settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
    width: 100%;
}

#pageSettings .settings-tabs .tab-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

#pageSettings .settings-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

#pageSettings .settings-tabs .tab-btn.active {
    background: var(--accent-primary);
    color: white;
}

#pageSettings .settings-tab-content {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
}

#pageSettings .settings-tab-content.hidden {
    display: none !important;
}

#pageSettings .settings-tab-content.active {
    display: block;
}

#pageSettings .info-banner,
#pageSettings .settings-tab-content>div:first-child {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

#pageSettings label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
}

#pageSettings input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

#pageSettings input[type="text"],
#pageSettings input[type="password"],
#pageSettings input[type="number"],
#pageSettings select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

#pageSettings input:focus,
#pageSettings select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

#pageSettings small {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

#pageSettings small a {
    color: var(--accent-primary);
}

#pageSettings .btn-save,
#pageSettings button[id="btnSaveSettings"] {
    padding: 12px 28px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--accent-glow);
    border: none;
}

#pageSettings .btn-test,
#pageSettings button[id="btnTestSmtp"] {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ===================================
   Visual Scraper Page
   =================================== */

#pageVisualScraper {
    padding: 0 24px 24px;
}

.visual-scraper-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.url-input-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.scraper-url-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.scraper-url-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.scraper-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    min-height: 400px;
    max-height: calc(100vh - 320px);
}

.page-preview-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.preview-title {
    font-weight: 600;
}

.selection-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.selection-toggle input {
    accent-color: var(--accent-primary);
}

.preview-container {
    flex: 1;
    overflow: auto;
    position: relative;
    max-height: calc(100vh - 420px);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.preview-placeholder svg {
    opacity: 0.5;
    margin-bottom: 16px;
}

.preview-html {
    padding: 20px;
    background: white;
    color: black;
    min-height: 100%;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.fields-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.fields-header h3 {
    margin: 0;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-add-field {
    background: var(--accent-primary);
    color: white;
    border: none;
}

.fields-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-fields-message {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.field-item {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
}

.field-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.field-name {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.field-type {
    padding: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.field-selector {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85rem;
}

.field-preview {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-field {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-remove-field:hover {
    color: #ef4444;
}

.selector-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 6px;
}

.scraper-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.extraction-results {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-header h3 {
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.results-table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

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

.results-table th,
.results-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.results-table td {
    font-size: 0.9rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .scraper-main-layout {
        grid-template-columns: 1fr;
    }
}

/* Quick Extract Bar */
.quick-extract-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.3);
    margin-bottom: 16px;
}

.quick-extract-bar label {
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
}

.template-dropdown {
    flex: 1;
    max-width: 300px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.template-dropdown optgroup {
    font-weight: 600;
    color: var(--text-secondary);
}

.quick-max-pages {
    width: 70px;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-align: center;
}

.btn-accent {
    background: var(--accent-gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    box-shadow: var(--accent-glow);
    transition: transform var(--transition-fast);
}

.btn-accent:hover {
    transform: translateY(-2px);
}

.btn-accent:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Dedup Toggle */
.dedup-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.dedup-toggle input {
    accent-color: var(--accent-primary);
}

/* Ensure Visual Scraper container fits properly */
#pageVisualScraper .visual-scraper-container {
    max-width: 100%;
    overflow-x: auto;
}

#pageVisualScraper .scraper-main-layout {
    min-width: 0;
}

/* Fix Quick Extract bar on smaller screens */
@media (max-width: 1200px) {
    .quick-extract-bar {
        flex-wrap: wrap;
    }

    .template-dropdown {
        max-width: 100%;
        flex: 1 1 200px;
    }
}



/* ===================================
   Input Text Visibility Fix
   Ensures white text on all form inputs
   =================================== */

input,
textarea,
select {
    color: #ffffff !important;
    caret-color: #ffffff;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

/* Specific fixes for all input types */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="date"],
textarea {
    color: #ffffff !important;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

/* Modal form inputs */
.modal input,
.modal textarea,
.modal select {
    color: #ffffff !important;
}

/* Settings page inputs */
#pageSettings input,
#pageSettings textarea,
#pageSettings select {
    color: #ffffff !important;
}

/* Visual Scraper inputs */
#pageVisualScraper input,
#pageVisualScraper textarea,
#pageVisualScraper select {
    color: #ffffff !important;
}

/* Marketing page inputs */
#pageMarketing input,
#pageMarketing textarea,
#pageMarketing select {
    color: #ffffff !important;
}

/* Campaign creation wizard inputs */
.wizard-content input,
.wizard-content textarea,
.wizard-content select {
    color: #ffffff !important;
}

/* Info Icon Styling */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 6px;
    cursor: help;
    border: 1px solid var(--border-color);
}

.info-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* User Guide Styling */
.guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-section {
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.guide-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    margin-top: 24px;
    color: var(--text-primary);
}

.guide-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.guide-section ul {
    margin-left: 20px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.guide-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.guide-tip {
    background: rgba(34, 197, 94, 0.1);
    /* Greenish tint equivalent */
    border-left: 4px solid var(--status-success);
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
}

/* ===================================
   Info Icons with Tooltips
   =================================== */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    cursor: help;
    margin-left: 6px;
    transition: all var(--transition-fast);
    vertical-align: middle;
}

.info-icon:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}


/* Integration Readiness Status */
.readiness-panel {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: radial-gradient(circle at top right, rgba(99,102,241,.12), transparent 35%), rgba(13,13,22,.68);
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
}
.readiness-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.readiness-eyebrow { display: block; margin-bottom: 2px; color: #8b8b9a; font-size: .65rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.readiness-heading h2 { font-size: 1.02rem; letter-spacing: -.01em; }
.readiness-legend { display: flex; align-items: center; gap: 14px; color: #8f8f9f; font-size: .68rem; }
.readiness-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-dot, .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.working, .integration-badge.working .status-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.1); }
.legend-dot.untested, .integration-badge.untested .status-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.1); }
.legend-dot.not-configured, .integration-badge.not-configured .status-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.integration-badge.loading .status-dot { background: #71717a; }

.integration-status-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; min-height: 58px; }
.integration-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 58px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.integration-badge:hover { transform: translateY(-1px); border-color: rgba(167,139,250,.28); background: rgba(255,255,255,.045); }
.integration-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.integration-summary > div { min-width: 0; }
.integration-summary strong { display: block; overflow: hidden; color: #f4f4f5; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.integration-summary small { display: block; margin-top: 2px; color: #858594; font-size: .63rem; white-space: nowrap; }
.integration-badge.working .integration-summary small { color: #6ee7a5; }
.integration-badge.untested .integration-summary small { color: #fbbf24; }
.integration-badge.not-configured .integration-summary small { color: #fda4af; }
.integration-badge button {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 7px;
    color: #c4b5fd;
    background: rgba(124,58,237,.1);
    border: 1px solid rgba(139,92,246,.2);
    font-size: .64rem;
    font-weight: 800;
}
.integration-badge button::after { content: ' \2192'; margin-left: 2px; }
.integration-badge button:hover, .integration-badge button:focus-visible { color: white; background: rgba(124,58,237,.25); border-color: rgba(167,139,250,.55); outline: none; }

/* Fixed BundleWP offer and product rail */
.promo-bar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 134px;
    z-index: 1100;
    overflow: hidden;
    background: #21145f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.promo-announcement {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
    color: white;
    background: linear-gradient(90deg, #4c1d95, #7c3aed, #4c1d95);
    text-align: center;
    letter-spacing: .01em;
}

.promo-offer-label {
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    font-size: .69rem;
    font-weight: 800;
    text-transform: uppercase;
}

.promo-announcement strong { font-size: .82rem; }
.promo-header-controls {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.promo-header-controls button {
    display: inline-flex;
    min-width: 30px;
    height: 27px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px;
    color: #f5f3ff;
    background: rgba(30,16,78,.52);
    font-size: .68rem;
    font-weight: 750;
}
.promo-header-controls button:hover,
.promo-header-controls button:focus-visible { color: #2e1065; background: #fef08a; border-color: #fef08a; }
#promoClose { padding: 0; font-size: 1.1rem; }
.promo-reopen {
    position: static;
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(167,139,250,.55);
    border-radius: 7px;
    color: #ede9fe;
    background: #21145f;
    box-shadow: 0 5px 16px rgba(0,0,0,.24);
    font-size: .72rem;
    font-weight: 800;
}
.promo-reopen[hidden] { display: none; }
.promo-reopen:hover { background: #6d28d9; }
.visitor-total {
    position: absolute;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 7px;
    color: #ede9fe;
    background: rgba(30, 16, 78, .48);
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}
.visitor-total strong { color: #fef08a; font-size: .76rem; }
.coupon-code {
    margin: 0 3px;
    padding: 3px 8px;
    border-radius: 6px;
    color: #2e1065;
    background: #fef08a;
    font-weight: 900;
    letter-spacing: .08em;
}

.promo-products {
    height: 94px;
    display: block;
    background: rgba(7, 7, 20, .25);
}
.promo-scroller {
    width: 100%;
    height: 100%;
    padding: 8px 0;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
}
.promo-scroller::-webkit-scrollbar { display: none; }

.promo-track {
    width: max-content;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    will-change: transform;
    animation: promo-products-marquee 55s linear infinite;
}

.promo-bar:hover .promo-track,
.promo-bar:focus-within .promo-track { animation-play-state: paused; }

.promo-set {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

@keyframes promo-products-marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-50% - 4px), 0, 0); }
}

.promo-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 370px;
    height: 76px;
    padding: 10px 10px 10px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: rgba(10, 10, 25, .34);
    color: #fff;
    font-size: .75rem;
}

.promo-product > div:first-child { min-width: 0; }
.promo-product strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-description { display: block; max-width: 210px; margin-top: 3px; overflow: hidden; color: #bcb4dc; font-size: .64rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.promo-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.promo-product button,
.promo-product a { padding: 6px 8px; border-radius: 7px; white-space: nowrap; font-size: .69rem; font-weight: 800; }
.promo-product button { color: #ede9fe; border: 1px solid rgba(221,214,254,.45); }
.promo-product a { color: #3b0764; background: white; }
.promo-product button:hover { background: rgba(255,255,255,.12); }
.promo-product a:hover { background: #fef08a; }

.product-modal[hidden] { display: none; }
.product-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.product-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 3, 10, .78); backdrop-filter: blur(6px); }
.product-modal-card {
    position: relative;
    width: min(900px, 100%);
    max-height: min(760px, 90vh);
    overflow-y: auto;
    padding: 28px;
    border: 1px solid rgba(139,92,246,.48);
    border-radius: 18px;
    background: #151522;
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.product-modal-close { position: absolute; top: 12px; right: 15px; color: #d4d4d8; font-size: 2rem; line-height: 1; }
.product-modal-eyebrow { display: block; color: #a78bfa; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.product-modal-card h2 { margin: 6px 36px 8px 0; font-size: 1.55rem; }
.product-modal-card > p { margin-bottom: 18px; color: var(--text-secondary); }
.product-modal-card h3 { margin-bottom: 10px; font-size: .95rem; }
.product-modal-card ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0 0 20px; color: #e4e4e7; list-style: none; }
.product-modal-card li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; background: rgba(255,255,255,.025); font-size: .78rem; line-height: 1.35; }
.product-modal-card li > span { display: inline-grid; flex: 0 0 23px; height: 23px; place-items: center; border-radius: 6px; color: #c4b5fd; background: rgba(124,58,237,.18); font-size: .65rem; font-weight: 800; }
.product-modal-offer { padding: 11px 13px; border-radius: 9px; color: #fef9c3; background: rgba(234,179,8,.12); border: 1px solid rgba(250,204,21,.25); }
.product-modal-buy { display: flex; justify-content: center; margin-top: 14px; padding: 12px 18px; border-radius: 9px; color: white; background: var(--accent-gradient); font-weight: 800; }

.btn-action.restart {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 1px solid #a78bfa;
    box-shadow: 0 7px 18px rgba(79, 70, 229, .22);
}
.btn-action.restart:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.12); }
.btn-action.restart:disabled { color: #a1a1aa; background: #27272f; border-color: #3f3f46; box-shadow: none; cursor: not-allowed; }
.btn-action.edit { color: #dbeafe; background: rgba(37,99,235,.14); border: 1px solid rgba(96,165,250,.35); }
.btn-action.edit:hover:not(:disabled) { background: rgba(37,99,235,.28); border-color: #60a5fa; }
.btn-action.edit:disabled { color: #71717a; border-color: #3f3f46; background: #27272f; cursor: not-allowed; }
.campaign-card-edit { padding: 6px 9px; border-radius: 7px; color: #c4b5fd; border: 1px solid rgba(139,92,246,.25); background: rgba(124,58,237,.1); font-size: .7rem; font-weight: 800; }
.campaign-card-edit:hover:not(:disabled) { color: white; border-color: #8b5cf6; }
.campaign-card-edit:disabled { opacity: .45; cursor: not-allowed; }
.modal.small.edit-campaign-modal {
    max-width: 560px;
    overflow: hidden;
    background: linear-gradient(180deg, #171722 0%, #111119 100%);
    border-color: rgba(139,92,246,.34);
    box-shadow: 0 28px 80px rgba(0,0,0,.72), 0 0 0 1px rgba(139,92,246,.08);
}
.edit-campaign-modal .modal-header { background: rgba(99,102,241,.06); }
.edit-campaign-modal .modal-body {
    display: grid;
    gap: 16px;
    padding: 22px 28px 26px;
    max-height: 58vh;
    overflow-y: auto;
}
.edit-campaign-modal .modal-footer { justify-content: flex-end; gap: 10px; }
.edit-options-grid { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--border-color); border-radius: 10px; background: rgba(255,255,255,.02); }
.edit-toggle { display: flex; align-items: center; gap: 9px; color: var(--text-secondary); cursor: pointer; }
.edit-toggle input { width: 17px; height: 17px; accent-color: var(--accent-primary); }
.proxy-choice { padding: 12px; border: 1px solid rgba(139,92,246,.18); border-radius: 10px; background: rgba(99,102,241,.05); }

#domainsInput,
#keywordsInput,
#screenshotUrls,
#trafficUrls,
#downloadUrls {
    display: block;
    width: 100%;
    min-height: 150px;
    resize: vertical;
}

.app-header { top: 134px; }
.main-content { padding-top: 238px; }

body.promo-collapsed .promo-bar { height: 40px; }
body.promo-collapsed .promo-products { display: none; }
body.promo-collapsed .app-header { top: 40px; }
body.promo-collapsed .main-content { padding-top: 144px; }
body.promo-hidden .promo-bar { display: none; }
body.promo-hidden .app-header { top: 0; }
body.promo-hidden .main-content { padding-top: 104px; }

.input-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: var(--text-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.input-divider::before, .input-divider::after { content: ''; height: 1px; flex: 1; background: var(--border-color); }
.file-import-button { display: inline-flex; margin-top: 10px; padding: 9px 13px; border: 1px solid var(--border-color); border-radius: 8px; color: var(--accent-primary); cursor: pointer; }
.file-import-button:hover { border-color: var(--accent-primary); background: rgba(99,102,241,.08); }
.file-import-status { display: block; min-height: 20px; margin-top: 6px; color: var(--text-muted); }

@media (max-width: 1100px) {
    .integration-status-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .readiness-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 768px) {
    .promo-bar { height: 138px; }
    .promo-announcement { height: 44px; gap: 7px; flex-wrap: wrap; align-content: center; }
    .promo-announcement strong { font-size: .71rem; }
    .promo-offer-label { display: none; }
    .promo-header-controls { left: 7px; }
    #promoToggleLabel { display: none; }
    .promo-header-controls button { width: 27px; min-width: 27px; padding: 0; }
    .header-left { gap: 9px; }
    .promo-reopen { padding: 6px 8px; font-size: .66rem; }
    .visitor-total { right: 7px; padding: 3px 6px; font-size: 0; }
    .visitor-total > span { font-size: .72rem; }
    .visitor-total strong { font-size: .7rem; }
    .promo-products { height: 94px; }
    .promo-product { width: min(355px, calc(100vw - 76px)); height: 76px; }
    .app-header { top: 138px; }
    .main-content { padding-top: 228px; }
    body.promo-collapsed .promo-bar { height: 44px; }
    body.promo-collapsed .app-header { top: 44px; }
    body.promo-collapsed .main-content { padding-top: 134px; }
    body.promo-hidden .app-header { top: 0; }
    body.promo-hidden .main-content { padding-top: 90px; }
    .integration-status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .readiness-legend { flex-wrap: wrap; gap: 6px 12px; }
    .product-modal-card { padding: 23px 18px; }
    .product-modal-card ul { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .integration-status-list { grid-template-columns: 1fr; }
}

/* Sponsor (Buy Me a Coffee) */
.sponsor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: #ffdd00;
    color: #0d0c22;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid #0d0c22;
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sponsor-button:hover,
.sponsor-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 221, 0, 0.5);
    color: #0d0c22;
}

.sponsor-button .sponsor-cup {
    font-size: 1.4rem;
    line-height: 1;
}

.sponsor-button-block {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
    font-size: 1.15rem;
    padding: 16px 22px;
}

@media (max-width: 768px) {
    .header-right > .sponsor-button {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .header-right > .sponsor-button .sponsor-label {
        display: none;
    }
}
