/**
 * MediaTranscriber.com Stylesheet
 *
 * Dark theme with teal accent
 * Utility-first approach with component classes
 *
 * Standard breakpoints:
 *   480px  - Small mobile (button stacking, compact layouts)
 *   640px  - Mobile (single-column layouts, modal adjustments)
 *   768px  - Tablet (grid collapse, navigation changes)
 *   1024px - Desktop (full layouts)
 */

/* =============================================================================
   CSS VARIABLES
   ============================================================================= */

:root {
    /* Colors - Dark Theme */
    --color-bg: #0f172a;
    --color-bg-alt: #020617;
    --color-surface: #1e293b;
    --color-surface-hover: #334155;
    --color-border: #334155;
    --color-border-light: #475569;

    /* Text Colors */
    --color-text: #f1f5f9;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-text-dark: #64748b;

    /* Brand Colors */
    --color-primary: #14b8a6;
    --color-primary-hover: #0d9488;
    --color-primary-light: #5eead4;
    --color-primary-dark: #0f766e;

    /* Status Colors */
    --color-success: #22c55e;
    --color-success-bg: #052e16;
    --color-warning: #f59e0b;
    --color-warning-bg: #422006;
    --color-error: #ef4444;
    --color-error-bg: #450a0a;
    --color-info: #3b82f6;
    --color-info-bg: #172554;

    /* Speaker Colors */
    --speaker-1: #14b8a6;
    --speaker-2: #f59e0b;
    --speaker-3: #8b5cf6;
    --speaker-4: #ef4444;
    --speaker-5: #3b82f6;
    --speaker-6: #22c55e;
    --speaker-7: #ec4899;
    --speaker-8: #f97316;

    /* Typography */
    --font-heading: 'Sora', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Container */
    --container-max: 800px;
    --container-wide: 1200px;
}

/* =============================================================================
   BASE RESET & TYPOGRAPHY
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 2.125rem; font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: var(--container-wide);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.metadata-file-size {
    overflow: visible;
}

.metadata-grid {
    overflow: visible;
}

.metadata-grid > div {
    overflow: visible;
}

/* Allow tooltip to overflow card */
.card-metadata {
    overflow: visible !important;
}

.card-metadata .card-body {
    overflow: visible !important;
}

.card-metadata .metadata-grid {
    overflow: visible !important;
}

.card-metadata .metadata-file-size {
    overflow: visible !important;
}

.card-metadata .metadata-file-size > * {
    overflow: visible !important;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr;
    }

    .metadata-grid {
        gap: var(--space-md);
    }

    .info-tooltip {
        white-space: normal;
        min-width: auto;
        max-width: calc(100vw - 2rem);
    }
}

/* =============================================================================
   SPACING UTILITIES
   ============================================================================= */

.m-0 { margin: 0; }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.ml-sm { margin-left: var(--space-sm); }
.ml-md { margin-left: var(--space-md); }
.mr-sm { margin-right: var(--space-sm); }
.mr-md { margin-right: var(--space-md); }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

/* =============================================================================
   TEXT UTILITIES
   ============================================================================= */

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.font-mono { font-family: var(--font-mono); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================================================
   VISIBILITY UTILITIES
   ============================================================================= */

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.25), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    color: white;
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-surface-hover);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    color: white;
}

.btn-ghost {
    background-color: rgba(2, 6, 23, 0.35);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-border-light);
}

.btn-outline {
    background-color: rgba(2, 6, 23, 0.35);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-border-light);
}

.btn-sm {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .btn-group {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

.btn-icon {
    padding: 0.75rem;
    width: 2.75rem;
    height: 2.75rem;
}

.btn-icon.btn-sm {
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

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

.form-input,
.form-control,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-input::placeholder,
.form-control::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-input:disabled,
.form-control:disabled,
.form-select:disabled,
.form-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

/* Date input styling for dark mode */
.date-input-wrapper {
    position: relative;
    display: inline-block;
    max-width: 200px;
    width: 100%;
}

.date-input-wrapper input[type="date"] {
    width: 100%;
    padding-right: 40px;
}

.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.date-input-wrapper .date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text);
    pointer-events: none;
    opacity: 0.8;
}

.date-input-wrapper:hover .date-icon {
    opacity: 1;
}

.form-select,
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
    cursor: pointer;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

select.form-control-sm {
    padding-right: 2.5rem;
    background-position: right 0.75rem center;
    background-size: 1rem;
    min-width: 120px;
}

.form-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-checkbox-label {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.form-hint {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.form-error {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-error);
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    border-color: rgba(20, 184, 166, 0.2);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.card-body {
    padding: var(--space-lg);
}

/* =============================================================================
   ALERTS
   ============================================================================= */

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
}

.alert-success {
    background-color: var(--color-success-bg);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-warning {
    background-color: var(--color-warning-bg);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

.alert-error {
    background-color: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error);
}

.alert-info {
    background-color: var(--color-info-bg);
    border-color: var(--color-info);
    color: var(--color-info);
}

/* =============================================================================
   TOASTS
   ============================================================================= */

#toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastSlideIn 0.28s ease-out;
}

.toast-success { background-color: #10b981; }
.toast-error { background-color: #ef4444; }
.toast-warning { background-color: #f59e0b; }
.toast-info { background-color: #3b82f6; }

.toast.toast-hiding {
    animation: toastSlideOut 0.28s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translate3d(22px, 22px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    to {
        transform: translate3d(22px, 22px, 0);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    #toast-container {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

/* =============================================================================
   BADGES
   ============================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin: 0;
    margin-right: 0.5rem;
}

.badge:last-child {
    margin-right: 0;
}

.badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
}

.badge-pending {
    background-color: var(--color-surface);
    color: var(--color-text-muted);
}

.badge-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
}

.badge-primary {
    background-color: rgba(20, 184, 166, 0.15);
    color: var(--color-primary);
}

.badge-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    margin-right: 0.25rem;
}

/* =============================================================================
   UPLOAD ZONE
   ============================================================================= */

.upload-zone {
    position: relative;
    padding: var(--space-3xl) var(--space-xl);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background-color: var(--color-surface);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(20, 184, 166, 0.04) 0%, transparent 70%);
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background-color: rgba(20, 184, 166, 0.05);
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.1), inset 0 0 40px rgba(20, 184, 166, 0.03);
}

.upload-zone.dragover {
    border-color: var(--color-primary);
    background-color: rgba(20, 184, 166, 0.1);
    transform: scale(1.01);
    box-shadow: 0 0 60px rgba(20, 184, 166, 0.2), inset 0 0 60px rgba(20, 184, 166, 0.05);
}

.upload-zone-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto var(--space-lg);
    color: var(--color-primary);
}

.upload-zone-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.upload-zone-text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.upload-zone-formats {
    font-size: 0.8125rem;
    color: var(--color-text-dark);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* =============================================================================
   PROGRESS BAR
   ============================================================================= */

.progress-bar {
    height: 0.5rem;
    background-color: var(--color-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.progress-bar-lg {
    height: 1rem;
}

/* =============================================================================
   TRANSCRIPT DISPLAY
   ============================================================================= */

/* Podcast breadcrumb navigation */
.podcast-breadcrumb {
    display: inline-flex;
    align-items: center;
}

.podcast-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.25rem 0.625rem;
    margin-left: -0.625rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.podcast-breadcrumb-link:hover {
    color: var(--color-primary);
    background-color: var(--color-surface-hover);
}

.podcast-breadcrumb-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.podcast-breadcrumb-link:hover svg {
    opacity: 1;
}

/* Transcript title edit (inline) */
.transcript-title-edit-inline {
    width: 100%;
    max-width: 100%;
}

.transcript-title-edit-input {
    margin-bottom: var(--space-md);
    width: 100%;
    min-width: 0;
}

.transcript-title-edit-buttons {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.transcript-display-title {
    font-size: 2rem;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .transcript-display-title {
        font-size: 1.65rem;
    }

    .transcript-title-edit-inline {
        margin-top: var(--space-sm);
    }

    .transcript-title-edit-input {
        font-size: 1rem;
        padding: var(--space-sm) var(--space-md);
    }

    .transcript-title-edit-buttons {
        gap: var(--space-sm);
    }

    .transcript-title-edit-buttons .btn {
        flex: 1;
        min-width: 0;
    }
}

.transcript-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.transcript-page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.transcript-page-header-main {
    width: 100%;
}

.transcript-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    width: 100%;
    justify-content: flex-end;
}

.transcript-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: var(--space-md);
    align-items: start;
}

.transcript-meta-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}

.transcript-recorded-at {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.transcript-recorded-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.2;
}

.transcript-recorded-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.transcript-recorded-input {
    width: 10.25rem;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0.28rem 0.5rem;
}

.transcript-recorded-status {
    min-height: 1em;
    text-align: right;
}

@media (max-width: 768px) {
    .transcript-page-actions {
        justify-content: flex-start;
    }

    .transcript-meta-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .transcript-recorded-at {
        width: 100%;
    }

    .transcript-recorded-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: var(--space-sm);
        align-items: center;
    }

    .transcript-recorded-input {
        width: 100%;
        min-width: 0;
    }

    .transcript-recorded-status {
        text-align: left;
    }
}

.transcript-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

.transcript-tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.transcript-search {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

.transcript-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 500px;
}

.transcript-search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.transcript-search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    z-index: 1;
}

.transcript-search-input {
    width: 100%;
    padding: 0.625rem var(--space-md) 0.625rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.transcript-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.transcript-search-input::placeholder {
    color: var(--color-text-muted);
}

.transcript-search-clear {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    z-index: 2;
}

.transcript-search-clear:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text);
}

.transcript-search-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.transcript-search-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.transcript-search-nav-btn:hover:not(:disabled) {
    background-color: var(--color-surface-hover);
    border-color: var(--color-primary);
    color: var(--color-text);
}

.transcript-search-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.transcript-search-count {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    min-width: 3rem;
    text-align: center;
}

/* Mobile responsive styles for search */
@media (max-width: 768px) {
    .transcript-search {
        padding: var(--space-sm) var(--space-md);
    }

    .transcript-search-wrapper {
        flex-wrap: wrap;
        gap: var(--space-sm);
        max-width: 100%;
    }

    .transcript-search-input-wrapper {
        flex: 1 1 100%;
        order: 1;
    }

    .transcript-search-input {
        padding-right: 3rem; /* Make room for clear button */
    }

    .transcript-search-clear {
        right: var(--space-sm);
    }

    .transcript-search-nav {
        flex: 1 1 100%;
        justify-content: center;
        order: 2;
        width: 100%;
        margin-top: 0;
    }

    .transcript-search-nav-btn {
        width: 2.5rem;
        height: 2.5rem;
        flex-shrink: 0;
    }

    .transcript-search-count {
        min-width: auto;
        padding: 0 var(--space-xs);
        font-size: 0.75rem;
    }
}

.transcript-body {
    padding: var(--space-lg);
    max-height: 600px;
    overflow-y: auto;
}

/* Search highlight styling */
.transcript-search-highlight {
    background-color: rgba(20, 184, 166, 0.3);
    color: var(--color-text);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.transcript-search-highlight.active {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.3);
}

.transcript-segment {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-md);
    border-left: 3px solid var(--color-border);
}

.transcript-segment:last-child {
    margin-bottom: 0;
}

.speaker-label {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.speaker-label:hover {
    filter: brightness(1.2);
}

.speaker-color-1 { background-color: rgba(20, 184, 166, 0.2); color: var(--speaker-1); border-color: var(--speaker-1); }
.speaker-color-2 { background-color: rgba(245, 158, 11, 0.2); color: var(--speaker-2); border-color: var(--speaker-2); }
.speaker-color-3 { background-color: rgba(139, 92, 246, 0.2); color: var(--speaker-3); border-color: var(--speaker-3); }
.speaker-color-4 { background-color: rgba(239, 68, 68, 0.2); color: var(--speaker-4); border-color: var(--speaker-4); }
.speaker-color-5 { background-color: rgba(59, 130, 246, 0.2); color: var(--speaker-5); border-color: var(--speaker-5); }
.speaker-color-6 { background-color: rgba(34, 197, 94, 0.2); color: var(--speaker-6); border-color: var(--speaker-6); }
.speaker-color-7 { background-color: rgba(236, 72, 153, 0.2); color: var(--speaker-7); border-color: var(--speaker-7); }
.speaker-color-8 { background-color: rgba(249, 115, 22, 0.2); color: var(--speaker-8); border-color: var(--speaker-8); }

.transcript-segment.speaker-1 { border-color: var(--speaker-1); }
.transcript-segment.speaker-2 { border-color: var(--speaker-2); }
.transcript-segment.speaker-3 { border-color: var(--speaker-3); }
.transcript-segment.speaker-4 { border-color: var(--speaker-4); }
.transcript-segment.speaker-5 { border-color: var(--speaker-5); }
.transcript-segment.speaker-6 { border-color: var(--speaker-6); }
.transcript-segment.speaker-7 { border-color: var(--speaker-7); }
.transcript-segment.speaker-8 { border-color: var(--speaker-8); }

/* Speaker badge for cleaned/formatted transcript text */
.speaker-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: 0.25rem;
    border: 1px solid transparent;
}

.speaker-badge:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.speaker-badge:active {
    transform: translateY(0);
}

.transcript-timestamp {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-right: var(--space-sm);
}

.transcript-text {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.transcript-formatted {
    /* Proper paragraph spacing for cleaned/formatted transcript text */
    line-height: 1.8;
}

.transcript-formatted br + br {
    /* Add spacing between paragraphs (double line breaks become paragraph gaps) */
    display: block;
    content: "";
    margin-top: 1em;
}

/* =============================================================================
   STAT CARDS
   ============================================================================= */

.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-change {
    font-size: 0.8125rem;
    margin-top: var(--space-xs);
}

.stat-change-positive { color: var(--color-success); }

/* Stat card category colors */
.stat-card-revenue {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.stat-card-transcriptions {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-card-refunds {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.stat-card-ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.stat-card-translations {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(20, 184, 166, 0.02) 100%);
    border-color: rgba(20, 184, 166, 0.2);
}

.stat-card-storage {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(249, 115, 22, 0.02) 100%);
    border-color: rgba(249, 115, 22, 0.2);
}
.stat-change-negative { color: var(--color-error); }

/* =============================================================================
   DATA TABLES
   ============================================================================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background-color: var(--color-bg);
}

.data-table tbody tr:hover {
    background-color: var(--color-surface-hover);
}

.data-table td {
    color: var(--color-text-secondary);
}

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

.site-header {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg);
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(20, 184, 166, 0.3) 50%, transparent 100%);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo:hover {
    color: var(--color-primary-light);
}

.site-logo-img {
    height: 36px;
    width: auto;
}

@media (max-width: 768px) {
    .site-logo-img {
        height: 28px;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-nav a {
    color: var(--color-text-secondary);
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.site-nav a:hover {
    color: var(--color-text);
}

.site-nav a.nav-active {
    color: var(--color-text);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
}

.site-nav .nav-btn-primary.nav-active {
    background: var(--color-primary-dark);
    border: 1px solid var(--color-primary);
}

.site-nav .nav-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.site-nav .nav-btn-primary {
    background: var(--color-primary);
    color: white !important;
}

.site-nav .nav-btn-primary:hover {
    background: var(--color-primary-dark);
    color: white !important;
}

.site-nav .nav-link-muted {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.site-nav .nav-link-muted:hover {
    color: var(--color-text-secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-sm);
    margin-right: calc(-1 * var(--space-sm));
    z-index: 1001;
}

.mobile-menu-toggle .close-icon {
    display: none;
}

.mobile-menu-toggle.is-open .hamburger-icon {
    display: none;
}

.mobile-menu-toggle.is-open .close-icon {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        background-color: var(--color-surface);
        border-left: 1px solid var(--color-border);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 5rem var(--space-lg) var(--space-lg);
        gap: var(--space-sm);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav a {
        display: block;
        width: 100%;
        padding: var(--space-sm) var(--space-md);
        margin: 0;
        border-bottom: 1px solid var(--color-border);
        border-left: 1px solid transparent;
        border-right: 1px solid transparent;
        border-top: 1px solid transparent;
        font-size: 1.125rem;
        text-align: left;
        box-sizing: border-box;
    }

    .site-nav a:last-child {
        border-bottom: none;
    }

    .site-nav a.nav-active {
        padding: var(--space-sm) var(--space-md);
        border-left: 1px solid var(--color-border);
        border-right: 1px solid var(--color-border);
        border-top: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    .site-nav .nav-btn {
        display: block;
        width: 100%;
        margin-top: var(--space-md);
        padding: var(--space-sm) var(--space-md);
        text-align: center;
    }

    .site-nav .nav-btn-primary.nav-active {
        border: 1px solid var(--color-primary);
    }

    .site-nav .nav-link-muted {
        font-size: 1rem;
    }
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.site-footer {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* =============================================================================
   LOADING & SPINNER
   ============================================================================= */

.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--color-surface);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
}

.spinner-sm {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.25rem;
}

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

/* =============================================================================
   PROGRESS BAR
   ============================================================================= */

.progress-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    height: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light, #2dd4bf) 100%);
    border-radius: var(--radius-lg);
    transition: width 0.5s ease-out;
    position: relative;
    min-width: 0;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: progress-shimmer 2s ease-in-out infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
}

.progress-percent {
    font-weight: 600;
    color: var(--color-primary);
}

.progress-time {
    color: var(--color-text-muted);
}

/* Progress confidence indicators */
.progress-container[data-confidence="high"] .progress-bar {
    background: linear-gradient(90deg, var(--color-primary) 0%, #2dd4bf 100%);
}

.progress-container[data-confidence="medium"] .progress-bar {
    background: linear-gradient(90deg, var(--color-warning) 0%, #fbbf24 100%);
}

.progress-container[data-confidence="low"] .progress-bar {
    background: linear-gradient(90deg, var(--color-text-muted) 0%, #94a3b8 100%);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* =============================================================================
   MODAL
   ============================================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
}

.modal {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Dashboard-style modals override: .modal > .modal-backdrop + .modal-content */
.modal:has(.modal-content) {
    background-color: transparent;
    border: none;
    border-radius: 0;
    max-width: none;
    width: auto;
    max-height: none;
    overflow: visible;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    font-size: 1.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

/* =============================================================================
   INFO BOX
   ============================================================================= */

.info-box {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.info-row:last-child {
    border-bottom: none;
}

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

.info-value {
    color: var(--color-text);
    font-weight: 500;
}

/* =============================================================================
   PULSE ANIMATION
   ============================================================================= */

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =============================================================================
   PRINT-ONLY ELEMENTS (hidden on screen)
   ============================================================================= */

.print-only-header,
.print-only {
    display: none;
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    /* Show print-only elements */
    .print-only {
        display: block !important;
    }

    .print-only-header {
        display: block !important;
        margin-bottom: 20pt;
        padding-bottom: 10pt;
        border-bottom: 1px solid #ccc;
    }

    .print-only-header h1 {
        font-size: 14pt !important;
        margin: 0 0 4pt 0 !important;
        color: black !important;
    }

    .print-only-header p {
        font-size: 10pt !important;
        margin: 0 !important;
        color: #666 !important;
    }
    /* Reset page to white background */
    * {
        background-color: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    body {
        background-color: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.6;
    }

    /* Hide all non-essential elements */
    .site-header,
    .site-footer,
    .btn,
    .no-print,
    .card,
    .transcript-header,
    .dropdown,
    .badge {
        display: none !important;
    }

    /* Hide the top section with filename and buttons */
    main > .container > .flex:first-child {
        display: none !important;
    }

    /* Remove container constraints */
    .container,
    .container-wide {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    main {
        padding: 0 !important;
    }

    /* Transcript container - remove styling, show all content */
    .transcript-container {
        border: none !important;
        background: white !important;
        overflow: visible !important;
    }

    /* Critical: Remove scroll constraints so all content prints */
    .transcript-body {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* Transcript text styling for print */
    .transcript-text {
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.7 !important;
    }

    .transcript-formatted {
        line-height: 1.8 !important;
    }

    /* Segment styling for multi-speaker transcripts */
    .transcript-segment {
        border-left: 2px solid #333 !important;
        padding-left: 12pt !important;
        margin-bottom: 12pt !important;
        page-break-inside: avoid;
    }

    /* Speaker labels */
    .speaker-label {
        border: 1px solid #333 !important;
        background: none !important;
        color: black !important;
        padding: 2pt 6pt !important;
        font-size: 10pt !important;
    }

    /* Timestamps */
    .transcript-timestamp {
        color: #666 !important;
        font-size: 10pt !important;
    }

    /* Ensure page breaks work well */
    .transcript-segment {
        page-break-inside: avoid;
    }

    /* Remove any fixed positioning */
    .modal-backdrop,
    .modal {
        display: none !important;
    }
}

/* =============================================================================
   ADDITIONAL MODAL STYLES (for dashboard-style modals with .modal-content)
   ============================================================================= */

/* Dashboard-style modals with nested backdrop + modal-content */
.modal.modal-shell {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background-color: transparent;
    border: none;
    border-radius: 0;
    max-width: none;
    width: 100%;
    max-height: none;
    overflow: visible;
}

.modal.modal-shell[style*="display: flex"],
.modal.modal-shell[style*="display:flex"],
.modal.modal-shell[style*="display: flex;"],
.modal.modal-shell[style*="display:flex;"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.modal.modal-shell > .modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.modal.modal-shell > .modal-content {
    position: relative;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    flex-shrink: 0;
}

/* Ensure modal-content is centered when parent is flex */
.modal.modal-shell[style*="display: flex"] > .modal-content,
.modal.modal-shell[style*="display:flex"] > .modal-content {
    width: auto;
    min-width: 0;
    max-width: min(500px, calc(100% - 2rem));
}

/* Dashboard-style modals: .modal > .modal-backdrop + .modal-content */
.modal:has(.modal-content) {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background-color: transparent;
    border: none;
    border-radius: 0;
    max-width: none;
    width: 100%;
    max-height: none;
    overflow: visible;
}

.modal:has(.modal-content)[style*="display: flex"],
.modal:has(.modal-content)[style*="display:flex"],
.modal:has(.modal-content)[style*="display: flex;"],
.modal:has(.modal-content)[style*="display:flex;"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.modal:has(.modal-content)[style*="display: flex"] .modal-backdrop,
.modal:has(.modal-content)[style*="display:flex"] .modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.modal:has(.modal-content) .modal-content {
    position: relative;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    flex-shrink: 0;
}

/* Ensure modal-content is centered when parent is flex */
.modal:has(.modal-content)[style*="display: flex"] .modal-content,
.modal:has(.modal-content)[style*="display:flex"] .modal-content {
    width: auto;
    min-width: 0;
    max-width: min(500px, calc(100% - 2rem));
}

/* Ensure dynamically created modals inside .modal-backdrop are properly styled */
.modal-backdrop > .modal {
    position: relative;
    max-width: 500px;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow-y: auto;
}

/* Mobile responsiveness for modals */
@media (max-width: 640px) {
    .modal-backdrop {
        padding: var(--space-md);
    }

    .modal.modal-shell {
        padding: var(--space-md);
    }

    .modal:has(.modal-content) {
        padding: var(--space-md);
    }

    .modal-backdrop > .modal,
    .modal .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-md);
    }

    .modal-footer {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* =============================================================================
   GRID SYSTEM
   ============================================================================= */

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   ADDITIONAL BADGE VARIANTS
   ============================================================================= */

.badge-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
}

.badge-secondary {
    background-color: var(--color-surface-hover);
    color: var(--color-text-muted);
}

/* =============================================================================
   DANGER ZONE STYLES
   ============================================================================= */

.border-error {
    border-color: var(--color-error) !important;
}

.bg-error-subtle {
    background-color: var(--color-error-bg);
}

/* =============================================================================
   TABLE CONTAINER
   ============================================================================= */

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   ADDITIONAL FORM STYLES
   ============================================================================= */

.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.opacity-50 {
    opacity: 0.5;
}

.bg-tertiary {
    background-color: var(--color-bg);
}

.rounded {
    border-radius: var(--radius-md);
}

.btn-group-lg {
    gap: var(--space-md);
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.inline-block {
    display: inline-block;
}

.mx-sm {
    margin-left: var(--space-sm);
    margin-right: var(--space-sm);
}

.ml-sm {
    margin-left: var(--space-sm);
}

.gap-xs {
    gap: var(--space-xs);
}

.pt-lg {
    padding-top: var(--space-lg);
}

.text-warning {
    color: var(--color-warning);
}

.icon {
    display: inline-block;
    vertical-align: middle;
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.active {
    color: var(--color-primary);
}

/* =============================================================================
   SITE FOOTER ENHANCEMENTS
   ============================================================================= */

.site-footer a {
    color: var(--color-primary);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* =============================================================================
   CARD FOOTER
   ============================================================================= */

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

/* =============================================================================
   PRICING SECTION
   ============================================================================= */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 1rem; /* Space for featured badge */
    overflow: visible;
}

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

.pricing-card {
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: visible; /* Allow badge to extend outside card */
    border: 1px solid var(--color-border);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card-featured {
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), 0 4px 12px rgba(20, 184, 166, 0.2);
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.1) 0%, transparent 100%);
}

.pricing-card-featured:hover {
    box-shadow: 0 0 0 1px var(--color-primary), 0 8px 20px rgba(20, 184, 166, 0.3);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-bg);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.pricing-features li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}
.pricing-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.pricing-amount span {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}
.pricing-minutes {
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.pricing-rate {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}
.pricing-savings {
    display: inline-block;
    background: var(--color-success-subtle);
    color: var(--color-success);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.pay-as-you-go {
    background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, var(--color-bg-secondary) 100%);
}
.commitment-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.commitment-toggle {
    display: inline-flex;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 4px;
    gap: 4px;
}
.commitment-option {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.commitment-option.active {
    background: var(--color-primary);
    color: white;
}
.commitment-option .option-label {
    font-weight: 600;
    font-size: 0.875rem;
}
.commitment-option .option-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}
.pricing-option {
    display: none;
}
.pricing-option.active {
    display: block;
}
.option-card .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.option-card .card.featured:hover {
    box-shadow: 0 0 0 1px var(--color-primary), 0 8px 20px rgba(20, 184, 166, 0.3);
}
@media (max-width: 768px) {
    .commitment-toggle {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .commitment-option {
        width: 100%;
    }
}

/* =============================================================================
   WIDTH UTILITIES
   ============================================================================= */

.w-full { width: 100%; }
.w-auto { width: auto; }

/* Max-width containers for forms/content */
.max-w-xs { max-width: 320px; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 500px; }
.max-w-lg { max-width: 600px; }
.max-w-xl { max-width: 800px; }
.max-w-2xl { max-width: 1000px; }

/* Centered container with max-width */
.content-narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.content-sm { max-width: 500px; margin-left: auto; margin-right: auto; }
.content-md { max-width: 600px; margin-left: auto; margin-right: auto; }
.content-lg { max-width: 800px; margin-left: auto; margin-right: auto; }

/* Full width button helper */
.btn-block { width: 100%; }

/* =============================================================================
   ADDITIONAL DISPLAY UTILITIES
   ============================================================================= */

.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-none { display: none; }

/* =============================================================================
   MY UTILITIES (Vertical margins)
   ============================================================================= */

.my-sm { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-md { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.my-lg { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.my-xl { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

/* =============================================================================
   AI TOOLS TOOLBAR
   ============================================================================= */

.ai-tools-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.ai-tools-bar .tools-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding-right: var(--space-md);
    border-right: 1px solid var(--color-border);
    margin-right: var(--space-sm);
}

.ai-tools-bar .tools-label svg {
    color: var(--color-primary);
}

.ai-tools-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.ai-tools-group + .ai-tools-group {
    padding-left: var(--space-md);
    border-left: 1px solid var(--color-border);
    margin-left: var(--space-sm);
}

.tools-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.tools-split-grid .ai-tools-bar {
    margin-bottom: 0;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-tool:hover:not(:disabled) {
    background-color: var(--color-surface-hover);
    color: var(--color-text);
    border-color: var(--color-border-light);
}

.btn-tool:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-tool.loading {
    pointer-events: none;
}

.btn-tool .spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* AI Tool Processing State */
.btn-tool.processing {
    opacity: 0.85;
    background-color: var(--color-surface);
    border-color: var(--color-primary);
    cursor: pointer;
}

.btn-tool.processing .ai-tool-spinner {
    flex-shrink: 0;
}

.btn-tool.processing .btn-tool-label {
    color: var(--color-text-muted);
}

/* AI Tool Cached Content Indicator */
.btn-tool.has-content,
.show-notes-dropdown .btn-tool.has-content,
.tone-dropdown .btn-tool.has-content {
    position: relative;
}

.btn-tool.has-content::after,
.show-notes-dropdown .btn-tool.has-content::after,
.tone-dropdown .btn-tool.has-content::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-bg);
}

/* Tone dropdown (for Title and Social Media) */
.tone-dropdown {
    position: relative;
}

.tone-dropdown .tone-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 150px;
    max-width: 200px;
    overflow: hidden;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    padding: 0.25rem 0;
}

.tone-menu-header {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 0.5rem 0.75rem 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tone-menu .tone-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tone-menu .tone-option:hover,
.tone-menu .tone-option:focus {
    background-color: var(--color-surface-hover);
    outline: none;
}

.tone-menu .tone-option:active {
    background-color: var(--color-primary);
    color: white;
}

.tone-menu .tone-option.last-used {
    position: relative;
}

.tone-menu .tone-option.last-used::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-surface);
}

.show-notes-menu .show-notes-option.last-used {
    position: relative;
}

.show-notes-menu .show-notes-option.last-used::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-surface);
}

/* Show Notes dropdown */
.show-notes-dropdown {
    position: relative;
}

.show-notes-dropdown .show-notes-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 140px;
    overflow: hidden;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.show-notes-menu .show-notes-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.show-notes-menu .show-notes-option:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.show-notes-menu .show-notes-option:hover {
    background-color: var(--color-surface-hover);
}

.show-notes-menu .option-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Bullets dropdown */
.bullets-dropdown {
    position: relative;
}

.bullets-dropdown .btn-tool.has-content::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-bg);
}

.bullets-dropdown .bullets-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 160px;
    overflow: hidden;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.bullets-menu .bullets-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.bullets-menu .bullets-option:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.bullets-menu .bullets-option:hover {
    background-color: var(--color-surface-hover);
}

.bullets-menu .bullets-option.last-used {
    position: relative;
}

.bullets-menu .bullets-option.last-used::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-surface);
}

.bullets-menu .option-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 2px;
}

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

.translate-dropdown .translate-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.translate-menu .translate-option {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.translate-menu .translate-option:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text);
}

.translate-menu .translate-option.active {
    color: var(--color-primary);
    font-weight: 500;
}

/* Language toggle button */
.language-toggle {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.language-toggle .toggle-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.language-toggle .toggle-btn:not(:last-child) {
    border-right: 1px solid var(--color-border);
}

.language-toggle .toggle-btn:hover {
    background: var(--color-surface-hover);
}

.language-toggle .toggle-btn.active {
    background: var(--color-primary);
    color: white;
}

/* =============================================================================
   AI RESULT MODAL
   ============================================================================= */

.modal-wide {
    max-width: 700px;
}

.modal-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.modal-result-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border-color: var(--color-border-light);
}

.btn-icon.copied {
    background: var(--color-success-bg);
    border-color: var(--color-success);
    color: var(--color-success);
}

.ai-result-content {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text);
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

.ai-result-content p {
    margin: 0 0 1em 0;
}

.ai-result-content p:last-child {
    margin-bottom: 0;
}

/* Multi-variant AI results (titles, social media) */
.variant-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.variant-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.variant-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.variant-content {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--color-text);
    word-break: break-word;
}

.variant-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-tool-confirm-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
}

.ai-tool-confirm-description p {
    margin: 0 0 1rem 0;
}

.ai-tool-confirm-description p:last-child {
    margin-bottom: 0;
}

.ai-tool-confirm-description strong {
    color: var(--color-text);
    font-weight: 600;
}

/* AI Tool Options (e.g., Detailed checkbox for bullets) */
.ai-tool-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.ai-tool-options .form-checkbox-wrapper {
    margin: 0;
}

.ai-tool-options .form-hint {
    margin-top: 0.25rem;
}

.variant-copy-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.variant-copy-btn .check-icon {
    display: none;
}

.variant-copy-btn.copied {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.variant-copy-btn.copied svg:first-child {
    display: none;
}

.variant-copy-btn.copied .check-icon {
    display: block;
}

/* Loading state for modal */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
}

.modal-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.modal-loading-text {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.modal-loading-info {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    text-align: center;
}

.modal-loading-info p {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    margin: 0;
}

/* =============================================================================
   MOBILE RESPONSIVE - AI TOOLS
   ============================================================================= */

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

    .ai-tools-bar {
        padding: var(--space-md);
    }

    .ai-tools-bar .tools-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-right: 0;
        padding-bottom: var(--space-sm);
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }

    .ai-tools-group {
        width: 100%;
    }

    .ai-tools-group + .ai-tools-group {
        padding-left: 0;
        border-left: none;
        padding-top: var(--space-sm);
        border-top: 1px solid var(--color-border);
        margin-left: 0;
        margin-top: var(--space-sm);
    }

    .btn-tool {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .translate-dropdown {
        flex: 1;
    }

    .translate-dropdown .btn-tool {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .modal-wide {
        max-width: 100%;
    }

    .ai-result-content {
        max-height: 300px;
    }
}

/* Print styles - hide AI tools */
@media print {
    .ai-tools-bar {
        display: none !important;
    }
}

/* =============================================================================
   TRANSCRIPT EDITING
   ============================================================================= */

.btn-edit-transcript {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit-transcript:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-edit-transcript.hidden {
    display: none;
}

/* Transcript Editor */
.transcript-editor {
    width: 100%;
    min-height: 400px;
    max-height: 600px;
    padding: var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    resize: vertical;
    outline: none;
}

.transcript-editor:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.transcript-editor::placeholder {
    color: var(--color-text-muted);
}

/* Edit Actions Bar */
.transcript-edit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.edit-actions-left {
    display: flex;
    gap: var(--space-sm);
}

.edit-actions-right {
    display: flex;
    gap: var(--space-sm);
}

/* Restore button styling */
#restoreOriginalBtn {
    color: var(--color-warning);
    border-color: var(--color-warning);
}

#restoreOriginalBtn:hover {
    background-color: var(--color-warning-bg);
}

/* Warning button variant */
.btn-warning {
    background-color: var(--color-warning);
    color: var(--color-bg);
    border: none;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
    color: var(--color-bg);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .transcript-edit-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .edit-actions-left,
    .edit-actions-right {
        width: 100%;
        justify-content: stretch;
    }

    .edit-actions-left .btn,
    .edit-actions-right .btn {
        flex: 1;
    }

    .transcript-editor {
        min-height: 300px;
    }
}

/* Info Banner (for signup prompts) */
.info-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    color: white;
}

.info-banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.info-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-banner-icon svg {
    color: white;
}

.info-banner-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.info-banner-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.info-banner-cta {
    flex-shrink: 0;
    background: white !important;
    color: var(--color-primary) !important;
    font-weight: 600;
}

.info-banner-cta:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

@media (max-width: 768px) {
    .info-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .info-banner-cta {
        width: 100%;
    }
}

/* Info Tooltip (click to show) */
.info-tooltip-trigger {
    position: relative;
    display: inline-block;
    color: var(--color-info);
    overflow: visible;
    z-index: 10;
}

.info-tooltip-trigger svg {
    transition: color var(--transition-fast);
}

.info-tooltip-trigger:hover svg {
    color: var(--color-primary);
}

.info-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text);
    text-align: left;
    font-weight: normal;
    min-width: 200px;
    max-width: 300px;
    width: 250px;
    white-space: normal;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-border);
}

.info-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--color-bg);
    z-index: 1;
}

.info-tooltip-trigger.active .info-tooltip,
.info-tooltip-trigger:hover .info-tooltip {
    display: block;
}

@media (max-width: 640px) {
    .info-tooltip {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 2rem);
        max-width: 300px;
    }

    .info-tooltip::after,
    .info-tooltip::before {
        display: none;
    }
}

/* Transcript Accuracy Disclaimer */
.transcript-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.transcript-disclaimer svg {
    flex-shrink: 0;
    color: var(--color-warning);
}

.transcript-disclaimer a {
    white-space: nowrap;
}

/* Transcriptions List Styling */
.transcriptions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.transcription-item {
    padding: var(--space-lg) var(--space-xl);
    margin: 0 calc(-1 * var(--space-xl));
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--color-border);
}

.transcription-item:hover {
    background-color: var(--color-bg-alt);
}

.transcription-item:last-child {
    border-bottom: none !important;
}

.transcription-item .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transcription-item .filename-truncate {
    cursor: help;
    position: relative;
}

/* Better spacing between items on mobile */
@media (max-width: 768px) {
    .transcription-item {
        padding: var(--space-md) var(--space-lg);
        margin: 0 calc(-1 * var(--space-lg));
    }
}

/* Header with title row above action buttons */
.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

/* Dashboard Header - Stack on mobile */
@media (max-width: 768px) {
    .dashboard-header {
        align-items: flex-start !important;
    }

    .dashboard-header > div {
        width: 100%;
    }

    .dashboard-header .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Transcription Row Layout */
.transcription-row {
    margin-bottom: var(--space-sm);
}

.transcription-row:last-child {
    margin-bottom: 0;
}

/* Improve alignment and spacing for transcription items */
.transcription-row-1 {
    line-height: 1.5;
}

.transcription-row-1 .filename-truncate {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--color-text);
}

.transcription-row-1 .text-xs {
    margin-top: var(--space-xs);
}

.transcription-row-2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.transcription-row-2 .badge {
    flex-shrink: 0;
    align-self: center;
}

.transcription-row-2 > .flex {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.transcription-row-2 .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    vertical-align: middle;
}

.transcription-row-2 .btn-sm {
    min-height: 2rem;
    line-height: 1;
}

.transcription-row-2 .btn svg {
    flex-shrink: 0;
    display: block;
    width: 16px;
    height: 16px;
}

/* Icon-only buttons should be square - target buttons that only contain SVG */
.transcription-row-2 .btn-secondary[title="Download Audio"],
.transcription-row-2 .btn-ghost[title="Delete"] {
    padding: 0.5rem;
    min-width: 2rem;
    width: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.transcription-row-3 > div,
.transcription-row-4 > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.transcription-row-3 .flex,
.transcription-row-4 .flex {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.transcription-row-3 svg,
.transcription-row-4 svg {
    flex-shrink: 0;
    display: block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.transcription-row-3 span,
.transcription-row-4 span {
    display: inline-block;
    vertical-align: middle;
}

/* Desktop: Combine rows 1-2 horizontally and rows 3-4 horizontally */
@media (min-width: 769px) {
    .transcription-item {
        display: flex;
        flex-direction: column;
    }

    /* Combine rows 1-2 into one horizontal flex row using wrapper */
    .transcription-row-1-2 {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .transcription-row-1-2 > .transcription-row-1 {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .transcription-row-1-2 > .transcription-row-2 {
        display: flex;
        align-items: center;
        margin-bottom: 0;
        flex-shrink: 0;
        align-self: flex-start;
        padding-top: 0.125rem; /* Align with first line of filename */
    }

    /* Combine rows 3-4 into one horizontal flex row using wrapper */
    .transcription-row-3-4 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-lg);
        margin-bottom: 0;
        flex-wrap: wrap;
    }

    .transcription-row-3-4 > .transcription-row-3 {
        display: flex;
        margin-bottom: 0;
    }

    .transcription-row-3-4 > .transcription-row-4 {
        display: flex;
        margin-bottom: 0;
        margin-left: auto;
    }
}

/* Mobile: Show all 4 rows stacked vertically */
@media (max-width: 768px) {
    .transcription-row {
        margin-bottom: var(--space-md);
    }

    /* Rows 1-2: Stack vertically on mobile */
    .transcription-row-1-2 {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
    }

    .transcription-row-1-2 > .transcription-row-1 {
        display: block;
        margin-bottom: 0;
    }

    .transcription-row-1-2 > .transcription-row-2 {
        display: flex;
        align-items: center;
        margin-left: 0;
        margin-bottom: 0;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    /* Ensure consistent button heights on mobile */
    .transcription-row-2 .btn {
        height: 2rem;
    }

    /* Rows 3-4: Stack vertically on mobile */
    .transcription-row-3-4 {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        margin-bottom: 0;
    }

    .transcription-row-3-4 > .transcription-row-3,
    .transcription-row-3-4 > .transcription-row-4 {
        display: block;
        margin-bottom: 0;
    }

    .transcription-row-3-4 > .transcription-row-4 {
        margin-left: 0;
    }

    /* Better spacing for metadata on mobile */
    .transcription-row-3 > div,
    .transcription-row-4 > div {
        gap: var(--space-sm);
    }

    /* Ensure buttons are properly sized on mobile */
    .transcription-row-2 .btn {
        min-width: auto;
    }
}

/* Audio Player Styling */
audio {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-md);
    display: block;
    /* Invert for dark theme - makes the native player dark with light text */
    filter: invert(1) hue-rotate(180deg);
}

/* Style the play button to use our primary color */
audio::-webkit-media-controls-play-button {
    background-color: var(--color-primary);
    border-radius: 50%;
    filter: invert(1) hue-rotate(180deg);
}

/* =============================================================================
   THUMBNAIL GENERATION
   ============================================================================= */

/* Usage Display */
.thumbnail-usage-display {
    background: var(--color-surface);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.thumbnail-usage-display .usage-text {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.thumbnail-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.thumbnail-source-btn {
    position: relative;
}

.thumbnail-source-btn.is-selected {
    border-color: var(--color-success);
    color: var(--color-success);
}

.thumbnail-source-btn.is-selected::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
}

.thumbnail-source-selection-box {
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
}

#thumbnailModal {
    z-index: 1200;
}

#thumbnailPromptEditorModal,
#thumbnailTopicSelectorModal {
    z-index: 1300;
}

.thumbnail-topics-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    display: grid;
    gap: var(--space-xs);
}

.thumbnail-topic-option {
    margin: 0;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.thumbnail-topic-option:hover {
    background: var(--color-bg);
}

.usage-bar {
    height: 6px;
    background: var(--color-bg);
    border-radius: 3px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Thumbnail Grid */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

/* Thumbnail Card */
.thumbnail-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.thumbnail-card:hover {
    border-color: var(--color-primary);
}

.thumbnail-preview {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--color-bg);
    overflow: hidden;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-badges {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.thumbnail-badges .badge {
    font-size: 0.625rem;
    padding: 0.15rem 0.35rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
}

.thumbnail-badges .badge-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
}

.thumbnail-actions {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm);
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
}

.thumbnail-actions .btn {
    flex: 1;
}

.thumbnail-actions .btn:last-child:not(:first-child) {
    flex: 0 0 auto;
}

/* Progress display */
.thumbnail-progress {
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    text-align: center;
}

.thumbnail-progress .progress-bar {
    margin-top: var(--space-sm);
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.thumbnail-progress .progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Indeterminate progress bar animation */
.thumbnail-progress .progress-bar.indeterminate .progress-bar-fill {
    width: 30% !important;
    animation: thumbnail-progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes thumbnail-progress-indeterminate {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(233%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Results section (newly generated) */
.thumbnail-results {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* History section */
.thumbnail-history {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
}

/* Zoom button on thumbnail cards */
.thumbnail-zoom-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.thumbnail-preview:hover .thumbnail-zoom-btn {
    opacity: 1;
}

.thumbnail-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Zoom overlay */
.thumbnail-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.thumbnail-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.thumbnail-zoom-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.thumbnail-zoom-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s;
}

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

/* Empty state */
.thumbnail-empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-muted);
}

/* User settings: bumper/logo previews */
.bling-preview {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    flex: 0 0 auto;
}

.bling-preview-bumper {
    width: 100px !important;
    max-width: 100px !important;
    height: 56px;
    object-fit: cover;
}

.bling-preview-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: 56px;
    object-fit: contain;
    padding: 4px;
}

/* User settings: custom file picker */
.file-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 60px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-surface) 90%, #ffffff 10%);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.file-picker:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.file-picker.has-file {
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border) 60%);
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface) 92%);
}

.file-picker-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border) 65%);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 18%, var(--color-surface) 82%) 0%, color-mix(in srgb, var(--color-primary) 10%, var(--color-surface) 90%) 100%);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, border-color var(--transition-fast), background-color var(--transition-fast);
}

.file-picker-button:hover {
    border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border) 45%);
    transform: translateY(-1px);
}

.file-picker-button svg {
    color: var(--color-primary-light);
}

.file-picker-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.file-picker.has-file .file-picker-name {
    color: var(--color-text);
}

/* Responsive - tablet */
@media (max-width: 768px) {
    .thumbnail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - mobile */
@media (max-width: 640px) {
    .thumbnail-grid {
        grid-template-columns: 1fr;
    }

    #thumbnailModal .modal {
        max-width: 100%;
        margin: var(--space-sm);
    }
}

/* =============================================================================
   DESIGN ENHANCEMENTS - Visual Polish
   ============================================================================= */

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-light) 50%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Feature icon container */
.feature-icon-wrap {
    width: 64px;
    height: 64px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    transition: all var(--transition-normal);
}

.feature-icon-wrap svg {
    width: 28px;
    height: 28px;
}

/* Feature cards for landing pages */
.feature-tile {
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
    text-align: center;
}

.feature-tile:hover {
    border-color: rgba(20, 184, 166, 0.3);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(20, 184, 166, 0.1);
}

.feature-tile:hover .feature-icon-wrap {
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.15);
}

/* Section background glow */
.section-glow {
    position: relative;
    overflow: hidden;
}

.section-glow::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(20, 184, 166, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.section-glow > * {
    position: relative;
    z-index: 1;
}

/* Scroll-triggered entrance animations */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid children */
.stagger-children .fade-up:nth-child(1) { transition-delay: 0ms; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 80ms; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 160ms; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 240ms; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 320ms; }
.stagger-children .fade-up:nth-child(6) { transition-delay: 400ms; }
.stagger-children .fade-up:nth-child(7) { transition-delay: 480ms; }
.stagger-children .fade-up:nth-child(8) { transition-delay: 560ms; }
.stagger-children .fade-up:nth-child(9) { transition-delay: 640ms; }

/* Hero section enhancements */
.hero-gradient-bg {
    position: relative;
    overflow: hidden;
}

.hero-gradient-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse at center top, rgba(20, 184, 166, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Enhanced pricing card featured */
.pricing-card-featured,
.pricing-card.featured {
    position: relative;
}

.pricing-card-featured::after,
.pricing-card.featured::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Enhanced footer */
.site-footer {
    position: relative;
    background: linear-gradient(180deg, var(--color-bg) 0%, rgba(2, 6, 23, 0.8) 100%);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(20, 184, 166, 0.3) 50%, transparent 100%);
}

.site-footer p {
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-lg);
    margin-top: var(--space-md);
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* Badge polish - text-style badges */
.badge-primary-subtle {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(20, 184, 166, 0.1) 100%);
    border: 1px solid rgba(20, 184, 166, 0.25);
    color: var(--color-primary);
}

/* Subtle noise texture overlay for depth */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Step number glow */
.step-number-glow {
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

/* Divider with centered dot */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border));
    max-width: 200px;
}

.section-divider::after {
    background: linear-gradient(90deg, var(--color-border), transparent);
}

.section-divider-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin: 0 var(--space-md);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.4);
}

/* Mobile adjustments for design enhancements */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .text-4xl { font-size: 2rem; }

    .feature-tile {
        padding: var(--space-lg);
    }

    .section-glow::before {
        width: 400px;
        height: 200px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .feature-tile:hover,
    .btn-primary:hover:not(:disabled) {
        transform: none;
    }
}
