﻿:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #475569;
    --line: #e2e8f0;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --sidebar: #334155;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    color: #f8fafc;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.brand {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.brand strong {
    display: block;
    color: #ffffff;
}

.brand span {
    color: #cbd5e1;
    font-size: 0.88rem;
}

.sidebar nav {
    display: grid;
    gap: 0.35rem;
}

.sidebar nav a {
    color: #dbeafe;
    text-decoration: none;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    font-weight: 750;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.privacy-card {
    margin-top: auto;
    background: rgba(15,23,42,0.30);
    border: 1px solid rgba(203,213,225,0.20);
    border-radius: 18px;
    padding: 1rem;
}

.privacy-card strong {
    display: block;
    color: #d1fae5;
}

.privacy-card span {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.main-content {
    padding: 1.5rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 1.25rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 30px;
    padding: 2rem;
    color: #ffffff;
    box-shadow: 0 24px 60px rgba(15,23,42,0.18);
}

.hero h1 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.02;
    margin: 0.3rem 0 1rem;
}

.hero p {
    color: #dbeafe;
    font-size: 1.05rem;
}

.eyebrow {
    color: #14b8a6 !important;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero-card,
.panel,
.card,
.page-header,
.grid-section {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.35rem;
}

.hero-card {
    color: var(--ink);
}

.hero-card p,
.card p,
.panel p,
.page-header p {
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.78rem 1.15rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
}

.btn.primary {
    background: var(--teal);
    color: #ffffff;
}

.btn.secondary {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid #cbd5e1;
}

.grid-section,
.page-header,
.workspace-grid {
    margin-top: 1.25rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    text-decoration: none;
    color: var(--ink);
    display: block;
}

.card:hover {
    border-color: #14b8a6;
    box-shadow: 0 18px 42px rgba(15,23,42,0.10);
    transform: translateY(-1px);
}

.badge {
    display: inline-flex;
    background: #ccfbf1;
    color: #134e4a;
    border: 1px solid #5eead4;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-weight: 900;
    font-size: 0.78rem;
}

.search-form,
.workspace-grid {
    display: grid;
    gap: 1rem;
}

.search-form input,
.search-form select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.8rem;
    color: var(--ink);
    background: #ffffff;
    font-weight: 600;
}

textarea {
    min-height: 180px;
    resize: vertical;
}

.workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
    font-size: 3rem;
    font-weight: 900;
    color: var(--teal-dark);
}

.muted {
    color: var(--muted);
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    color: var(--muted);
}

.footer a {
    color: var(--teal-dark);
    font-weight: 850;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 950px) {
    body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .hero,
    .card-grid,
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}



/* OI-1A: Opportunity Hunter MVP */
.section-title-row,
.opportunity-topline,
.card-actions,
.opportunity-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-title-row {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.opportunity-list {
    display: grid;
    gap: 1rem;
}

.opportunity-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: 0 16px 36px rgba(15,23,42,0.06);
}

.opportunity-card h3 {
    color: #0f172a;
    margin-bottom: 0.45rem;
}

.opportunity-card p {
    color: #475569;
}

.score-badge {
    display: inline-flex;
    background: #0f766e;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-weight: 900;
    font-size: 0.8rem;
}

.opportunity-meta {
    margin: 0.85rem 0;
    color: #334155;
    font-size: 0.94rem;
}

.opportunity-meta.stacked {
    display: grid;
    align-items: start;
}

.reason-list,
.check-list {
    margin: 0.8rem 0;
    padding-left: 1.15rem;
    color: #334155;
}

.reason-list li,
.check-list li {
    margin: 0.28rem 0;
}

.recommendation {
    border-left: 4px solid #14b8a6;
    background: #f0fdfa;
    color: #134e4a;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-weight: 850;
    margin: 0.8rem 0;
}

.empty-state {
    background: #ffffff;
    border: 1px dashed #94a3b8;
    border-radius: 24px;
    padding: 1.5rem;
    color: #475569;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.selected-opportunity {
    margin-top: 1.25rem;
}

@media (max-width: 950px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}



/* OI-1B: Application Readiness Checker */
.readiness-form {
    display: grid;
    gap: 1.25rem;
}

.run-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.requirements-grid,
.score-grid,
.results-grid {
    display: grid;
    gap: 1rem;
}

.requirements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.readiness-results {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
}

.result-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: 0 22px 48px rgba(15,23,42,0.16);
}

.result-hero h2 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin: 0.2rem 0;
}

.result-hero p {
    color: #dbeafe;
}

.risk-card {
    min-width: 180px;
    border-radius: 22px;
    padding: 1.25rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    display: grid;
    align-content: center;
}

.risk-card span {
    color: #cbd5e1;
    font-weight: 800;
}

.risk-card strong {
    color: #ffffff;
    font-size: 1.8rem;
}

.risk-low {
    border-color: rgba(34,197,94,0.55);
}

.risk-medium {
    border-color: rgba(245,158,11,0.65);
}

.risk-high {
    border-color: rgba(239,68,68,0.65);
}

.score-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1.1rem;
    box-shadow: 0 14px 32px rgba(15,23,42,0.06);
}

.score-card span {
    color: #0f766e;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.score-card strong {
    display: block;
    color: #0f172a;
    font-size: 2rem;
    margin: 0.25rem 0;
}

.score-card p {
    color: #475569;
    margin: 0;
}

.results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.issue-list {
    margin: 0.8rem 0;
    padding-left: 1.15rem;
    color: #7f1d1d;
}

.issue-list li {
    margin: 0.32rem 0;
}

.report-preview {
    border-left: 5px solid #0d9488;
}

@media (max-width: 950px) {
    .run-panel,
    .result-hero {
        display: grid;
    }

    .requirements-grid,
    .score-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
}



/* OI-1B-FIX1: Results scroll anchor and run actions */
#readiness-results {
    scroll-margin-top: 24px;
    outline: none;
}

.run-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

#readiness-result-present {
    height: 1px;
    width: 1px;
    overflow: hidden;
}



/* OI-1C: Export readiness reports */
.export-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.error-panel {
    border-left: 5px solid #ef4444;
}

@media (max-width: 950px) {
    .export-panel {
        display: grid;
    }
}

