/* ==========================================================================
   REFLEKKT AI PROJECTION STUDIO — RESPONSIVE & MOBILE-FIRST DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-main: #000000;
    --bg-surface: #040406;
    --bg-glass: rgba(8, 8, 12, 0.88);
    --bg-glass-hover: rgba(14, 14, 20, 0.95);
    --border-glass: rgba(255, 255, 255, 0.09);
    --border-glass-glow: rgba(0, 240, 255, 0.45);

    --accent-cyan: #00f0ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-gold: #fbbf24;
    --accent-green: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.95);
    --shadow-glow-cyan: 0 0 25px rgba(0, 240, 255, 0.35);
    --shadow-glow-purple: 0 0 25px rgba(168, 85, 247, 0.4);

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: #000000;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Background Ambient Lighting (Optimized for OLED Pitch Black) */
.ambient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 90% 85%, rgba(168, 85, 247, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.ambient-glow {
    position: fixed;
    width: clamp(250px, 40vw, 450px);
    height: clamp(250px, 40vw, 450px);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.ambient-glow.top-left {
    top: -80px;
    left: -80px;
    background: var(--accent-cyan);
}

.ambient-glow.bottom-right {
    bottom: -80px;
    right: -80px;
    background: var(--accent-purple);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(7, 8, 13, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
}

.logo-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.logo-title {
    font-size: clamp(16px, 3.5vw, 20px);
    font-weight: 800;
    letter-spacing: 1.2px;
    background: linear-gradient(135deg, #ffffff 20%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

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

.btn-notify {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notify:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-notify.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.bell-icon {
    font-size: 14px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.status-indicator.online .status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.status-indicator.busy .status-dot {
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold);
    animation: pulse 1.5s infinite;
}

.status-indicator.offline .status-dot {
    background: #ef4444;
}

.vram-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 999px;
    font-size: 11px;
}

.badge-label {
    color: var(--text-muted);
    font-weight: 600;
}

.badge-val {
    color: var(--accent-purple);
    font-weight: 700;
}

/* ==========================================================================
   3-DASH (HAMBURGER) MENU & DROPDOWN DRAWER
   ========================================================================== */

.hamburger-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 999px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hamburger-menu-btn:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
    transform: translateY(-1px);
}

.hamburger-menu-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(121, 40, 202, 0.3));
    border-color: #00f0ff;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.hamburger-bars {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 16px;
    height: 12px;
}

.hamburger-bars span {
    display: block;
    height: 2px;
    width: 100%;
    background: #00f0ff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Morph to X when active */
.hamburger-menu-btn.active .hamburger-bars span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
.hamburger-menu-btn.active .hamburger-bars span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-menu-btn.active .hamburger-bars span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.menu-btn-label {
    letter-spacing: 0.5px;
}

/* Header Dropdown Menu Drawer */
.header-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: rgba(10, 11, 18, 0.96);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: menu-pop-down 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header-menu-dropdown.active {
    display: flex;
}

@keyframes menu-pop-down {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.menu-dropdown-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.menu-status-pill {
    font-size: 10px;
    font-weight: 700;
    color: #30d158;
    background: rgba(48, 209, 88, 0.12);
    border: 1px solid rgba(48, 209, 88, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
}

.menu-items-group {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.menu-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    position: relative;
}

.menu-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.menu-nav-item.highlight-cyan:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.3);
}

.menu-nav-item.highlight-purple:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.3);
}

.menu-item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.menu-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.menu-item-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-badge-chip {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
}

.menu-badge-chip-purple {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(121, 40, 202, 0.3));
    color: #ffffff;
    border: 1px solid rgba(121, 40, 202, 0.4);
    padding: 2px 6px;
    border-radius: 6px;
}

.menu-dropdown-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

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


/* ==========================================================================
   PROGRESS STEPPER / MOBILE TABS
   ========================================================================== */

.studio-container {
    position: relative;
    z-index: 10;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 20px 48px;
}

.stepper-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
}

.stepper-bar::-webkit-scrollbar {
    display: none;
}

.step-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.step-pill.active {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.step-pill.active .step-num {
    background: var(--accent-cyan);
    color: #000000;
    font-weight: 800;
}

.stepper-line {
    width: 32px;
    height: 2px;
    background: var(--border-glass);
    flex-shrink: 0;
}

/* ==========================================================================
   PANELS & LAYOUT
   ========================================================================== */

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

.studio-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.studio-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.glass-panel {
    background: rgba(6, 6, 10, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 3vw, 28px);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.95);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
    margin-bottom: 6px;
}

.panel-tag.cyan {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

.panel-tag.purple {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-purple);
    border-color: rgba(168, 85, 247, 0.3);
}

.panel-header h2 {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
    margin-bottom: 4px;
}

.panel-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   Step 1: Upload Dropzone & Mask Preparation Box
   ========================================================================== */
.mask-prep-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(0, 240, 255, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.mask-prep-card:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.02);
}

.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 20px 14px;
    margin: 12px 0 14px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.25s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropzone-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.dropzone-text strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 2px;
}

.dropzone-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.glow-btn-cyan {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(0, 150, 255, 0.3) 100%) !important;
    border: 1px solid var(--accent-cyan) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.glow-btn-cyan:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.4) 0%, rgba(0, 150, 255, 0.45) 100%) !important;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

/* Step 1 to Step 2 Transition CTA Box */
.step-transition-box {
    margin-top: 18px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-mask-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.next-step-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.2s ease;
}

.next-step-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--accent-purple);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
}

/* Step 2: Active Base Mask Banner */
.active-base-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.base-banner-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.base-banner-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.base-banner-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.base-banner-label {
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-purple);
}

.base-banner-name {
    font-size: 12px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prep-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.prep-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ffffff;
}

.prep-icon {
    font-size: 16px;
}

.badge-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.prep-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.prep-actions {
    display: flex;
    gap: 8px;
}

.btn-clean-mask {
    flex: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clean-mask:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.35) 0%, rgba(168, 85, 247, 0.35) 100%);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.upload-btn {
    flex: 1;
    font-size: 11px;
    cursor: pointer;
}

.badge-mask-item {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    background: #000000;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    z-index: 5;
}

/* ==========================================================================
   FORMS & CONTROLS
   ========================================================================== */

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .half {
    flex: 1;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.label-hint {
    font-size: 11px;
    color: var(--accent-cyan);
    font-weight: 400;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.btn-text:hover {
    color: var(--accent-cyan);
}

/* Image Picker Touch Scroll (OLED optimized) */
.image-picker-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
}

.picker-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picker-item:hover, .picker-item:active {
    border-color: rgba(0, 240, 255, 0.5);
    transform: scale(1.02);
}

.picker-item.selected {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.picker-item .item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    font-size: 9px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style Preset Chips */
.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.chip:hover, .chip:active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.chip.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.chip.surprise-chip {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(168, 85, 247, 0.15));
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-weight: 700;
}

.chip.surprise-chip:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(168, 85, 247, 0.3));
    border-color: #ffd700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.35);
}

.chip.surprise-chip.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(168, 85, 247, 0.35));
    border-color: #ffd700;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.5), 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Form inputs */
.form-textarea, .form-select, .form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.form-textarea:focus, .form-select:focus, .form-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.form-textarea {
    resize: vertical;
    line-height: 1.5;
}

/* Sliders */
.form-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 6px 0;
    cursor: pointer;
}

.form-range.cyan {
    accent-color: var(--accent-cyan);
}

.form-range.purple {
    accent-color: var(--accent-purple);
}

.duration-badge, .strength-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.duration-badge, .strength-badge.purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.strength-badge.cyan {
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.motion-lock-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.lock-icon {
    font-size: 20px;
}

.lock-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.lock-text strong {
    color: var(--accent-cyan);
    font-size: 13px;
}

.lock-text span {
    color: var(--text-secondary);
}

/* Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, #00f0ff 0%, #00a3ff 100%);
    color: #000000;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover:not(:disabled), .btn-primary:active:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 240, 255, 0.5);
}

.btn-accent {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.btn-accent:hover:not(:disabled), .btn-accent:active:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    width: auto;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   KEYFRAME GALLERY & SELECTION
   ========================================================================== */

.view-section {
    margin-bottom: 36px;
}

.section-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.section-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-count-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 999px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.section-top h2 {
    font-size: clamp(18px, 3vw, 20px);
    font-weight: 700;
    margin-bottom: 4px;
}

/* Scrollable Keyframe Viewport (8 in View) */
.keyframes-scroll-viewport {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    position: relative;
}

.keyframes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 2px;
}

/* 8-Item Pagination Bar */
.gallery-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
}

.btn-page {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: var(--accent-cyan);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-page:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
    transform: translateY(-1px);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.page-indicator {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 600;
}

@media (max-width: 900px) {
    .keyframes-scroll-viewport {
        padding: 8px;
    }

    .keyframes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.keyframe-card {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 16/9;
}

.keyframe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.keyframe-card:hover, .keyframe-card:active {
    border-color: rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.keyframe-card.selected {
    border-color: var(--accent-purple);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
}

.keyframe-card .badge-selected {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-purple);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.keyframe-card.selected .badge-selected {
    display: block;
}

.empty-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-lg);
}

.placeholder-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.empty-placeholder h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.empty-placeholder p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   VIDEO BUILDER & SHOWCASE
   ========================================================================== */

.video-builder-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 24px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.25);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    align-items: start;
}

.card-inspect-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 5;
}

.keyframe-card:hover .card-inspect-btn {
    opacity: 1;
}

.card-inspect-btn:hover {
    background: rgba(168, 85, 247, 0.4);
    border-color: #a855f7;
}

.selected-keyframe-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-purple);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.preview-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.preview-box:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
    border-radius: calc(var(--radius-md) - 1px);
}

.preview-zoom-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.preview-box:hover .preview-zoom-hover-overlay {
    opacity: 1;
}

.preview-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(168, 85, 247, 0.6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.9);
    z-index: 3;
    pointer-events: none;
}

.dim-text {
    font-size: 12px;
    color: var(--text-muted);
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.showcase-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.videos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.video-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-card video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    display: block;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
}

.video-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.video-download-btn {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    background: rgba(0, 240, 255, 0.08);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.video-download-btn:hover {
    background: rgba(0, 240, 255, 0.15);
}

/* ==========================================================================
   MODAL & TOAST
   ========================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 1080p Interactive Zoom Lightbox Modal */
.zoom-modal-content {
    max-width: 1380px;
    width: 95vw;
    height: 88vh;
    max-height: 88vh;
    background: #08090e;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(168, 85, 247, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.zoom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-glass);
    z-index: 10;
    gap: 12px;
}

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

.zoom-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
}

.zoom-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.zoom-btn:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #ffffff;
}

.zoom-btn.reset-btn {
    width: auto;
    padding: 0 10px;
    font-size: 12px;
}

.zoom-level-text {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-purple);
    min-width: 48px;
    text-align: center;
}

.zoom-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #11131f 0%, #030407 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    user-select: none;
    touch-action: none;
}

.zoom-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
}

.zoom-stage img {
    max-width: 96%;
    max-height: 96%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    pointer-events: none;
}

.zoom-hint-pill {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}

.zoom-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(10, 12, 18, 0.95);
    border-top: 1px solid var(--border-glass);
    z-index: 10;
    gap: 12px;
}

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

.modal-close {
    position: relative;
    top: auto;
    right: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #ffffff;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000000;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-glass);
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: 400px;
    margin-left: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 16px;
    background: rgba(14, 17, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 13px;
    box-shadow: var(--shadow-soft);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: #ef4444; }

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

/* Live Job Inspector Modal */
.status-indicator {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-indicator:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    transform: scale(1.02);
}

.status-mini-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f0ff, #a855f7);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px #00f0ff;
}

.inspector-modal-content {
    max-width: 820px;
    background: #040406;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
    padding: 20px;
}

.inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.inspector-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inspector-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.live-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    animation: pulse 1.5s infinite;
}

.inspector-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.inspector-preview-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inspector-ref-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

.inspector-ref-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.card-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.card-label-row .card-label {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
}

.ref-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
    text-transform: uppercase;
}

.ref-badge.gold {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.3);
}

.inspector-img-box {
    aspect-ratio: 16/9;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inspector-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inspector-img-name {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    word-break: break-all;
}

.inspector-details-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Real-Time Progress Card in Inspector */
.inspector-progress-card {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}

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

.progress-node-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.progress-percent-val {
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #ffffff;
}

.inspector-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.inspector-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #a855f7);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inspector-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.inspector-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.stat-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    max-height: 140px;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .inspector-body {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE / TABLET / IPAD)
   ========================================================================== */

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

    .video-builder-layout {
        grid-template-columns: 1fr;
    }

    .selected-keyframe-card .preview-box {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .vram-badge {
        display: none;
    }

    .studio-container {
        padding: 12px 12px 60px;
    }

    .stepper-bar {
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 18px;
    }

    .step-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .stepper-line {
        width: 16px;
    }

    .glass-panel {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .image-picker-scroll {
        grid-template-columns: repeat(3, 1fr);
        max-height: 160px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .keyframes-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .videos-list {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

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

/* ==========================================================================
   Command Center & Telemetry Dashboard Styles (OLED Pitch Black)
   ========================================================================== */

.btn-command-center {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: var(--accent-cyan);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.btn-command-center:hover, .btn-command-center:active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

/* Auto-Isolate Toggle Switch */
.prep-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(0, 240, 255, 0.4);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: var(--accent-cyan);
}

.toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-label small {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
}

/* Command Center Modal Dialog */
.command-center-modal-content {
    max-width: 780px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    background: #000000 !important;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), 0 20px 50px rgba(0, 0, 0, 0.95) !important;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.cmd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.cmd-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmd-modal-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.cmd-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    animation: pulse 1.5s infinite;
}

.cmd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 650px) {
    .cmd-grid {
        grid-template-columns: 1fr;
    }
}

.cmd-card {
    background: rgba(15, 15, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
}

.cmd-card-header, .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cmd-card h4, .history-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.btn-text-sm {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-text-sm:hover {
    background: rgba(0, 240, 255, 0.1);
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 10px;
}

.t-label {
    color: var(--text-muted);
}

.t-val {
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 600;
}

.vram-meter-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0 14px;
}

.vram-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #7928ca);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    transition: width 0.4s ease;
}

.cmd-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-danger-action, .btn-cyan-action, .btn-amber-action, .btn-secondary-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.btn-action-title {
    font-size: 13px;
    font-weight: 700;
}

.btn-action-desc {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

.btn-danger-action {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff453a;
}
.btn-danger-action:hover, .btn-danger-action:active {
    background: rgba(255, 59, 48, 0.25);
    border-color: #ff453a;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

.btn-cyan-action {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
}
.btn-cyan-action:hover, .btn-cyan-action:active {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.btn-amber-action {
    background: rgba(255, 159, 10, 0.1);
    border: 1px solid rgba(255, 159, 10, 0.3);
    color: #ff9f0a;
}
.btn-amber-action:hover, .btn-amber-action:active {
    background: rgba(255, 159, 10, 0.25);
    border-color: #ff9f0a;
    box-shadow: 0 0 15px rgba(255, 159, 10, 0.3);
}

/* History Audit Log */
.history-list-container {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-title {
    font-weight: 600;
    color: #ffffff;
}

.history-meta {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
}

.history-badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.history-badge.success {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.history-badge.error {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.history-badge.interrupted {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

/* Deep Diagnostics Panel */
.diagnostics-output {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}
.diag-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 500;
}
.diag-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-top: 2px solid #00f0ff;
    border-radius: 50%;
    animation: diag-spin 0.8s linear infinite;
}
@keyframes diag-spin {
    to { transform: rotate(360deg); }
}
.diag-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.diag-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.diag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 12px;
}
.diag-row .diag-label {
    color: var(--text-muted);
    font-weight: 500;
}
.diag-row .diag-value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
}
.diag-status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.diag-status-pill.ok {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}
.diag-status-pill.warn {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}
.diag-status-pill.error {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}
.diag-models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.diag-model-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
}
.diag-model-item .model-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}
.diag-model-item .model-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.diag-errors-list {
    max-height: 120px;
    overflow-y: auto;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: #ff453a;
    background: rgba(255, 69, 58, 0.05);
    border-radius: 6px;
    padding: 8px;
    scrollbar-width: thin;
}
.diag-errors-list .error-line {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    word-break: break-all;
}
.diag-timestamp {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 6px;
    font-style: italic;
}

/* ==========================================================================
   Real-Time 3-Stage Progress Card & Visual Pipeline Stepper (OLED Cyber)
   ========================================================================== */
.inspector-progress-card {
    background: #000000;
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.08);
}

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

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

.progress-stage-badge {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.progress-node-badge {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--accent-cyan);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: var(--font-mono);
}

.progress-percent-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.inspector-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.inspector-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff 0%, #7928ca 50%, #ff0080 100%);
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}

/* 3-Stage Visual Pipeline Stepper Chips */
.inspector-stages-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stage-step-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.stage-chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.stage-step-chip.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.6);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.stage-step-chip.active .stage-chip-icon {
    background: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
    animation: pulseGlow 1.5s infinite alternate;
}

.stage-step-chip.completed {
    background: rgba(48, 209, 88, 0.12);
    border-color: rgba(48, 209, 88, 0.4);
    color: #30d158;
}

.stage-step-chip.completed .stage-chip-icon {
    background: #30d158;
    color: #000000;
}

.inspector-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ========================================================================== */
/* VIEW SWITCHING & NAVIGATION                                               */
/* ========================================================================== */
.app-view {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-view.active-view {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.btn-overnight-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.25), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #f1f5f9;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.btn-overnight-nav:hover {
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.45), rgba(168, 85, 247, 0.35));
    border-color: #a855f7;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
    transform: translateY(-1px);
}

.btn-overnight-nav .overnight-icon {
    font-size: 15px;
    animation: moonSway 3s ease-in-out infinite alternate;
}

@keyframes moonSway {
    0% { transform: rotate(-5deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.1); }
}

/* ========================================================================== */
/* "THE OVERNIGHT" MASTER PRODUCTION SUITE STYLING                           */
/* ========================================================================== */
.overnight-container {
    max-width: 1720px;
    margin: 0 auto;
    padding: 24px 32px 64px 32px;
}

.overnight-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 27, 75, 0.6) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-to-studio-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.back-to-studio-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-muted);
}

.hero-titles h2 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.badge-tag.gold {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #facc15;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.overnight-status-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.overnight-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    align-items: start;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .overnight-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.overnight-sidebar-col, .overnight-main-col {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.overnight-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(16px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 600px) {
    .overnight-container {
        padding: 12px 12px 64px 12px;
    }
    .overnight-card {
        padding: 14px;
        border-radius: var(--radius-md);
    }
    .overnight-hero-header {
        padding: 14px;
    }
}

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

.selection-pill {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #d8b4fe;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

.selection-quick-bar {
    display: flex;
    gap: 10px;
    margin: 12px 0 16px 0;
}

.btn-text-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-text-sm:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.overnight-kf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
    box-sizing: border-box;
}

.transition-mask-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
    box-sizing: border-box;
}

.transition-mask-card {
    position: relative;
    aspect-ratio: 16/9;
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
}

.transition-mask-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.transition-mask-card.selected {
    border-color: #00f0ff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.transition-mask-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transition-mask-card .mask-name-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.overnight-kf-card {
    position: relative;
    aspect-ratio: 16/9;
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
}

.overnight-kf-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.overnight-kf-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overnight-kf-card.selected {
    border-color: #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.overnight-kf-card .kf-select-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    transition: var(--transition-fast);
}

.overnight-kf-card.selected .kf-select-badge {
    background: #a855f7;
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
}

.overnight-param-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 10px;
}

.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.param-label {
    color: var(--text-muted);
}

.param-val {
    font-weight: 600;
    color: var(--text-primary);
}

.param-val.highlight {
    color: #38bdf8;
    font-family: var(--font-mono);
}

.overnight-metrics-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-md);
    padding: 14px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-label {
    font-size: 11px;
    color: var(--text-muted);
}

.m-val {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-mono);
}

.m-val.gold { color: #facc15; }
.m-val.cyan { color: #38bdf8; }

.btn-launch-overnight {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #d946ef 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
    transition: var(--transition-normal);
}

.btn-launch-overnight:hover:not(:disabled) {
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.7);
    transform: translateY(-2px);
}

.btn-launch-overnight:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Overnight Live Dashboard */
.overnight-live-details {
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
}

.live-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.overnight-progress-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.overnight-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #a855f7, #ec4899);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.live-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.live-stat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-stat-pill .pill-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.live-stat-pill .pill-val {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-mono);
}

/* Overnight Video Gallery */
.overnight-filter-tabs {
    display: flex;
    gap: 8px;
    margin: 14px 0 16px 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.overnight-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    max-height: 600px;
    overflow-y: auto;
    padding: 4px;
}

@media (max-width: 1200px) {
    .overnight-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================== */
/* "MASTER VIDEO CINEMA ARCHIVE" STYLING                                      */
/* ========================================================================== */
.video-archive-container {
    max-width: 1720px;
    margin: 0 auto;
    padding: 24px 32px 64px 32px;
}

.archive-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 27, 75, 0.7) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.archive-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-stage-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
}

.stage-filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.stage-filter-chip.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.archive-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
}

.archive-search-wrap input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 12px;
    width: 240px;
    font-family: var(--font-main);
}

.full-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.archive-video-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.archive-video-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.archive-video-card video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    display: block;
}

.archive-video-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    flex: 1;
}

.archive-video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.archive-video-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-stage {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-stage.master {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: #facc15;
}

.badge-stage.detail {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #d8b4fe;
}

.badge-stage.base {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}

.archive-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.archive-video-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-theater-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-theater-preview:hover {
    background: rgba(0, 240, 255, 0.25);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.archive-download-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 10px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.archive-download-btn:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   LAZY VIDEO POSTER CARD & HOVER PLAYER
   -------------------------------------------------------------------------- */
.video-poster-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    overflow: hidden;
    cursor: pointer;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-hover-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    background: #000000;
    z-index: 2;
}

.video-poster-box:hover .video-thumb-img {
    transform: scale(1.03);
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
    opacity: 0.85;
    transition: all 0.2s ease;
    z-index: 3;
    pointer-events: none;
}

.video-poster-box:hover .video-play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
}

.play-glyph-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.2);
    border: 2px solid var(--accent-cyan);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transition: transform 0.2s ease;
}

.video-poster-box:hover .play-glyph-circle {
    transform: scale(1.12);
    background: var(--accent-cyan);
    color: #000000;
}

.hover-play-hint {
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.video-card-top-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
}

/* --------------------------------------------------------------------------
   ARCHIVE PAGINATION BAR
   -------------------------------------------------------------------------- */
.archive-pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px 0 16px 0;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(12px);
}

.archive-pagination-bar .page-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
}

.archive-pagination-bar .page-btn:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.archive-pagination-bar .page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.archive-pagination-bar .page-indicator {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   1080P THEATER MODAL VIDEO PLAYER
   -------------------------------------------------------------------------- */
.theater-modal-content {
    max-width: 1280px;
    width: 92vw;
    background: #06070a;
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.theater-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.theater-video-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
}

.theater-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theater-player-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theater-player-viewport video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.theater-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.theater-meta-details {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & FULL RESOLUTION DOWNLOAD CONTROLS
   ========================================================================== */

.download-top-btn {
    background: rgba(0, 240, 255, 0.15) !important;
    border-color: rgba(0, 240, 255, 0.4) !important;
    color: var(--accent-cyan) !important;
    text-decoration: none;
}

.download-top-btn:hover {
    background: rgba(0, 240, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Keyframe Card Download Quick Button */
.keyframe-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.card-download-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.keyframe-card:hover .card-download-btn,
.keyframe-card:hover .card-inspect-btn {
    opacity: 1;
}

.card-download-btn:hover {
    background: rgba(0, 240, 255, 0.3);
    border-color: var(--accent-cyan);
    color: #ffffff;
}

/* Mobile Screens (< 768px) */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0 !important;
    }

    .zoom-modal-content {
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .zoom-modal-header {
        padding: 8px 12px !important;
        gap: 8px !important;
    }

    .zoom-modal-title {
        font-size: 12px !important;
        max-width: 110px !important;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .zoom-toolbar {
        gap: 4px !important;
    }

    .zoom-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 13px !important;
    }

    .zoom-level-text {
        font-size: 11px !important;
        min-width: 32px !important;
    }

    .zoom-modal-footer {
        padding: 8px 12px !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .footer-actions {
        width: 100% !important;
        display: flex !important;
        gap: 6px !important;
    }

    .footer-actions .btn {
        flex: 1 !important;
        padding: 10px 6px !important;
        font-size: 11px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .zoom-hint-pill {
        bottom: 8px !important;
        font-size: 10px !important;
        padding: 3px 10px !important;
        max-width: 90% !important;
        text-align: center !important;
    }

    .keyframe-card-actions .card-download-btn,
    .keyframe-card-actions .card-inspect-btn,
    .card-inspect-btn {
        opacity: 1 !important; /* Always visible on touch screens */
    }
}

/* ==========================================================================
   STUDIO AI AGENT (GEMINI 3.7 FLASH) FLOATING WIDGET & CHAT DRAWER
   ========================================================================== */

/* Floating Trigger Button */
.floating-agent-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(121, 40, 202, 0.35));
    border: 1px solid rgba(0, 240, 255, 0.45);
    border-radius: 50px;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.25), 0 0 15px rgba(121, 40, 202, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-agent-btn:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: #00f0ff;
    box-shadow: 0 12px 40px rgba(0, 240, 255, 0.4), 0 0 25px rgba(121, 40, 202, 0.5);
}

.agent-btn-pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: #00f0ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00f0ff;
    animation: agent-pulse-ring 2s infinite ease-out;
}

@keyframes agent-pulse-ring {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.3; }
    100% { transform: scale(0.9); opacity: 1; }
}

.agent-btn-icon {
    font-size: 16px;
    animation: float-sparkle 3s ease-in-out infinite alternate;
}

@keyframes float-sparkle {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(15deg); }
}

.agent-badge-chip {
    background: linear-gradient(135deg, #00f0ff, #7928ca);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

/* Chat Drawer Window */
.agent-chat-drawer {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 600px;
    max-height: calc(100vh - 120px);
    z-index: 9995;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 18px;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    animation: agent-drawer-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.agent-chat-drawer.active {
    display: flex;
}

.agent-chat-drawer.minimized {
    height: 64px !important;
}

.agent-chat-drawer.minimized .agent-quick-prompts,
.agent-chat-drawer.minimized .agent-chat-messages,
.agent-chat-drawer.minimized .agent-typing-indicator,
.agent-chat-drawer.minimized .agent-chat-input-bar {
    display: none !important;
}

@keyframes agent-drawer-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.agent-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.agent-avatar-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(121, 40, 202, 0.3));
    border: 1px solid rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.agent-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-name-row h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.agent-model-tag {
    font-size: 10px;
    font-weight: 700;
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
}

.agent-status-subtext {
    font-size: 10px;
    color: #30d158;
    font-weight: 500;
}

.agent-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.agent-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.agent-icon-btn.close-btn:hover {
    background: rgba(255, 69, 58, 0.2);
    color: #ff453a;
    border-color: #ff453a;
}

/* Quick Prompts Bar */
.agent-quick-prompts {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.agent-quick-prompts::-webkit-scrollbar {
    display: none;
}

.agent-prompt-chip {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-prompt-chip:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.35);
    color: var(--accent-cyan);
    transform: translateY(-1px);
}

/* Chat Messages */
.agent-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.2) transparent;
}

.agent-msg {
    display: flex;
    gap: 10px;
    max-width: 92%;
    animation: msg-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.agent-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.agent-msg.assistant {
    align-self: flex-start;
}

.agent-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.agent-msg.assistant .agent-msg-avatar {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(121, 40, 202, 0.3));
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.agent-msg.user .agent-msg-avatar {
    background: linear-gradient(135deg, #00f0ff, #7928ca);
    color: #000;
    font-weight: 700;
    font-size: 11px;
}

.agent-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.5;
    word-break: break-word;
}

.agent-msg.assistant .agent-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

.agent-msg.user .agent-msg-bubble {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(121, 40, 202, 0.35));
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.agent-msg-bubble p {
    margin: 0 0 6px 0;
}

.agent-msg-bubble p:last-child {
    margin-bottom: 0;
}

.agent-msg-bubble ul, .agent-msg-bubble ol {
    margin: 4px 0 6px 18px;
    padding: 0;
}

.agent-msg-bubble li {
    margin-bottom: 3px;
}

.agent-msg-bubble code {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent-cyan);
}

.agent-msg-bubble pre {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    margin: 6px 0;
}

.agent-msg-bubble pre code {
    background: none;
    border: none;
    padding: 0;
}

.agent-msg-bubble strong {
    color: #ffffff;
    font-weight: 700;
}

/* Typing indicator */
.agent-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 11px;
    color: var(--text-muted);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: typing-dot-bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Chat Input Bar */
.agent-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-chat-input-bar input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12.5px;
    outline: none;
    transition: all 0.2s ease;
}

.agent-chat-input-bar input:focus {
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.agent-chat-input-bar input::placeholder {
    color: var(--text-muted);
}

.agent-chat-input-bar button {
    background: linear-gradient(135deg, #00f0ff, #7928ca);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.agent-chat-input-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
}

.agent-chat-input-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .agent-chat-drawer {
        width: 100vw !important;
        right: 0 !important;
        bottom: 0 !important;
        max-width: 100vw !important;
        height: 80vh !important;
        border-radius: 20px 20px 0 0 !important;
    }
    .floating-agent-btn {
        bottom: 16px !important;
        right: 16px !important;
        padding: 10px 16px !important;
        font-size: 12px !important;
    }
}

/* ========================================================================== */
/* "LIVE JOB QUEUE" — PAGE & COMPONENT STYLING                                */
/* ========================================================================== */

.highlight-amber:hover {
    background: rgba(251, 191, 36, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
}

.menu-badge-chip-amber {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tag.amber {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.header-queue-pill {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-queue-pill:hover {
    background: rgba(251, 191, 36, 0.22) !important;
    border-color: #fbbf24 !important;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.35);
}

.header-queue-pill.has-jobs {
    animation: queuePulse 2s infinite alternate;
}

@keyframes queuePulse {
    0% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 18px rgba(251, 191, 36, 0.5); border-color: #fbbf24; }
}

.queue-container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px 32px 64px 32px;
}

.queue-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 20, 10, 0.65) 100%);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

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

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Stats Cards */
.queue-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.queue-stat-card {
    background: rgba(10, 12, 18, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.queue-stat-card:hover {
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-icon {
    font-size: 16px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.stat-main-val {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

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

.text-amber { color: #fbbf24 !important; }
.text-cyan { color: #00f0ff !important; }
.text-purple { color: #c084fc !important; }

/* Section Headers */
.queue-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.queue-section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-section-sub {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.live-dot-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00f0ff;
    box-shadow: 0 0 10px #00f0ff;
    animation: dotPulse 1.2s infinite alternate;
}

@keyframes dotPulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 14px #00f0ff; }
}

/* Active Render Card */
.active-job-card {
    background: linear-gradient(135deg, rgba(8, 14, 26, 0.9) 0%, rgba(14, 20, 36, 0.8) 100%);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 12px 35px rgba(0, 240, 255, 0.12);
    position: relative;
    overflow: hidden;
}

.active-job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f0ff, #a855f7, #fbbf24, #00f0ff);
    background-size: 300% 100%;
    animation: liveGradientFlow 3s linear infinite;
}

@keyframes liveGradientFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

.active-job-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.active-job-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.active-job-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.active-job-prompt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 900px;
}

.active-job-main-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
}

.active-job-media-col {
    display: flex;
    gap: 10px;
}

.active-job-thumb-box {
    flex: 1;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 16/9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.active-job-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.active-job-thumb-label {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.75);
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    color: var(--text-secondary);
}

.active-job-telemetry-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.active-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-mono);
}

.active-progress-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.active-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #a855f7);
    border-radius: 999px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.active-stages-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.active-stage-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.active-stage-chip.current {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.active-stage-chip.completed {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

/* Idle State in Queue */
.queue-idle-state {
    padding: 36px 20px;
    background: rgba(8, 10, 16, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    text-align: center;
}

.idle-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.idle-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.idle-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Pending Jobs Cards */
.pending-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(10, 14, 22, 0.75);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.pending-job-card:hover {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(14, 18, 28, 0.9);
    transform: translateY(-1px);
}

.pending-card-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.pending-pos-badge {
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    white-space: nowrap;
}

.pending-thumb {
    width: 72px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pending-info {
    flex: 1;
    min-width: 0;
}

.pending-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.pending-job-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.pending-prompt-text {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 800px;
    margin-bottom: 4px;
}

.pending-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.pending-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.btn-remove-queue {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #f87171;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-queue:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
}

/* History Table in Queue */
.recent-history-table-wrap {
    background: rgba(8, 10, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.queue-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.queue-history-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-history-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.queue-history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-chip {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.status-chip.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.status-chip.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .queue-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .active-job-main-grid {
        grid-template-columns: 1fr;
    }
    .active-job-media-col {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .queue-container {
        padding: 16px 14px 48px 14px;
    }
    .queue-hero-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .queue-header-actions {
        justify-content: space-between;
    }
    .queue-stats-grid {
        grid-template-columns: 1fr;
    }
    .pending-job-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .pending-card-right {
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   THE OVERNIGHT — CUSTOM THEME CINEMA STYLES
   ========================================================================== */
.theme-prompt-textarea:focus {
    outline: none;
    border-color: #a855f7 !important;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4), inset 0 2px 8px rgba(0,0,0,0.6) !important;
}

.custom-theme-preset-chip {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    padding: 5px 11px;
    cursor: pointer;
    transition: var(--transition-base);
}

.custom-theme-preset-chip:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.custom-theme-preset-chip.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(0, 240, 255, 0.2));
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.custom-target-footage-chip {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    padding: 5px 11px;
    cursor: pointer;
    transition: var(--transition-base);
}

.custom-target-footage-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-target-footage-chip.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.badge-tag.purple, .m-val.purple, .param-val.purple {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.4);
}

/* Keyframe Transitions Studio Styles */
.transition-theme-preset-chip {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(234, 179, 8, 0.2);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    padding: 5px 11px;
    cursor: pointer;
    transition: var(--transition-base);
}

.transition-theme-preset-chip:hover {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.transition-theme-preset-chip.active {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(0, 240, 255, 0.2));
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

.transition-slot-card:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.transition-slot-card.active {
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.overnight-kf-card.start-selected {
    border-color: #00f0ff !important;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.6) !important;
}

.overnight-kf-card.end-selected {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.6) !important;
}

.overnight-kf-card.both-selected {
    border-color: #10b981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
}

.kf-slot-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.btn-set-start, .btn-set-end {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-set-start:hover {
    background: rgba(0, 240, 255, 0.3);
    border-color: #00f0ff;
}

.btn-set-end:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: #fbbf24;
}

/* DaVinci Master Studio Styles */
.badge-tag.cyan {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.35);
}

.menu-badge-chip-cyan {
    background: rgba(0, 240, 255, 0.2);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.4);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.davinci-speed-chip.active, .davinci-trans-chip.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(124, 58, 237, 0.25)) !important;
    border-color: #00f0ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3) !important;
}





