/* ==========================================================================
   VoiceCraft Studio Pro — Official Modern Light Theme & UX System
   Typography: Montserrat
   ========================================================================== */

/* --------------------------------------------------------------------------
   Light Theme Tokens (Default)
   -------------------------------------------------------------------------- */
:root, body.theme-light {
    --bg-canvas: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --bg-input-focus: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-pill: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    
    --accent-primary: #0f172a;
    --accent-primary-hover: #1e293b;
    --accent-primary-text: #ffffff;
    --accent-blue: #2563eb;
    --accent-emerald: #059669;
    
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
    --shadow-elevated: 0 10px 25px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 4px 18px rgba(15, 23, 42, 0.2);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.12s ease;
    --transition-smooth: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Dark Theme Tokens
   -------------------------------------------------------------------------- */
body.theme-dark {
    --bg-canvas: #09090b;
    --bg-sidebar: #0e0e11;
    --bg-card: #141418;
    --bg-card-hover: #1c1c22;
    --bg-input: #0e0e11;
    --bg-input-focus: #141418;
    --bg-elevated: #1a1a20;
    --bg-pill: #27272a;
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-dark: rgba(255, 255, 255, 0.3);
    
    --accent-primary: #ffffff;
    --accent-primary-hover: #f1f5f9;
    --accent-primary-text: #09090b;
    --accent-blue: #38bdf8;
    --accent-emerald: #10b981;
    
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-elevated: 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 24px rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Custom Clean Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Master Layout */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ==========================================================================
   Modern Sidebar
   ========================================================================== */
.app-sidebar {
    width: 275px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: var(--shadow-subtle);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 0 4px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

.brand-logo:hover img {
    transform: scale(1.06);
}

.brand-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 10px;
    font-weight: 800;
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.badge-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-emerald);
    letter-spacing: 0.4px;
    margin-top: 3px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 6px var(--accent-emerald);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.nav-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

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

.nav-btn.active {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    font-weight: 700;
    box-shadow: var(--shadow-card);
}

.badge-new {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    background: #ef4444;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.badge-pro {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    background: var(--accent-blue);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.sidebar-optimization-card {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 18px;
}

.opt-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.opt-title i {
    color: var(--accent-blue);
}

.sidebar-optimization-card p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
    font-weight: 500;
}

.sidebar-footer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-meta {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-state {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Workspace Area
   ========================================================================== */
.app-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-canvas);
    padding: 24px 32px;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-shrink: 0;
    gap: 16px;
}

.header-titles h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.header-titles p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

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

.quick-sample-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
}

.quick-sample-box i {
    color: var(--text-muted);
    font-size: 13px;
}

.quick-sample-box select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.quick-sample-box select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.humanizer-toggle-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
}

.toggle-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Light Theme Switch */
.switch-light {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch-light input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-light.round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-medium);
    transition: var(--transition-fast);
    border-radius: 20px;
}

.slider-light.round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: var(--transition-fast);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider-light.round {
    background-color: var(--accent-primary);
}

input:checked + .slider-light.round:before {
    transform: translateX(16px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
}

/* Workspace Views */
.workspace-view {
    display: none;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.workspace-view.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

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

/* ==========================================================================
   Studio Layout (Single Speaker)
   ========================================================================== */
.studio-layout {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 24px;
    align-items: start;
}

/* Left Voice Deck Panel */
.voice-deck-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.panel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.header-badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.active-voice-box {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.voice-avatar-badge {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: var(--shadow-subtle);
}

.voice-info-col {
    flex-grow: 1;
    min-width: 0;
}

.voice-heading-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.voice-heading-row h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-gender-pill {
    font-size: 9px;
    font-weight: 700;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.voice-bio {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    font-weight: 500;
}

.voice-tag-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.light-tag {
    font-size: 9px;
    font-weight: 700;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.voice-action-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-action-round {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-fast);
}

.btn-action-round:hover {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border-color: var(--accent-primary);
}

.btn-action-pill {
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.btn-action-pill:hover {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border-color: var(--accent-primary);
}

/* Style Presets */
.panel-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.block-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.style-pills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.style-pill {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.style-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.style-pill.active {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border-color: var(--accent-primary);
    font-weight: 800;
}

/* Micro-Tuners */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.slider-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.slider-top-meta strong {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-medium);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 600;
}

.btn-reset-light {
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
    border: 1px dashed var(--border-medium);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
    margin-top: 4px;
}

.btn-reset-light:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ==========================================================================
   Right Script Deck & Player Deck
   ========================================================================== */
.script-deck-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Editor Card */
.editor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-card);
}

.editor-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-title-group {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.ssml-pill-group {
    display: flex;
    gap: 4px;
}

.btn-ssml-tool {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-ssml-tool:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-editor-action {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.btn-editor-action:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

#studio-text {
    width: 100%;
    height: 190px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.65;
    font-weight: 500;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

#studio-text:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.editor-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.stat-item b {
    color: var(--text-primary);
}

/* Primary Generate Button */
.btn-primary-generate {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-smooth);
}

.btn-primary-generate:hover {
    transform: translateY(-2px);
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-elevated);
}

.btn-primary-generate:active {
    transform: translateY(0);
}

.btn-primary-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.shortcut-tag {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

body.theme-light .shortcut-tag {
    background: rgba(255, 255, 255, 0.25);
}

/* Player Card */
.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.player-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recording-beacon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
}

.recording-beacon.playing {
    background: var(--accent-emerald);
    box-shadow: 0 0 12px var(--accent-emerald);
    animation: beaconPulse 1.4s infinite;
}

@keyframes beaconPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.player-track-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.player-engine-note {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.timecode-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

/* Spectrum Canvas */
.spectrum-visualizer-box {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.visualizer-idle-prompt {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.visualizer-idle-prompt i {
    font-size: 24px;
}

/* Scrubber */
.scrubber-wrapper {
    width: 100%;
    padding: 6px 0;
    cursor: pointer;
}

.scrubber-rail {
    width: 100%;
    height: 6px;
    background: var(--border-medium);
    border-radius: 3px;
    position: relative;
}

.scrubber-fill-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    border-radius: 3px;
    position: absolute;
}

.scrubber-thumb-dot {
    position: absolute;
    top: -4px;
    left: 0%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
}

/* Transport & Exports */
.player-transport-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.transport-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-transport {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-fast);
}

.btn-transport:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-transport.active {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border-color: var(--accent-primary);
}

.btn-transport-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: var(--accent-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
}

.btn-transport-play:hover {
    transform: scale(1.06);
    background: var(--accent-primary-hover);
}

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

.btn-export-main {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border: none;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    text-decoration: none;
    box-shadow: var(--shadow-subtle);
}

.btn-export-main:hover {
    transform: translateY(-1px);
    background: var(--accent-primary-hover);
}

.btn-export-sub {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.btn-export-sub:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Teleprompter */
.karaoke-teleprompter {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.teleprompter-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.teleprompter-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   Multi-Speaker Dialogue & Podcast Studio (IMPROVED UX)
   ========================================================================== */
.dialogue-studio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.dialogue-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.dialogue-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dialogue-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dialogue-top-bar h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.dialogue-top-bar p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.dialogue-actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.light-select {
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 9px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.dialogue-timeline-flow {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Dialogue Row Enhanced UX */
.dialogue-row {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 240px 1fr 90px;
    gap: 14px;
    align-items: center;
    transition: var(--transition-fast);
}

.dialogue-row:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-subtle);
}

.dialogue-speaker-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dialogue-speaker-input {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    outline: none;
}

.dialogue-speaker-input:focus {
    border-color: var(--accent-primary);
}

.dialogue-voice-select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    outline: none;
    width: 100%;
}

.dialogue-text-input {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    resize: none;
    height: 64px;
    outline: none;
    line-height: 1.5;
}

.dialogue-text-input:focus {
    border-color: var(--accent-primary);
}

.dialogue-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.dialogue-line-preview-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 11px;
}

.dialogue-line-preview-btn:hover {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border-color: var(--accent-primary);
}

.dialogue-delete-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 11px;
}

.dialogue-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-add-line {
    background: var(--bg-input);
    border: 1px dashed var(--border-medium);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-add-line:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
}

.multi-master-card {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
}

.multi-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   Voice Library Explorer (320+ Voices)
   ========================================================================== */
.library-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.library-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    width: 440px;
}

.search-input-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    width: 100%;
}

.filter-dropdowns {
    display: flex;
    gap: 10px;
}

.voice-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 6px;
}

.voice-card-item {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all var(--transition-fast);
}

.voice-card-item:hover {
    background: var(--bg-card);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-subtle);
}

.voice-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
}

.voice-card-meta {
    flex-grow: 1;
    min-width: 0;
}

.voice-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-card-locale {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.voice-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voice-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Sound FX Lab
   ========================================================================== */
.fx-rack-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.fx-rack-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.fx-rack-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.fx-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.fx-module-card {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fx-module-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fx-module-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.fx-module-left h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.fx-module-left p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Audio Vault & History
   ========================================================================== */
.vault-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.vault-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vault-top-bar h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.btn-clear-vault {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-clear-vault:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.vault-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.history-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.history-item-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    font-weight: 500;
}

.empty-vault-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

/* ==========================================================================
   Voice Cloner Studio (NEW)
   ========================================================================== */
.cloner-studio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.cloner-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.cloner-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cloner-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cloner-header-row h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.cloner-header-row p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.cloner-badge-free {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--accent-emerald);
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cloner-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .cloner-grid-layout {
        grid-template-columns: 1fr;
    }
}

.cloner-step-panel {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

/* Mic Recorder */
.mic-recorder-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mic-recorder-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-record-mic {
    background: #ef4444;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-record-mic:hover {
    background: #dc2626;
}

.btn-record-mic.recording {
    background: #000000;
    color: #ef4444;
    border: 2px solid #ef4444;
    animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mic-timer-box {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.mic-hint-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.or-separator {
    text-align: center;
    position: relative;
    margin: 4px 0;
}

.or-separator span {
    background: var(--bg-input);
    padding: 0 10px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* Audio Dropzone */
.audio-dropzone {
    border: 2px dashed var(--border-medium);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.audio-dropzone.dragover {
    border-color: var(--accent-blue);
    background: var(--bg-elevated);
}

.audio-dropzone i {
    font-size: 28px;
    color: var(--text-muted);
}

.audio-dropzone h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.audio-dropzone p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-select-file {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 4px;
    transition: var(--transition-fast);
}

.btn-select-file:hover {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
}

.reference-audio-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.reference-audio-box label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.clone-config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.light-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    outline: none;
}

.light-input:focus {
    border-color: var(--accent-primary);
}

.light-textarea {
    width: 100%;
    height: 70px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    resize: none;
    outline: none;
}

.light-textarea:focus {
    border-color: var(--accent-primary);
}

/* Biometrics Results Card */
.biometrics-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-card);
}

.bio-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.bio-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.bio-header h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.bio-confidence-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-emerald);
}

.bio-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.bio-metric-item {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.bio-metric-item span {
    color: var(--text-muted);
}

.bio-metric-item strong {
    color: var(--text-primary);
}

.clone-test-box {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.btn-save-clone-action {
    background: var(--accent-emerald);
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-save-clone-action:hover {
    background: #047857;
}

/* Cloned Voices Grid */
.cloned-voices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.cloned-voice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-fast);
}

.cloned-voice-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-subtle);
}

.clone-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clone-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.clone-meta {
    flex-grow: 1;
    min-width: 0;
}

.clone-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.clone-sub {
    font-size: 10px;
    color: var(--text-muted);
}

.clone-specs {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.clone-specs b {
    color: var(--text-primary);
}

.clone-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-use-clone-studio {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border: none;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-delete-clone {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.btn-delete-clone:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.empty-clones-state {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-dim);
}

.empty-clones-state i {
    font-size: 28px;
    margin-bottom: 8px;
}


/* ==========================================================================
   Voice Picker Modal
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.modal-window {
    width: 620px;
    max-width: 90vw;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-elevated);
}

.modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-row h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

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

.modal-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}

.modal-search-field input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
}

.modal-voice-scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 420px;
    padding-right: 4px;
}

.modal-voice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-voice-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

/* Responsive */
@media (max-width: 1024px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
    .app-sidebar {
        width: 80px;
        padding: 16px 10px;
    }
    .brand-title, .brand-sub, .badge-status, .nav-btn span, .sidebar-optimization-card, .profile-meta, .badge-new {
        display: none;
    }
    .brand-section {
        justify-content: center;
    }
    .nav-btn {
        justify-content: center;
        padding: 14px;
    }
}
