/* ── ConvictionEdge — Design System ── */

:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-card: #1a2234;
    --bg-card-hover: #1f2a40;
    --text-primary: #f0f2f5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --border: #1e293b;
    --border-light: #334155;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo { height: 32px; width: auto; }
.brand-name { letter-spacing: -0.02em; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.nav-link:hover { color: var(--text-primary); text-decoration: none; }

.nav-link-primary {
    background: var(--accent);
    color: white !important;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
}
.nav-link-primary:hover { background: var(--accent-hover); }

.nav-link-secondary { color: var(--text-muted); }

.credit-badge {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.credit-badge-large {
    font-size: 1rem;
    padding: 0.4rem 1rem;
}

/* ── Container ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--bg-card-hover); text-decoration: none; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.btn-outline:hover { color: var(--text-primary); border-color: var(--text-muted); text-decoration: none; }

.btn-block { width: 100%; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2.5rem; font-size: 1.1rem; }
.btn-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ── Ticker Input ── */
.ticker-form { max-width: 560px; margin: 0 auto; }

.ticker-input-group {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--border-light), var(--shadow);
    transition: box-shadow 0.2s;
}
.ticker-input-group:focus-within {
    box-shadow: 0 0 0 2px var(--accent), 0 0 20px var(--accent-glow);
}

.ticker-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: var(--font);
    outline: none;
    text-transform: uppercase;
}
.ticker-input::placeholder {
    color: var(--text-muted);
    text-transform: none;
}

.btn-analyze {
    padding: 1rem 2rem;
    border-radius: 0;
    font-size: 1.05rem;
}

.ticker-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.ticker-hint-warning { color: var(--yellow); }

/* ── How It Works ── */
.section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

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

/* ── Differentiator Section ── */
.differentiator {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.diff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.diff-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.diff-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.diff-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── CTA Section ── */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 2rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cta-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ── Auth Logo ── */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-img {
    height: 40px;
    width: auto;
}

/* ── Report Brand ── */
.report-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.report-logo {
    height: 28px;
    width: auto;
}

.report-brand-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: -0.01em;
}

/* ── Auth Pages ── */
.auth-container {
    display: flex;
    justify-content: center;
    padding-top: 4rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ── Google Sign-In ── */
.google-signin-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    padding: 0.7rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }

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

.auth-switch {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
}

/* ── Generating Page ── */
.generating-container {
    display: flex;
    justify-content: center;
    padding-top: 4rem;
}

.generating-card {
    width: 100%;
    max-width: 560px;
    text-align: center;
}

.generating-ticker {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.generating-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.progress-stages {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    text-align: left;
}

.stage {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.stage-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-light);
    flex-shrink: 0;
    transition: all 0.3s;
}

.stage-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.stage-active {
    background: var(--accent-glow);
}
.stage-active .stage-indicator {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 1.5s infinite;
}
.stage-active .stage-text { color: var(--text-primary); }

.stage-done .stage-indicator { background: var(--green); }
.stage-done .stage-text { color: var(--text-secondary); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.generating-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Report Page ── */
.report-container {
    max-width: 860px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-ticker {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.report-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.report-header-right {
    display: flex;
    gap: 0.5rem;
}

.report-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.1rem; font-weight: 700; font-family: var(--font-mono); }

.report-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.report-body h1, .report-h1 { font-size: 1.5rem; color: var(--text-primary); margin: 1.5rem 0 0.75rem; font-weight: 700; }
.report-body h2, .report-h2, .report-section { font-size: 1.2rem; color: var(--accent); margin: 1.5rem 0 0.5rem; font-weight: 700; }
.report-body h3, .report-h3 { font-size: 1.05rem; color: var(--text-primary); margin: 1rem 0 0.5rem; font-weight: 600; }
.report-body strong { color: var(--text-primary); }
.report-bullet { margin-left: 1.25rem; margin-bottom: 0.25rem; list-style: disc; }

.report-disclaimer {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Dashboard ── */
.dashboard-container { max-width: 1000px; margin: 0 auto; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.dashboard-actions { display: flex; align-items: center; gap: 0.75rem; }

.reports-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.reports-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.reports-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.reports-table tr:last-child td { border-bottom: none; }
.reports-table tr:hover { background: var(--bg-card-hover); }

.ticker-cell {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
}

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

.empty-state p { margin-bottom: 1.5rem; font-size: 1.1rem; }

/* ── Pricing ── */
.pricing-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.pricing-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pricing-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

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

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: border-color 0.2s;
}
.pricing-card:hover { border-color: var(--border-light); }

.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.pricing-credits {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pricing-features li::before {
    content: '\2713';
    color: var(--green);
    margin-right: 0.5rem;
    font-weight: 700;
}

/* ── FAQ ── */
.pricing-faq { text-align: left; margin-top: 2rem; }
.pricing-faq h2 { text-align: center; margin-bottom: 1.5rem; }

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.faq-item h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

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

/* ── Footer ── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

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

/* ── Responsive ── */

/* Tablet */
@media (max-width: 768px) {
    .navbar { height: auto; padding: 0.6rem 1rem; }
    .nav-container { flex-wrap: wrap; gap: 0.5rem; }
    .nav-brand { font-size: 1rem; }
    .nav-logo { height: 24px; }
    .nav-links { gap: 0.6rem; width: 100%; justify-content: flex-end; }
    .nav-link { font-size: 0.8rem; }
    .nav-link-primary { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
    .credit-badge { font-size: 0.7rem; padding: 0.2rem 0.5rem; }

    .container { padding: 1.25rem 1rem; }
    .hero { padding: 2rem 0 1.5rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }

    .ticker-input-group { flex-direction: column; border-radius: var(--radius-sm); }
    .ticker-input { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
    .btn-analyze { border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 0.85rem; }

    .steps-grid { grid-template-columns: 1fr; }
    .diff-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.35rem; }

    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .faq-grid { grid-template-columns: 1fr; }

    .report-header { flex-direction: column; }
    .report-header-right { width: 100%; }
    .report-ticker { font-size: 2rem; }
    .report-body { padding: 1.5rem; }
    .report-stats { flex-wrap: wrap; gap: 1rem; }

    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .dashboard-actions { width: 100%; flex-wrap: wrap; }
    .reports-table-container { overflow-x: auto; }

    .auth-card { padding: 1.5rem; }
    .generating-container { padding-top: 2rem; }
    .generating-ticker { font-size: 2.25rem; }
    .cta-section { padding: 2.5rem 1.25rem; }
    .cta-section h2 { font-size: 1.35rem; }
}

/* Small phone */
@media (max-width: 480px) {
    .navbar { padding: 0.5rem 0.75rem; }
    .nav-container { justify-content: center; }
    .nav-brand { width: 100%; justify-content: center; margin-bottom: 0.25rem; }
    .nav-links { justify-content: center; flex-wrap: wrap; gap: 0.4rem; }
    .nav-link { font-size: 0.75rem; }
    .nav-link-primary { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
    .nav-link-secondary { font-size: 0.75rem; }
    .credit-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; }

    .hero-title { font-size: 1.35rem; }
    .hero-subtitle { font-size: 0.85rem; }
    .step-card { padding: 1.25rem; }
    .diff-item { padding: 1.25rem; }
    .pricing-title { font-size: 1.5rem; }
    .footer p { font-size: 0.7rem; }
}
