/* ========================================
   BEAMX1 Demo v2 — Report Styles
   Full session data report
   ======================================== */

.report-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-xl);
    padding-top: 80px;
}

/* Header Row — two columns */
.report-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.report-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    flex: 1;
    min-width: 250px;
}

.report-icon svg { width: 40px; height: 40px; color: var(--beam); }
.report-title-group h1 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 4px; }
.report-subtitle { font-size: 1rem; color: var(--text-secondary); }
.report-meta { font-size: 0.8125rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: 4px; }

/* Identity in header */
.header-identity {
    text-align: center;
    flex-shrink: 0;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
}

.identity-photos {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.identity-photo { text-align: center; }
.identity-photo img { width: 70px; height: 93px; border-radius: var(--radius-lg); border: 2px solid var(--beam); object-fit: cover; display: block; }
.identity-photo span { font-size: 0.6875rem; color: var(--text-muted); margin-top: 4px; display: block; }
.identity-match { font-size: 1.25rem; color: var(--beam); }
.identity-name { font-size: 0.8125rem; color: var(--beam); margin-top: var(--space-sm); }

/* Header info separator */
.report-header {
    border-right: 1px solid var(--border);
    padding-right: var(--space-xl);
}

/* Face Photos Gallery */
.face-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
}

.face-photo-item {
    text-align: center;
}

.face-photo-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.face-photo-img:hover {
    transform: scale(1.05);
    border-color: var(--beam);
}

.face-photo-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--beam);
    text-align: center;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.face-photo-meta {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.face-photo-quality {
    color: var(--beam);
    font-weight: 600;
}

/* Photo Modal — overlay version */
.photo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.photo-modal-overlay.visible { opacity: 1; }

.photo-modal {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    cursor: default;
}

.photo-modal-img {
    max-width: 90vw;
    max-height: 75vh;
    border-radius: var(--radius-xl);
    border: 2px solid var(--beam);
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
    display: block;
}

.photo-modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
    padding: 0 var(--space-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.photo-modal-info span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.photo-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Summary Cards */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.report-card { text-align: center; padding: var(--space-md); }
.report-card-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--beam); }
.report-card-label { font-size: 0.6875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* Sections */
.report-section {
    margin-bottom: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}
.report-section-title {
    display: flex; align-items: center; gap: var(--space-sm);
    font-size: 1rem; font-weight: 600; margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border);
}
.report-section-title svg { color: var(--beam); flex-shrink: 0; }

/* ========================================
   Question Timeline
   ======================================== */
.timeline { position: relative; }

.tl-item {
    display: grid;
    grid-template-columns: 48px 20px 1fr;
    gap: 0 var(--space-sm);
    margin-bottom: var(--space-lg);
    position: relative;
}

.tl-item::before {
    content: '';
    position: absolute;
    left: 57px;
    top: 20px;
    bottom: -16px;
    width: 2px;
    background: var(--border);
}

.tl-item:last-child::before { display: none; }

.tl-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    padding-top: 3px;
}

.tl-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-primary);
    margin-top: 4px;
    z-index: 1;
    position: relative;
}

.tl-dot.correct { background: var(--success); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.tl-dot.wrong { background: var(--warning); }

.tl-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: 0.8125rem;
}

.tl-screen-label, .tl-response-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tl-question {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.tl-screen-answers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.tl-screen-answers span.selected {
    color: var(--beam);
    font-weight: 600;
}

.tl-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-sm) 0;
}

/* Timeline row layout — text + photo */
.tl-row {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.tl-text { flex: 1; min-width: 0; }

.tl-photo-slot {
    flex-shrink: 0;
    width: 80px;
}

.tl-photo {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.tl-photo:hover {
    border-color: var(--beam);
    transform: scale(1.05);
}

.tl-photo-empty {
    width: 80px;
    height: 60px;
}

.tl-response { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.tl-answer { font-weight: 600; }
.tl-answer.correct { color: var(--success); background: rgba(34, 197, 94, 0.1); padding: 4px 10px; border-radius: var(--radius-sm); border-left: 3px solid var(--success); }
.tl-answer.wrong { color: var(--warning); background: rgba(245, 158, 11, 0.1); padding: 4px 10px; border-radius: var(--radius-sm); border-left: 3px solid var(--warning); }
.tl-meta { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

.tl-biometric {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.tl-voice {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--beam);
    margin-top: 4px;
}

.tl-pause {
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 4px;
}

.tl-reveal {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--beam);
}

.tl-reveal-label { color: var(--text-muted); font-weight: 400; }

.tl-reveal-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

/* ========================================
   Voice Comments
   ======================================== */
.voice-list { display: flex; flex-direction: column; gap: 4px; }
.voice-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: var(--space-sm);
    padding: 6px var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    align-items: center;
}
.voice-time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.voice-text { font-family: var(--font-mono); color: var(--beam); }
.voice-conf { font-size: 0.6875rem; color: var(--text-muted); }

/* ========================================
   Emotion Timeline
   ======================================== */
/* ========================================
   Charts
   ======================================== */
.charts-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.chart-block { margin-bottom: 0; }
.chart-label { font-size: 0.8125rem; font-weight: 600; margin-bottom: 4px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-sm); font-size: 0.75rem; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.chart-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.chart-bar-wrap, .chart-line-wrap {
    position: relative;
    height: 120px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.chart-bar-svg, .chart-line-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-y-labels {
    position: absolute;
    top: 0;
    right: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.5625rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    pointer-events: none;
    padding: 2px 0;
}

.chart-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.chart-row {
    display: flex;
    gap: var(--space-lg);
}

.chart-half { flex: 1; min-width: 0; }

/* Bio summary */
.bio-summary { margin-top: var(--space-md); }
.bio-summary-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: var(--space-sm); }

.bio-face-rate {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}
.bio-face-rate strong { color: var(--beam); }

.bio-row {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    gap: var(--space-sm);
    padding: 6px var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: center;
    font-size: 0.8125rem;
    margin-bottom: 3px;
}
.bio-icon { font-size: 1rem; }
.bio-label { color: var(--text-secondary); }
.bio-avg { font-family: var(--font-mono); font-weight: 600; color: var(--beam); }
.bio-range { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* ========================================
   Gestures
   ======================================== */
/* Gesture Summary — compact grouped view */
.gesture-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gesture-row {
    display: grid;
    grid-template-columns: 24px 100px 40px 1fr 80px;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.gesture-icon { text-align: center; font-size: 1rem; }
.gesture-name { font-weight: 600; color: var(--text-primary); }
.gesture-count { font-family: var(--font-mono); font-size: 0.75rem; color: var(--beam); text-align: right; }

.gesture-timeline-wrap {
    height: 16px;
    overflow: hidden;
}

.gesture-timeline-svg {
    width: 100%;
    height: 100%;
}

.gesture-time-range {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-align: right;
}

@media (max-width: 768px) {
    .gesture-row { grid-template-columns: 24px 80px 36px 1fr; }
    .gesture-time-range { display: none; }
}

/* Device Info Chips */
.device-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.device-chip {
    display: inline-flex;
    flex-direction: column;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 100px;
}

.device-chip-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.device-chip-value {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}
/* Overview Row — sensors + bio side by side */
.overview-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.overview-col { min-width: 0; }

.overview-sub-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-md);
}

.overview-sub-title:first-child { margin-top: 0; }

/* Bio summary rows (in overview) */
.bio-summary-row {
    display: grid;
    grid-template-columns: 24px 1fr auto auto;
    gap: 6px;
    padding: 5px var(--space-sm);
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.bio-summary-row:last-child { border-bottom: none; }
.bio-summary-row.warning { background: rgba(239, 68, 68, 0.06); }
.bio-summary-row.warning .bio-summary-value { color: var(--danger); }
.bio-summary-icon { font-size: 0.875rem; }
.bio-summary-label { color: var(--text-secondary); }
.bio-summary-value { font-family: var(--font-mono); font-weight: 600; color: var(--beam); }
.bio-summary-range { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-muted); }

@media (max-width: 768px) {
    .overview-row { grid-template-columns: 1fr; }
}

/* Sensor status rows */
.sensor-status-table { display: flex; flex-direction: column; gap: 4px; }
.sensor-status-row {
    display: grid;
    grid-template-columns: 28px 1fr auto 1fr;
    gap: var(--space-sm);
    padding: 8px var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: center;
    font-size: 0.8125rem;
}
.sensor-status-icon { font-size: 1rem; }
.sensor-status-label { font-weight: 500; }
.sensor-status-badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-align: center;
}
.sensor-status-badge.active { background: var(--beam-soft); color: var(--beam); }
.sensor-status-badge.inactive { background: rgba(239,68,68,0.1); color: var(--danger); }
.sensor-status-detail { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Mic Volume Timeline */
.vol-timeline {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 120px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    overflow: hidden;
}
.vol-bar {
    flex: 1;
    min-width: 2px;
    background: var(--beam);
    border-radius: 1px 1px 0 0;
    opacity: 0.7;
    transition: opacity 0.1s;
}
.vol-bar:hover { opacity: 1; }
.vol-timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* Session Events Log */
.evt-log {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.evt-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr;
    gap: var(--space-sm);
    padding: 4px var(--space-sm);
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.evt-row:hover { background: var(--bg-card); }
.evt-time { font-family: var(--font-mono); color: var(--text-muted); }
.evt-label { font-weight: 500; }
.evt-detail { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.6875rem; }

/* Bottom Actions — 3 columns */
.report-actions-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
}

.report-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.report-action-card svg {
    color: var(--text-muted);
}

.report-action-card.highlight {
    background: linear-gradient(135deg, var(--beam-soft), var(--bg-card));
    border-color: rgba(16, 185, 129, 0.2);
}

.report-action-card.highlight svg {
    color: var(--beam);
}

.report-action-card h4 {
    font-size: 0.9375rem;
    margin: 0;
}

.report-action-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.report-action-card .btn {
    margin-top: var(--space-sm);
}

/* Summary highlight numbers */
.summary-highlight {
    color: var(--beam);
    font-weight: 700;
}

.report-meta-secondary {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Disclaimer in header */
.report-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: var(--space-sm);
}

.report-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--warning);
}

/* Chart methodology notes */
.chart-method {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    font-style: italic;
}

/* End reason badge */
.report-end-reason {
    color: var(--warning);
    font-weight: 600;
}

@media (max-width: 768px) {
    .report-actions-bar { grid-template-columns: 1fr 1fr; }
    .report-header-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .report-actions-bar { grid-template-columns: 1fr; }
}

/* ========================================
   v2 — Skipped questions (greyed out)
   ======================================== */
.tl-skipped-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px dashed var(--border);
}

.tl-skipped-header {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.tl-item.tl-skipped {
    opacity: 0.45;
}

.tl-item.tl-skipped .tl-content {
    background: transparent;
    border-style: dashed;
    padding: var(--space-sm) var(--space-md);
}

.tl-dot.skipped {
    background: var(--text-muted);
    opacity: 0.5;
}

.tl-dot.neutral {
    background: var(--beam);
    box-shadow: 0 0 6px var(--beam-glow);
}

.tl-skip-reason {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--space-xs);
}

/* ========================================
   v2 — Branching info
   ======================================== */
.tl-branching-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-md);
    background: var(--beam-soft);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

/* ========================================
   v2 — "Wanted more" badge
   ======================================== */
.tl-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--beam);
    background: var(--beam-soft);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    margin-top: var(--space-xs);
    margin-bottom: var(--space-xs);
}
