/* ============================================ */
/* TRANSCRIPTION PAGES SHARED STYLES           */
/* Video to Text & Audio to Text               */
/* ============================================ */

/* ============================================ */
/* GLOBAL: Body Background Override             */
/* ============================================ */

body,
html {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    background-color: #f8fafc !important;
}

/* Dark theme body background */
.dark-theme body,
.dark-theme html,
.dark-theme {
    background: #0f172a !important;
    background-color: #0f172a !important;
}

.content-wrapper,
.app-container,
main.container {
    background: transparent !important;
}

/* ============================================ */
/* PAGE LAYOUT - Override main-grid             */
/* ============================================ */

/* Main container for transcription pages */
.transcription-page-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 90%;
    margin: 0 auto;
    padding: 24px;
}

/* Two column layout for header + upload area */
.transcription-header-row {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: stretch;
}

/* ============================================ */
/* PAGE HEADER CARD (Left sidebar style)        */
/* ============================================ */

.page-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    gap: 20px;
    animation: none !important;
}

.page-header-card * {
    animation: none !important;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.page-header-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: none !important;
}

.page-header-icon.video-icon {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.page-header-icon.video-icon svg {
    width: 40px;
    height: 40px;
    color: #1e293b;
}

.page-header-icon.audio-icon {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.page-header-icon.audio-icon svg {
    width: 40px;
    height: 40px;
    color: #1e293b;
}

.page-header-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b !important;
    background: none !important;
    -webkit-text-fill-color: #1e293b !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    margin: 0;
    /* Prevent any text animations */
    animation: none !important;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.page-header-credits {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
}

.credits-remaining {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}

.credits-remaining #creditCount {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

/* ============================================ */
/* UPLOAD CARD                                  */
/* ============================================ */

.upload-card {
    overflow: hidden;
}

.upload-card .config-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-area {
    margin: 24px;
    padding: 60px 40px;
    border: 2px dashed #38bdf8;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #0284c7;
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    transform: scale(1.01);
}

.upload-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    color: #0ea5e9;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #0ea5e9;
}

.upload-subtext {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
}

.browse-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.file-input {
    /* Safari-compatible hiding: position off-screen instead of display:none 
       display:none can prevent programmatic click() from working in Safari */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Upload Progress */
.upload-progress-container {
    margin: 0 24px 24px;
    padding: 20px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 12px;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.upload-progress-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.upload-progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: #0ea5e9;
}

.upload-progress-bar-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}

/* ============================================ */
/* PROCESSING CARD                              */
/* ============================================ */

.processing-card {
    overflow: hidden;
}

.processing-card .config-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Step Badges - Base and variants */
.step-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.step-badge.processing {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
    color: white !important;
    border: none !important;
}

.step-badge.success {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%) !important;
    color: white !important;
    border: none !important;
}

.processing-content {
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.processing-animation {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-spinner {
    width: 100px;
    height: 100px;
    border: 4px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-waves {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.processing-waves span {
    width: 4px;
    height: 100%;
    background: #0ea5e9;
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.processing-waves span:nth-child(1) { animation-delay: 0s; }
.processing-waves span:nth-child(2) { animation-delay: 0.1s; }
.processing-waves span:nth-child(3) { animation-delay: 0.2s; }
.processing-waves span:nth-child(4) { animation-delay: 0.3s; }
.processing-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.processing-status {
    text-align: center;
}

.processing-status h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 8px;
}

.processing-status p {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.processing-progress {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.processing-progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.processing-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.processing-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #0ea5e9;
    min-width: 40px;
}

.processing-file-info {
    display: flex;
    justify-content: center;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}

.file-chip svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary, #64748b);
}

/* ============================================ */
/* RESULTS CARD                                 */
/* ============================================ */

.results-card {
    overflow: hidden;
}

.results-card .config-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
}

/* Result File Info */
.result-file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-hover, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.result-file-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-file-icon.video {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.result-file-icon.video svg {
    width: 28px;
    height: 28px;
    color: #3b82f6;
}

.result-file-icon.audio {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.result-file-icon.audio svg {
    width: 28px;
    height: 28px;
    color: #ec4899;
}

.result-file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.result-file-meta {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}

.file-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon.video {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.file-icon.video svg {
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.file-icon.audio {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.file-icon.audio svg {
    width: 24px;
    height: 24px;
    color: #ec4899;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.file-meta {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}

/* Transcript Toolbar */
.transcript-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
}

.toolbar-btn.active {
    background: var(--color-primary, #3b82f6);
    border-color: var(--color-primary, #3b82f6);
    color: white;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--color-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box svg {
    color: var(--text-muted, #94a3b8);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 160px;
    background: transparent;
    color: var(--text-primary, #1e293b);
}

/* Transcript Content */
.transcript-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px 24px;
}

.transcript-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 10px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.transcript-entry:hover {
    background: #f1f5f9;
}

.timestamp {
    font-size: 12px;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text-muted, #94a3b8);
    min-width: 50px;
    flex-shrink: 0;
}

.speaker {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.speaker.speaker-1 {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
}

.speaker.speaker-2 {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #15803d;
}

.transcript-entry .text {
    flex: 1;
    min-width: 200px;
    color: var(--text-primary, #1e293b);
    font-size: 14px;
}

.transcript-content.hide-timestamps .timestamp {
    display: none;
}

.transcript-content.hide-speakers .speaker {
    display: none;
}

/* Transcript Stats */
.transcript-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-wrap: wrap;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================ */
/* ACTION BAR                                   */
/* ============================================ */

.action-bar-card {
    padding: 20px 24px;
}

.results-actions-bar {
    padding: 20px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 16px;
}

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

.actions-left,
.actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    min-height: 48px;
}

.action-btn.secondary {
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
}

.action-btn.secondary:hover {
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
    background: #f0f9ff;
}

.action-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* New Transcription button - pushed to the right */
.action-btn.new-transcription-btn {
    margin-left: auto;
}

/* Dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 100;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover, #f8fafc);
    color: var(--color-primary, #3b82f6);
}

/* ============================================ */
/* INFO CARD                                    */
/* ============================================ */

.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.info-card-header:hover {
    color: var(--color-primary, #3b82f6);
    background: var(--bg-hover, #f8fafc);
}

.info-card-header .info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #3b82f6);
}

.info-card-header .chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.info-card.collapsible .info-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.info-card.collapsible.expanded .info-card-content {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}

.info-card.collapsible.expanded .chevron {
    transform: rotate(180deg);
}

.info-card-content {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.info-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 12px;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-section li {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    line-height: 1.5;
}

.info-section li strong {
    color: var(--text-primary, #1e293b);
}

/* ============================================ */
/* NAVBAR ADDITIONS                             */
/* ============================================ */

/* Hide skip link (visually, still accessible) */
.skip-link {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Hide aria live region visually */
.aria-live-region {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Hide copy toast by default */
.copy-toast {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.copy-toast.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Menu section labels */
.user-menu-section-label {
    padding: 8px 14px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #94a3b8);
}

.user-menu-item.active {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
}

.user-menu-item-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
}

/* ============================================ */
/* DARK THEME                                   */
/* ============================================ */

.dark-theme .page-header-card,
.dark-theme .upload-card,
.dark-theme .processing-card,
.dark-theme .results-card,
.dark-theme .action-bar-card,
.dark-theme .info-card,
.dark-theme .card {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #e2e8f0 !important;
}

.dark-theme .page-title,
.dark-theme .config-title,
.dark-theme h1, .dark-theme h2, .dark-theme h3 {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}

.dark-theme .page-subtitle,
.dark-theme .upload-subtext {
    color: #94a3b8 !important;
}

.dark-theme .upload-area {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

.dark-theme .upload-area:hover {
    background: rgba(14, 165, 233, 0.15) !important;
}

.dark-theme .upload-text {
    color: #38bdf8 !important;
}

.dark-theme .upload-icon svg {
    color: #38bdf8 !important;
    stroke: #38bdf8 !important;
}

.dark-theme .browse-btn {
    background: var(--brand-secondary) !important;
    color: white !important;
}

.dark-theme .step-badge {
    background: var(--brand-secondary) !important;
    color: white !important;
}

.dark-theme .credit-badge {
    background: rgba(var(--brand-secondary-rgb), 0.2) !important;
    border-color: rgba(var(--brand-secondary-rgb), 0.4) !important;
    color: #38bdf8 !important;
}

.dark-theme .credits-remaining {
    color: #94a3b8 !important;
}

.dark-theme .page-header-icon {
    background: rgba(var(--brand-secondary-rgb), 0.15) !important;
}

.dark-theme .page-header-icon svg {
    color: #38bdf8 !important;
    stroke: #38bdf8 !important;
}

.dark-theme .transcript-toolbar {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(71, 85, 105, 0.3) !important;
}

.dark-theme .toolbar-btn {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(71, 85, 105, 0.3) !important;
    color: #94a3b8 !important;
}

.dark-theme .toolbar-btn.active {
    background: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
    color: white !important;
}

.dark-theme .transcript-entry {
    background: rgba(15, 23, 42, 0.5) !important;
    color: #e2e8f0 !important;
}

.dark-theme .action-btn.secondary {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(71, 85, 105, 0.3) !important;
    color: #94a3b8 !important;
}

.dark-theme .dropdown-menu {
    background: #1e293b;
}

/* ============================================ */
/* SPEAKER RENAME DIALOG                        */
/* ============================================ */

.speaker-rename-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speaker-rename-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.speaker-rename-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.speaker-rename-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.speaker-rename-content p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
}

.speaker-rename-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.speaker-rename-input:focus {
    outline: none;
    border-color: #0ea5e9;
}

.speaker-rename-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.speaker-rename-cancel,
.speaker-rename-save {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speaker-rename-cancel {
    background: #f1f5f9;
    border: none;
    color: #64748b;
}

.speaker-rename-cancel:hover {
    background: #e2e8f0;
}

.speaker-rename-save {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    border: none;
    color: white;
}

.speaker-rename-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Dark theme for speaker rename */
.dark-theme .speaker-rename-content {
    background: #1e293b;
}

.dark-theme .speaker-rename-content h3 {
    color: #f1f5f9;
}

.dark-theme .speaker-rename-content p {
    color: #94a3b8;
}

.dark-theme .speaker-rename-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.dark-theme .speaker-rename-cancel {
    background: #334155;
    color: #94a3b8;
}

/* ============================================ */
/* ANALYZE CONFIRMATION MODAL                   */
/* ============================================ */

.analyze-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analyze-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.analyze-confirm-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.analyze-confirm-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analyze-confirm-content h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.analyze-confirm-description {
    margin: 0 0 16px 0;
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
}

.analyze-confirm-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #92400e;
}

.analyze-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analyze-confirm-download,
.analyze-confirm-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analyze-confirm-download {
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.analyze-confirm-download:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: #f0f9ff;
}

.analyze-confirm-continue {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.analyze-confirm-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.analyze-confirm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.analyze-confirm-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Dark theme for analyze modal */
.dark-theme .analyze-confirm-content {
    background: #1e293b;
}

.dark-theme .analyze-confirm-content h3 {
    color: #f1f5f9;
}

.dark-theme .analyze-confirm-description {
    color: #94a3b8;
}

.dark-theme .analyze-confirm-icon {
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
}

.dark-theme .analyze-confirm-tip {
    background: linear-gradient(135deg, #422006 0%, #713f12 100%);
    color: #fde68a;
}

.dark-theme .analyze-confirm-download {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

.dark-theme .analyze-confirm-close {
    background: #334155;
    color: #94a3b8;
}

@media (max-width: 480px) {
    .analyze-confirm-content {
        padding: 24px;
        margin: 16px;
    }
    
    .analyze-confirm-icon {
        width: 64px;
        height: 64px;
    }
    
    .analyze-confirm-icon svg {
        width: 36px;
        height: 36px;
    }
}

/* ============================================ */
/* VIDEO THUMBNAIL PREVIEW                      */
/* ============================================ */

.video-thumbnail-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 24px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.video-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
}

.thumbnail-play-overlay svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
}

/* ============================================ */
/* MEETING INTELLIGENCE OVERVIEW                */
/* ============================================ */

.meeting-overview {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.overview-section {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.overview-section:last-child {
    border-bottom: none;
}

.overview-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.overview-section-header:hover {
    background: var(--bg-hover, #f8fafc);
}

.section-icon {
    font-size: 18px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    flex: 1;
}

.section-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
}

.section-chevron {
    color: var(--text-muted, #94a3b8);
    transition: transform 0.3s ease;
}

.overview-section-header[aria-expanded="true"] .section-chevron {
    transform: rotate(180deg);
}

.overview-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
}

.overview-section-content.expanded {
    max-height: 600px;
    padding: 0 24px 20px;
    overflow-y: auto;
}

/* Summary Content */
.summary-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary, #475569);
}

.summary-bullets {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-bullets li {
    line-height: 1.6;
}

/* Chapters / Key Topics */
.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chapter-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 10px;
}

.chapter-time {
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    height: fit-content;
}

.chapter-content {
    flex: 1;
}

.chapter-headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
}

.chapter-summary {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    line-height: 1.5;
}

/* Highlights / Key Phrases */
.highlights-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.highlight-chip {
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
}

/* Entities */
.entities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entity-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.entity-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
}

.entity-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.entity-chip.person {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.entity-chip.org {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.entity-chip.location {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9d174d;
}

/* Dark theme for meeting overview */
.dark-theme .overview-section-header:hover {
    background: rgba(30, 41, 59, 0.5);
}

.dark-theme .section-title {
    color: #f1f5f9;
}

.dark-theme .section-badge {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(56, 189, 248, 0.2) 100%);
    color: #38bdf8;
}

.dark-theme .chapter-item {
    background: rgba(30, 41, 59, 0.5);
}

.dark-theme .chapter-headline {
    color: #f1f5f9;
}

.dark-theme .chapter-summary {
    color: #94a3b8;
}

.dark-theme .summary-content {
    color: #94a3b8;
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

@media (max-width: 900px) {
    .transcription-header-row {
        grid-template-columns: 1fr;
    }
    
    .page-header-card {
        flex-direction: row;
        text-align: left;
        padding: 24px;
    }
    
    .page-header-content {
        flex-direction: row;
        align-items: center;
    }
    
    .page-header-text {
        text-align: left;
    }
    
    .page-header-icon {
        width: 64px;
        height: 64px;
    }
    
    .page-header-icon svg {
        width: 32px !important;
        height: 32px !important;
    }
    
    .page-header-credits {
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 768px) {
    .transcription-page-layout {
        padding: 16px;
    }
    
    .page-header-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .page-header-content {
        flex-direction: column;
    }
    
    .page-header-text {
        text-align: center;
    }
    
    .page-header-credits {
        align-items: center;
    }
    
    .upload-area {
        margin: 16px;
        padding: 40px 20px;
    }
    
    .results-actions-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .actions-left,
    .actions-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .transcript-toolbar {
        flex-direction: column;
        gap: 12px;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .transcript-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .action-btn span:not(.btn-icon) {
        display: none;
    }
    
    .action-btn {
        min-width: auto;
        padding: 10px 14px;
    }
}
