/* =========================================
   LUMA INSIGHTS
   ========================================= */

.insights-view {
    min-height: 0;
    overflow-y: auto;
    padding: 44px 32px 72px;
}

.insights-container {
    width: 100%;
    max-width: 930px;
    margin: 0 auto;
}

.insights-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.insights-icon,
.insights-empty-orb {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 18px;
    color: white;
    background: linear-gradient(135deg, #6959fb, #8978ff);
    box-shadow: 0 14px 32px rgba(117, 101, 255, 0.22);
    font-size: 22px;
}

.insights-kicker {
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.8px;
}

.insights-heading h2 {
    margin: 0 0 5px;
    font-size: 28px;
    letter-spacing: -0.9px;
}

.insights-heading p {
    margin: 0;
    max-width: 650px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.insights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 14px 15px 14px 17px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.insights-toolbar > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insights-toolbar b {
    font-size: 12px;
}

.insights-toolbar span {
    color: var(--muted);
    font-size: 10px;
}

#generateInsightsBtn {
    flex-shrink: 0;
    padding: 10px 14px;
    border: none;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(117, 101, 255, 0.19);
    transition: 0.15s ease;
}

#generateInsightsBtn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

#generateInsightsBtn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.insights-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(218, 75, 75, 0.18);
    border-radius: 12px;
    background: rgba(218, 75, 75, 0.07);
    color: #c34141;
    font-size: 11px;
    line-height: 1.5;
}

.insights-empty {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 20px;
    border: 1px dashed var(--border);
    border-radius: 22px;
    text-align: center;
    background: linear-gradient(145deg, var(--surface), var(--accent-soft));
}

.insights-empty-orb {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 15px;
    font-size: 18px;
}

.insights-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.insights-empty p {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.insights-overview-card {
    margin-bottom: 14px;
    padding: 21px 22px;
    border: 1px solid rgba(117, 101, 255, 0.20);
    border-radius: 19px;
    background: linear-gradient(145deg, var(--surface), rgba(117, 101, 255, 0.055));
    box-shadow: var(--shadow-small);
}

.insights-overview-card span {
    color: var(--accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.4px;
}

.insights-overview-card p {
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.65;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.insights-card {
    min-height: 210px;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.insights-card-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
}

.insights-card h3,
.insights-uncertain h3 {
    margin: 0 0 11px;
    font-size: 15px;
    letter-spacing: -0.25px;
}

.insights-card ul,
.insights-uncertain ul {
    margin: 0;
    padding-left: 18px;
}

.insights-card li,
.insights-uncertain li {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.55;
}

.insights-card li::marker,
.insights-uncertain li::marker {
    color: var(--accent);
}

.insights-uncertain {
    margin-top: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface-soft);
}

.insights-uncertain > div:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 5px;
}

.insights-uncertain > div:first-child span {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 800;
}

.insights-uncertain h3 {
    margin: 0;
}

.insights-disclaimer {
    margin: 14px 4px 0;
    color: var(--muted);
    text-align: center;
    font-size: 9px;
    line-height: 1.5;
}

.insights-muted {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

body.dark .insights-error {
    color: #ff8a8a;
}

@media (max-width: 780px) {
    .insights-view {
        padding: 30px 17px 60px;
    }

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

    .insights-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
