/* =========================================================================
   ElevenLabs Script Generator — Premium Dark Theme
   ========================================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
    /* Palette */
    --bg-primary:       #0a0e1a;
    --bg-secondary:     #111827;
    --bg-card:          rgba(17, 24, 39, 0.7);
    --bg-card-hover:    rgba(30, 41, 59, 0.8);
    --bg-glass:         rgba(255, 255, 255, 0.03);
    --bg-input:         rgba(255, 255, 255, 0.06);
    --bg-input-focus:   rgba(255, 255, 255, 0.1);

    --border:           rgba(255, 255, 255, 0.08);
    --border-focus:     rgba(99, 102, 241, 0.5);

    --text-primary:     #f1f5f9;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;

    --accent:           #6366f1;       /* Indigo */
    --accent-hover:     #818cf8;
    --accent-glow:      rgba(99, 102, 241, 0.25);
    --accent-gradient:  linear-gradient(135deg, #6366f1, #8b5cf6);

    --success:          #10b981;
    --success-bg:       rgba(16, 185, 129, 0.12);
    --warning:          #f59e0b;
    --warning-bg:       rgba(245, 158, 11, 0.12);
    --error:            #ef4444;
    --error-bg:         rgba(239, 68, 68, 0.12);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px var(--accent-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html { font-size: 15px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Background gradient mesh */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app { position: relative; z-index: 1; }

/* --- Login Screen --- */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    text-align: center;
    margin-bottom: var(--space-xs);
    font-size: 1.6rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 0.9rem;
}

.login-card .login-error {
    background: var(--error-bg);
    color: var(--error);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    display: none;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
}

select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

select option:hover,
select option:checked {
    background: var(--accent);
    color: white;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

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

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { filter: brightness(1.15); }

.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: var(--error-bg);
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
}
.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

.btn-block { width: 100%; }

/* --- Layout: Shell --- */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header / Navbar --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    padding: 3px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.navbar-user .user-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 4px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-badge .role-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--accent-glow);
    color: var(--accent-hover);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-header h3 {
    font-size: 1.1rem;
}

/* --- Generate Tab --- */
.generate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    align-items: stretch;
}

.generate-grid > .card {
    display: flex;
    flex-direction: column;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-glass);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.upload-zone .upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-zone .upload-file {
    color: var(--accent-hover);
    font-weight: 600;
    margin-top: var(--space-sm);
    font-size: 0.95rem;
}

/* --- CSV Placeholder Detection --- */
.csv-placeholders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-sm);
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.csv-placeholders .ph-info {
    color: var(--text-secondary);
    font-weight: 500;
}

.csv-placeholders .ph-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.csv-placeholders .ph-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: var(--radius-full);
    color: var(--accent-hover);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
}

.csv-placeholders .ph-badge small {
    opacity: 0.6;
    font-size: 0.65rem;
}

/* --- Script Metadata Section --- */
.script-meta-section {
    margin-top: var(--space-sm);
    animation: fadeIn 0.3s ease;
}

.script-meta-detected {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.script-meta-detected .meta-source {
    color: var(--success);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.script-meta-detected .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
}

.script-meta-detected .meta-pill .meta-key {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.script-meta-inputs {
    padding: 14px 16px;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
}

.script-meta-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.script-meta-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.script-meta-hint {
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 500;
}

.script-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.script-meta-grid .form-group {
    margin-bottom: 0;
}

.script-meta-grid label {
    font-size: 0.72rem;
    margin-bottom: 3px;
}

.script-meta-grid label .required {
    color: var(--error);
    font-weight: 700;
}

.script-meta-grid input {
    padding: 7px 10px;
    font-size: 0.85rem;
}

.meta-readonly {
    opacity: 0.7;
    cursor: default !important;
    background: var(--bg-glass) !important;
}

.meta-hint-inline {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

.meta-pitch-preview {
    margin-top: 4px;
    padding: 6px 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-height: 20px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.meta-pitch-preview:empty {
    display: none;
}

/* --- Review Meta Bar --- */
.review-meta-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 0;
    font-size: 0.8rem;
}

.review-meta-bar .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    color: var(--accent-hover);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
}

.review-meta-bar .meta-pill .meta-key {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
}

/* --- History Card Metadata --- */
.hc-script-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}

.hc-script-meta .meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent-hover);
}

.hc-script-meta .meta-tag .meta-label {
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

/* --- Voice Selector --- */
.voice-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
    max-height: 480px;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.voice-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
    flex-shrink: 0;
}

.voice-item:hover {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
}

.voice-item.selected {
    background: var(--accent-glow);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.voice-radio {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-focus);
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.voice-item.selected .voice-radio {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--bg-card);
}

.voice-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.voice-item .voice-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-item .voice-id {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
    white-space: nowrap;
    flex-shrink: 0;
}

.voice-item .voice-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 0;
    min-width: 100%;
}

.voice-item .btn-preview {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.voice-item .btn-preview:hover {
    color: var(--accent-hover);
    border-color: var(--accent);
}

.add-voice-row {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.add-voice-row input { flex: 1; }

/* --- Progress Bar --- */
.progress-panel {
    display: none;
    margin-top: var(--space-lg);
}

.progress-panel.active { display: block; }

.progress-bar-wrap {
    background: var(--bg-input);
    border-radius: var(--radius-full);
    height: 8px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width var(--transition-base);
    box-shadow: 0 0 10px var(--accent-glow);
}

.progress-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Review Table --- */
.review-panel {
    display: none;
    margin-top: var(--space-lg);
}

.review-panel.active { display: block; }

.review-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.review-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.review-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.review-table tr:hover td {
    background: var(--bg-glass);
}

.review-table .tag-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-hover);
    white-space: nowrap;
    width: 100px;
    min-width: 100px;
}

.review-table .script-cell {
    min-width: 400px;
    line-height: 1.5;
}

.review-table .script-cell textarea {
    width: 100%;
    min-height: 120px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    color: var(--text-primary);
    resize: vertical;
}

.review-table .audio-cell {
    width: 180px;
    min-width: 180px;
}

.review-table .actions-cell {
    white-space: nowrap;
    width: 80px;
    min-width: 80px;
}

.actions-cell .action-buttons {
    display: flex;
    gap: 4px;
}

/* Regenerating row */
.review-table tr.regenerating {
    opacity: 0.4;
    pointer-events: none;
    position: relative;
}

.review-table tr.regenerating td {
    background: rgba(99, 102, 241, 0.05);
}

.row-status {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.row-status.done { background: var(--success); }
.row-status.failed { background: var(--error); }
.row-status.regenerating { background: var(--warning); animation: pulse 1s infinite; }

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

/* Voice QC flag badge */
.qc-flag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: help;
    vertical-align: middle;
}

/* Flagged row subtle highlight */
.review-table tr.qc-flagged td {
    background: rgba(245, 158, 11, 0.04);
}

.review-table tr.qc-flagged:hover td {
    background: rgba(245, 158, 11, 0.08);
}

/* Audio short/truncated flag badge */
.short-flag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: help;
    vertical-align: middle;
}

/* Short-flagged row subtle highlight */
.review-table tr.short-flagged td {
    background: rgba(239, 68, 68, 0.04);
}

.review-table tr.short-flagged:hover td {
    background: rgba(239, 68, 68, 0.08);
}

/* --- Review Actions Bar --- */
.review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.review-actions .info-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.review-actions .btn-group {
    display: flex;
    gap: var(--space-sm);
}

/* --- History Toolbar (Search + Filters) --- */
.history-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.history-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    min-width: 180px;
}

.history-search-icon {
    position: absolute;
    left: 12px;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0.5;
}

.history-toolbar input.history-search-input {
    width: 100%;
    padding: 7px 28px 7px 32px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.76rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
}

.history-toolbar input.history-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

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

.history-search-clear {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1;
}

.history-search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.history-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.history-filter-select {
    width: auto !important;  /* override global select { width: 100% } */
    padding: 7px 26px 7px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    white-space: nowrap;
}

.history-filter-select:focus {
    outline: none;
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Highlight active filters */
.history-filter-select.active-filter {
    border-color: rgba(99, 102, 241, 0.5);
    background-color: rgba(99, 102, 241, 0.08);
    color: var(--accent-hover);
}

/* --- History Stats Bar --- */
.history-stats-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 5px var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.history-stats-bar strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hs-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.hs-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.hs-dot.reviewed { background: var(--success); }
.hs-dot.pending  { background: #3b82f6; }
.hs-dot.reviewing { background: var(--warning); }

.hs-divider {
    color: var(--border);
    font-weight: 300;
    user-select: none;
}

.hs-filter-info {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--accent-hover);
    font-size: 0.73rem;
}

/* --- History Cards --- */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.12);
}

.history-card .hc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.history-card .hc-title {
    font-weight: 600;
    font-size: 1rem;
}

.history-card .hc-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    color: var(--success);
}

.history-card .hc-badge.reviewing {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.history-card .hc-badge.pending {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.history-card .hc-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-right: 6px;
    flex-shrink: 0;
}

.history-card .hc-pitch {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
    cursor: default;
}

/* --- Pitch Tag Chip Input --- */
.pitch-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: text;
    min-height: 28px;
}

.pitch-chip-wrap:focus-within {
    border-color: var(--accent);
}

.pitch-chips {
    display: contents;
}

.pitch-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 4px 1px 6px;
    border-radius: var(--radius-full);
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-hover);
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    white-space: nowrap;
}

.pitch-chip-x {
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0 1px;
}

.pitch-chip-x:hover {
    opacity: 1;
}

.pitch-search-input {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 2px 0;
}

.pitch-dropdown {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-card);
}

.pitch-dropdown-item {
    padding: 5px 10px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.1s;
}

.pitch-dropdown-item:hover,
.pitch-dropdown-item.active {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.pitch-dropdown-empty {
    padding: 8px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.history-card .hc-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.history-card .hc-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.history-card .hc-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.history-card .agent-badge {
    color: #8b5cf6;
}

.history-card .agent-badge strong {
    color: #a78bfa;
}

/* --- Settings Tab --- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.settings-grid .full-width {
    grid-column: 1 / -1;
}

.settings-grid textarea {
    min-height: 300px;
}

/* --- Variables Management --- */
.var-mgmt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-lg);
}

.var-mgmt-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.var-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 40px;
}

.var-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.var-tag .var-tag-x {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 2px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.var-tag .var-tag-x:hover {
    color: var(--error);
    background: var(--error-bg);
}

.var-add-row {
    display: flex;
    gap: var(--space-xs);
}

.var-add-row input {
    flex: 1;
    font-size: 0.82rem;
    padding: 6px 10px;
}

@media (max-width: 900px) {
    .var-mgmt-grid { grid-template-columns: 1fr; }
}

/* --- User Management Tab --- */
.users-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.users-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.users-table tr:hover td {
    background: var(--bg-glass);
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
}

.modal h3 {
    margin-bottom: var(--space-lg);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

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

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast.success { background: rgba(16, 185, 129, 0.9); }
.toast.error   { background: rgba(239, 68, 68, 0.9); }
.toast.info    { background: rgba(99, 102, 241, 0.9); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- Audio Player Inline --- */
.inline-audio {
    display: flex;
    align-items: center;
    gap: 4px;
}

audio.mini-player {
    height: 32px;
    width: 170px;
    border-radius: var(--radius-sm);
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

audio.mini-player:hover {
    opacity: 1;
}

audio.mini-player::-webkit-media-controls-panel {
    background: var(--bg-input);
}

audio.mini-player::-webkit-media-controls-play-button,
audio.mini-player::-webkit-media-controls-mute-button {
    filter: invert(0.8);
}

/* Lazy-load play button (replaces <audio> to prevent phantom fetches) */
.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.1);
}

.play-btn:active {
    transform: scale(0.95);
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* --- Prompt Tuner --- */
.pt-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.pt-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.pt-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
    max-width: 300px;
}

.pt-table tr:hover td {
    background: var(--bg-glass);
}

.pt-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.pt-table tr:nth-child(even):hover td {
    background: var(--bg-glass);
}

/* Excluded row */
.pt-table tr.pt-excluded {
    opacity: 0.4;
}

.pt-table tr.pt-excluded:hover {
    opacity: 0.6;
}

/* Color-coded columns */
.pt-cell-original {
    color: var(--text-secondary);
}

.pt-cell-llm {
    color: #93c5fd; /* light blue */
}

.pt-cell-human {
    color: #86efac; /* light green */
}

.pt-cell-candidate {
    color: #c4b5fd; /* light purple for candidate */
}

/* Prompt comparison grid */
.pt-prompt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.pt-prompt-grid > div {
    display: flex;
    flex-direction: column;
}

.pt-prompt-grid textarea.pt-prompt-box {
    flex: 1;
}

.pt-prompt-box {
    width: 100%;
    min-height: 300px;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

textarea.pt-prompt-box {
    resize: vertical;
}

pre.pt-prompt-box {
    opacity: 0.7;
}

/* Test table */
.pt-test-table td {
    font-size: 0.82rem;
    max-width: 250px;
}

/* Delete button in table */
.pt-delete-btn {
    padding: 3px 8px !important;
    font-size: 0.75rem !important;
    line-height: 1;
}

/* Include checkbox */
.pt-include-cb {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .generate-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .navbar { flex-wrap: wrap; gap: var(--space-sm); }
    .navbar-tabs { order: 3; width: 100%; justify-content: center; }
    .main-content { padding: var(--space-md); }
    .history-search-wrap { flex: 1 1 100%; }
}

@media (max-width: 600px) {
    .tab-btn { padding: 6px 12px; font-size: 0.78rem; }
    .history-grid { grid-template-columns: 1fr; }
    .history-toolbar { flex-direction: column; align-items: stretch; }
    .history-filters { flex-direction: column; }
    .history-filter-select { width: 100% !important; }
    .history-stats-bar { font-size: 0.7rem; gap: var(--space-xs); }
}

/* Exit Review Modal */
#exit-review-modal {
    z-index: 9999;
}

#exit-review-modal .modal-dialog {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#exit-review-modal .modal-dialog h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 1.1rem;
}

#exit-review-modal .modal-dialog p {
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

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

/* --- FlowScript Script Picker --- */
.script-picker-section {
    margin-bottom: var(--space-md);
}

.script-picker-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.script-picker-header:hover {
    background: var(--bg-glass);
    border-color: rgba(255, 255, 255, 0.12);
}

.script-picker-header.expanded {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom-color: transparent;
}

.script-picker-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.script-picker-summary {
    font-size: 0.78rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.script-picker-controls {
    display: none;
    gap: var(--space-xs);
    align-items: center;
}

.script-picker-header.expanded .script-picker-controls {
    display: flex;
}

.script-picker-header:not(.expanded) .script-picker-summary {
    display: inline;
}

.script-picker-header.expanded .script-picker-summary {
    display: none;
}

.sp-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.script-picker-header.expanded .sp-chevron {
    transform: rotate(90deg);
}

.script-picker-select {
    width: 200px;
    padding: 6px 10px;
    font-size: 0.82rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
}

/* Collapsible body */
.script-picker-body {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.script-picker-list {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

/* Each script row is a mini-card with 2 internal rows */
.script-picker-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
    cursor: pointer;
}

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

.script-picker-row:hover {
    background: var(--bg-glass);
}

.script-picker-row.selected {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--accent);
}

/* Row 1: Campaign + pills + template + button */
.sp-top-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.sp-campaign {
    font-weight: 600;
    font-size: 0.78rem;
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.25);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.4);
    white-space: nowrap;
}

.sp-pill {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.sp-pill-flow {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.sp-pill-variant {
    color: #5eead4;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.35);
}

.sp-use-btn {
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* Row 2: Pitch summary + voice badges */
.sp-bottom-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
}

.sp-pitch {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    min-width: 0;
}

.sp-voices {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

.sp-voice-badge {
    font-size: 0.66rem;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.10);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    cursor: default;
}

.sp-voice-badge:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* Divider between Script Picker and CSV upload */
.script-picker-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.script-picker-divider::before,
.script-picker-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Script Picker error/empty state */
.script-picker-empty {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.script-picker-error {
    text-align: center;
    padding: var(--space-md);
    color: var(--warning);
    font-size: 0.82rem;
}
