/* ==========================================================================
   Eliora AI HR - Interview Agent Platform CSS System
   Dark Mode Glassmorphism & High-Fidelity UI Styling
   ========================================================================== */

:root {
    --bg-dark: #f0f4f7;
    --bg-card: #ffffff;
    --bg-card-border: #e2e8f0;
    --bg-card-hover: #f8fafc;

    --primary-yellow: #1553a9; /* JobJugad Blue */
    --primary-yellow-glow: rgba(21, 83, 169, 0.2);
    --primary-blue: #3b31ff;
    --accent-purple: #6f42c1;
    --accent-cyan: #0dcaf0;
    --accent-green: #22c55e;
    --accent-red: #ef4444;

    --text-main: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Ambient Radial Glows (Hidden in Light Theme) */
.bg-glow {
    display: none;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: -200px;
    left: -150px;
}

.bg-glow-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0,0,0,0) 70%);
    bottom: -250px;
    right: -200px;
}

.bg-glow-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: 40%;
    left: 30%;
}

/* App Container Layout */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glassmorphism Common Utilities */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
}

.glass-nested {
    background: #f8f9fa;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

/* Header & Navigation Bar */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    margin-bottom: 24px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-avatar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-yellow);
    box-shadow: 0 0 14px var(--primary-yellow-glow);
}

.logo-avatar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--primary-yellow);
}

.logo-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    font-weight: 400;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    gap: 16px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #475569;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-tab:hover {
    color: var(--primary-yellow);
    background: #f1f5f9;
}

.nav-tab.active {
    background: #eff6ff;
    color: var(--primary-yellow);
    font-weight: 600;
    box-shadow: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon Styling */
.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-lg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Buttons */
.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--primary-yellow);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary-sm:hover {
    transform: translateY(-1px);
    background: #0b5ed7;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--primary-yellow);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #0b5ed7;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    background: var(--primary-yellow);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary-lg:hover {
    transform: translateY(-3px);
    background: #0b5ed7;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--bg-card-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-secondary-sm {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.8rem;
    border: 1px solid var(--bg-card-border);
    cursor: pointer;
}

.btn-reupload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--primary-yellow);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid var(--primary-yellow);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 10px var(--primary-yellow-glow);
}

.btn-reupload:hover {
    background: #12488f;
    border-color: #12488f;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: #f8f9fa;
}

/* Views & Tabs Visibility */
.view-tab {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.view-tab.active {
    display: flex;
}

/* ==========================================================================
   TAB 1: CANDIDATE DASHBOARD
   ========================================================================== */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    border-radius: 16px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-desc {
    color: var(--text-muted);
    max-width: 600px;
    font-size: 0.95rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    background: var(--primary-yellow);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
    transition: var(--transition-fast);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.stat-icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--primary-yellow); }
.stat-icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--primary-blue); }

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: block;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-card {
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-container {
    height: 260px;
    position: relative;
}

/* Avatar Card */
.avatar-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 16px;
}

.avatar-preview-box {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-yellow);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.15);
}

.avatar-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.avatar-card-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    color: var(--primary-yellow);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-yellow);
}

/* History Table */
.history-card {
    padding: 24px;
}

.search-box input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.table-responsive {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.history-table th, .history-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.history-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-purple { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ==========================================================================
   TAB 2: RESUME & JD SETUP
   ========================================================================== */
.setup-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.setup-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 8px auto;
}

.setup-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.setup-card {
    padding: 28px;
    position: relative;
}

.step-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.dropzone {
    border: 2px dashed var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: #f8f9fa;
}

.dropzone:hover {
    border-color: var(--primary-yellow);
    background: rgba(245, 158, 11, 0.05);
}

.drop-icon {
    width: 36px;
    height: 36px;
    fill: var(--primary-yellow);
    margin-bottom: 10px;
}

.drop-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.drop-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.text-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 600;
}

.text-divider::before, .text-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.text-divider span {
    padding: 0 12px;
}

.form-textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.88rem;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

.form-textarea:focus {
    border-color: var(--primary-yellow);
}

.parsed-box {
    margin-top: 20px;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

.profile-title {
    font-size: 0.85rem;
    color: var(--primary-yellow);
    display: block;
    margin-bottom: 8px;
}

.profile-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 0.75rem;
}

.skill-chip-green { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); color: #34d399; }
.skill-chip-amber { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); color: #fbbf24; }

.match-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.match-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-yellow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.match-percent {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-yellow);
    line-height: 1;
}

.match-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.launch-card {
    padding: 28px;
}

.launch-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-input, select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.form-input:focus, select:focus {
    border-color: var(--primary-yellow);
}

/* ==========================================================================
   TAB 3: LIVE AI INTERVIEW STAGE
   ========================================================================== */
.interview-stage-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    height: calc(100vh - 140px);
}

/* Avatar Live Video Screen */
.avatar-video-stage {
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stage-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.recording-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

.rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-red);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.dual-video-stage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.video-window-card {
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.video-window-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-yellow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avatar-screen-container {
    position: relative;
    width: 100%;
    height: 190px;
    flex: none;
    background: #050811;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.candidate-camera-container {
    position: relative;
    width: 100%;
    height: 190px;
    flex: none;
    background: #050811;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.candidate-video-element {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transform: scaleX(-1) !important;
}

.avatar-video-element {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transform: none !important;
    transition: none !important;
}

.avatar-render-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.subtitle-banner {
    margin-top: 10px;
    min-height: 52px;
    padding: 8px 14px;
    background: #ffffff;
    border-left: 3px solid var(--primary-yellow);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.subtitle-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-yellow);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.subtitle-text {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.4;
}

.timer-waveform-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.flex-1 { flex: 1; }

.question-timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    min-width: 90px;
}

.timer-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.timer-countdown {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-green);
}

.timer-countdown.warning {
    color: var(--accent-red);
    animation: pulse-red 1s infinite;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-idle { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.status-speaking { background: var(--primary-yellow); box-shadow: 0 0 10px var(--primary-yellow); animation: pulse-yellow 1s infinite; }
.status-listening { background: var(--accent-cyan); box-shadow: 0 0 10px var(--accent-cyan); animation: pulse-cyan 1s infinite; }
.status-thinking { background: var(--accent-purple); box-shadow: 0 0 10px var(--accent-purple); }

/* Webcam Picture-in-Picture */
.webcam-pip-container {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 160px;
    height: 110px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--primary-yellow);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    background: #000;
    z-index: 5;
}

.webcam-pip-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pip-label {
    position: absolute;
    bottom: 4px;
    left: 6px;
    font-size: 0.65rem;
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
}

.audio-visualizer-bar {
    height: 36px;
    margin: 12px 0;
    background: #e9ecef;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

#live-waveform-canvas {
    width: 100%;
    height: 100%;
}

.stage-fresh-anim {
    animation: freshScreenFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes freshScreenFade {
    0% { opacity: 0.5; transform: scale(0.995); }
    100% { opacity: 1; transform: scale(1); }
}

.question-focus-window {
    padding: 16px 20px;
    background: #ffffff;
    border: 1.5px solid var(--bg-card-border);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.question-focus-window.question-active-anim {
    animation: qCardPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qCardPop {
    0% { transform: translateY(6px) scale(0.98); opacity: 0.7; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.question-window-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.q-window-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-yellow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.q-step-dots-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.q-step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.q-step-dot.active {
    background: var(--primary-yellow);
    color: #050811;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    transform: scale(1.15);
}

.q-step-dot.done {
    background: var(--accent-green);
    color: #050811;
    border-color: var(--accent-green);
}

.question-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.question-body-box {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--bg-card-border);
}

.current-question-text {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

/* Transcript & Controls Stage */
.transcript-stage {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.transcript-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 8px;
    margin-bottom: 14px;
}

.transcript-msg {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    max-width: 85%;
    font-size: 0.9rem;
}

.msg-ai {
    background: #e7f1ff;
    border: 1px solid #cce5ff;
    align-self: flex-start;
}

.msg-candidate {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    align-self: flex-end;
}

.msg-system {
    background: #f8f9fa;
    border: 1px dashed var(--bg-card-border);
    align-self: center;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.msg-author {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.msg-ai .msg-author { color: var(--primary-yellow); }
.msg-candidate .msg-author { color: var(--primary-blue); }

.speech-dictation-preview {
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 14px;
}

.dictation-label {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.dictation-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.interview-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mic-button-row {
    display: flex;
    gap: 12px;
}

.btn-mic {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: #dc3545;
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-mic.active {
    background: #b02a37;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.icon-mic {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.btn-primary-action {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--primary-yellow);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.control-toggles-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* ==========================================================================
   TAB 4: AUTOMATED PERFORMANCE REPORT
   ========================================================================== */
.report-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.report-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px;
    background: #ffffff;
    border-bottom: 1px solid var(--bg-card-border);
}

.report-candidate-meta h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}

.report-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-circle-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--primary-yellow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.score-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-yellow);
    line-height: 1;
}

.score-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rec-badge-lg {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.report-card {
    padding: 28px;
}

.radar-chart-container {
    height: 320px;
    position: relative;
}

.summary-paragraph {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 20px;
}

.report-strengths-box, .report-weakness-box {
    margin-top: 16px;
}

.report-list {
    list-style: none;
    margin-top: 8px;
}

.report-list li {
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.evaluations-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.eval-item {
    background: #f8f9fa;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.eval-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.eval-q-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.eval-score-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.eval-answer-block {
    background: #ffffff;
    border-left: 3px solid var(--primary-yellow);
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.report-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0 40px 0;
}

/* Modals & Drawers */
.drawer-overlay, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
}

.drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    z-index: 101;
    padding: 24px;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.drawer.open { right: 0; }
.drawer-overlay.open, .modal-overlay.open { display: block; }

.modal-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    z-index: 102;
    padding: 24px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.video-player-element {
    width: 100%;
    border-radius: var(--radius-md);
    max-height: 480px;
    background: black;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

/* Utilities */
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--accent-green); }
.text-amber { color: var(--primary-yellow); }

/* ── ACCENT TOGGLE (compact pill row) ──────────────────────────────────────── */
.accent-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 22px;
    flex-wrap: wrap;
}

.accent-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.accent-toggle-group {
    display: flex;
    gap: 8px;
}

.accent-pill {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.accent-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
}

.accent-pill--indian.active {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
    color: #fb923c;
}

.accent-pill--foreign.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}

/* ==========================================================================
   PRINT & CLEAN PDF EXPORT STYLES
   ========================================================================== */
@media print {
    /* Force crisp white background & dark text */
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }

    /* Hide web app UI navigation, sidebars, buttons, modals, camera boxes */
    header, 
    .navbar, 
    .app-header, 
    .nav-tabs, 
    .drawer-overlay, 
    .drawer, 
    .modal-overlay, 
    .report-action-bar, 
    .btn-primary, 
    .btn-secondary, 
    .btn-icon,
    #view-setup,
    #view-dashboard,
    #view-interview,
    #view-coach {
        display: none !important;
    }

    /* Show only printable report container */
    #view-report {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .report-container {
        gap: 16px !important;
    }

    /* Convert dark glass cards to clean white paper cards */
    .glass, .report-banner, .report-card, .eval-item {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        color: #0f172a !important;
        backdrop-filter: none !important;
        border-radius: 8px !important;
        padding: 16px !important;
        page-break-inside: avoid !important;
    }

    .report-candidate-meta h2, .card-title, .summary-paragraph, p, span, li, strong, h3, h4 {
        color: #0f172a !important;
    }

    .text-muted {
        color: #64748b !important;
    }

    .score-circle-lg {
        background: #f8fafc !important;
        border: 3px solid #2563eb !important;
        box-shadow: none !important;
    }

    .score-num {
        color: #2563eb !important;
    }

    .eval-answer-block {
        background: #f8fafc !important;
        border-left: 3px solid #2563eb !important;
        color: #334155 !important;
    }

    /* Clean progress bar print styling */
    .competency-grid div div {
        border: 1px solid #cbd5e1 !important;
    }
}

