/* ============================================================
   SWOT Intelligence — Site Stylesheet — v2
   ============================================================ */
:root {
    --bg:         #0f1117;
    --bg2:        #1a1d27;
    --bg3:        #22263a;
    --border:     #2e3348;
    --text:       #e2e6f0;
    --text-muted: #7b849e;
    --primary:    #6366f1;
    --primary-h:  #4f52d8;
    --success:    #22c55e;
    --warning:    #f59e0b;
    --danger:     #ef4444;
    --strength:   #22c55e;
    --weakness:   #ef4444;
    --opportunity:#6366f1;
    --threat:     #f59e0b;
    --radius:     10px;
    --shadow:     0 4px 24px rgba(0,0,0,.35);
}

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

html { font-size: 16px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ── Navbar ── */
.navbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.nav-left  { display: flex; align-items: center; gap: clamp(2rem, 6vw, 8rem); }
.nav-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.logo-icon  { color: var(--primary); font-size: 1.4rem; }
.logo-icon.large { font-size: 2.5rem; }
.logo-text  { color: var(--text); }
.nav-links  { display: flex; align-items: center; gap: 1.2rem; }
.nav-link   { color: var(--text-muted); font-size: .9rem; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-user   { color: var(--text-muted); font-size: .85rem; }
.nav-logout { color: var(--danger) !important; font-size: .85rem; text-decoration: none; }
.nav-logout:hover { text-decoration: underline; }
.nav-user-pill {
    display: flex; align-items: center; gap: .45rem;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 99px; padding: .3rem .85rem;
}
.nav-pill-divider { color: var(--border); font-size: .85rem; }
.btn-nav-cta {
    background: var(--primary); color: #fff !important;
    padding: .35rem .9rem; border-radius: 6px; font-size: .85rem;
}
.btn-nav-cta:hover { background: var(--primary-h); text-decoration: none; }

/* ── Main / Footer ── */
.main-content { flex: 1; max-width: 90%; margin: 0 auto; padding: 2rem; width: 100%; }
.main-full    { flex: 1; width: 100%; padding: 0; overflow-x: hidden; }
.footer {
    background: var(--bg2); border-top: 1px solid var(--border);
    text-align: center; padding: 1rem 2rem;
    font-size: .8rem; color: var(--text-muted);
}

/* ── Page Header ── */
.page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; margin-bottom: 2rem; gap: 1rem;
}
.page-header h2 { font-size: 1.6rem; }
.subtitle { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

/* ── Step Indicator ── */
.step-indicator { display: flex; align-items: center; gap: 0; }
.step {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg3); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 600; color: var(--text-muted);
}
.step.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done   { background: var(--success); border-color: var(--success); color: #fff; }
.step-line   { width: 32px; height: 2px; background: var(--border); }
.step-line.done { background: var(--success); }

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex; align-items: center;
    padding: .55rem 1.2rem; border-radius: 7px;
    font-size: .9rem; font-weight: 500; cursor: pointer;
    border: none; transition: all .15s; text-decoration: none !important;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-h); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.full-width { width: 100%; justify-content: center; }
.ml-2 { margin-left: .5rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }

/* ── Cards ── */
.card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .75rem; font-size: 1rem; }

/* ── Forms ── */
.form-card { max-width: 800px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; }
.form-control {
    width: 100%; background: var(--bg3); border: 1px solid var(--border);
    border-radius: 7px; color: var(--text); padding: .6rem .85rem;
    font-size: .95rem; font-family: inherit; transition: border .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.context-textarea { resize: vertical; min-height: 260px; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; display: block; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }
.optional { color: var(--text-muted); font-size: .8rem; }

/* ── Auth pages ── */
.auth-page {
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
}
.auth-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2.5rem 2rem;
    width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 680px; width: 100%; }
.reg-section-heading { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 1.5rem 0 .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.5rem; margin-top: .5rem; }
.auth-header p  { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }
.auth-footer    { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 1.25rem; }

/* ── Alerts ── */
.alert { padding: .75rem 1rem; border-radius: 7px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.3);  color: #86efac; }

/* ── Account pages ── */
.account-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
.account-nav {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.account-nav-link {
    display: block; padding: .75rem 1.25rem;
    color: var(--text-muted); font-size: .9rem;
    border-left: 3px solid transparent;
    transition: all .15s; text-decoration: none !important;
}
.account-nav-link:hover { color: var(--text); background: var(--bg3); }
.account-nav-link.active { color: var(--primary); border-left-color: var(--primary); background: var(--bg3); }
.account-form-card { max-width: 100%; }
.section-heading { font-size: 1rem; margin-bottom: 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Stripe card element ── */
.stripe-card-element {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 7px; padding: .75rem .85rem;
}
.stripe-card-element.StripeElement--focus { border-color: var(--primary); }
.saved-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 10px; padding: 1rem 1.25rem;
}
.saved-card-icon { font-size: 1.75rem; }
.saved-card-info { flex: 1; }
.saved-card-brand { font-weight: 600; font-size: .95rem; }
.saved-card-expiry { margin-top: .2rem; }

/* ── Billing table ── */
.billing-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.billing-table th {
    text-align: left; padding: .6rem .85rem;
    font-size: .75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.billing-table td { padding: .75rem .85rem; border-bottom: 1px solid var(--border); }
.billing-table tfoot td { border-bottom: none; border-top: 1px solid var(--border); font-weight: 600; }
.billing-table tbody tr:hover { background: var(--bg3); }
.billing-total { font-weight: 600; color: var(--text); }
.run-type-badge {
    font-size: .7rem; font-weight: 600; padding: .15rem .5rem;
    border-radius: 99px; text-transform: uppercase; letter-spacing: .04em;
}
.run-type-swot     { background: rgba(99,102,241,.15); color: #a5b4fc; }
.run-type-forecast { background: rgba(34,197,94,.15);  color: #86efac; }

/* ── Dashboard Grid ── */
.analysis-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.analysis-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    transition: border-color .2s;
}
.analysis-card:hover { border-color: var(--primary); }
.analysis-card-header { display: flex; gap: .5rem; margin-bottom: .75rem; align-items: center; }
.analysis-title { font-size: 1rem; margin-bottom: .25rem; }
.analysis-date  { font-size: .8rem; color: var(--text-muted); margin-bottom: 1rem; }
.analysis-card-footer { margin-top: auto; }

.status-badge {
    font-size: .7rem; font-weight: 600; padding: .2rem .55rem;
    border-radius: 99px; text-transform: uppercase; letter-spacing: .05em;
}
.status-complete   { background: rgba(34,197,94,.15);  color: var(--success); }
.status-processing { background: rgba(99,102,241,.15); color: var(--primary); }
.status-pending    { background: rgba(123,132,158,.15);color: var(--text-muted); }
.status-failed     { background: rgba(239,68,68,.15);  color: var(--danger); }

.industry-tag {
    font-size: .75rem; background: var(--bg3); border: 1px solid var(--border);
    padding: .15rem .5rem; border-radius: 99px; color: var(--text-muted);
}

/* ── Empty state ── */
.empty-state {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-icon { font-size: 3rem; color: var(--border); display: block; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.25rem; color: var(--text); margin-bottom: .5rem; }
.empty-state p  { margin-bottom: 1.5rem; }

/* ── File Upload ── */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.drop-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 2rem; text-align: center; cursor: pointer;
    transition: all .2s; position: relative; margin-bottom: .5rem;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary); background: rgba(99,102,241,.06);
}
.drop-icon  { font-size: 2rem; color: var(--text-muted); display: block; margin-bottom: .5rem; }
.file-input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.doc-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.doc-item { display: flex; align-items: center; gap: .75rem; }
.doc-icon {
    font-size: .65rem; font-weight: 700; padding: .3rem .4rem;
    border-radius: 5px; letter-spacing: .03em;
}
.file-pdf { background: rgba(239,68,68,.15); color: #fca5a5; }
.file-txt { background: rgba(99,102,241,.15); color: #a5b4fc; }
.file-csv { background: rgba(34,197,94,.15);  color: #86efac; }
.doc-info { flex: 1; }
.doc-name { display: block; font-size: .9rem; }
.doc-size { display: block; font-size: .75rem; color: var(--text-muted); }
.doc-check { color: var(--success); }

/* ── Waiting page ── */
.waiting-page {
    max-width: 540px; margin: 4rem auto; text-align: center;
}
.waiting-icon {
    font-size: 3rem; color: var(--primary); display: block;
    margin: 0 auto 1rem; position: relative; z-index: 1;
}
.error-icon { color: var(--danger) !important; }
.pulse-ring {
    width: 80px; height: 80px; border-radius: 50%;
    border: 3px solid var(--primary); opacity: .4;
    animation: pulse 2s ease-in-out infinite;
    margin: 0 auto -50px;
}
@keyframes pulse {
    0%,100% { transform: scale(1); opacity: .4; }
    50%      { transform: scale(1.3); opacity: .1; }
}
.progress-bar {
    background: var(--bg3); border-radius: 99px;
    height: 6px; margin: 1.5rem 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%; background: var(--primary);
    border-radius: 99px; width: 0%;
    transition: width 1s ease;
}
.thinking-steps { list-style: none; text-align: left; margin: 1rem 0; }
.step-item {
    padding: .4rem .75rem; border-radius: 6px;
    font-size: .85rem; color: var(--text-muted);
    margin-bottom: .25rem;
}
.step-item.active { color: var(--text); background: var(--bg3); }
.step-item.done   { color: var(--success); }
.step-item.done::before { content: "✓ "; }
.disclaimer { font-size: .8rem; color: var(--text-muted); margin-top: 1.5rem; }

/* ── SWOT Results Grid ── */
.swot-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.25rem; margin-bottom: 2.5rem;
}
.swot-quadrant {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.quadrant-header {
    padding: 1rem 1.25rem; display: flex;
    align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.quadrant-header h3 { font-size: .95rem; }
.quadrant-count { font-size: .75rem; color: var(--text-muted); }
.quadrant-strength   .quadrant-header { background: rgba(34,197,94,.08);  border-left: 4px solid var(--strength); }
.quadrant-weakness   .quadrant-header { background: rgba(239,68,68,.08);  border-left: 4px solid var(--weakness); }
.quadrant-opportunity.quadrant-header { background: rgba(99,102,241,.08); border-left: 4px solid var(--opportunity); }
.quadrant-threat     .quadrant-header { background: rgba(245,158,11,.08); border-left: 4px solid var(--threat); }

.swot-items { list-style: none; padding: 0; }
.swot-item {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.swot-item:last-child { border-bottom: none; }
.swot-item-body { font-size: .9rem; margin-bottom: .5rem; }
.swot-item-meta { display: flex; flex-direction: column; gap: .3rem; }

/* Confidence */
.confidence-badge {
    font-size: .7rem; font-weight: 600; padding: .15rem .45rem;
    border-radius: 99px; width: fit-content;
}
.conf-high   { background: rgba(34,197,94,.15);  color: #86efac; }
.conf-medium { background: rgba(245,158,11,.15); color: #fcd34d; }
.conf-low    { background: rgba(239,68,68,.15);  color: #fca5a5; }

.confidence-bar {
    height: 3px; background: var(--bg3); border-radius: 99px;
    width: 100%; overflow: hidden;
}
.confidence-fill { height: 100%; border-radius: 99px; }
.conf-fill-high   { background: var(--success); }
.conf-fill-medium { background: var(--warning); }
.conf-fill-low    { background: var(--danger); }

.source-refs { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.source-tag {
    font-size: .7rem; background: var(--bg3); border: 1px solid var(--border);
    padding: .1rem .45rem; border-radius: 99px; color: var(--text-muted);
}

/* ── Action Plans ── */
.action-plans-section { margin-bottom: 2rem; }
.action-plans-section h2 { margin-bottom: .25rem; }
.action-group { margin-bottom: 2rem; break-inside: avoid; page-break-inside: avoid; }
.action-group h3 {
    display: flex; align-items: center; gap: .5rem;
    font-size: .95rem; margin-bottom: .75rem; color: var(--text-muted);
    break-inside: avoid; page-break-inside: avoid;
    break-after: avoid;  page-break-after: avoid;
}
.priority-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.priority-high   { background: var(--danger); }
.priority-medium { background: var(--warning); }
.priority-low    { background: var(--success); }

.action-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }
.action-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
    border-left-width: 3px; border-left-style: solid;
    break-inside: avoid; page-break-inside: avoid;
}
.priority-border-high   { border-left-color: var(--danger); }
.priority-border-medium { border-left-color: var(--warning); }
.priority-border-low    { border-left-color: var(--success); }

.action-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: .5rem;
}
.action-category {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
}
.action-timeframe { font-size: .75rem; color: var(--text-muted); }
.action-text { font-size: .88rem; margin-bottom: .5rem; }
.action-rationale { font-size: .82rem; color: var(--text-muted); }

/* ── Forecast Result — Narrative ── */
.narrative-section {
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
}
.narrative-headline {
    font-size: 1.2rem; font-weight: 600; color: var(--text);
}
.narrative-columns {
    display: grid; grid-template-columns: 300px 1fr; gap: 2rem;
}
.narrative-main { font-size: .95rem; line-height: 1.75; }
.narrative-sidebar { font-size: .9rem; }
.highlight-item {
    padding: .6rem .85rem; border-radius: 7px;
    border-left: 3px solid var(--border);
    background: rgba(255,255,255,.04);
}
.sentiment-positive { border-left-color: var(--success); }
.sentiment-negative { border-left-color: var(--danger); }
.sentiment-neutral  { border-left-color: var(--text-muted); }
.risk-list, .rec-list { padding-left: 1.25rem; }
.risk-list li, .rec-list li { font-size: .88rem; }

/* ── Forecast Result — Charts ── */
.charts-section { margin-bottom: 2rem; }
.charts-section h2 { margin-bottom: .35rem; }
.chart-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.chart-title { font-size: 1rem; margin-bottom: 1rem; }
.chart-wrapper { position: relative; }

@media (max-width: 900px) {
    .narrative-columns { grid-template-columns: 1fr; }
}

/* ── Disclaimer banner ── */
.disclaimer-banner {
    background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
    border-radius: 7px; padding: .75rem 1rem;
    font-size: .82rem; color: var(--text); margin-bottom: 1.5rem;
}

/* ── Sources section ── */
.sources-section {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin-top: 1rem;
}
.sources-section h3 { margin-bottom: .75rem; font-size: .95rem; }

/* ── Token info ── */
.token-info { font-size: .8rem; color: var(--text-muted); margin-left: .5rem; }

/* ── Nav Dropdowns ── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none; border: none; cursor: pointer;
    font-family: inherit; display: flex; align-items: center; gap: .25rem;
}
.nav-caret { font-size: .65rem; opacity: .6; }
.nav-dropdown-menu {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    min-width: 220px; z-index: 200; padding: .4rem;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px; left: 0; right: 0;
    height: 10px;
}
.nav-dropdown-menu-right { left: auto; right: 0; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .75rem; border-radius: 7px;
    color: var(--text); text-decoration: none !important;
    transition: background .12s;
}
.nav-dropdown-item:hover { background: var(--bg3); }
.nav-dropdown-item strong { display: block; font-size: .88rem; }
.nav-dropdown-item small  { display: block; font-size: .75rem; color: var(--text-muted); }
.nav-dropdown-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Small button variant ── */
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }

/* ── Dashboard welcome ── */
.dashboard-welcome { margin-bottom: 2rem; }
.dashboard-welcome h2 { font-size: 1.7rem; }

/* ── Module Cards ── */
.module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
.module-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    transition: border-color .2s;
}
.module-card:hover { border-color: var(--primary); }
.module-card-icon { font-size: 2rem; line-height: 1; }
.swot-icon { color: var(--primary); }
.module-card-body { flex: 1; }
.module-card-body h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.module-card-body p  { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }
.module-card-stats {
    display: flex; align-items: baseline; gap: .35rem;
    margin-top: .75rem; font-size: .85rem;
}
.module-stat-count { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1; }
.module-stat-label { color: var(--text-muted); }
.module-stat-sep   { color: var(--border); }
.module-stat-last  { color: var(--text-muted); font-size: .8rem; }
.module-card-actions { display: flex; gap: .6rem; }

/* ── Recent Activity ── */
.recent-activity { margin-top: .5rem; }
.recent-activity-heading {
    font-size: .8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted);
    margin-bottom: .75rem;
}
.activity-list { display: flex; flex-direction: column; gap: .4rem; }
.activity-item {
    display: flex; align-items: center; gap: .85rem;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 8px; padding: .65rem 1rem;
    color: var(--text); text-decoration: none !important;
    transition: border-color .15s;
}
.activity-item:hover { border-color: var(--primary); }
.activity-module-tag {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; padding: .15rem .5rem; border-radius: 99px;
    flex-shrink: 0;
}
.swot-tag     { background: rgba(99,102,241,.15); color: #a5b4fc; }
.forecast-tag { background: rgba(34,197,94,.15);  color: #86efac; }
.activity-title { flex: 1; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-date  { font-size: .78rem; color: var(--text-muted); flex-shrink: 0; }

/* ── Analysis list (forecast-style row layout) ── */
.analysis-list { display: flex; flex-direction: column; gap: .75rem; }
.analysis-card-body  { flex: 1; }
.analysis-card-status { display: flex; align-items: center; }
.analysis-meta { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Utility ── */
.text-muted { color: var(--text-muted); }
.small { font-size: .8rem; }

/* ── Print styles ── */
@media print {
    .navbar, .btn-primary, .btn-secondary, .btn-ghost, .footer,
    .disclaimer-banner { display: none !important; }
    body { background: #fff; color: #000; }
    .swot-grid { page-break-inside: avoid; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .swot-grid    { grid-template-columns: 1fr; }
    .upload-grid  { grid-template-columns: 1fr; }
    .page-header  { flex-direction: column; }
    .main-content { padding: 1rem; }
}

/* ============================================================
   Landing Page Styles
   ============================================================ */

/* Override main-content constraint for landing page */
.lp-hero,
.lp-proof-strip,
.lp-section,
.lp-section-dark,
.lp-cta-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Unauthenticated nav auth links */
.nav-auth-links {
    display: flex; align-items: center; gap: .85rem;
}

/* ── Hero ── */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 3rem;
    align-items: center;
    padding: 5rem 8vw 4rem;
    background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(99,102,241,.10) 0%, transparent 70%),
                var(--bg);
    min-height: calc(100vh - 160px);
}

.lp-hero-badge {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3);
    color: #a5b4fc; font-size: .78rem; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
    padding: .3rem .8rem; border-radius: 99px;
    margin-bottom: 1.5rem;
}
.lp-hero-badge::before { content: "◈"; color: var(--primary); }

.lp-hero-headline {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800; line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1.25rem;
}
.lp-headline-accent {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-hero-sub {
    font-size: 1.05rem; color: var(--text-muted);
    line-height: 1.7; max-width: 520px;
    margin-bottom: 2rem;
}

.lp-hero-ctas { display: flex; gap: .85rem; flex-wrap: wrap; margin-bottom: .85rem; }
.lp-cta-primary  { padding: .7rem 1.6rem; font-size: 1rem; }
.lp-cta-secondary { padding: .7rem 1.6rem; font-size: 1rem; }
.lp-hero-pricing-hint {
    font-size: .82rem; color: var(--text-muted);
}

/* ── Browser Mockup ── */
.lp-hero-demo { position: relative; }

.lp-browser-mockup {
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(99,102,241,.15);
}

.lp-browser-chrome {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: .55rem 1rem;
    display: flex; align-items: center; gap: .75rem;
}
.lp-browser-dots { display: flex; gap: .4rem; }
.lp-dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.lp-dot-red    { background: #ef4444; }
.lp-dot-yellow { background: #f59e0b; }
.lp-dot-green  { background: #22c55e; }
.lp-browser-url {
    flex: 1; background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px; padding: .2rem .75rem;
    font-size: .75rem; color: var(--text-muted);
    max-width: 280px;
}
.lp-browser-content { background: var(--bg); }
.lp-demo-gif { width: 100%; display: block; }

/* ── Proof Strip ── */
.lp-proof-strip {
    display: flex; align-items: center; justify-content: center;
    gap: 0; flex-wrap: wrap;
    background: var(--bg2); border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 4rem;
}
.lp-proof-item {
    display: flex; flex-direction: column; align-items: center;
    padding: .5rem 2.5rem; text-align: center;
}
.lp-proof-number {
    font-size: 1.3rem; font-weight: 700; color: var(--primary);
}
.lp-proof-label {
    font-size: .78rem; color: var(--text-muted); margin-top: .15rem;
}
.lp-proof-divider {
    width: 1px; height: 40px; background: var(--border);
}

/* ── Section Wrapper ── */
.lp-section {
    padding: 5rem 8vw;
    background: var(--bg);
}
.lp-section-dark {
    padding: 5rem 8vw;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.lp-section-header {
    text-align: center; margin-bottom: 3rem;
}
.lp-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700; letter-spacing: -.02em;
    margin-bottom: .6rem;
}
.lp-section-sub {
    color: var(--text-muted); font-size: .95rem;
}

/* ── Services Grid ── */
.lp-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1100px; margin: 0 auto;
}

.lp-service-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 14px; padding: 2rem 2rem 1.75rem;
    display: flex; flex-direction: column; gap: 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.lp-service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(99,102,241,.2), var(--shadow);
}
.lp-service-swot:hover   { border-color: var(--primary); }
.lp-service-forecast:hover { border-color: var(--success); }

.lp-service-icon { font-size: 2.4rem; line-height: 1; }
.lp-service-name {
    font-size: 1.3rem; font-weight: 700;
}
.lp-service-desc {
    font-size: .9rem; color: var(--text-muted); line-height: 1.65;
}

.lp-feature-list {
    list-style: none; display: flex; flex-direction: column; gap: .45rem;
    flex: 1;
}
.lp-feature-list li {
    font-size: .875rem; color: var(--text-muted);
    padding-left: 1.25rem; position: relative;
}
.lp-feature-list li::before {
    content: "✓"; position: absolute; left: 0;
    color: var(--success); font-weight: 700;
}

.lp-service-price {
    display: flex; align-items: baseline; gap: .35rem;
    padding-top: .75rem; border-top: 1px solid var(--border);
}
.lp-price { font-size: 2rem; font-weight: 800; color: var(--text); }
.lp-price-unit { font-size: .85rem; color: var(--text-muted); }

.lp-service-cta { align-self: flex-start; }

/* ── How It Works Steps ── */
.lp-steps-grid {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; max-width: 960px; margin: 0 auto;
}
.lp-step-card {
    flex: 1; background: var(--bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.75rem 1.5rem;
    text-align: center;
}
.lp-step-connector {
    width: 48px; flex-shrink: 0;
    height: 2px; background: var(--border);
    margin-top: 2.5rem; align-self: flex-start;
}
.lp-step-number {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(99,102,241,.15); border: 2px solid var(--primary);
    color: var(--primary); font-size: 1.1rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto .75rem;
}
.lp-step-title {
    font-size: 1rem; font-weight: 600; margin-bottom: .5rem;
}
.lp-step-desc {
    font-size: .85rem; color: var(--text-muted); line-height: 1.6;
}

/* ── Benefits Grid ── */
.lp-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px; margin: 0 auto;
}
.lp-benefit {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
    transition: border-color .2s;
}
.lp-benefit:hover { border-color: var(--border); }
.lp-benefit-icon {
    font-size: 1.75rem; margin-bottom: .75rem;
    display: block;
}
.lp-icon-primary { color: var(--primary); }
.lp-icon-success { color: var(--success); }
.lp-icon-warning { color: var(--warning); }
.lp-benefit h4 { font-size: .95rem; font-weight: 600; margin-bottom: .5rem; }
.lp-benefit p  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Demo Center ── */
.lp-demo-center { display: flex; justify-content: center; }
.lp-demo-full   { width: 100%; max-width: 1000px; }

/* ── Pricing ── */
.lp-pricing-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.5rem; max-width: 820px; margin: 0 auto;
}
.lp-pricing-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 14px; padding: 2rem;
    display: flex; flex-direction: column; gap: 1rem;
    position: relative;
}
.lp-pricing-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(99,102,241,.25), var(--shadow);
}
.lp-pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: .2rem .75rem; border-radius: 99px;
}
.lp-pricing-icon { font-size: 2rem; }
.swot-icon-sm { color: var(--primary); }
.lp-pricing-name { font-size: 1.15rem; font-weight: 700; }
.lp-pricing-amount { display: flex; align-items: baseline; gap: .35rem; }
.lp-price-big  { font-size: 2.4rem; font-weight: 800; }
.lp-price-per  { font-size: .85rem; color: var(--text-muted); }
.lp-pricing-features {
    list-style: none; display: flex; flex-direction: column; gap: .45rem; flex: 1;
}
.lp-pricing-features li {
    font-size: .875rem; color: var(--text-muted);
    padding-left: 1.25rem; position: relative;
}
.lp-pricing-features li::before {
    content: "✓"; position: absolute; left: 0;
    color: var(--success); font-weight: 700;
}
.lp-pricing-overage {
    font-size: .75rem; color: var(--text-muted); margin-top: .25rem; text-align: center;
}

/* ── Final CTA Section ── */
.lp-cta-section {
    text-align: center;
    padding: 6rem 4rem;
    background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(99,102,241,.12) 0%, transparent 70%),
                var(--bg);
    border-top: 1px solid var(--border);
}
.lp-cta-headline {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800; letter-spacing: -.02em;
    margin-bottom: .75rem;
}
.lp-cta-sub {
    font-size: 1rem; color: var(--text-muted); max-width: 480px;
    margin: 0 auto 2rem;
}
.lp-cta-buttons { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.lp-cta-disclaimer {
    font-size: .78rem; color: var(--text-muted);
    max-width: 500px; margin: 0 auto;
}

/* ── Landing Responsive ── */
@media (max-width: 1024px) {
    .lp-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 4rem 6vw 3rem;
        text-align: center;
    }
    .lp-hero-sub { max-width: 100%; }
    .lp-hero-ctas { justify-content: center; }
    .lp-hero-demo { order: -1; }
    .lp-services-grid    { grid-template-columns: 1fr; }
    .lp-benefits-grid    { grid-template-columns: 1fr 1fr; }
    .lp-pricing-grid     { grid-template-columns: 1fr; max-width: 440px; }
    .lp-steps-grid       { flex-direction: column; gap: 1rem; }
    .lp-step-connector   { width: 2px; height: 32px; margin: 0 auto; }
    .lp-proof-strip      { gap: 0; padding: 1.25rem 2rem; }
    .lp-proof-divider    { display: none; }
}
@media (max-width: 640px) {
    .lp-section, .lp-section-dark { padding: 3.5rem 5vw; }
    .lp-benefits-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Advisor Chat
   ============================================================ */

/* Two-column layout: sidebar + main */
.advisor-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 60px - 4rem); /* viewport minus navbar minus page padding */
    align-items: start;
}

/* ── Sidebar ── */
.advisor-sidebar {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(100vh - 60px - 4rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.advisor-sidebar-section {}
.advisor-sidebar-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .75rem;
}
.advisor-sidebar-empty {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Facts list */
.advisor-facts-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.advisor-fact-item { display: flex; flex-direction: column; gap: .2rem; }
.advisor-fact-type {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--primary);
}
.advisor-fact-text { font-size: .82rem; line-height: 1.4; }
.advisor-confidence-bar {
    height: 3px;
    background: var(--bg3);
    border-radius: 99px;
    margin-top: .2rem;
    overflow: hidden;
}
.advisor-confidence-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
}

/* Actions list */
.advisor-actions-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.advisor-action-item {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .6rem .75rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 7px;
}
.advisor-action-priority {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .1rem .4rem;
    border-radius: 4px;
    align-self: flex-start;
}
.priority-high   { background: rgba(239,68,68,.15);  color: #fca5a5; }
.priority-medium { background: rgba(245,158,11,.15); color: #fcd34d; }
.priority-low    { background: rgba(34,197,94,.15);  color: #86efac; }
.advisor-action-title { font-size: .82rem; line-height: 1.35; }
.advisor-action-status-select {
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .75rem;
    border-radius: 5px;
    padding: .2rem .4rem;
    font-family: inherit;
    cursor: pointer;
}
.advisor-action-status-select:focus { outline: none; border-color: var(--primary); }

/* ── Main chat area ── */
.advisor-main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 4rem);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.advisor-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.advisor-chat-header h3 { font-size: 1rem; }
.advisor-session-date { font-size: .78rem; color: var(--text-muted); display: block; margin-top: .15rem; }
.advisor-message-counter {
    font-size: .78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Messages scroll area */
.advisor-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Welcome block */
.advisor-welcome { text-align: center; margin: auto; max-width: 520px; padding: 1.5rem 0; }
.advisor-welcome-text { color: var(--text-muted); font-size: .9rem; line-height: 1.6; margin-bottom: 1.25rem; }

/* Follow-up chips at session start */
.advisor-follow-ups {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

/* Inline follow-up chips after each response */
.advisor-follow-ups-inline {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem 0 .25rem;
}

/* The chip buttons themselves */
.advisor-follow-up-btn {
    display: inline-flex;
    align-items: center;
    padding: .4rem .85rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text);
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    text-align: left;
}
.advisor-follow-up-btn:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,.1);
    color: var(--primary);
}

/* Chat bubbles */
.advisor-message { display: flex; flex-direction: column; max-width: 78%; }
.advisor-message-user      { align-self: flex-end; }
.advisor-message-assistant { align-self: flex-start; }

.advisor-message-content {
    padding: .75rem 1rem;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.65;
    word-break: break-word;
}
.advisor-message-user .advisor-message-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.advisor-message-assistant .advisor-message-content {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.advisor-message-meta {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .25rem;
    padding: 0 .25rem;
}
.advisor-message-user .advisor-message-meta { text-align: right; }

/* Typing indicator */
.advisor-typing {
    display: inline-block;
    animation: advisor-pulse 1.2s ease-in-out infinite;
    letter-spacing: .15em;
    color: var(--text-muted);
}
@keyframes advisor-pulse {
    0%, 100% { opacity: .3; }
    50%       { opacity: 1; }
}

/* ── Input panel ── */
.advisor-input-area {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.advisor-textarea {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: .7rem .9rem;
    font-size: .9rem;
    font-family: inherit;
    resize: none;
    transition: border-color .15s;
    line-height: 1.5;
}
.advisor-textarea:focus { outline: none; border-color: var(--primary); }
.advisor-textarea::placeholder { color: var(--text-muted); }

.advisor-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.advisor-input-hint { font-size: .78rem; color: var(--text-muted); }

/* Session complete banner */
.advisor-session-complete {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .9rem;
    color: var(--text-muted);
}

/* Advisor Index page */
.advisor-index-header { margin-bottom: 2rem; }
.advisor-onboarding-banner {
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: .9rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}
.advisor-onboarding-banner strong { color: var(--text); }
.advisor-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.advisor-session-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: border-color .15s;
}
.advisor-session-card:hover { border-color: var(--primary); }
.advisor-session-card-title { font-weight: 600; font-size: .95rem; }
.advisor-session-card-meta { font-size: .8rem; color: var(--text-muted); }
.advisor-session-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .5rem;
}
.advisor-status-badge {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 4px;
}
.advisor-status-active   { background: rgba(34,197,94,.15);  color: #86efac; }
.advisor-status-complete { background: rgba(123,132,158,.15); color: var(--text-muted); }

@media (max-width: 900px) {
    .advisor-layout { grid-template-columns: 1fr; height: auto; }
    .advisor-sidebar { max-height: 300px; }
    .advisor-main { height: 70vh; }
}
