/* ===================================================================
   SynapseAlpha — Page-Level Styles
   Extracted from style.css — Thesis, Log, Decision, Reports, Compare, Responsive
   =================================================================== */

/* ===================================================================
   THESIS PANEL
   =================================================================== */
.thesis-panel {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.thesis-compact {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.thesis-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thesis-field label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.thesis-field select,
.thesis-field input {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    padding: 7px 10px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: var(--font-mono);
    min-width: 90px;
    transition: border-color 0.15s ease;
}

.thesis-field select:hover,
.thesis-field input:hover {
    border-color: var(--border);
}

.thesis-field select:focus,
.thesis-field input:focus {
    outline: none;
    border-color: var(--blue);
}

.thesis-field input[type="number"] {
    width: 80px;
}

.thesis-save-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 7px 20px;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-ui);
    cursor: pointer;
    align-self: flex-end;
    transition: all 0.15s ease;
}

.thesis-save-btn:hover {
    background: #2563eb;
}

/* ===================================================================
   LIVE LOG
   =================================================================== */
.live-log {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    max-height: 220px;
    overflow-y: auto;
}

.live-log-header {
    margin-bottom: 10px;
}

.live-log h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.log-content {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}

.log-content .log-line {
    color: var(--text-secondary);
    padding: 1px 0;
}

/* ===================================================================
   DECISION CARD
   =================================================================== */
.decision-card {
    text-align: center;
    padding: 40px 32px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    animation: fadeSlideIn 0.5s ease-out;
}

.decision-card.buy {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(34, 197, 94, 0.15));
    border: 1px solid var(--green-border);
}

.decision-card.sell {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(239, 68, 68, 0.15));
    border: 1px solid var(--red-border);
}

.decision-card.hold {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(245, 158, 11, 0.15));
    border: 1px solid var(--amber-border);
}

.verdict {
    font-size: 52px;
    font-family: var(--font-mono);
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.decision-card.buy .verdict {
    color: var(--green);
    text-shadow: 0 0 60px var(--green-dim);
}
.decision-card.sell .verdict {
    color: var(--red);
    text-shadow: 0 0 60px var(--red-dim);
}
.decision-card.hold .verdict {
    color: var(--amber);
    text-shadow: 0 0 60px var(--amber-dim);
}

.reasoning {
    font-size: 14px;
    line-height: 1.8;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--text-secondary);
    font-family: var(--font-ui);
}

/* ===================================================================
   DEEP DIVE
   =================================================================== */
.deep-dive-row {
    display: none;
}

.deep-dive-row.visible {
    display: flex;
}

.deep-dive-section {
    text-align: center;
    margin: 24px 0;
}

.deep-dive-btn {
    background: transparent;
    border: 1px solid var(--blue-border);
    color: var(--blue);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-ui);
    transition: all 0.2s ease;
}

.deep-dive-btn:hover {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 0 20px var(--blue-dim);
}

.deep-dive-btn:disabled {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
}

.deep-dive-note {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================================
   REPORT CARDS
   =================================================================== */
.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.report-card,
.full-section {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    transition: border-color 0.15s ease;
}

.report-card:hover,
.full-section:hover {
    border-color: var(--border);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s ease;
}

.report-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.report-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.toggle-icon {
    color: var(--text-secondary);
    font-size: 18px;
    font-family: var(--font-mono);
    font-weight: 500;
    width: 20px;
    text-align: center;
}

.report-body {
    display: none;
    padding: 0 20px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text-secondary);
}

.report-body.open {
    display: block;
    animation: fadeSlideIn 0.2s ease-out;
}

/* ===================================================================
   COMPARE VIEW
   =================================================================== */
.compare-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.compare-col {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
}

.compare-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.compare-section {
    margin-bottom: 16px;
}

.compare-section h5 {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-section pre {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
}

/* ===================================================================
   INPUT / SELECT GLOBAL STYLES
   =================================================================== */
input, select {
    font-family: var(--font-ui);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1100px) {
    .main-content {
        padding: 24px 20px;
    }
}

@media (max-width: 900px) {
    .top-nav {
        padding: 0 16px;
        gap: 16px;
    }

    .nav-links {
        display: none;
    }

    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        max-height: 180px;
        position: relative;
        top: 0;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .main-content {
        max-width: 100%;
    }

    .search-bar {
        flex-wrap: wrap;
    }

    .ticker-input-wrapper {
        min-width: 100%;
    }

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

    .compare-view {
        grid-template-columns: 1fr;
    }

    .score-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .score-badges {
        justify-content: flex-start;
    }

    .score-number {
        font-size: 56px;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 16px 12px;
    }

    .score-card {
        padding: 20px 16px;
    }

    .score-number {
        font-size: 48px;
    }

    .thesis-compact {
        gap: 10px;
    }

    .decision-card {
        padding: 24px 16px;
    }

    .verdict {
        font-size: 36px;
        letter-spacing: 3px;
    }
}
