
/* Cockpit Layout */
.cockpit-body {
    background: linear-gradient(to bottom, #060e1d 0%, #0b1c39 100%);
    color: var(--text-color-light);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cockpit-header {
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cockpit-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--primary-neon-blue);
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.cockpit-label {
    background: rgba(0, 200, 255, 0.1);
    color: var(--primary-neon-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.session-timer {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-color-light);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* Setup Screen */
.setup-screen {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 200, 255, 0.05) 0%, transparent 70%);
    position: relative;
    z-index: 5;
    visibility: visible !important;
}

.setup-card-isolated {
    max-width: 550px;
    width: 100%;
    text-align: center;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.setup-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.setup-steps {
    text-align: left;
    margin: 35px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-color-medium);
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-neon-blue);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
}

.setup-persona {
    margin-bottom: 35px;
    text-align: left;
}

.start-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.setup-disclaimer {
    font-size: 0.8rem;
    color: var(--text-color-dark);
    margin-top: 25px;
}

/* Permission Modal */
.permission-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.permission-card {
    max-width: 400px;
    width: 90%;
    padding: 40px;
    text-align: center;
}

.permission-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.permission-guide-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #fff;
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { border-color: rgba(0, 200, 255, 0.3); box-shadow: 0 0 0 rgba(0, 200, 255, 0); }
    50% { border-color: rgba(0, 200, 255, 0.8); box-shadow: 0 0 15px rgba(0, 200, 255, 0.2); }
    100% { border-color: rgba(0, 200, 255, 0.3); box-shadow: 0 0 0 rgba(0, 200, 255, 0); }
}

.guide-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--primary-neon-blue);
    background: var(--primary-neon-blue);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
}

/* Cockpit Grid */
.cockpit {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
}

.cockpit-left, .cockpit-centre, .cockpit-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

/* Gauge Panel */
.gauge-wrapper {
    position: relative;
    padding: 20px 0;
    text-align: center;
}

.gauge-svg {
    width: 100%;
    height: 140px;
}

.gauge-score {
    position: absolute;
    bottom: 35px;
    left: 0;
    right: 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color-light);
}

.gauge-emotion {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color-medium);
    margin-top: -5px;
}

/* Risk Indicators */
.risk-row {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.risk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-color-dark);
    opacity: 0.4;
    transition: opacity 0.3s, color 0.3s;
}

.risk-item.active {
    opacity: 1;
    color: var(--text-color-light);
}

.risk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

#riskEscalation.active .risk-dot { background: #ff3366; box-shadow: 0 0 10px #ff3366; }
#riskChurn.active .risk-dot { background: #ffcc00; box-shadow: 0 0 10px #ffcc00; }
#riskBuying.active .risk-dot { background: #00ff88; box-shadow: 0 0 10px #00ff88; }

/* Transcript */
.transcript-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.transcript-box {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-color-medium);
}

.transcript-placeholder { opacity: 0.3; font-style: italic; }

/* Coaching & Signals (Centre) */
.coaching-panel { flex: 0 0 auto; }
.coaching-card {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    animation: borderGlow 2s infinite alternate;
}

@keyframes borderGlow {
    from { border-color: rgba(0, 200, 255, 0.2); box-shadow: 0 0 0 rgba(0, 200, 255, 0); }
    to { border-color: rgba(0, 200, 255, 0.5); box-shadow: 0 0 15px rgba(0, 200, 255, 0.1); }
}

.pulse-once {
    animation: textPulse 0.8s ease-out;
}

@keyframes textPulse {
    0% { transform: scale(1); color: var(--text-color-light); }
    50% { transform: scale(1.02); color: var(--primary-neon-blue); text-shadow: 0 0 10px var(--primary-neon-blue); }
    100% { transform: scale(1); color: var(--text-color-light); }
}

.coaching-icon { font-size: 2rem; }
.coaching-text { font-size: 1.1rem; line-height: 1.4; font-weight: 500; }

.signal-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.signal-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.signal-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--primary-neon-blue);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.signal-placeholder {
    color: var(--text-color-dark);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 40px;
}

.stop-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 51, 102, 0.1);
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.2);
}

.stop-btn:hover {
    background: rgba(255, 51, 102, 0.2);
    color: #ff3366;
    border-color: #ff3366;
}

/* Right Panels */
.talkratio-panel { flex: 0 0 auto; }
.talk-bars { padding: 10px 0; }
.talk-bar-wrap { margin-bottom: 12px; }
.talk-bar-label { font-size: 0.75rem; color: var(--text-color-dark); margin-bottom: 4px; }
.talk-bar-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; position: relative; }
.talk-bar { height: 100%; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.talk-you { background: var(--primary-neon-blue); box-shadow: 0 0 10px var(--primary-neon-blue); }
.talk-them { background: #ff44cc; box-shadow: 0 0 10px #ff44cc; }
.talk-bar-pct { font-size: 0.75rem; font-weight: 700; position: absolute; right: 0; top: -16px; }

.arc-live-panel { flex: 0 0 auto; overflow: hidden; }
.live-arc-svg { width: 100%; height: 80px; margin-top: 10px; }

.inflection-log-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.inflection-log { flex: 1; overflow-y: auto; padding: 12px; }

.inflection-entry {
    font-size: 0.8rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inflection-time { color: var(--text-color-dark); font-family: 'Roboto Mono', monospace; margin-right: 8px; }

/* Utilities */
.panel-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-color-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hidden { display: none !important; }

/* Scrollbars */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* --- Inline Report Screen --- */
.report-screen {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: linear-gradient(to bottom, #060e1d 0%, #0b1c39 100%);
}

.report-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 60px;
}

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

.report-header h2 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #00c8ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.report-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-family: 'Roboto Mono', monospace;
}

.report-actions {
    display: flex;
    gap: 12px;
}

/* Report Grid Elements */
.report-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.report-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.report-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-color: rgba(0, 200, 255, 0.3);
}

.report-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.report-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.report-section h3 {
    color: #00c8ff;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-tip {
    background: rgba(0, 200, 255, 0.06);
    border-left: 3px solid #00c8ff;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.report-transcript {
    background: rgba(0, 0, 0, 0.3);
    padding: 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Roboto Mono', monospace;
    white-space: pre-wrap;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.report-inflection {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    display: flex;
    gap: 16px;
}

.report-inflection:last-child {
    border-bottom: none;
}

.report-inflection-time {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Roboto Mono', monospace;
    min-width: 45px;
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-pos { background: rgba(0, 255, 136, 0.15); color: #00ff88; border: 1px solid rgba(0, 255, 136, 0.3); }
.tag-neg { background: rgba(255, 51, 102, 0.15); color: #ff3366; border: 1px solid rgba(255, 51, 102, 0.3); }
.tag-neut { background: rgba(255, 204, 0, 0.15); color: #ffcc00; border: 1px solid rgba(255, 204, 0, 0.3); }

/* Custom Studio Button Match */
#downloadReportBtn {
    background: linear-gradient(135deg, #00c8ff, #00ff88);
    color: #0a0e1a;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 200, 255, 0.3);
    transition: all 0.3s ease;
}

#downloadReportBtn:hover {
    box-shadow: 0 6px 20px rgba(0, 200, 255, 0.5);
    transform: translateY(-2px);
}
