/* Main CSS - Base styles and variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Design System variables imported - using design-system.css */
/* Legacy variable mappings for backward compatibility */
:root {
    --primary-color: var(--primary-800);
    --primary-dark: var(--primary-900);
    --secondary-color: var(--secondary-500);
    --secondary-dark: var(--secondary-600);
    --accent-color: var(--secondary-400);
    --success-color: var(--success);
    --success-dark: var(--success-dark);
    --danger-color: var(--error);
    --danger-dark: var(--error-dark);
    --text-dark: var(--text-primary);
    --text-light: var(--text-secondary);
    --bg-light: var(--bg-secondary);
    --bg-white: var(--bg-primary);
    --border-color: var(--gray-200);
    --gradient-primary: var(--gradient-primary);
    --gradient-secondary: var(--gradient-secondary);
    --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] body,
[data-theme="dark"] {
    background: #1A1512 !important;
    color: #f1f5f9;
}
[data-theme="dark"] .app-section { background: #1A1512 !important; }
[data-theme="dark"] .navbar { background: #2A201A !important; border-bottom: 1px solid #3D2E24 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important; }
[data-theme="dark"] .step-card,
[data-theme="dark"] .card,
[data-theme="dark"] .glass-card { background: #2A201A !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .step-content { background: transparent !important; }
[data-theme="dark"] .step-wrapper,
[data-theme="dark"] .transcription-wizard,
[data-theme="dark"] .wizard-container { background: #2A201A !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .steps-progress,
[data-theme="dark"] .steps-header { background: #f8fafc !important; }
[data-theme="dark"] .step-item span { color: #6A5440 !important; }
[data-theme="dark"] .step-item.active span { color: #C06E4F !important; }
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="time"] {
    color-scheme: dark;
    background: #1A1512 !important;
    color: #f1f5f9 !important;
    border-color: #6A5440 !important;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select { background: #1A1512 !important; color: #f1f5f9 !important; border-color: #6A5440 !important; }
[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover,
[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1A1512 inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
}
[data-theme="dark"] #patientName { background-color: #1A1512 !important; color: #f1f5f9 !important; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #64748b !important; }
[data-theme="dark"] label { color: #f1f5f9 !important; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: #f1f5f9 !important; }
[data-theme="dark"] p { color: #cbd5e1 !important; }
[data-theme="dark"] .step-header,
[data-theme="dark"] .step-title { color: #f1f5f9 !important; }
[data-theme="dark"] .nav-btn.primary { background: #C06E4F !important; }
[data-theme="dark"] .nav-btn.back,
[data-theme="dark"] .nav-btn.secondary { background: #3D2E24 !important; color: #f1f5f9 !important; border-color: #6A5440 !important; }
[data-theme="dark"] .progress-bar { background: #3D2E24 !important; }
[data-theme="dark"] .quota-warning { background: #450a0a !important; border-color: #991b1b !important; }
[data-theme="dark"] .upgrade-alert,
[data-theme="dark"] #quotaWarningStep1 {
    background-color: #3b0a0a !important;
    border-color: #7f1d1d !important;
}
[data-theme="dark"] #quotaWarningTitle { color: #fca5a5 !important; }
[data-theme="dark"] #quotaWarningMessage { color: #fda4af !important; }
[data-theme="dark"] .status-message { background: #2A201A !important; }
[data-theme="dark"] #userGreeting { color: #f1f5f9 !important; }
[data-theme="dark"] .logout-btn-ghost { color: #94a3b8 !important; }
[data-theme="dark"] .logout-btn-ghost:hover { color: #f1f5f9 !important; }
[data-theme="dark"] .language-selector select { background: #2A201A !important; color: #f1f5f9 !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .divider { border-color: #3D2E24 !important; }
[data-theme="dark"] .modern-editor { background: #1A1512 !important; color: #f1f5f9 !important; border-color: #6A5440 !important; }
[data-theme="dark"] .modal,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7) !important; }
[data-theme="dark"] .modal-content { background: #2A201A !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .modal-header { background: #2A201A !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .modal-header h3 { color: #f1f5f9 !important; }
[data-theme="dark"] .modal-body { background: #2A201A !important; }
[data-theme="dark"] .modal-footer { background: #2A201A !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .patient-selection-item { background: #2A201A !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .patient-item-inner { border-color: #3D2E24 !important; }
[data-theme="dark"] .patient-item-name { color: #f1f5f9 !important; }
[data-theme="dark"] .patient-item-name span { color: #f1f5f9 !important; }
[data-theme="dark"] .patient-item-sessions { color: #94a3b8 !important; }
[data-theme="dark"] #patientSelectionList { background: #1A1512 !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .empty-state { background: #1A1512 !important; border-color: #3D2E24 !important; color: #94a3b8 !important; }
[data-theme="dark"] .empty-state p { color: #64748b !important; }
[data-theme="dark"] .app-container { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
[data-theme="dark"] .result-area { background: #1A1512 !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
/* choice buttons */
[data-theme="dark"] .choice-btn { background: #1A1512 !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .choice-btn h3,
[data-theme="dark"] .choice-btn div,
[data-theme="dark"] .choice-btn small { color: #f1f5f9 !important; }
[data-theme="dark"] .choice-btn:hover { background: #2A201A !important; border-color: #C06E4F !important; }
[data-theme="dark"] .choice-btn.selected { background: rgba(192,110,79,0.14) !important; border-color: #C06E4F !important; }
[data-theme="dark"] .choice-btn.selected h3,
[data-theme="dark"] .choice-btn.selected small { color: #f1f5f9 !important; }
[data-theme="dark"] .icon-wrapper { background: #2A201A !important; }
/* upload area */
[data-theme="dark"] .upload-area { background: #1A1512 !important; border-color: #6A5440 !important; color: #94a3b8 !important; }
[data-theme="dark"] .upload-area:hover { background: #2A201A !important; border-color: #C06E4F !important; }
/* skeleton / status */
[data-theme="dark"] .skeleton-wrapper { background: #1A1512 !important; border-radius: 12px; padding: 16px; }
[data-theme="dark"] .skeleton-line { background: #3D2E24 !important; }
[data-theme="dark"] .processing-text { color: #94a3b8 !important; }
/* transcription info boxes */
[data-theme="dark"] .transcription-info,
[data-theme="dark"] .info-box,
[data-theme="dark"] .tip-box,
[data-theme="dark"] .transcription-container { background: #1A1512 !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .transcription-header h4,
[data-theme="dark"] .section-title { color: #f1f5f9 !important; }
/* AI info card */
[data-theme="dark"] .ai-info-card { background: linear-gradient(135deg, #1A1512 0%, #2A201A 100%) !important; border-color: #3b82f6 !important; }
[data-theme="dark"] .ai-info-inner { background: #1A1512 !important; }
[data-theme="dark"] .ai-info-card [style*="color: #0369a1"],
[data-theme="dark"] .ai-info-card [style*="color: #0c4a6e"],
[data-theme="dark"] .ai-info-card [style*="color: #1e40af"] { color: #93c5fd !important; }
/* tip box at top of audio step */
[data-theme="dark"] [style*="background: linear-gradient(135deg, #f0f9ff"] { background: #1A1512 !important; border-color: #3b82f6 !important; }
[data-theme="dark"] [style*="background: #f0f9ff"] { background: #1A1512 !important; }
/* privacy tip */
[data-theme="dark"] .privacy-tip-box { background: #1A1512 !important; border-color: #3D2E24 !important; }
[data-theme="dark"] .privacy-tip-box div { color: #94a3b8 !important; }
/* skeleton status message box */
[data-theme="dark"] .transcription-status-message,
[data-theme="dark"] [class*="status"] { background: #2A201A !important; color: #f1f5f9 !important; }
/* file choose button */
[data-theme="dark"] .file-label { background: #2A201A !important; color: #C06E4F !important; border-color: #6A5440 !important; }
[data-theme="dark"] .file-label:hover { background: #3D2E24 !important; }
/* audio player */
[data-theme="dark"] audio { filter: invert(0.85) hue-rotate(180deg); }
/* skeleton / status message (loading) */
[data-theme="dark"] .transcription-status-message,
[data-theme="dark"] #transcriptionStatusMessage,
[data-theme="dark"] [id*="Status"],
[data-theme="dark"] [class*="status-msg"] { background: #2A201A !important; color: #f1f5f9 !important; border-color: #3D2E24 !important; }
/* template cards */
[data-theme="dark"] .template-card { background: #2A201A !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .template-card:hover { background: #3D2E24 !important; border-color: #C06E4F !important; }
[data-theme="dark"] .template-card.selected { border-color: #C06E4F !important; background: rgba(192,110,79,0.14) !important; }
[data-theme="dark"] .template-card h3,
[data-theme="dark"] .template-card p,
[data-theme="dark"] .template-card span { color: #f1f5f9 !important; }
/* transcription result / AI summary box */
[data-theme="dark"] .transcription-container,
[data-theme="dark"] .result-container,
[data-theme="dark"] .formatted-result { background: #2A201A !important; border-color: #3D2E24 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .modern-editor,
[data-theme="dark"] [id*="transcription"],
[data-theme="dark"] [id*="Transcription"] { background: #1A1512 !important; color: #f1f5f9 !important; border-color: #6A5440 !important; }
/* step 5 - skeleton loading white box */
[data-theme="dark"] .skeleton-wrapper { background: #2A201A !important; border-radius: 12px; padding: 16px; }
[data-theme="dark"] .skeleton-line { background: linear-gradient(90deg, #3D2E24 25%, #6A5440 50%, #3D2E24 75%) !important; background-size: 200% !important; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

body {
    font-family: 'Heebo', 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc !important;
    min-height: 100vh;
    color: #2A201A;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* App Section */
.app-section {
    padding: 100px 0 60px; /* Top padding to account for navbar */
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.app-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(192, 110, 79, 0.03) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.app-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(192, 110, 79, 0.02) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.app-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #e5e7eb;
    position: relative;
    z-index: 2;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1.1); box-shadow: 0 8px 25px rgba(91, 33, 182, 0.4); }
    50% { transform: scale(1.15); box-shadow: 0 12px 30px rgba(91, 33, 182, 0.5); }
}

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

@keyframes recordingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

/* Status Messages */
.status {
    padding: 16px 24px;
    border-radius: 12px;
    margin: 24px 0;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.status.loading {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.status.success {
    background: #FAE8DF;
    color: #C06E4F;
    border-color: #C06E4F;
}

.status.error {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Results Section */
.result-area {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    min-height: 200px;
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-wrap;
    direction: rtl;
    position: relative;
    color: #1f2937;
}

.result-area:empty::before {
    content: "Transcription will appear here...";
    color: #9ca3af;
    font-style: italic;
}

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

.corrections-modal {
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #e5e7eb;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
    direction: rtl;
}

.corrections-summary {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.corrections-summary p {
    margin: 0;
    color: #0369a1;
    font-size: 16px;
}

.text-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.text-column h4 {
    margin: 0 0 12px 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
}

.text-box {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.original-text {
    border-color: #fbbf24;
    background: #fffbeb;
}

.corrected-text {
    border-color: #C06E4F;
    background: #FAE8DF;
}

.corrections-list {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
}

.corrections-list h4 {
    margin: 0 0 16px 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
}

.corrections-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.corrections-list li {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.correction-type {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.correction-type.spelling {
    background: #dbeafe;
    color: #1d4ed8;
}

.correction-type.grammar {
    background: #FAE8DF;
    color: #C06E4F;
}

.correction-change {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.correction-message {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: center;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.nav-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.nav-btn.warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Responsive design for modal */
@media (max-width: 768px) {
    .corrections-modal {
        width: 95vw;
        margin: 10px;
    }
    
    .text-comparison {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* step card */
[data-theme="dark"] .step-card { background: #2A201A !important; border-color: #3D2E24 !important; box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important; }
[data-theme="dark"] .step-card h2 { color: #f1f5f9 !important; }
[data-theme="dark"] .step-card h2 span { color: #f1f5f9 !important; }
[data-theme="dark"] .step-card h3 { color: #f1f5f9 !important; }
[data-theme="dark"] .step-card p { color: #cbd5e1 !important; }

/* next-steps container (step 6) */
.next-steps-container { background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.next-steps-title { color: #2A201A; }
[data-theme="dark"] .next-steps-container { background: #2A201A !important; border-color: #3D2E24 !important; box-shadow: none !important; }
[data-theme="dark"] .next-steps-title { color: #f1f5f9 !important; }

/* ===== MOBILE DARK MODE FRAME FIX ===== */
[data-theme="dark"] html,
[data-theme="dark"] body { background: #1A1512 !important; }

/* navbar steps bar on mobile */
[data-theme="dark"] .navbar { background: #2A201A !important; }

/* stepper steps header - white bar on mobile */
[data-theme="dark"] .steps-header,
[data-theme="dark"] .stepper-container,
[data-theme="dark"] .stepper { background: #2A201A !important; }

/* white frame around app on mobile */
[data-theme="dark"] .app-section::before,
[data-theme="dark"] .app-section::after { display: none; }
[data-theme="dark"] .app-section { background: #1A1512 !important; }

/* step navigation white box */
[data-theme="dark"] .step-navigation { background: transparent !important; border-color: #3D2E24 !important; }

/* white card behind steps progress on mobile */
@media (max-width: 768px) {
    [data-theme="dark"] .container { background: #1A1512 !important; }
    [data-theme="dark"] .app-container { margin: 0 8px !important; }
}

/* Date input dark mode — force override iOS/Safari */
[data-theme="dark"] .dark-date-input,
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"] {
    color-scheme: dark;
    background: #1A1512 !important;
    background-color: #1A1512 !important;
    color: #f1f5f9 !important;
    border: 1.5px solid #6A5440 !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px;
    padding: 12px;
}
[data-theme="dark"] .dark-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
[data-theme="dark"] .form-group,
[data-theme="dark"] .step-card .form-group { background: transparent !important; }

[data-theme="dark"] .step-navigation { border-top-color: #2A201A !important; }

/* Dark mode button — visible in both modes */
#darkModeBtn { transition: all 0.2s ease !important; }
#darkModeBtn:hover { transform: scale(1.08) !important; }
[data-theme="dark"] #darkModeBtn { background: #3D2E24 !important; border-color: #6A5440 !important; color: #f1f5f9 !important; }
[data-theme="dark"] #darkModeBtn:hover { background: #6A5440 !important; }

/* Dark mode toggle button — yellow glow */
#darkModeBtn { transition: all 0.2s ease !important; }
#darkModeBtn:hover { transform: scale(1.1) !important; box-shadow: 0 4px 14px rgba(250,204,21,0.6) !important; }
[data-theme="dark"] #darkModeBtn { background: #2A201A !important; border-color: #3b82f6 !important; color: #93c5fd !important; box-shadow: 0 2px 8px rgba(59,130,246,0.4) !important; }
[data-theme="dark"] #darkModeBtn:hover { background: #1e40af !important; box-shadow: 0 4px 14px rgba(59,130,246,0.6) !important; }


/* Install button pulse animation */
@keyframes install-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(192,110,79,0.28); }
    50% { box-shadow: 0 2px 20px rgba(192,110,79,0.70), 0 0 0 4px rgba(192,110,79,0.14); }
}
#installAppBtn {
    animation: install-pulse 2.5s ease-in-out infinite;
}

/* Mobile — compact install button (icon only) */
@media (max-width: 768px) {
    #installAppBtn span { display: none !important; }
    #installAppBtn { padding: 8px 10px !important; }
    #darkModeBtn { padding: 8px 10px !important; }
}

/* Mobile navbar — compact language selector */
@media (max-width: 768px) {
    .language-selector select { 
        font-size: 13px !important; 
        padding: 6px 8px !important;
        max-width: 100px !important;
    }
    #userSection > div { gap: 14px !important; }
}

/* Mobile — hide language selector to free up navbar space */
@media (max-width: 768px) {
    .language-selector { display: none !important; }
}

/* ── Chat bubbles (diarization) ── */
.chat-bubbles { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.chat-row { display: flex; flex-direction: column; max-width: 75%; }
.chat-right { align-self: flex-end; align-items: flex-end; }
.chat-left  { align-self: flex-start; align-items: flex-start; }
.chat-speaker { font-size: 11px; font-weight: 700; color: #C06E4F; margin-bottom: 3px; padding: 0 4px; }
.chat-right .chat-speaker { color: #C06E4F; }
.chat-left  .chat-speaker { color: #C06E4F; }
.chat-bubble {
    padding: 10px 14px; border-radius: 16px;
    font-size: 15px; line-height: 1.55;
    max-width: 100%; word-break: break-word;
}
.bubble-right {
    background: #C06E4F; color: #fff;
    border-bottom-right-radius: 4px;
}
.bubble-left {
    background: #2A201A; color: #e2e8f0;
    border-bottom-left-radius: 4px;
    border: 1px solid #3D2E24;
}
[data-theme="light"] .bubble-left {
    background: #f1f5f9; color: #2A201A;
    border-color: #e2e8f0;
}

/* Speaker rename modal dark mode */
[data-theme="dark"] #speakerRenameModal > div {
    background: #2A201A !important;
}
[data-theme="dark"] #speakerRenameModal h3 { color: #f1f5f9 !important; }
[data-theme="dark"] #speakerRenameModal p { color: #94a3b8 !important; }
[data-theme="dark"] #speakerRenameModal input {
    background: #1A1512 !important;
    border-color: #6A5440 !important;
    color: #f1f5f9 !important;
}
