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

:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --gray: #888;
    --gray-light: #aaa;
    --accent: #FF6B35;
    --accent-dim: #FF6B3520;
    --accent-hover: #ff8050;
    --surface: #141414;
    --surface-hover: #1a1a1a;
    --border: #222;
    --border-light: #333;
    --success: #22c55e;
    --success-dim: #22c55e20;
    --warning: #eab308;
    --warning-dim: #eab30820;
    --danger: #ef4444;
    --danger-dim: #ef444420;
    --info: #3b82f6;
    --info-dim: #3b82f620;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.space { font-family: 'Space Grotesk', sans-serif; }

/* --- COMPONENTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}
.btn-secondary {
    background: var(--surface);
    color: var(--white);
    border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--border-light);
}
.btn-ghost {
    background: transparent;
    color: var(--gray);
    padding: 8px 12px;
}
.btn-ghost:hover {
    color: var(--white);
}
.btn-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid transparent;
}
.btn-danger:hover:not(:disabled) {
    border-color: var(--danger);
}
.btn-success {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid transparent;
}
.btn-success:hover:not(:disabled) {
    border-color: var(--success);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}
.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.input:focus {
    outline: none;
    border-color: var(--accent);
}
.input::placeholder {
    color: #555;
}

textarea.input {
    resize: vertical;
    min-height: 80px;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 6px;
    font-weight: 500;
}

.field {
    margin-bottom: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.card-hover:hover {
    border-color: var(--border-light);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-accent {
    background: var(--accent-dim);
    color: var(--accent);
}
.badge-success {
    background: var(--success-dim);
    color: var(--success);
}
.badge-warning {
    background: var(--warning-dim);
    color: var(--warning);
}
.badge-danger {
    background: var(--danger-dim);
    color: var(--danger);
}
.badge-info {
    background: var(--info-dim);
    color: var(--info);
}

/* --- NAV --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(10,10,10,0.8);
    border-bottom: 1px solid var(--border);
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: var(--white);
    cursor: pointer;
    text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-tag {
    font-size: 0.75rem;
    color: var(--gray);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
}

/* --- LANDING PAGE --- */
.landing { padding-top: 80px; }

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 40px 80px;
    max-width: 900px;
    margin: 0 auto;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 8px 16px;
    border-radius: 100px;
    width: fit-content;
    margin-bottom: 32px;
}
.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}
.hero h1 em {
    font-style: italic;
    color: var(--accent);
}
.hero p {
    font-size: 1.15rem;
    color: var(--gray);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 40px;
}
.hero-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Ticker */
.ticker-wrap {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}
.ticker {
    display: flex;
    animation: scroll 30s linear infinite;
    gap: 48px;
    width: max-content;
}
.ticker span {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.ticker span::before {
    content: '◆ ';
    color: var(--accent);
    font-size: 0.6rem;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Steps */
.steps {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 40px;
}
.steps h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -1px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: border-color 0.3s;
}
.step-card:hover {
    border-color: var(--accent);
}
.step-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 16px;
}
.step-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.step-card p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

/* Compare */
.compare {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    text-align: center;
}
.compare h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -1px;
}
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    text-align: left;
}
.compare-card {
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.compare-card.old {
    background: #1a1111;
    border-color: #331a1a;
}
.compare-card.new {
    background: #111a11;
    border-color: #1a331a;
}
.compare-card h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}
.compare-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.compare-card li {
    font-size: 0.9rem;
    color: var(--gray-light);
}
.compare-card.old li::before {
    content: '✗ ';
    color: var(--danger);
}
.compare-card.new li::before {
    content: '✓ ';
    color: var(--success);
}

/* CTA */
.cta-section {
    text-align: center;
    padding: 100px 40px;
    max-width: 700px;
    margin: 0 auto;
}
.cta-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.cta-section p {
    color: var(--gray);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}
footer a {
    color: var(--accent);
    text-decoration: none;
}

/* --- APP PAGES --- */
.app-container {
    padding-top: 80px;
    min-height: 100vh;
}
.app-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Auth Forms */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
}
.auth-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.auth-card .subtitle {
    color: var(--gray);
    margin-bottom: 32px;
    font-size: 0.9rem;
}
.auth-switch {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 0.85rem;
}
.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* Campaign Cards */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.campaign-card {
    cursor: pointer;
    transition: all 0.2s;
}
.campaign-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.campaign-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.campaign-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.campaign-meta-item {
    font-size: 0.8rem;
    color: var(--gray);
}
.campaign-meta-item strong {
    color: var(--white);
}
.campaign-stats {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.campaign-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.campaign-stat .num {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}
.campaign-stat .lbl {
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Campaign Detail */
.campaign-detail-header {
    margin-bottom: 32px;
}
.campaign-detail-header h1 {
    margin-bottom: 8px;
}
.campaign-icp {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 40px;
}
.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Prospects Table */
.prospects-table {
    width: 100%;
    border-collapse: collapse;
}
.prospects-table th,
.prospects-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.prospects-table th {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.prospects-table td {
    color: var(--gray-light);
}
.prospects-table tr:hover td {
    background: var(--surface);
}
.prospect-name {
    color: var(--white) !important;
    font-weight: 500;
}
.score-bar {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
.score-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
}

/* Email Queue */
.email-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.email-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.email-info {
    flex: 1;
    min-width: 0;
}
.email-to {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 4px;
}
.email-subject {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.email-preview {
    font-size: 0.85rem;
    color: var(--gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.email-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}
.modal-lg {
    max-width: 700px;
}
.modal h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Loading / Empty States */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray);
}
.empty-state h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.empty-state p {
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
    max-width: 360px;
}
.toast-success {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid #22c55e40;
}
.toast-error {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid #ef444440;
}
.toast-info {
    background: var(--info-dim);
    color: var(--info);
    border: 1px solid #3b82f640;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    nav { padding: 14px 20px; }
    .hero { padding: 40px 20px 60px; }
    .hero h1 { font-size: 2rem; letter-spacing: -1px; }
    .steps { padding: 60px 20px; }
    .compare { padding: 60px 20px; }
    .compare-grid { grid-template-columns: 1fr; }
    .app-content { padding: 20px; }
    .campaigns-grid { grid-template-columns: 1fr; }
    .prospects-table { font-size: 0.8rem; }
    .prospects-table th, .prospects-table td { padding: 8px; }
    .email-card { flex-direction: column; }
    .modal { padding: 24px; margin: 12px; }
}
