/* app.css - Styles specific to the Noos.AI Web App Workspace */

.app-body {
    background: linear-gradient(to bottom, #060e1d 0%, #0b1c39 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
.app-header {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.app-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color-light);
    text-shadow: var(--neon-text-glow);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-color-medium);
    font-size: 0.95rem;
}
.nav-link:hover {
    color: var(--primary-neon-blue);
    text-shadow: var(--neon-text-glow);
}

/* Workspace Layout */
.app-workspace {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
    height: calc(100vh - 60px);
    box-sizing: border-box;
}

/* Reusing glassmorphism logic from style.css for panels */
.glass-panel {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%), var(--background-medium);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Left Panel */
.input-panel {
    flex: 1;
    max-width: 50%;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.app-select {
    background-color: var(--background-dark);
    color: var(--text-color-light);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    outline: none;
}
.app-select:focus {
    border-color: var(--primary-neon-blue);
    box-shadow: var(--neon-outline-glow);
}

.app-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color-light);
    padding: 20px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}
.app-textarea::placeholder {
    color: rgba(255,255,255,0.2);
}

.panel-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
}

.analyze-btn {
    width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Right Panel (Results) */
.results-panel, .empty-state-panel {
    flex: 1;
    overflow-y: auto;
}

.empty-state-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.empty-state-content {
    color: var(--text-color-medium);
}
.empty-state-content h3 {
    color: var(--text-color-light);
    margin-top: 15px;
}

.hidden {
    display: none !important;
}

/* Reusable Spinner */
.spinner {
    border: 3px solid rgba(0, 255, 255, 0.1);
    border-left-color: var(--primary-neon-blue);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Generated Results Styles */
.result-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(0,255,255,0.05), transparent);
}

.score-display {
    display: flex;
    align-items:baseline;
    gap: 10px;
}
.score-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-neon-blue);
    text-shadow: var(--neon-text-glow);
}
.score-label {
    font-size: 1.2rem;
    color: var(--text-color-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-body {
    padding: 20px;
}

.result-section {
    margin-bottom: 25px;
}
.result-section h3 {
    font-size: 1rem;
    color: var(--primary-neon-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tags for keywords */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--text-color-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.share-banner {
    padding: 15px 20px;
    background: rgba(0, 89, 255, 0.1);
    border-top: 1px solid var(--secondary-neon-magenta);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---- Super Tool UI ---- */

/* SVG Sentiment Chart */
.chart-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 4px 0 0;
}
.sentiment-svg {
    width: 100%;
    height: auto;
    display: block;
}
.chart-legend, .highlight-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: var(--text-color-medium);
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-swatch {
    width: 14px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid;
    flex-shrink: 0;
    display: inline-block;
}

/* Paragraph score badges */
.para-badge-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.para-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid;
    border-radius: 20px;
    padding: 3px 10px 3px 6px;
    font-size: 0.72rem;
    cursor: default;
    transition: opacity 0.2s;
}
.para-badge:hover { opacity: 0.75; }
.para-badge-num {
    font-weight: 700;
    font-size: 0.75rem;
    opacity: 0.7;
}
.para-badge-score {
    font-weight: 700;
    font-size: 0.85rem;
}
.para-badge-label {
    opacity: 0.7;
    font-size: 0.7rem;
}

/* Highlighted text block */
.highlighted-text {
    font-family: var(--font-secondary);
    font-size: 0.93rem;
    line-height: 1.8;
    color: var(--text-color-medium);
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
}
mark.hl-word {
    background: transparent;
    border-radius: 2px;
    padding: 1px 2px;
    cursor: help;
    text-decoration: none;
    font-style: inherit;
    transition: opacity 0.2s;
}
mark.hl-word:hover { opacity: 0.75; }

/* Confidence bar */
.confidence-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.confidence-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

/* Emotion badge */
.emotion-badge {
    display: inline-block;
    background: rgba(0,200,255,0.1);
    border: 1px solid rgba(0,200,255,0.3);
    color: #00c8ff;
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Manager Summary Highlighted */
.manager-summary-box {
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--primary-neon-blue);
    padding: 12px 16px !important;
    border-radius: 0 8px 8px 0;
}

/* Emotional Arc Chart */
.arc-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    padding: 0 4px 0;
}
.arc-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}
.arc-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    min-height: 6px;
    transition: height 0.8s ease;
}
.arc-label {
    font-size: 0.65rem;
    color: var(--text-color-medium);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

/* Inflection Points Timeline */
.inflection-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 8px;
    border-left: 2px solid rgba(255,255,255,0.08);
}
.inflection-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.inflection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
    margin-left: -7px;
}
.inflection-content { flex: 1; }
.inflection-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.inflection-quote {
    margin: 0 0 4px;
    padding: 6px 10px;
    border-left: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    font-style: italic;
    font-size: 0.9rem;
    border-radius: 0 4px 4px 0;
    color: var(--text-color-light);
}
.inflection-impact {
    margin: 0;
    font-size: 0.83rem;
    color: var(--text-color-medium);
}

/* Key Drivers */
.drivers-list { display: flex; flex-direction: column; gap: 10px; }
.driver-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 10px 14px;
}
.driver-phrase {
    color: var(--text-color-light);
    font-style: italic;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.driver-detail {
    font-size: 0.82rem;
    color: var(--text-color-medium);
}

/* Insight grid (opps, risks, shielding) */
.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.insight-card {
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid transparent;
}
.insight-opp {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
}
.insight-risk {
    background: rgba(255, 51, 102, 0.05);
    border-color: rgba(255, 51, 102, 0.2);
}
.insight-shield {
    background: rgba(0, 200, 255, 0.05);
    border-color: rgba(0, 200, 255, 0.2);
}
.insight-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 6px;
}
.insight-detail {
    font-size: 0.8rem;
    color: var(--text-color-medium);
    line-height: 1.5;
}

/* Sales Intelligence Section */
.sales-section { background: rgba(255, 51, 200, 0.03); border-radius: 8px; padding: 14px !important; }
.section-sublabel {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color-medium);
    margin-bottom: 6px;
}
.sales-approach-box {
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 10px 12px;
}
.next-action-box {
    margin-top: 10px;
    background: rgba(0, 255, 136, 0.07);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #00ff88;
}

/* Colored Tag Variants */
.tag-green {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}
.tag-red {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.3);
    color: #ff3366;
}

/* Suggested Actions */
.actions-list { display: flex; flex-direction: column; gap: 8px; }
.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--text-color-light);
}
.action-num {
    background: var(--primary-neon-blue);
    color: var(--background-dark);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Accordion (Report Page) ---- */
.accordion {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s;
}
.accordion[open] {
    border-color: rgba(0, 200, 255, 0.2);
}
.accordion-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color-light);
    user-select: none;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary:hover {
    background: rgba(0, 200, 255, 0.05);
}
.accordion[open] .accordion-summary {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--primary-neon-blue);
}
.accordion-chevron {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
    color: var(--text-color-medium);
}
.accordion[open] .accordion-chevron {
    transform: rotate(180deg);
    color: var(--primary-neon-blue);
}
.accordion-body {
    padding: 16px;
}