/* House Lighting Styles - With Login Splash & Theme Toggle */

/* ============================================
   THEME VARIABLES - DARK MODE (DEFAULT)
   ============================================ */
:root {
    --bg: #0b0c10;
    --card: #12141b;
    --muted: #a3a7b7;
    --text: #eef1f7;
    --accent: #76c7ff;
    --accent-2: #9dff8c;
    --border: #1f2230;
    --hover: #1a1e2e;
}

/* ============================================
   LIGHT THEME VARIABLES
   ============================================ */
[data-theme="light"] {
    --bg: #f5f6f0;           /* warm off-white */
    --card: #ffffff;
    --muted: #5a6472;
    --text: #1e3a4f;          /* logo navy — primary text */
    --accent: #5a92bf;        /* logo blue (darker for contrast) */
    --accent-2: #d4883a;      /* warm golden complement */
    --border: #d4dbe3;        /* light blue-gray */
    --hover: #e8edf2;
    --sidebar-bg: #1e3a4f;    /* navy sidebar */
    --sidebar-text: #c8dce9;
    --sidebar-active: #6aa0d1; /* logo medium blue */
    --header-bg: #ffffff;
    --section-heading: #1e3a4f;
    --card-bg: #ffffff;       /* used by entity cards, panels */
    --bg-darker: #f0f4f8;     /* used by sub-sections */
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background-image: url('./login-bg.jpg'), url('./theme-pattern.svg');
    background-size: cover, 200px 200px;
    background-position: center, center;
    background-repeat: no-repeat, repeat;
    background-attachment: fixed;
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image: none;
    background-color: var(--bg);
}

/* ============================================
   LOGIN SPLASH SCREEN
   ============================================ */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('./login-bg.jpg'), url('./theme-pattern.svg');
    background-size: cover, 200px 200px;
    background-position: center, center;
    background-repeat: no-repeat, repeat;
    filter: brightness(0.4);
}

[data-theme="light"] .login-background {
    filter: brightness(0.7) saturate(0.8);
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.login-card {
    background: rgba(18, 20, 27, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(30, 58, 79, 0.15);
    box-shadow: 0 20px 60px rgba(30, 58, 79, 0.18);
}

.login-logo {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.login-tagline {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 32px;
    line-height: 1.5;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.auth-form {
    animation: fadeIn 0.3s ease;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 199, 255, 0.1);
}

[data-theme="light"] .form-group input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.checkbox-label a {
    color: var(--accent);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--accent), #5891ff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 199, 255, 0.3);
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #6aa0d1, #1e3a4f);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 20px rgba(30, 58, 79, 0.3);
}

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

/* ============================================
   MAIN APP STYLES
   ============================================ */
.main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header, .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    transition: all 0.3s ease;
}

.footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    margin-top: auto;
}

.brand {
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 48px;
    width: auto;
    border-radius: 6px;
}

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

.theme-toggle {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--hover);
    transform: scale(1.05);
}

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

/* ── Guided Tour Button ───────────────────────────── */
.btn-tour {
    background: rgba(118, 199, 255, 0.15);
    border: 1px solid rgba(118, 199, 255, 0.35);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-tour:hover {
    background: rgba(118, 199, 255, 0.25);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ── Full-Width Toggle Button ─────────────────────── */
.btn-fullwidth {
    background: rgba(118, 199, 255, 0.15);
    border: 1px solid rgba(118, 199, 255, 0.35);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-fullwidth:hover {
    background: rgba(118, 199, 255, 0.25);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.btn-fullwidth.active {
    background: rgba(118, 199, 255, 0.3);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(118, 199, 255, 0.2);
}
[data-theme="light"] .btn-fullwidth {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #2563eb;
}
[data-theme="light"] .btn-fullwidth:hover {
    background: rgba(37, 99, 235, 0.18);
}

/* ── Full-Width Layout Mode ───────────────────────── */
.container.full-width {
    max-width: 100% !important;
    padding: 0 24px;
}
.container.full-width .view-container,
.container.full-width .dashboard,
.container.full-width #creditPackagesView .container {
    max-width: 100% !important;
}

/* ── Shepherd.js Dark Theme Overrides ─────────────── */
.shepherd-modal-overlay-container {
    z-index: 10000 !important;
}
.shepherd-element {
    z-index: 10001 !important;
    max-width: 420px;
}
.shepherd-content {
    background: #1a1d2e !important;
    border: 1px solid rgba(118, 199, 255, 0.25) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(118, 199, 255, 0.08) !important;
    color: #eef1f7 !important;
}
.shepherd-header {
    background: rgba(118, 199, 255, 0.08) !important;
    border-bottom: 1px solid rgba(118, 199, 255, 0.15) !important;
    padding: 14px 18px 12px !important;
    border-radius: 14px 14px 0 0 !important;
}
.shepherd-title {
    color: #eef1f7 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}
.shepherd-cancel-icon {
    color: #a3a7b7 !important;
    font-size: 20px !important;
}
.shepherd-cancel-icon:hover {
    color: #ff6b6b !important;
}
.shepherd-text {
    color: #c8ccda !important;
    padding: 16px 18px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}
.shepherd-text p {
    margin: 0 !important;
}
.shepherd-footer {
    padding: 10px 18px 14px !important;
    border-top: 1px solid rgba(118, 199, 255, 0.1) !important;
}
.shepherd-button {
    background: linear-gradient(180deg, #2a6dff, #2055c9) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 18px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}
.shepherd-button:hover {
    background: linear-gradient(180deg, #3a7dff, #2a65d9) !important;
    transform: translateY(-1px) !important;
}
.shepherd-button-secondary {
    background: rgba(163, 167, 183, 0.15) !important;
    color: #a3a7b7 !important;
    border: 1px solid rgba(163, 167, 183, 0.25) !important;
}
.shepherd-button-secondary:hover {
    background: rgba(163, 167, 183, 0.25) !important;
    color: #eef1f7 !important;
}
.shepherd-arrow::before {
    background: #1a1d2e !important;
    border: 1px solid rgba(118, 199, 255, 0.25) !important;
}
.shepherd-modal-overlay-container .shepherd-modal-overlay-container--visible {
    opacity: 0.7 !important;
}

/* Shepherd.js Light Theme Overrides */
[data-theme="light"] .shepherd-content {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 30px rgba(37, 99, 235, 0.06) !important;
    color: #1a1d24 !important;
}
[data-theme="light"] .shepherd-header {
    background: rgba(37, 99, 235, 0.06) !important;
    border-bottom: 1px solid #e5e7eb !important;
}
[data-theme="light"] .shepherd-title {
    color: #1a1d24 !important;
}
[data-theme="light"] .shepherd-text {
    color: #374151 !important;
}
[data-theme="light"] .shepherd-footer {
    border-top: 1px solid #e5e7eb !important;
}
[data-theme="light"] .shepherd-cancel-icon {
    color: #6b7280 !important;
}
[data-theme="light"] .shepherd-arrow::before {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
}
[data-theme="light"] .btn-tour {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #2563eb;
}
[data-theme="light"] .btn-tour:hover {
    background: rgba(37, 99, 235, 0.18);
}

.chip {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 13px;
    transition: all 0.3s ease;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.divider {
    color: var(--border);
}

.logout-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.logout-link:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    flex: 1;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

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

.col {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    transition: all 0.3s ease;
}

.form label {
    display: block;
    margin: 8px 0 4px;
    color: var(--muted);
    font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

input[type="file"] {
    width: 100%;
    padding: 8px;
    color: var(--text);
}

button {
    background: linear-gradient(180deg, #2a6dff, #2055c9);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 109, 255, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

[data-theme="light"] button {
    background: linear-gradient(180deg, var(--accent), #1e40af);
}

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

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

.tiny {
    font-size: 12px;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.plan {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.plan h4 {
    margin: 0 0 6px;
    color: var(--text);
}

.price {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0;
    color: var(--text);
}

.badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px 7px;
    background: var(--card);
    font-size: 12px;
    color: var(--muted);
}

/* Status Indicators */
.status-indicator {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    color: var(--accent-2);
    font-weight: bold;
}

/* Progress Bar */
.progress-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

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

.progress-header span {
    font-weight: 600;
    color: var(--text);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

/* Scenes & Shots */
.scene {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    padding: 12px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

.scene-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.scene-title {
    font-weight: 700;
    color: var(--text);
}

.scene-meta {
    color: var(--muted);
    font-size: 13px;
}

.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.shot {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 10px;
    transition: all 0.3s ease;
}

.shot h5 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--text);
}

.shot .desc {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.shot img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 8px;
}

.shot textarea {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 12px;
}

.pill.ok {
    color: var(--accent-2);
}

.pill.warn {
    color: #ffd36e;
}

.pill.err {
    color: #ff8c8c;
}

.totals {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

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

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    max-width: 600px;
    margin: 20px;
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
    }
    
    .shots {
        grid-template-columns: 1fr;
    }
    
    .status {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .login-card {
        padding: 24px 20px;
    }
}

/* ============================================
   PHASE 2: TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(400px);
}

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

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.toast-message {
    font-size: 14px;
    color: var(--muted);
}

.toast.success {
    border-left: 4px solid #4ade80;
}

.toast.error {
    border-left: 4px solid #f87171;
}

.toast.info {
    border-left: 4px solid #60a5fa;
}

.toast.warning {
    border-left: 4px solid #fbbf24;
}

/* ============================================
   PHASE 2: DASHBOARD
   ============================================ */
.dashboard {
    padding: 20px 0;
}

.dashboard-hero {
    margin-bottom: 32px;
}

.dashboard-hero h1 {
    font-size: 32px;
    margin: 0 0 8px 0;
    color: var(--text);
}

.dashboard-hero p {
    font-size: 16px;
    color: var(--muted);
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dashboard-actions button {
    padding: 12px 24px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

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

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text);
}

.empty-state p {
    margin: 0 0 24px 0;
}

/* ============================================
   PHASE 2: PROJECT CARD
   ============================================ */
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.project-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card-status.created {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.project-card-status.uploaded {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.project-card-status.parsed {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.project-card-status.expanded {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.project-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--muted);
}

.project-card-counts {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
}

.project-card-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.project-card-count-value {
    font-weight: 600;
    color: var(--text);
}

.project-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-card-actions {
    opacity: 1;
}

.project-card-menu {
    position: relative;
}

.project-card-menu-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.project-card-menu-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.project-card-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

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

.project-card-menu-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-card-menu-item:first-child {
    border-radius: 10px 10px 0 0;
}

.project-card-menu-item:last-child {
    border-radius: 0 0 10px 10px;
}

.project-card-menu-item:hover {
    background: var(--hover);
}

.project-card-menu-item.danger {
    color: #f87171;
}

.project-card-menu-item.danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* ============================================
   PHASE 2: HEADER DROPDOWN
   ============================================ */
.header-project-dropdown {
    position: relative;
    margin-right: 16px;
}

.header-project-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text);
}

.header-project-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.header-project-btn .arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.header-project-btn.open .arrow {
    transform: rotate(180deg);
}

.header-project-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    max-height: 500px;
    overflow-y: auto;
}

.header-project-menu.show {
    display: block;
}

.header-project-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.header-project-menu-search {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.header-project-menu-section {
    padding: 8px 0;
}

.header-project-menu-label {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-project-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-project-menu-item:hover {
    background: var(--hover);
}

.header-project-menu-item.active {
    background: rgba(96, 165, 250, 0.1);
}

.header-project-menu-item-title {
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.header-project-menu-item-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--border);
    color: var(--muted);
}

.header-project-menu-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.header-project-menu-footer button {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

/* ============================================
   PHASE 3: DRAG & DROP UPLOAD ZONE
   ============================================ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: var(--bg);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(118, 199, 255, 0.1);
    transform: scale(1.02);
}

.upload-zone-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.upload-zone-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.upload-zone-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
}

.upload-zone-formats {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
}

.upload-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-zone-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.upload-zone:hover .upload-zone-button {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 199, 255, 0.4);
}

/* ============================================
   PHASE 3: LOADING STATES
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay-text {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-overlay-subtext {
    white-space: pre-line;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
/* Progress bar in loading overlay */
.loading-progress-wrap {
    width: 280px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 8px;
}
.loading-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.3s ease;
}
.loading-progress-pct {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}
.loading-time-estimate {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
    font-style: italic;
}


.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 25%,
        var(--hover) 50%,
        var(--border) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 200px;
    margin-bottom: 16px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

/* ============================================
   PHASE 3: FILTER CHIPS
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

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

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-chip:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.filter-chip-icon {
    font-size: 14px;
}

.filter-chip-close {
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    margin-left: 4px;
}

.filter-clear {
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.filter-clear:hover {
    color: var(--text);
}

/* ============================================
   PHASE 3: PROGRESS BAR
   ============================================ */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill.indeterminate {
    width: 30%;
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

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

/* ============================================
   PHASE 3: ENHANCED BUTTONS
   ============================================ */
.btn-secondary {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--hover);
    border-color: var(--accent);
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 12px;
    top: 50%;
    margin-top: -8px;
}

/* ============================================
   PHASE 3: ENHANCED SEARCH
   ============================================ */
.search-wrapper {
    position: relative;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 199, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: none;
}

.search-input:not(:placeholder-shown) ~ .search-clear {
    display: block;
}

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

/* ============================================
   PHASE 3: BADGE ENHANCEMENTS
   ============================================ */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   PHASE 3: TOOLTIP
   ============================================ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: var(--card);
    color: var(--text);
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--border) transparent transparent transparent;
}

/* ============================================
   PHASE 1: SECTION REORGANIZATION
   ============================================ */

/* Scenes Toolbar */
.scenes-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.toolbar-spacer {
    flex: 1;
}

.btn-secondary {
    background: linear-gradient(180deg, #555, #444);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #666, #555);
}

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

.costs-section {
    padding: 12px;
}

/* ============================================
   PHASE 2: SHOT CARDS & SCENE STYLING
   ============================================ */

/* Scene Header */
.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.scene-info {
    flex: 1;
    min-width: 200px;
}

.scene-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.scene-meta {
    color: var(--muted);
    font-size: 13px;
}

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

.btn-scene-action {
    background: linear-gradient(180deg, #2a6dff, #2055c9);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-scene-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 109, 255, 0.3);
}

.btn-scene-action:active {
    transform: translateY(0);
}

.btn-scene-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Shots Grid */
.shots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    padding: 14px;
}

/* Shot Cards */
.shot-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0b0d13;
    padding: 12px;
    transition: all 0.2s;
    overflow: hidden;
}

.shot-card:hover {
    border-color: rgba(42, 109, 255, 0.4);
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* When shot card has details visible, make it span full width */
.shot-card.details-visible {
    grid-column: 1 / -1;
    max-width: 100%;
    max-height: 85vh;
    overflow-y: auto;  /* Card itself scrolls — topbar sticks inside it */
}

/* Full details container */
.shot-full-details {
    width: 100%;
}

/* Make lighting table responsive and readable */
.lighting-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-top: 10px;
}

.lighting-table th,
.lighting-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.lighting-table th {
    background: rgba(42, 109, 255, 0.1);
    font-weight: 600;
    white-space: nowrap;
}

.lighting-table td {
    vertical-align: top;
}


/* Unexpanded Shot Placeholder */
.shot-card.unexpanded {
    background: rgba(255, 255, 255, 0.02);
    border-style: dashed;
}

.shot-placeholder {
    text-align: center;
    padding: 20px 12px;
}

.shot-placeholder-title {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--muted);
}

.shot-excerpt {
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
}

.excerpt-text {
    margin: 8px 0 0;
    font-style: italic;
}

.btn-expand-shot {
    background: linear-gradient(180deg, #76c7ff, #4a9dd9);
    color: #000;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-expand-shot:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 199, 255, 0.4);
}

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

/* Expanded Shot Card */
.shot-card.expanded {
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
    display: flex;
    flex-direction: column;
}

/* When details are open, card scrolls internally */
.shot-card.expanded.details-visible {
    max-height: 85vh;
    overflow-y: auto !important;
}

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

.shot-header h5 {
    margin: 0;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.shot-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.shot-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.btn-shot-action {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-shot-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(42, 109, 255, 0.5);
}

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

.shot-image {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.shot-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ============================================
   PHASE 3: SCREENPLAY VIEWER
   ============================================ */

/* Workspace Container */
.workspace-container {
    display: flex;
    gap: 16px;
    min-height: 400px;
}

/* Screenplay Panel */
.screenplay-panel {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0b0d13;
    overflow: hidden;
    max-height: 800px;
}

.screenplay-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    align-items: center;
}

.screenplay-toolbar input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0f1118;
    color: var(--text);
    font-size: 13px;
}

.screenplay-toolbar input[type="text"]:focus {
    outline: none;
    border-color: rgba(42, 109, 255, 0.6);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: #1a1d28;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #252936;
    border-color: rgba(42, 109, 255, 0.4);
}

.screenplay-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #d4d7e0;
}

.screenplay-loading {
    text-align: center;
    padding: 40px;
    color: var(--muted);
    font-family: system-ui, Arial, sans-serif;
}

/* Scene Markers in Screenplay */
.screenplay-scene {
    position: relative;
    padding: 8px 0;
    margin: 12px 0;
}

.screenplay-scene-heading {
    font-weight: 700;
    color: var(--text);
    background: rgba(42, 109, 255, 0.1);
    padding: 4px 8px;
    border-left: 3px solid rgba(42, 109, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.screenplay-scene-heading:hover {
    background: rgba(42, 109, 255, 0.2);
    border-left-color: rgba(42, 109, 255, 1);
}

.screenplay-scene.highlighted .screenplay-scene-heading {
    background: rgba(255, 215, 0, 0.25);
    border-left-color: gold;
    animation: highlight-pulse 0.5s ease-in-out;
}

@keyframes highlight-pulse {
    0%, 100% { background: rgba(255, 215, 0, 0.25); }
    50% { background: rgba(255, 215, 0, 0.4); }
}

/* Search Highlighting */
.screenplay-search-highlight {
    background: rgba(255, 215, 0, 0.4);
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
}

.screenplay-search-current {
    background: rgba(255, 140, 0, 0.6);
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3);
}

/* Scenes Panel (when screenplay visible) */
.scenes-panel {
    flex: 1;
    min-width: 300px;
}

/* Split View Active State */
.workspace-container.split-view-active .screenplay-panel {
    display: flex;
}

.workspace-container.split-view-active .scenes-panel {
    flex: 1 1 60%;
}

/* Responsive */
@media (max-width: 1200px) {
    .workspace-container.split-view-active {
        flex-direction: column;
    }
    
    .screenplay-panel {
        flex: 0 0 auto;
        max-height: 500px;
    }
}

/* Scrollbar Styling for Screenplay */
.screenplay-content::-webkit-scrollbar {
    width: 8px;
}

.screenplay-content::-webkit-scrollbar-track {
    background: #0f1118;
}

.screenplay-content::-webkit-scrollbar-thumb {
    background: rgba(42, 109, 255, 0.3);
    border-radius: 4px;
}

.screenplay-content::-webkit-scrollbar-thumb:hover {
    background: rgba(42, 109, 255, 0.5);
}

/* ============================================
   TWO-STATE SHOT CARD STYLES
   Added: 2025-10-31
   ============================================ */

/* Shot card states */
.shot-card {
    transition: all 0.3s ease;
}

.shot-card.details-visible {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(118, 199, 255, 0.3);
}

/* Basic info section (always visible) */
.shot-basic-info {
    margin-bottom: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
/* Compact Visual Description in collapsed card view */
.shot-basic-info .shot-section {
    margin: 0;
    padding: 8px;
    border: none;
    background: none;
}

.shot-basic-info .shot-section h6 {
    font-size: 12px;
    margin: 0 0 4px 0;
}

/* Shot basic info: Visual Description area on card face */
.shot-basic-info {
    margin-bottom: 8px;
    flex-shrink: 0;
}

.shot-basic-info .shot-section {
    overflow: hidden;
    margin: 0;
    padding: 8px;
    position: relative;
}

.shot-basic-info .section-header {
    margin-bottom: 4px;
    flex-wrap: nowrap;
    gap: 6px;
}

.shot-basic-info .section-header h6 {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.shot-basic-info .section-actions {
    flex-shrink: 0;
}

.shot-basic-info .section-actions .btn-elaborate {
    padding: 2px 8px;
    font-size: 10px;
}

.shot-basic-info .shot-section p {
    font-size: 13px;
    color: var(--muted, #a3a7b7);
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
}



/* Full details container (hidden by default) */
.shot-full-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shot sections */
.shot-section {
    margin: 16px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shot-section h6 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #76c7ff;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

/* Elaborate controls — push to right of h6 */
.elaborate-section-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.elaborate-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.elaborate-badge.baseline {
    background: rgba(163, 167, 183, 0.15);
    color: var(--muted);
    border: 1px solid rgba(163, 167, 183, 0.2);
}

.elaborate-badge.elaborated {
    background: rgba(157, 255, 140, 0.15);
    color: var(--accent-2);
    border: 1px solid rgba(157, 255, 140, 0.2);
}

.btn-elaborate-section {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: linear-gradient(180deg, #2a6dff, #2055c9);
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.btn-elaborate-section:hover {
    background: linear-gradient(180deg, #3a7dff, #2a65d9);
}

/* Shot description truncation */
.shot-desc-text {
    margin: 0;
    line-height: 1.5;
    transition: max-height 0.3s ease;
}

/* Text truncation handled by JS — no CSS clamp needed */

/* ===== SHOT DETAILS TOPBAR (sticky close bar) ===== */
.shot-details-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: -12px -12px 12px -12px;  /* Stretch to card edges (card has 12px padding) */
    background: #0f1220;  /* Solid so scroll content doesn't bleed through */
    border-bottom: 1px solid rgba(118, 199, 255, 0.25);
    border-radius: 10px 10px 0 0;  /* Match card top corners */
    position: sticky;
    top: -12px;  /* Offset card padding so it sticks flush */
    z-index: 10;
}

.topbar-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent, #76c7ff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.topbar-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-close-details {
    background: rgba(255, 100, 100, 0.15) !important;
    border-color: rgba(255, 100, 100, 0.3) !important;
    color: #ff8c8c !important;
}

.btn-close-details:hover {
    background: rgba(255, 100, 100, 0.25) !important;
}

/* Hide elaborate controls on card face by default */
.shot-basic-info .section-header .section-actions {
    display: none;
}

.shot-basic-info .section-header .section-badge {
    display: none;
}

.shot-basic-info .elaborate-section-controls {
    display: none !important;
}

/* Show them when details are expanded */
.shot-card.details-visible .shot-basic-info .section-header .section-actions {
    display: flex;
}

.shot-card.details-visible .shot-basic-info .section-header .section-badge {
    display: inline-block;
}

.shot-card.details-visible .shot-basic-info .elaborate-section-controls {
    display: flex !important;
}

/* Light theme overrides */
[data-theme="light"] .shot-details-topbar {
    background: #e8ecf4;
    border-bottom-color: rgba(42, 109, 255, 0.2);
}

[data-theme="light"] .topbar-title {
    color: #2a6dff;
}

[data-theme="light"] .btn-close-details {
    background: rgba(220, 50, 50, 0.1) !important;
    border-color: rgba(220, 50, 50, 0.2) !important;
    color: #d32f2f !important;
}

.btn-show-more {
    display: block;
    background: none;
    border: none;
    color: var(--accent, #76c7ff);
    cursor: pointer;
    padding: 0;
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
    clear: both;
}

.btn-show-more:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Light theme */
[data-theme="light"] .btn-show-more {
    color: #2a6dff;
}

/* Collapsible sections */
.shot-section.collapsible {
    cursor: default;
}

.section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.section-toggle:hover {
    color: #9dff8c;
}

.toggle-icon {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.2s;
}

.shot-section.expanded .toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    margin-top: 12px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Lighting table */
.lighting-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.lighting-table th {
    background: rgba(118, 199, 255, 0.1);
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid rgba(118, 199, 255, 0.3);
    font-weight: 600;
    font-size: 12px;
}

.lighting-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

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

.lighting-table small {
    color: #a3a7b7;
    display: block;
    margin-top: 2px;
    font-size: 11px;
}

.lighting-meta {
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Camera grid */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.camera-param {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.camera-param label {
    display: block;
    font-size: 11px;
    color: #a3a7b7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.camera-param span {
    font-size: 15px;
    font-weight: 600;
    color: #eef1f7;
}

.camera-notes {
    padding: 10px;
    background: rgba(157, 255, 140, 0.05);
    border-left: 3px solid #9dff8c;
    font-size: 13px;
    line-height: 1.5;
}

/* Metadata grid */
.metadata-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.metadata-grid strong {
    color: #76c7ff;
    margin-right: 6px;
}

/* Empty state */
.empty-state {
    color: #a3a7b7;
    font-style: italic;
    text-align: center;
    padding: 16px;
    font-size: 13px;
}

/* Button styling for view details */
.btn-shot-action[data-action="toggle-details"] {
    background: linear-gradient(180deg, #4a9eff, #2a7ed9);
}

.btn-shot-action[data-action="toggle-details"]:hover {
    background: linear-gradient(180deg, #5aafff, #3a8ee9);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .camera-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lighting-table {
        font-size: 11px;
    }
    
    .lighting-table th,
    .lighting-table td {
        padding: 6px 4px;
    }
    
    .shot-actions {
        flex-wrap: wrap;
    }
    
    .btn-shot-action {
        flex: 1 1 45%;
        min-width: 120px;
    }
}

/* ============================================
   END TWO-STATE SHOT CARD STYLES
   ============================================ */


/* Collapsible Sections */
.collapsible .collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.collapsible .collapsible-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    
    
}

.collapsible .chevron {
    transition: transform 0.3s ease;
    font-size: 14px;
    opacity: 0.6;
}

.collapsible.collapsed .chevron {
    transform: rotate(-90deg);
}

.collapsible > *:not(h2) {
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible.collapsed > *:not(h2) {
    display: none;
}

/* ============================================
   COST WARNING BANNER
   ============================================ */

.cost-warning-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cost-warning-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.cost-warning-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cost-warning-text {
    flex: 1;
    color: #856404;
}

.cost-warning-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #664d03;
}

.cost-breakdown {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    font-size: 15px;
    font-weight: 500;
}

.cost-item {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    color: #664d03;
}

.cost-item.total {
    background: #ffc107;
    color: #000;
    font-weight: 700;
}

.cost-separator {
    color: #856404;
    font-weight: bold;
}

.cost-note {
    font-size: 13px;
    color: #856404;
    margin-top: 6px;
}

.view-breakdown-link {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.view-breakdown-link:hover {
    color: #004499;
}

.cost-warning-dismiss {
    background: none;
    border: none;
    font-size: 28px;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cost-warning-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #664d03;
}


/* Credit Balance Chip in Header */
.credit-chip {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
}

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

.btn-buy-credits {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-buy-credits:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Credit Balance Large Display */
.credit-balance-large {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 16px;
  color: white;
  margin: 30px 0;
}

.credit-icon-large {
  font-size: 60px;
}

.balance-label {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.balance-amount {
  font-size: 42px;
  font-weight: 700;
  margin: 8px 0;
}

.balance-breakdown {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 8px;
}

/* Packages Section */
.packages-section {
  margin: 40px 0;
}

.packages-section h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
}

.section-description {
  color: var(--muted);
  margin: 0 0 20px 0;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Package Card */
.package-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.package-card.featured {
  border-color: #f5576c;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.package-card.featured::before {
  content: "BEST VALUE";
  position: absolute;
  top: 12px;
  right: -30px;
  background: #f5576c;
  color: white;
  padding: 4px 40px;
  font-size: 11px;
  font-weight: 700;
  transform: rotate(45deg);
  letter-spacing: 1px;
}

.package-type {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

.package-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.package-price {
  font-size: 36px;
  font-weight: 700;
  color: #667eea;
  margin: 12px 0;
}

.package-price-interval {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}

.package-credits {
  font-size: 18px;
  color: var(--muted);
  margin: 12px 0;
}

.package-credits strong {
  color: var(--text);
  font-weight: 600;
}

.package-description {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 20px 0;
  min-height: 40px;
}

.package-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.package-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--muted);
}

.package-features li::before {
  content: "✓";
  color: #667eea;
  font-weight: bold;
  margin-right: 8px;
}

.btn-buy-package {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-buy-package:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-buy-package:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Transactions List */
.transactions-container {
  margin: 30px 0;
}

.transactions-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.transaction-item {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.transaction-item:hover {
  background: rgba(102, 126, 234, 0.05);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info {
  flex: 1;
}

.transaction-type {
  font-weight: 600;
  margin-bottom: 4px;
}

.transaction-notes {
  font-size: 13px;
  color: var(--muted);
}

.transaction-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.transaction-amount {
  font-size: 20px;
  font-weight: 700;
  text-align: right;
}

.transaction-amount.positive {
  color: #10b981;
}

.transaction-amount.negative {
  color: #ef4444;
}

.transaction-balance {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}

/* Credit Cost Preview */
.credit-cost-preview {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.credit-cost-label {
  color: var(--muted);
  font-size: 13px;
}

.credit-cost-amount {
  font-weight: 600;
  color: #667eea;
}

/* Insufficient Credits Warning */
.insufficient-credits-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  color: #ef4444;
}

.insufficient-credits-warning .warning-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.insufficient-credits-warning .warning-action {
  margin-top: 12px;
}

.insufficient-credits-warning button {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}


/* Credit Badge on Buttons */
.credit-badge {
  display: inline-block;
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  letter-spacing: 0.3px;
}

button:hover .credit-badge {
  background: rgba(102, 126, 234, 0.3);
}

/* Shot Card Credit Cost Display */
.shot-credit-cost {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
  padding: 6px 10px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

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

.cost-amount {
  font-weight: 600;
  color: #667eea;
}

/* Project Cost Estimate */
.cost-estimate {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}

.estimate-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.estimate-amount {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 6px;
}

.estimate-breakdown {
  font-size: 12px;
  color: var(--muted);
}

/* Credit Warning Banner */
.credit-warning-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-warning-icon {
  font-size: 32px;
}

.credit-warning-content {
  flex: 1;
}

.credit-warning-title {
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 4px;
}

.credit-warning-message {
  font-size: 14px;
  color: var(--muted);
}

.credit-warning-action {
  margin-top: 12px;
}

.credit-warning-action button {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.credit-warning-action button:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Credit Success Message */
.credit-success-message {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-success-icon {
  font-size: 32px;
}

.credit-success-content {
  flex: 1;
}

.credit-success-title {
  font-weight: 600;
  color: #10b981;
  margin-bottom: 4px;
}

/* Low Balance Indicator in Header */
.credit-chip.low-balance {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  animation: pulse-warning 2s infinite;
}

.credit-chip.critical-balance {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: pulse-critical 1s infinite;
}

@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

@keyframes pulse-critical {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Operation Cost Preview Modal */
.cost-preview-modal {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  margin: 20px auto;
}

.cost-preview-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cost-preview-details {
  margin: 16px 0;
}

.cost-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cost-preview-row:last-child {
  border-bottom: none;
  font-weight: 600;
  font-size: 18px;
  color: #667eea;
}

.cost-preview-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.cost-preview-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-cost {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

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


/* Responsive */
@media (max-width: 768px) {
  .promo-content {
    flex-direction: column;
    text-align: center;
  }
  
  .promo-left {
    flex-direction: column;
  }
  
  .promo-right {
    flex-direction: column;
    width: 100%;
  }
  
  .promo-right button {
    width: 100%;
  }
}




#creditPackagesView .container {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

#creditPackagesView .dashboard {
  display: block;
  width: 100%;
}





#creditPackagesView .container {
  display: block !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 20px !important;
  min-height: 500px !important;
}

#creditPackagesView .dashboard {
  display: block !important;
  width: 100% !important;
  min-height: 300px !important;
}

#creditPackagesView .dashboard-hero {
  display: block !important;
  margin-bottom: 32px !important;
  padding: 20px !important;
  background: rgba(102, 126, 234, 0.1) !important;
  border-radius: 12px !important;
}

#creditPackagesView .dashboard-hero h1 {
  display: block !important;
  font-size: 32px !important;
  margin: 0 0 8px 0 !important;
  color: var(--text) !important;
}

#creditPackagesView .packages-section {
  display: block !important;
  width: 100% !important;
  margin-bottom: 40px !important;
}

#creditPackagesView .section-header {
  display: flex !important;
  width: 100% !important;
  padding: 16px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  margin-bottom: 20px !important;
}

#creditPackagesView .packages-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

#creditPackagesView .package-card {
  display: block !important;
  min-height: 200px !important;
  padding: 20px !important;
  background: var(--card) !important;
  border: 2px solid var(--border) !important;
  border-radius: 12px !important;
}



/* Top padding for header */
}

#creditPackagesView .dashboard,
#transactionHistoryView .dashboard {
  width: 100%;
}






/* ============================================================================
   SIMPLE CREDIT PACKAGES VIEW - Full Page, No Collapsing
   ============================================================================ */

.full-page-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow-y: auto;
  z-index: 10000;
}

.view-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

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

.view-header h1 {
  margin: 0;
  font-size: 32px;
}

.btn-back {
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.balance-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 48px;
}

.balance-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 700;
  color: #667eea;
}

.packages-grid-simple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.package-card-simple {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
}

.package-card-simple:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.package-card-simple.subscription {
  border-color: #667eea;
}

.package-card-simple.onetime {
  border-color: #10b981;
}

.package-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.package-type-badge.subscription {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

.package-type-badge.onetime {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.package-name {
  font-size: 24px;
  font-weight: 700;
  margin: 12px 0;
}

.package-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 0;
}

.package-credits {
  font-size: 18px;
  color: var(--muted);
  margin: 12px 0;
}

.package-description {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0;
  min-height: 40px;
}

.package-buy-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 16px;
}

.package-card-simple.subscription .package-buy-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.package-card-simple.onetime .package-buy-btn {
  background: linear-gradient(135deg, #34d399 0%, #047857 100%);
  color: white;
}


/* Button colors for inline package cards */
.package-card-inline.subscription .package-buy-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.package-card-inline.onetime .package-buy-btn {
  background: linear-gradient(135deg, #34d399 0%, #047857 100%);
  color: white;
}

.package-buy-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}


/* Buy Credits Button in Header */
.btn-buy-credits {
  padding: 8px 16px;
  margin-left: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy-credits:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}


/* Credits Display in Working View */
.credits-display {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
}

.credits-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.credits-amount {
  font-size: 32px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 16px;
}

.btn-want-more-credits {
  padding: 10px 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-want-more-credits:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}


/* ============================================================================
   INLINE CREDIT PACKAGES (In Subscribe Section)
   ============================================================================ */

.credits-balance-inline {
  text-align: center;
  padding: 20px;
  margin: 20px 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
}

.credits-label-inline {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 12px;
}

.credits-amount-inline {
  font-size: 28px;
  font-weight: 700;
  color: #10b981;
}

.packages-grid-inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.package-card-inline {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.package-card-inline:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.package-card-inline.subscription {
  border-color: #667eea;
}

.package-card-inline.onetime {
  border-color: #10b981;
}


/* ============================================
   PDF VIEWER ENHANCEMENTS
   ============================================ */
.screenplay-pdf-header {
    background: linear-gradient(135deg, #1a1d2e 0%, #2a2d3e 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-view-original-pdf {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-view-original-pdf:hover {
    background: linear-gradient(135deg, #5aadff 0%, #4587cd 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.btn-view-original-pdf span {
    font-size: 16px;
}

.screenplay-pdf-note {
    color: #a8b2c1;
    font-size: 13px;
    line-height: 1.4;
}

/* Improved Screenplay Formatting */
#screenplayContent {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    letter-spacing: 0.3px;
}

.screenplay-scene-heading {
    font-weight: bold;
    margin: 16px 0 8px 0;
    color: #4a9eff;
    cursor: pointer;
    padding: 4px 8px;
    border-left: 3px solid #4a9eff;
    background: rgba(74, 158, 255, 0.1);
    transition: all 0.2s ease;
}

.screenplay-scene-heading:hover {
    background: rgba(74, 158, 255, 0.2);
    border-left-width: 4px;
}

.screenplay-scene-heading.active {
    background: rgba(74, 158, 255, 0.25);
    border-left-color: #5aadff;
}


/* Cost breakdown styling */
.cost-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.cost-breakdown > div {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Wardrobe and Shot Other Costs Styling */
.cost-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cost-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
}

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

.cost-item-header strong {
    color: #1a1a1a;
    font-size: 0.95em;
}

.cost-value {
    font-weight: 700;
    color: #2e7d32;
    font-size: 1.1em;
}

.cost-item-details {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Scene Budget Details Styling - Dark Mode */
.scene-budget-details {
    background: #1a2f2f;
    border: 1px solid #2d4a4a;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.budget-details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cost-table-section {
    background: #243838;
    border: 1px solid #2d4a4a;
    border-radius: 6px;
    padding: 12px;
}

.cost-table-section h4 {
    margin: 0 0 12px 0;
    color: #81c784;
    font-size: 1.1em;
}

.cost-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    color: #e0e0e0;
}

.cost-detail-table thead {
    background: #1a2f2f;
}

.cost-detail-table th {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #2d4a4a;
    font-weight: 600;
    color: #90caf9;
}

.cost-detail-table td {
    padding: 8px 12px;
    border: 1px solid #2d4a4a;
    color: #e0e0e0;
}

.cost-detail-table tbody tr:hover {
    background: #2d4a4a;
}

.cost-detail-table th:nth-child(2),
.cost-detail-table th:nth-child(3),
.cost-detail-table th:nth-child(4),
.cost-detail-table th:nth-child(5),
.cost-detail-table td:nth-child(2),
.cost-detail-table td:nth-child(3),
.cost-detail-table td:nth-child(4),
.cost-detail-table td:nth-child(5) {
    text-align: right;
}

.cost-detail-table td:nth-child(2) {
    text-align: center;
}

/* ============================================
   EXPORT OPTIONS MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay .modal-content {
    background: #1a1d2e;
    border: 1px solid #2a2d3a;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2a2d3a;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    color: #e0e0e0;
}

.modal-body label {
    cursor: pointer;
    padding: 4px 8px;
    margin: 0 -8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-body label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-body input[type="checkbox"] {
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #2a2d3a;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-footer button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* ============================================================================
   SECTION ELABORATION STYLES
   ============================================================================ */

/* Elaborate modal */
.elaborate-modal {
    max-width: 500px;
}

.elaborate-modal .shot-context {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.elaborate-modal .benefits-list {
    margin: 12px 0;
    padding-left: 24px;
}

.elaborate-modal .benefits-list li {
    margin: 6px 0;
    line-height: 1.5;
}

.elaborate-modal .cost-estimate {
    background: #2a2d3a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
}

/* Section headers with elaborate controls */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}

.section-header h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Section badges */
.section-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: default;
    pointer-events: none;
}

.section-badge.baseline {
    background: #2a2d3a;
    color: #999;
}

.section-badge.elaborate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Elaborate section styling */
.shot-section.elaborate {
    border-left: 3px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
    padding-left: 12px;
}

.elaborate-content {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.elaborate-content h6 {
    color: #667eea;
    margin: 12px 0 6px 0;
    font-size: 13px;
}

.elaborate-content ul {
    margin: 6px 0;
    padding-left: 20px;
}

.elaborate-content li {
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.5;
}

.elaborate-content p {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Section actions */
.section-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Elaborate button */
.btn-elaborate {
    padding: 4px 10px;
    font-size: 11px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-elaborate:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-elaborate .spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Elaborate all button */
.btn-elaborate-all {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-weight: 600;
}

.btn-elaborate-all:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-elaborate-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Icon buttons for section actions */
.btn-icon {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #2a2d3a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    color: #eef1f7;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #667eea;
}

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

.btn-icon.danger:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Elaborate details table */
.elaborate-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
}

.elaborate-table th {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
}

.elaborate-table td {
    padding: 8px;
    border-bottom: 1px solid #2a2d3a;
}

.elaborate-table tr:last-child td {
    border-bottom: none;
}

/* Elaborate tag/pill */
.pill.elaborate-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-left: 8px;
}

/* Shot header with elaborate all button */
.shot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shot-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .btn-elaborate-all {
        font-size: 11px;
        padding: 5px 10px;
    }
}


/* ========================================
   PHASE 0A: CHECKBOX UI FOR SECTION ELABORATION
   ======================================== */

.elaborate-section-selector {
    background: rgba(26, 29, 46, 0.5);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.section-checkboxes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.checkbox-helpers {
    display: flex;
    gap: 8px;
}

.btn-text-small {
    background: none;
    border: none;
    color: #4a9eff;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-text-small:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #6bb0ff;
}

.section-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.checkbox-label:hover {
    background: rgba(15, 17, 24, 0.9);
    border-color: rgba(74, 158, 255, 0.4);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4a9eff;
}

.checkbox-label span {
    font-size: 13px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #4a9eff;
}

.elaborate-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(74, 158, 255, 0.2);
}

.credit-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
}

.credit-estimate .estimate-text {
    font-size: 13px;
    font-weight: 600;
    color: #4a9eff;
}

.btn-elaborate-all {
    flex-shrink: 0;
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .section-checkboxes {
        grid-template-columns: 1fr 1fr;
    }
    
    .elaborate-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn-elaborate-all {
        width: 100%;
    }
}

/* ========================================
   ELABORATE MODAL STYLES
   ======================================== */

.elaborate-modal-content {
    max-width: 500px;
    width: 90%;
}

.elaborate-modal-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin: -10px 0 20px 0;
}

.elaborate-modal-body {
    padding: 10px 0;
}

.elaborate-modal-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.modal-checkbox {
    background: rgba(15, 17, 24, 0.8);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.2s;
}

.modal-checkbox:hover {
    background: rgba(15, 17, 24, 1);
    border-color: rgba(74, 158, 255, 0.5);
}

.modal-checkbox input[type="checkbox"]:checked + span {
    color: #4a9eff;
}

.elaborate-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(74, 158, 255, 0.2);
}

.btn-elaborate-modal {
    padding: 12px 24px;
    font-size: 15px;
}

/* ========================================
   SHOT HEADER LAYOUT FIX
   ======================================== */

.shot-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.shot-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.shot-header-top h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.shot-header-top .pill {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Simple elaborate button for shot cards */
.btn-elaborate-shot {
    background: linear-gradient(135deg, #4a9eff 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
}

.btn-elaborate-shot:hover {
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    filter: brightness(1.1);
}

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

/* Scene collapse button styles */
#btnExpandAllScenes,
#btnCollapseAllScenes {
    min-width: auto;
}

/* Scene collapsed state indicator */
.scene.scene-collapsed .shots-grid {
    display: none !important;
}

.scene.scene-collapsed .scene-budget-details {
    display: none !important;
}

.scene.scene-collapsed .scene-collapse-icon {
    transform: rotate(-90deg);
}

/* Remove hover transform that causes layout shift */
.shot-card:hover {
    transform: none;
}

@media (max-width: 600px) {
    .elaborate-modal-sections {
        grid-template-columns: 1fr;
    }
    
    .elaborate-modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-elaborate-modal {
        width: 100%;
    }
}


/* Budget details no data message */
.budget-no-data {
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

.budget-no-data p {
    margin: 8px 0;
    line-height: 1.5;
}

.budget-no-data p:first-child {
    font-size: 16px;
}


/* ============================================
   EXPAND BUTTON STATES
   ============================================ */
.btn-expand-scene.all-expanded {
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: default;
    opacity: 0.9;
}

.btn-expand-scene:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-expand-scene:disabled:not(.all-expanded) {
    background: var(--bg-card);
}



/* ============================================
   VISUAL DESCRIPTION TRUNCATION
   ============================================ */

/* Description text container */
.description-text {
    position: relative;
}

.description-text p {
    margin: 0;
    white-space: pre-line;
}

/* Collapsed state - limit height */
.description-text.truncated p {
    max-height: 180px;
    overflow: hidden;
}

/* Fade gradient at bottom when truncated */
.description-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(15, 17, 24, 0.95));
    pointer-events: none;
}

/* Show more button styling */
.description-show-more {
    display: none;
    margin-top: 4px;
    text-align: left;
}

.description-text.truncated .description-show-more {
    display: block;
}

.description-show-more-link {
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    background: none;
    border: none;
    padding: 4px 0;
}

.description-show-more-link:hover {
    text-decoration: underline;
}

/* Show less button styling */
.description-show-less {
    display: none;
    margin-top: 8px;
    text-align: left;
}

.description-text.expanded .description-show-less {
    display: block;
}

.description-show-less-link {
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    background: none;
    border: none;
    padding: 4px 0;
}

.description-show-less-link:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Hide truncation when expanded */
.description-text.expanded p {
    max-height: none;
    overflow: visible;
}

.description-text.expanded::after {
    display: none;
}

.description-text.expanded .description-show-more {
    display: none;
}

/* Ensure elaborate content truncation works */
.elaborate-content.description-text {
    position: relative;
}

.elaborate-content.description-text.truncated p {
    max-height: 180px !important;
    overflow: hidden !important;
}

.elaborate-content.description-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

.elaborate-content.description-text.truncated .description-show-more {
    display: block;
}

.elaborate-content.description-text.expanded p {
    max-height: none !important;
    overflow: visible !important;
}

.elaborate-content.description-text.expanded .description-show-less {
    display: block;
}

.elaborate-content.description-text.expanded .description-show-more {
    display: none;
}

.elaborate-content.description-text.expanded::after {
    display: none;
}

/* ============================================
   FORCE DESCRIPTION TRUNCATION
   More specific rules to ensure truncation works
   ============================================ */

/* Force truncation on any element with truncated class */
.truncated p,
.description-text.truncated p,
.elaborate-content.truncated p,
.shot-section .truncated p {
    max-height: 180px !important;
    overflow: hidden !important;
}

/* Force show-more to display when truncated */
.truncated .description-show-more,
.description-text.truncated .description-show-more,
.elaborate-content.truncated .description-show-more {
    display: block !important;
}

/* Force show-less to hide when truncated */
.truncated .description-show-less,
.description-text.truncated .description-show-less,
.elaborate-content.truncated .description-show-less {
    display: none !important;
}

/* Force gradient overlay when truncated */
.truncated::after,
.description-text.truncated::after,
.elaborate-content.truncated::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: 24px !important;
    left: 0 !important;
    right: 0 !important;
    height: 50px !important;
    background: linear-gradient(to bottom, transparent, rgba(15, 17, 24, 0.95)) !important;
    pointer-events: none !important;
}

/* When expanded - remove all truncation */
.expanded p,
.description-text.expanded p,
.elaborate-content.expanded p {
    max-height: none !important;
    overflow: visible !important;
}

.expanded .description-show-more,
.description-text.expanded .description-show-more,
.elaborate-content.expanded .description-show-more {
    display: none !important;
}

.expanded .description-show-less,
.description-text.expanded .description-show-less,
.elaborate-content.expanded .description-show-less {
    display: block !important;
}

.expanded::after,
.description-text.expanded::after,
.elaborate-content.expanded::after {
    display: none !important;
}

/* ============================================
   CHARACTER PORTRAIT GENERATION
   ============================================ */

.btn-generate-portrait {
    transition: all 0.2s ease;
}

.btn-generate-portrait:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.3);
}

.btn-generate-portrait:disabled {
    cursor: not-allowed;
}

.btn-generate-portrait .spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

.character-portrait-container {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.character-portrait-img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.character-portrait-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
}

.character-card {
    transition: all 0.2s ease;
}

.character-card:hover {
    background: rgba(74, 158, 255, 0.15) !important;
}

/* ============================================
   ENTITY GALLERIES (Characters, Locations, Props)
   ============================================ */

.entity-count {
    font-size: 14px;
    font-weight: normal;
    color: var(--muted);
    margin-left: 8px;
}

.entity-gallery-section {
    padding: 16px 0;
}

.entity-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.entity-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.entity-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: rgba(15, 17, 24, 0.4);
    border-radius: 12px;
    border: 2px dashed var(--border);
}

.entity-card {
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.entity-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.entity-card-image {
    width: 100%;
    aspect-ratio: 2/3; /* Portrait for characters */
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.entity-card-image.landscape {
    aspect-ratio: 3/2; /* Landscape for locations */
}

.entity-card-image.square {
    aspect-ratio: 1/1; /* Square for props */
}

.entity-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entity-card-image .no-image {
    color: var(--muted);
    font-size: 48px;
    opacity: 0.3;
}

.entity-card-image .generate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.entity-card:hover .generate-overlay {
    opacity: 1;
}

.entity-card-info {
    padding: 12px;
}

.entity-card-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-card-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px 12px;
}

.entity-card-actions button {
    flex: 1;
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 6px;
}

/* Button text labels for entity card actions (#11 clarity) */
.entity-card-actions .btn-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.btn-generate-entity {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%) !important;
}

.btn-generate-entity:hover:not(:disabled) {
    background: linear-gradient(135deg, #ae5ff0 0%, #8c3dd0 100%) !important;
}

.btn-edit-entity {
    background: rgba(74, 158, 255, 0.2) !important;
    border: 1px solid rgba(74, 158, 255, 0.4) !important;
    color: var(--accent) !important;
}

.btn-delete-entity {
    background: rgba(255, 107, 107, 0.2) !important;
    border: 1px solid rgba(255, 107, 107, 0.4) !important;
    color: #ff6b6b !important;
}

/* Entity Edit Modal */
.entity-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.entity-modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.entity-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.entity-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.entity-modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

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

.entity-form-group {
    margin-bottom: 16px;
}

.entity-form-group label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.entity-form-group input,
.entity-form-group textarea,
.entity-form-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.entity-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.entity-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.entity-modal-actions button {
    flex: 1;
}

/* ============================================
   CREW LIST & BUDGET SUMMARY
   ============================================ */

.crew-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crew-department {
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.crew-department-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(74, 158, 255, 0.1);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.crew-department-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--accent);
}

.crew-department-total {
    font-size: 12px;
    color: var(--muted);
}

.crew-members {
    padding: 10px;
}

.crew-member {
    display: grid;
    grid-template-columns: 50px 1fr 150px 100px 80px;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: rgba(15, 17, 24, 0.4);
    border-radius: 8px;
    margin-bottom: 8px;
}

.crew-member:last-child {
    margin-bottom: 0;
}

.crew-member-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.crew-member-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--muted);
}

.crew-member-info {
    display: flex;
    flex-direction: column;
}

.crew-member-position {
    font-weight: 600;
    font-size: 13px;
}

.crew-member-name {
    font-size: 12px;
    color: var(--muted);
}

.crew-member-name.filled {
    color: var(--accent);
}

.crew-member-rate {
    font-size: 12px;
    color: var(--text);
}

.crew-member-total {
    font-weight: 600;
    color: #9dff8c;
    font-size: 13px;
}

.crew-member-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
}

.crew-member-status.planned { background: rgba(150, 150, 150, 0.3); color: #aaa; }
.crew-member-status.contacted { background: rgba(255, 193, 7, 0.3); color: #ffc107; }
.crew-member-status.negotiating { background: rgba(255, 152, 0, 0.3); color: #ff9800; }
.crew-member-status.confirmed { background: rgba(76, 175, 80, 0.3); color: #4caf50; }
.crew-member-status.wrapped { background: rgba(156, 39, 176, 0.3); color: #9c27b0; }

.crew-member-actions {
    display: flex;
    gap: 4px;
}

.crew-member-actions button {
    padding: 4px 8px;
    font-size: 11px;
}

/* Budget Summary */
.budget-summary-section {
    padding: 16px 0;
}

.budget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.budget-category {
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.budget-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.budget-category-title {
    font-weight: 600;
    font-size: 14px;
}

.budget-category-total {
    font-weight: 700;
    font-size: 16px;
    color: #9dff8c;
}

.budget-category-items {
    font-size: 12px;
    color: var(--muted);
}

.budget-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.budget-grand-total {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(157, 255, 140, 0.1) 0%, rgba(76, 175, 80, 0.1) 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.budget-grand-total-label {
    font-weight: 600;
    font-size: 16px;
}

.budget-grand-total-value {
    font-weight: 700;
    font-size: 24px;
    color: #9dff8c;
}

/* Entity Edit Modal Enhancement */
.entity-modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.entity-modal-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px 6px 0 0;
}

.entity-modal-tab.active {
    background: rgba(74, 158, 255, 0.2);
    color: var(--accent);
}

.entity-modal-panel {
    display: none;
}

.entity-modal-panel.active {
    display: block;
}

/* Image upload */
.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 10px 0;
}

.image-upload-area:hover {
    border-color: var(--accent);
    background: rgba(74, 158, 255, 0.05);
}

.image-upload-area.has-image {
    padding: 10px;
}

.image-upload-area img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
}

.image-upload-label {
    color: var(--muted);
    font-size: 13px;
}

.imdb-link {
    color: #f5c518;
    text-decoration: none;
    font-size: 12px;
}

.imdb-link:hover {
    text-decoration: underline;
}

/* Cast/Confirmed badges */
.entity-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.entity-badge.cast { background: rgba(76, 175, 80, 0.3); color: #4caf50; }
.entity-badge.confirmed { background: rgba(76, 175, 80, 0.3); color: #4caf50; }
.entity-badge.ai { background: rgba(156, 78, 221, 0.3); color: #9d4edd; }
.entity-badge.uploaded { background: rgba(74, 158, 255, 0.3); color: var(--accent); }

/* ============================================
   SHOOTING SCHEDULE
   ============================================ */

.schedule-section {
    padding: 16px 0;
}

.shooting-days-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shooting-day-card {
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.shooting-day-card.status-confirmed {
    border-color: rgba(76, 175, 80, 0.5);
}

.shooting-day-card.status-shooting {
    border-color: rgba(255, 152, 0, 0.5);
    animation: pulse-border 2s infinite;
}

.shooting-day-card.status-wrapped {
    border-color: rgba(156, 39, 176, 0.3);
    opacity: 0.8;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(255, 152, 0, 0.5); }
    50% { border-color: rgba(255, 152, 0, 1); }
}

.shooting-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(74, 158, 255, 0.1);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.shooting-day-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shooting-day-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    min-width: 50px;
}

.shooting-day-date {
    font-size: 14px;
    color: var(--text);
}

.shooting-day-location {
    font-size: 12px;
    color: var(--muted);
}

.shooting-day-times {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.time-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    background: rgba(15, 17, 24, 0.6);
    border-radius: 6px;
}

.time-badge-label {
    font-size: 10px;
    color: var(--muted);
}

.time-badge-value {
    font-weight: 600;
    color: var(--text);
}

.shooting-day-content {
    padding: 16px;
    display: none;
}

.shooting-day-card.expanded .shooting-day-content {
    display: block;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.schedule-section-box {
    background: rgba(15, 17, 24, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.schedule-section-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--accent);
}

.scheduled-scene {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(15, 17, 24, 0.6);
    border-radius: 6px;
    margin-bottom: 6px;
}

.scheduled-scene:last-child {
    margin-bottom: 0;
}

.scheduled-scene-info {
    display: flex;
    flex-direction: column;
}

.scheduled-scene-heading {
    font-size: 13px;
    font-weight: 500;
}

.scheduled-scene-meta {
    font-size: 11px;
    color: var(--muted);
}

.cast-call-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(15, 17, 24, 0.6);
    border-radius: 6px;
    margin-bottom: 6px;
}

.cast-call-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.cast-call-info {
    flex: 1;
}

.cast-call-name {
    font-size: 12px;
    font-weight: 500;
}

.cast-call-character {
    font-size: 11px;
    color: var(--muted);
}

.cast-call-times {
    display: flex;
    gap: 8px;
    font-size: 11px;
}

.cast-call-time {
    padding: 2px 6px;
    background: rgba(15, 17, 24, 0.6);
    border-radius: 4px;
}

/* Day Out of Days Modal */
.dood-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dood-table th,
.dood-table td {
    padding: 6px 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.dood-table th {
    background: rgba(74, 158, 255, 0.1);
}

.dood-table .character-cell {
    text-align: left;
    min-width: 150px;
}

.dood-cell-W { background: rgba(76, 175, 80, 0.3); color: #4caf50; }
.dood-cell-H { background: rgba(255, 193, 7, 0.3); color: #ffc107; }
.dood-cell-S { background: rgba(74, 158, 255, 0.3); color: var(--accent); }

/* ============================================
   STORYBOARD
   ============================================ */

.storyboard-section {
    padding: 16px 0;
}

.storyboard-grid {
    display: grid;
    gap: 16px;
}

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

.storyboard-grid.layout-filmstrip {
    grid-template-columns: repeat(6, 1fr);
}

.storyboard-grid.layout-timeline {
    grid-template-columns: 1fr;
}

.storyboard-scene {
    margin-bottom: 24px;
}

.storyboard-scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
}

.storyboard-scene-title {
    font-weight: 600;
    font-size: 14px;
}

.storyboard-scene-meta {
    font-size: 12px;
    color: var(--muted);
}

.storyboard-shots {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 17, 24, 0.4);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
}

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

.storyboard-shots.layout-filmstrip {
    grid-template-columns: repeat(6, 1fr);
}

.storyboard-shots.layout-timeline {
    grid-template-columns: 1fr;
}

.storyboard-shot {
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.storyboard-shot:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.storyboard-shot.status-complete {
    border-color: rgba(76, 175, 80, 0.5);
}

.storyboard-shot.status-in_can {
    border-color: rgba(156, 39, 176, 0.5);
}

.storyboard-shot.status-shooting {
    border-color: rgba(255, 152, 0, 0.7);
    animation: pulse-border 2s infinite;
}

.storyboard-shot-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--border);
}

.storyboard-shot-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--muted);
    font-size: 24px;
}

.storyboard-shot-info {
    padding: 8px;
}

.storyboard-shot-id {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}

.storyboard-shot-name {
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.storyboard-shot-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}

.storyboard-shot-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
}

.storyboard-shot-status.planned { background: rgba(150, 150, 150, 0.3); }
.storyboard-shot-status.scheduled { background: rgba(74, 158, 255, 0.3); color: var(--accent); }
.storyboard-shot-status.shooting { background: rgba(255, 152, 0, 0.3); color: #ff9800; }
.storyboard-shot-status.in_can { background: rgba(156, 39, 176, 0.3); color: #9c27b0; }
.storyboard-shot-status.complete { background: rgba(76, 175, 80, 0.3); color: #4caf50; }

/* Timeline layout specific */
.layout-timeline .storyboard-shot {
    display: grid;
    grid-template-columns: 200px 1fr;
}

.layout-timeline .storyboard-shot-image,
.layout-timeline .storyboard-shot-placeholder {
    aspect-ratio: 16/9;
    height: 100%;
}

.layout-timeline .storyboard-shot-info {
    padding: 12px;
}

.layout-timeline .storyboard-shot-description {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Call Sheet Modal */
.call-sheet-preview {
    background: white;
    color: #000;
    padding: 20px;
    font-family: Arial, sans-serif;
    max-height: 70vh;
    overflow-y: auto;
}

.call-sheet-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.call-sheet-title {
    font-size: 24px;
    font-weight: bold;
}

.call-sheet-day {
    font-size: 18px;
    color: #666;
}

.call-sheet-section {
    margin-bottom: 16px;
}

.call-sheet-section h4 {
    background: #eee;
    padding: 6px 10px;
    margin: 0 0 8px 0;
    font-size: 14px;
}

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

.call-sheet-table th,
.call-sheet-table td {
    padding: 6px 8px;
    border: 1px solid #ccc;
    text-align: left;
}

.call-sheet-table th {
    background: #f5f5f5;
}

/* Entity Prompt Textarea */
.entity-prompt-area {
    padding: 12px;
    background: var(--card-bg, #1a1a2e);
    border-radius: 8px;
    min-height: 150px;
}

.entity-prompt-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.5;
    background: var(--input-bg, #0d0d1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 6px;
    color: var(--text-color, #e0e0e0);
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.entity-prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-color, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.entity-prompt-textarea::placeholder {
    color: var(--muted-color, #666);
    font-style: italic;
}

.entity-prompt-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-generate-entity {
    padding: 8px 16px;
    font-size: 13px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-generate-entity:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

/* Entity Card Header with Rank Badge */
.entity-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.entity-rank-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.entity-rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #1a1a2e;
    font-weight: 600;
}

.entity-rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #1a1a2e;
}

.entity-rank-badge.rank-3 {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.entity-rank-badge.rank-4 {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.entity-rank-badge.rank-5 {
    background: rgba(55, 65, 81, 0.3);
    color: #6b7280;
    border: 1px solid rgba(55, 65, 81, 0.3);
}

.entity-card-stats {
    font-size: 12px;
    color: var(--muted-color, #888);
    margin: 4px 0;
}

/* Entity Prompt Section - Always Visible */
.entity-prompt-section {
    margin-top: 8px;
    border: 1px solid var(--border-color, #2a2d3a);
    border-radius: 6px;
    background: var(--card-bg-secondary, #1a1c24);
    overflow: hidden;
}

.entity-prompt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    background: var(--header-bg, #22252e);
    transition: background 0.2s;
}

.entity-prompt-header:hover {
    background: var(--hover-bg, #2a2d3a);
}

.prompt-toggle-icon {
    font-size: 10px;
    color: var(--text-muted, #888);
    transition: transform 0.2s;
}

.prompt-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #aaa);
}

.prompt-status {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.prompt-status.has-prompt {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.prompt-status.no-prompt {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.entity-prompt-content {
    padding: 10px;
    border-top: 1px solid var(--border-color, #2a2d3a);
}

.entity-prompt-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid var(--border-color, #2a2d3a);
    border-radius: 4px;
    background: var(--input-bg, #12141a);
    color: var(--text-primary, #eee);
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
}

.entity-prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-color, #6366f1);
}

.entity-prompt-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.entity-image-display {
    position: relative;
    margin-bottom: 8px;
}

.entity-image-display img {
    width: 100%;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.entity-image-display img:hover {
    opacity: 0.9;
}

/* When there's both image and prompt, stack them nicely */
.entity-card-image {
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   ACTORS MANAGEMENT STYLES
   ============================================================================ */

/* Actor cards in gallery */
.actor-card {
    position: relative;
}

.actor-card .entity-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 8px;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.2s;
}

.actor-card:hover .entity-image-overlay {
    opacity: 1;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
}

.btn-icon:hover {
    background: white;
    transform: scale(1.1);
}

/* Project actors list */
.project-actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.project-actor-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #333);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.project-actor-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent, #6366f1);
}

.project-actor-info {
    flex: 1;
}

.project-actor-name {
    font-weight: 600;
    font-size: 14px;
}

.project-actor-rate {
    font-size: 12px;
    color: var(--muted, #888);
}

.project-actor-characters {
    font-size: 11px;
    color: var(--accent, #6366f1);
    margin-top: 2px;
}

.project-actor-actions {
    display: flex;
    gap: 4px;
}

/* Actor selection modal */
.actors-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.actor-select-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.actor-select-item:hover {
    border-color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

.actor-select-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.actor-select-info {
    flex: 1;
}

.actor-select-name {
    font-weight: 600;
}

.actor-select-rate {
    font-size: 12px;
    color: var(--muted, #888);
}

/* Form row for side-by-side inputs */
.form-row {
    display: flex;
    gap: 12px;
}

/* Button link style */
.btn-link {
    background: none;
    border: none;
    color: var(--accent, #6366f1);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
}

.btn-link:hover {
    color: var(--accent-light, #818cf8);
}

/* Upload button in entity cards */
.entity-card .upload-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.entity-card:hover .upload-btn {
    opacity: 1;
}

.entity-card .upload-btn:hover {
    background: var(--accent, #6366f1);
}

/* Enhanced character edit modal */
.modal-content.modal-medium {
    max-width: 600px;
    width: 90%;
}

.btn-danger {
    background: linear-gradient(180deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger:hover {
    background: linear-gradient(180deg, #c82333, #bd2130);
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
}

.assigned-actor-card {
    border: 1px solid var(--border);
}

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

#editCharacterModal .form-group {
    margin-bottom: 12px;
}

#editCharacterModal .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--muted);
}

#editCharacterModal .form-group input,
#editCharacterModal .form-group select,
#editCharacterModal .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

#editCharacterModal .form-group select {
    cursor: pointer;
}

/* Upload button on entity cards */
.btn-upload-entity {
    background: linear-gradient(180deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn-upload-entity:hover {
    background: linear-gradient(180deg, #5a6268, #4e555b);
}

/* ============================================================================
   MY CREW MEMBERS & MY LOCATIONS STYLES
   ============================================================================ */

/* Badge variants */
.badge.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.badge.muted {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: var(--muted);
}

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

/* Assignment table */
.assign-table {
    width: 100%;
    border-collapse: collapse;
}

.assign-table th,
.assign-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.assign-table th {
    background: var(--bg-dark);
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

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

.assign-table select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}

.assign-table select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Form row for side-by-side fields */
.form-row {
    display: flex;
    gap: 12px;
}

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

/* Crew member and location cards */
.crew-member-card,
.location-card {
    min-width: 180px;
}

.crew-member-card .entity-card-image,
.location-card .entity-card-image.landscape {
    height: 120px;
}

/* Portrait images for crew */
.entity-card-image.portrait {
    height: 150px;
}

.entity-card-image.portrait img {
    object-fit: cover;
    object-position: top center;
}

/* Landscape images for locations */
.entity-card-image.landscape {
    height: 100px;
}

.entity-card-image.landscape img {
    object-fit: cover;
    object-position: center;
}

/* Modal improvements for assign modals */
.modal-content .tiny.muted {
    line-height: 1.5;
}

/* Small button next to badges */
.badge + .btn-small {
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 11px;
}

/* ============================================================================
   CREW CARDS - Enhanced styling for AI-extracted crew
   ============================================================================ */

.crew-department {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.crew-department-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.dept-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.dept-count {
    font-size: 12px;
    color: var(--muted);
}

.dept-total {
    margin-left: auto;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
}

.crew-positions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    padding: 10px;
    background: var(--bg);
}

.crew-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.crew-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.crew-position {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.crew-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 500;
}

.crew-card-body {
    padding: 10px 12px;
}

.crew-assigned,
.crew-unassigned {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.crew-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.crew-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.crew-name {
    font-size: 13px;
    color: var(--text);
}

.crew-name.muted {
    color: var(--muted);
    font-style: italic;
}

.crew-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 6px 0;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.rate-detail {
    color: var(--muted);
}

.rate-total {
    font-weight: 600;
    color: var(--accent-2);
}

.crew-notes {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crew-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
}

.btn-small {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}

.btn-small:hover {
    background: var(--border);
}

.btn-small.btn-danger {
    color: #ff6b6b;
    border-color: #ff6b6b33;
}

.btn-small.btn-danger:hover {
    background: #ff6b6b22;
}

/* ============================================================================
   SHOOTING SCHEDULE STYLES
   ============================================================================ */

.shooting-day-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.day-number-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
}

.day-date {
    font-size: 14px;
    color: var(--text);
}

.day-status {
    margin-left: auto;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
}

.day-card-times {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.day-card-times strong {
    color: var(--text);
}

.day-card-location {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.day-card-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.day-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.btn-small:hover {
    background: var(--border);
}

.btn-small.btn-primary {
    background: linear-gradient(180deg, #2a6dff, #2055c9);
    border: none;
    color: #fff;
}

.btn-small.btn-danger {
    background: #dc3545;
    border: none;
    color: #fff;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin: 0 0 16px 0;
    color: var(--text);
}

/* Day Out of Days Table */
.dood-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.dood-table th,
.dood-table td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    text-align: center;
}

.dood-table th {
    background: var(--bg);
    font-weight: bold;
}

.dood-table td:first-child,
.dood-table td:nth-child(2) {
    text-align: left;
}

.dood-work {
    background: #28a745;
    color: #fff;
    font-weight: bold;
}

.dood-hold {
    background: #ffc107;
    color: #000;
}

/* Crew Schedule Table */
.crew-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 12px;
}

.crew-schedule-table th,
.crew-schedule-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.crew-schedule-table th {
    background: var(--bg);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 10px;
}

.crew-schedule-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Scene Action Buttons - Improved Layout */
.scene-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.scene-actions .btn-scene-action {
    font-size: 12px;
    padding: 6px 12px;
    white-space: nowrap;
}

.scene-actions .btn-scene-action.btn-secondary {
    background: linear-gradient(180deg, #3a3f50, #2a2f40);
    border: 1px solid var(--border);
}

.scene-actions .btn-scene-action.btn-secondary:hover {
    background: linear-gradient(180deg, #4a4f60, #3a3f50);
}

/* ============================================
   STRIPBOARD STYLES
   ============================================ */

.stripboard-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 0;
    min-height: 400px;
}

.stripboard-column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.stripboard-column.unscheduled {
    background: #1a1a2e;
    border-color: #333;
    min-width: 300px;
}

.stripboard-column-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: #1a1f2e;
    border-radius: 10px 10px 0 0;
}

.stripboard-column-header h3 {
    margin: 0 0 4px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stripboard-column-header .day-date {
    font-size: 12px;
    color: var(--muted);
}

.stripboard-column-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

.stripboard-column-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stripboard-drops {
    flex: 1;
    padding: 8px;
    min-height: 200px;
    overflow-y: auto;
}

.stripboard-drops.drag-over {
    background: rgba(118, 199, 255, 0.1);
    border: 2px dashed var(--accent);
    border-radius: 8px;
}

/* Scene Strip */
.scene-strip {
    display: flex;
    align-items: stretch;
    margin-bottom: 6px;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid rgba(0,0,0,0.2);
}

.scene-strip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scene-strip.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.scene-strip-color {
    width: 8px;
    flex-shrink: 0;
}

.scene-strip-content {
    flex: 1;
    padding: 8px 10px;
    background: #2a2f40;
    color: var(--text);
}

.scene-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.scene-strip-number {
    font-weight: bold;
    font-size: 13px;
}

.scene-strip-pages {
    font-size: 11px;
    color: var(--muted);
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.scene-strip-heading {
    font-size: 11px;
    color: #ccc;
    line-height: 1.3;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scene-strip-meta {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    font-size: 10px;
    color: var(--muted);
}

.scene-strip-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Legend */
.stripboard-legend {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
    margin-left: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

/* Empty state */
.stripboard-empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-size: 13px;
}

.stripboard-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Drop placeholder */
.strip-drop-placeholder {
    height: 50px;
    border: 2px dashed var(--accent);
    border-radius: 4px;
    background: rgba(118, 199, 255, 0.1);
    margin-bottom: 6px;
}

/* Compact view */
.stripboard-container.compact .scene-strip-content {
    padding: 4px 8px;
}

.stripboard-container.compact .scene-strip-heading {
    display: none;
}

.stripboard-container.compact .scene-strip-meta {
    margin-top: 2px;
}

/* Add Day Button in Stripboard */
.stripboard-add-day {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 2px dashed var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 24px;
    color: var(--muted);
}

.stripboard-add-day:hover {
    background: rgba(118, 199, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================================
   STRIPBOARD STYLES
   ============================================================================ */

.stripboard-section {
    padding: 8px 0;
}

.stripboard-legend {
    display: flex;
    gap: 16px;
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.legend-color.int { background: #4a90d9; }
.legend-color.ext { background: #d9944a; }
.legend-color.day { background: #f9e79f; }
.legend-color.night { background: #85c1e9; }

.stripboard-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 0;
    min-height: 400px;
}

.stripboard-column {
    min-width: 280px;
    max-width: 320px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.stripboard-column.unscheduled {
    background: #1a1a2e;
    border-color: #3a3f50;
}

.stripboard-column-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stripboard-column-header .day-info {
    font-size: 11px;
    color: var(--muted);
}

.stripboard-strips {
    flex: 1;
    padding: 8px;
    min-height: 300px;
    overflow-y: auto;
}

.stripboard-strips.drag-over {
    background: rgba(118, 199, 255, 0.1);
    border: 2px dashed var(--accent);
}

/* Scene Strip */
.scene-strip {
    background: linear-gradient(180deg, #2a2f3a, #1f232d);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scene-strip:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.scene-strip.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.scene-strip.drag-preview {
    background: var(--accent);
    opacity: 0.8;
}

/* Strip Type Indicators */
.strip-indicator {
    width: 6px;
    height: 100%;
    min-height: 32px;
    border-radius: 3px;
    flex-shrink: 0;
}

.strip-indicator.int { background: #4a90d9; }
.strip-indicator.ext { background: #d9944a; }

/* Strip Content */
.strip-content {
    flex: 1;
    min-width: 0;
}

.strip-scene-num {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.strip-heading {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.strip-meta {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    font-size: 10px;
}

.strip-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.strip-badge.day {
    background: #f9e79f;
    color: #7d6608;
}

.strip-badge.night {
    background: #85c1e9;
    color: #1a5276;
}

.strip-badge.pages {
    background: var(--border);
    color: var(--muted);
}

.strip-badge.shots {
    background: #2a6dff33;
    color: var(--accent);
}

/* Strip Characters */
.strip-characters {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.strip-char-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3a3f50;
    border: 1px solid var(--border);
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.strip-char-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Empty column state */
.stripboard-empty {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    margin: 8px;
}

/* ============================================================================
   DAILY PROGRESS REPORT (DPR) STYLES
   ============================================================================ */

.dpr-section {
    padding: 8px 0;
}

.dpr-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

/* DPR Summary Cards */
.dpr-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dpr-summary-card {
    background: #1a1f2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.dpr-summary-card.success {
    background: rgba(40, 167, 69, 0.15);
    border-color: #28a745;
}

.dpr-summary-card.warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
}

.dpr-summary-card.danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
}

.dpr-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.dpr-summary-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
}

.dpr-summary-detail {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* Status Banner */
.dpr-status-banner {
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 16px;
}

.dpr-status-banner.on_schedule {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 2px solid #28a745;
}

.dpr-status-banner.ahead {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 2px solid #007bff;
}

.dpr-status-banner.behind {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 2px solid #dc3545;
}

/* Time Log */
.dpr-time-log {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.dpr-time-box {
    background: #1a1f2e;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.dpr-time-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
}

.dpr-time-value {
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: var(--accent);
}

.dpr-time-input {
    width: 80px;
    text-align: center;
    background: #0b0d13;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px;
    border-radius: 4px;
}

/* Scenes Table */
.dpr-scenes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.dpr-scenes-table th {
    background: #2a2f3a;
    padding: 10px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
}

.dpr-scenes-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.dpr-scene-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dpr-scene-status:hover {
    transform: scale(1.05);
}

.dpr-scene-status.not_started {
    background: #6c757d;
    color: #fff;
}

.dpr-scene-status.in_progress {
    background: #ffc107;
    color: #000;
}

.dpr-scene-status.completed {
    background: #28a745;
    color: #fff;
}

.dpr-scene-status.held {
    background: #dc3545;
    color: #fff;
}

/* Notes Section */
.dpr-notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.dpr-notes-box {
    background: #1a1f2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.dpr-notes-header {
    font-weight: bold;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dpr-notes-textarea {
    width: 100%;
    min-height: 80px;
    background: #0b0d13;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 8px;
    resize: vertical;
}

/* Delays Section */
.dpr-delays {
    margin-bottom: 16px;
}

.dpr-delay-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.dpr-delay-reason {
    font-weight: bold;
    min-width: 120px;
}

.dpr-delay-duration {
    background: #dc3545;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.dpr-add-delay {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dpr-add-delay input,
.dpr-add-delay select {
    background: #0b0d13;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px;
    border-radius: 4px;
}

/* ============================================================================
   BUDGET TRACKING STYLES
   ============================================================================ */

.budget-dashboard {
    margin-bottom: 20px;
}

.budget-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.budget-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.budget-card-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.budget-card-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.budget-allocated .budget-card-value { color: #60a5fa; }
.budget-spent .budget-card-value { color: #f87171; }
.budget-committed .budget-card-value { color: #fbbf24; }
.budget-remaining .budget-card-value { color: #4ade80; }

.budget-progress-container {
    margin-bottom: 24px;
}

.budget-progress-bar {
    height: 24px;
    background: #1f232d;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}

.budget-progress-spent {
    background: linear-gradient(90deg, #ef4444, #f87171);
    transition: width 0.5s ease;
}

.budget-progress-committed {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.5s ease;
}

.budget-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.budget-category-row {
    display: grid;
    grid-template-columns: 200px 1fr 150px 60px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.budget-category-row:hover {
    background: #1a1f2e;
}

.budget-cat-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-cat-code {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: #1f232d;
    padding: 2px 6px;
    border-radius: 4px;
}

.budget-cat-name {
    font-weight: 500;
}

.budget-cat-bar {
    height: 8px;
    background: #1f232d;
    border-radius: 4px;
    overflow: hidden;
}

.budget-cat-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.budget-cat-amounts {
    text-align: right;
    font-size: 13px;
}

.budget-cat-amounts .spent {
    font-weight: bold;
}

.budget-cat-amounts .allocated {
    color: var(--text-muted);
}

.budget-cat-pct {
    font-weight: bold;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.budget-cat-pct.ok { color: #4ade80; }
.budget-cat-pct.warning { color: #fbbf24; }
.budget-cat-pct.over { color: #ef4444; background: rgba(239, 68, 68, 0.2); }

.subsection-divider {
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.subsection-divider h3 {
    margin: 0 0 4px;
}

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

/* ============================================================================
   COMPETITIVE ANALYSIS STYLES
   ============================================================================ */

.competitive-analysis-container {
    margin-top: 16px;
}

.analysis-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.analysis-card {
    padding: 20px;
    background: linear-gradient(135deg, #1a1f2e 0%, #12151f 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
}

.analysis-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.analysis-card-value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.analysis-card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.analysis-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.analysis-section h4 {
    margin: 0 0 16px;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.revenue-projections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 16px;
}

.revenue-column {
    text-align: center;
    padding: 16px;
    background: #12151f;
    border-radius: 8px;
}

.revenue-header {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 14px;
}

.revenue-range {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.revenue-low, .revenue-high {
    font-size: 14px;
    color: var(--text-muted);
}

.revenue-mid {
    font-size: 24px;
    font-weight: bold;
    color: #4ade80;
}

.revenue-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.roi-scenarios {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px;
    background: #1a1f2e;
    border-radius: 8px;
}

.roi-item {
    font-size: 13px;
}

.roi-item strong {
    color: #fbbf24;
}

/* Comparable Films Table */
.comps-table-container {
    overflow-x: auto;
}

.comps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comps-table th {
    text-align: left;
    padding: 10px 12px;
    background: #1a1f2e;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.comps-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.comps-table tbody tr:hover {
    background: #1a1f2e;
}

.comp-title {
    font-weight: bold;
}

.comp-reason {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.roi-positive {
    color: #4ade80;
    font-weight: bold;
}

.roi-negative {
    color: #f87171;
}

.similarity-bar {
    width: 60px;
    height: 6px;
    background: #1f232d;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.similarity-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Market Analysis */
.market-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.market-item {
    font-size: 14px;
}

.competition-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.competition-badge.low { background: #065f46; color: #6ee7b7; }
.competition-badge.medium { background: #854d0e; color: #fde047; }
.competition-badge.high { background: #9a3412; color: #fdba74; }
.competition-badge.very_high { background: #7f1d1d; color: #fca5a5; }

.market-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.market-column h5 {
    margin: 0 0 12px;
    font-size: 14px;
}

.market-column ul {
    margin: 0;
    padding-left: 20px;
}

.market-column li {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

/* Recommendations */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rec-column h5 {
    margin: 0 0 12px;
    font-size: 14px;
}

.rec-column ul {
    margin: 0;
    padding-left: 20px;
}

.rec-column li {
    margin-bottom: 6px;
    font-size: 13px;
}

.rec-column li.strength::marker {
    color: #4ade80;
}

.rec-column li.improve::marker {
    color: #fbbf24;
}

/* Streaming */
.streaming-info {
    display: flex;
    gap: 32px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .budget-summary-cards,
    .analysis-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .revenue-projections-grid,
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .budget-category-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ============================================================================
   BUDGET DASHBOARD
   ============================================================================ */

.budget-dashboard {
    margin-top: 16px;
}

.budget-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.budget-card {
    background: linear-gradient(135deg, #1f232d 0%, #161922 100%);
    border: 1px solid #2a2f3a;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.budget-card-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.budget-card-value {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.budget-card-value.spent { color: #ef4444; }
.budget-card-value.committed { color: #f59e0b; }
.budget-card-value.remaining { color: #22c55e; }

.budget-progress-container {
    margin-bottom: 16px;
}

.budget-progress-bar {
    height: 24px;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}

.budget-progress-spent {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 0.5s ease;
}

.budget-progress-committed {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transition: width 0.5s ease;
}

.budget-progress-label {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.budget-category-row {
    display: grid;
    grid-template-columns: 200px 1fr 150px 60px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #1a1a2e;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.budget-category-row:hover {
    background: #252836;
}

.budget-cat-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.budget-cat-code {
    background: #3a3f50;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #76c7ff;
}

.budget-cat-name {
    font-weight: 500;
}

.budget-cat-bar {
    height: 8px;
    background: #0f1118;
    border-radius: 4px;
    overflow: hidden;
}

.budget-cat-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.budget-cat-amounts {
    text-align: right;
    font-size: 13px;
}

.budget-cat-amounts .spent {
    font-weight: bold;
}

.budget-cat-amounts .allocated {
    color: #666;
}

.budget-cat-pct {
    text-align: center;
    font-weight: bold;
    font-size: 13px;
}

.budget-cat-pct.ok { color: #22c55e; }
.budget-cat-pct.warning { color: #f59e0b; }
.budget-cat-pct.over { color: #ef4444; }

/* ============================================================================
   COMPETITIVE ANALYSIS
   ============================================================================ */

.analysis-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.analysis-card {
    background: linear-gradient(135deg, #1f232d 0%, #161922 100%);
    border: 1px solid #2a2f3a;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.analysis-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.analysis-card-value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.analysis-card-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.analysis-section {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.analysis-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #76c7ff;
}

.revenue-projections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.revenue-column {
    text-align: center;
}

.revenue-header {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 13px;
    color: #ccc;
}

.revenue-range {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
    padding: 0 10px;
}

.revenue-low, .revenue-high {
    font-size: 14px;
    color: #888;
}

.revenue-mid {
    font-size: 22px;
    font-weight: bold;
    color: #22c55e;
}

.revenue-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
    padding: 0 10px;
}

.roi-scenarios {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.roi-item {
    font-size: 12px;
    color: #888;
}

.roi-item strong {
    color: #76c7ff;
}

/* Comparable Films Table */
.comps-table-container {
    overflow-x: auto;
}

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

.comps-table th {
    text-align: left;
    padding: 10px 8px;
    background: #0f1118;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
}

.comps-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #2a2f3a;
}

.comps-table tr:hover {
    background: #252836;
}

.comp-title {
    font-weight: bold;
    color: #fff;
}

.comp-reason {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.roi-positive { color: #22c55e; font-weight: bold; }
.roi-negative { color: #ef4444; font-weight: bold; }

.similarity-bar {
    width: 60px;
    height: 6px;
    background: #0f1118;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.similarity-fill {
    height: 100%;
    background: linear-gradient(90deg, #76c7ff, #3b82f6);
}

/* Market Analysis */
.market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.market-item {
    font-size: 13px;
}

.competition-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.competition-badge.low { background: #22c55e20; color: #22c55e; }
.competition-badge.medium { background: #f59e0b20; color: #f59e0b; }
.competition-badge.high { background: #ef444420; color: #ef4444; }
.competition-badge.very_high { background: #dc262620; color: #dc2626; }

.market-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.market-column h5 {
    margin: 0 0 8px 0;
    font-size: 13px;
}

.market-column ul {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: #ccc;
}

.market-column li {
    margin-bottom: 4px;
}

/* Recommendations */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rec-column h5 {
    margin: 0 0 8px 0;
    font-size: 13px;
}

.rec-column ul {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
}

.rec-column li {
    margin-bottom: 6px;
}

.rec-column li.strength { color: #22c55e; }
.rec-column li.improve { color: #f59e0b; }

/* Streaming */
.streaming-info {
    display: flex;
    gap: 24px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .budget-summary-cards,
    .analysis-summary-grid,
    .revenue-projections-grid,
    .market-columns,
    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .budget-category-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================================
   MARKET ANALYSIS TOOLTIPS & ENHANCEMENTS
   ============================================================================ */

/* Tooltip container */
.tooltip-container {
    position: relative;
    cursor: help;
}

.tooltip-container.inline-tooltip {
    display: inline-block;
    margin-left: 6px;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted, #888);
    border: 1px solid var(--border-color, #333);
    border-radius: 50%;
    cursor: help;
    vertical-align: middle;
}

.tooltip-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    padding: 12px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--accent, #00d4ff);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary, #eee);
    z-index: 1000;
    text-align: left;
}

.tooltip-container:hover .tooltip-content {
    display: block;
}

/* Arrow for tooltip */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--accent, #00d4ff);
}

/* Calculated budget badge */
.calculated-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    vertical-align: middle;
}

.estimate-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted, #888);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    vertical-align: middle;
}

.revenue-mid.calculated {
    color: #00ff88;
    font-weight: 700;
}

.budget-comparison {
    margin-top: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    text-align: center;
}

.budget-comparison small {
    color: var(--text-muted, #888);
    font-size: 11px;
}

/* Analysis confidence footer */
.analysis-confidence {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #333);
    text-align: center;
    color: var(--text-muted, #888);
}

/* Cast suggestions styling */
.analysis-section h5 {
    margin: 12px 0 8px 0;
    font-size: 13px;
    color: var(--text-secondary, #ccc);
}

/* ============================================================================
   PHASE 4: PRE-PRODUCTION FEATURES STYLES
   ============================================================================ */

/* Breakdowns */
.breakdowns-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-card {
  background: var(--card-bg, #1a1d24);
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 8px;
  padding: 12px;
}

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

.breakdown-header:hover {
  background: rgba(255,255,255,0.03);
}

.breakdown-scene-title {
  font-weight: 600;
  font-size: 14px;
}

.breakdown-page-count {
  background: var(--accent-dim, #2a3a4a);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.breakdown-details {
  display: none;
}

.breakdown-details.expanded {
  display: block;
}

.breakdown-category {
  margin-bottom: 12px;
}

.breakdown-category-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #64b5f6);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breakdown-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breakdown-item {
  background: var(--bg-darker, #12141a);
  border: 1px solid var(--border-color, #2a2d35);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.breakdown-requirement {
  background: var(--warning-dim, #3d3020);
  border: 1px solid var(--warning, #ffb74d);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 6px;
}

.breakdown-requirement .req-category {
  font-weight: 600;
  color: var(--warning, #ffb74d);
}

.breakdown-requirement .req-dept {
  color: var(--text-muted, #888);
  font-size: 11px;
}

/* Calendar */
.calendar-content {
  min-height: 200px;
}

.calendar-grid {
  display: grid;
  gap: 8px;
}

.calendar-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 4px solid;
}

.calendar-event-date {
  min-width: 80px;
  font-size: 12px;
  color: var(--text-muted, #888);
}

.calendar-event-title {
  font-weight: 500;
  flex: 1;
}

.calendar-event-type {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

/* Rehearsals */
.rehearsals-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rehearsal-card {
  background: var(--card-bg, #1a1d24);
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
}

.rehearsal-date-badge {
  background: var(--accent-dim, #2a3a4a);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  min-width: 60px;
}

.rehearsal-date-badge .day {
  font-size: 20px;
  font-weight: 700;
}

.rehearsal-date-badge .month {
  font-size: 11px;
  color: var(--text-muted, #888);
}

.rehearsal-info {
  flex: 1;
}

.rehearsal-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.rehearsal-meta {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.rehearsal-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--accent-dim, #2a3a4a);
  color: var(--accent, #64b5f6);
}

/* Tech Scout */
.tech-scout-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.scout-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scout-stat .stat-value {
  font-size: 24px;
  font-weight: 700;
}

.scout-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted, #888);
}

.tech-scout-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scout-location-card {
  background: var(--card-bg, #1a1d24);
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.scout-location-card:hover {
  border-color: var(--accent, #64b5f6);
}

.scout-location-name {
  font-weight: 500;
}

.scout-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scout-status-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.scout-status-badge.scouted {
  background: var(--success-dim, #1a3d1a);
  color: var(--success, #81c784);
}

.scout-status-badge.pending {
  background: var(--warning-dim, #3d3020);
  color: var(--warning, #ffb74d);
}

.scout-rating {
  display: flex;
  gap: 2px;
}

.scout-rating .star {
  color: var(--warning, #ffb74d);
}

.scout-rating .star.empty {
  color: var(--text-muted, #444);
}

/* Deal Memos */
.deal-memo-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.memo-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.memo-stat .stat-value {
  font-size: 24px;
  font-weight: 700;
}

.memo-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted, #888);
}

.deal-memos-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deal-memo-card {
  background: var(--card-bg, #1a1d24);
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deal-memo-info {
  flex: 1;
}

.deal-memo-name {
  font-weight: 600;
  font-size: 14px;
}

.deal-memo-position {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.deal-memo-rate {
  font-size: 13px;
  color: var(--success, #81c784);
}

.deal-memo-status {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.deal-memo-status.draft {
  background: var(--bg-darker, #12141a);
  color: var(--text-muted, #888);
}

.deal-memo-status.sent {
  background: var(--accent-dim, #2a3a4a);
  color: var(--accent, #64b5f6);
}

.deal-memo-status.signed {
  background: var(--success-dim, #1a3d1a);
  color: var(--success, #81c784);
}

/* Reports */
.reports-content {
  min-height: 200px;
}

/* DOOD Grid */
.dood-grid {
  overflow-x: auto;
}

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

.dood-table th, .dood-table td {
  padding: 6px 8px;
  border: 1px solid var(--border-color, #2a2d35);
  text-align: center;
}

.dood-table th {
  background: var(--bg-darker, #12141a);
  font-weight: 600;
}

.dood-table .char-name {
  text-align: left;
  font-weight: 500;
  min-width: 120px;
}

.dood-cell {
  min-width: 40px;
}

.dood-cell.sw { background: #2e7d32; color: white; }
.dood-cell.w { background: #388e3c; color: white; }
.dood-cell.wf { background: #1b5e20; color: white; }
.dood-cell.swf { background: #4caf50; color: white; }
.dood-cell.h { background: #ff9800; color: white; }
.dood-cell.t { background: #2196f3; color: white; }
.dood-cell.r { background: #9c27b0; color: white; }

/* One-Line Schedule */
.one-line-content {
  overflow-x: auto;
}

.one-line-day {
  margin-bottom: 16px;
  background: var(--card-bg, #1a1d24);
  border-radius: 8px;
  overflow: hidden;
}

.one-line-day-header {
  background: var(--bg-darker, #12141a);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.one-line-scene {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #2a2d35);
  gap: 12px;
}

.one-line-scene:last-child {
  border-bottom: none;
}

.one-line-scene-num {
  font-weight: 600;
  min-width: 50px;
}

.one-line-ie-dn {
  display: flex;
  gap: 4px;
}

.one-line-ie-dn span {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.one-line-ie-dn .int { background: #fff9c4; color: #333; }
.one-line-ie-dn .ext { background: #c8e6c9; color: #333; }
.one-line-ie-dn .day { background: #fff9c4; color: #333; }
.one-line-ie-dn .night { background: #1a237e; color: white; }

.one-line-heading {
  flex: 1;
  font-size: 13px;
}

.one-line-pages {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.one-line-chars {
  font-size: 11px;
  color: var(--accent, #64b5f6);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scene Matrix */
.scene-matrix-content {
  overflow-x: auto;
}

.scene-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.scene-matrix-table th, .scene-matrix-table td {
  padding: 6px 8px;
  border: 1px solid var(--border-color, #2a2d35);
}

.scene-matrix-table th {
  background: var(--bg-darker, #12141a);
  font-weight: 600;
}

.scene-matrix-table .scene-col {
  text-align: left;
  min-width: 150px;
}

.scene-matrix-table .check-col {
  text-align: center;
  min-width: 30px;
}

.scene-matrix-table .check-col.has {
  background: var(--success-dim, #1a3d1a);
  color: var(--success, #81c784);
}

/* Modal Styles for new features */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-row > * {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px 10px;
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 6px;
  background: var(--bg-darker, #12141a);
  color: var(--text, #e0e0e0);
  font-size: 13px;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* Tech Scout Checklist Modal */
.scout-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.scout-checklist-section {
  background: var(--bg-darker, #12141a);
  border-radius: 8px;
  padding: 12px;
}

.scout-checklist-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--accent, #64b5f6);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.checklist-item label {
  font-size: 12px;
}

.checklist-notes {
  width: 100%;
  margin-top: 8px;
}

/* ============================================================================
   AI AUTO-GENERATION MODAL STYLES (Phase 5)
   ============================================================================ */

.ai-reasoning {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4a);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-reasoning h4 {
    margin: 0 0 8px 0;
    color: var(--accent-color, #76c7ff);
}

.ai-reasoning p {
    margin: 0;
    color: var(--text-muted, #a3a7b7);
    line-height: 1.5;
}

.ai-suggestions h4 {
    margin: 0 0 12px 0;
}

.suggestions-list {
    max-height: 400px;
    overflow-y: auto;
}

.suggestion-day {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4a);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

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

.suggestion-scenes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scene-chip {
    background: var(--accent-color-dim, #2a4a6a);
    color: var(--text-light, #fff);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4a);
    border-radius: 8px;
    margin-bottom: 8px;
}

.suggestion-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-content strong {
    display: block;
    margin-bottom: 4px;
}

.suggestion-content .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: var(--accent-color-dim, #2a4a6a);
    color: var(--text-light, #fff);
    margin-left: 8px;
}

.suggestion-details {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-muted, #a3a7b7);
}

.suggestion-reason {
    margin: 8px 0 0 0;
    color: var(--text-muted, #a3a7b7);
    font-size: 13px;
    font-style: italic;
}

.priority-list {
    max-height: 400px;
    overflow-y: auto;
}

.priority-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4a);
    border-radius: 8px;
    margin-bottom: 8px;
}

.priority-item.priority-high {
    border-left: 4px solid #dc3545;
}

.priority-item.priority-medium {
    border-left: 4px solid #ffc107;
}

.priority-item.priority-low {
    border-left: 4px solid #28a745;
}

.priority-rank {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-muted, #a3a7b7);
    min-width: 50px;
    text-align: center;
}

.priority-content {
    flex: 1;
}

.priority-content strong {
    display: block;
    margin-bottom: 4px;
}

.priority-details {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-muted, #a3a7b7);
}

.priority-reason {
    margin: 8px 0 0 0;
    color: var(--text-muted, #a3a7b7);
    font-size: 13px;
}

.badge-priority-high {
    background: #dc3545 !important;
}

.badge-priority-medium {
    background: #ffc107 !important;
    color: #000 !important;
}

.badge-priority-low {
    background: #28a745 !important;
}

.modal-content.modal-lg {
    max-width: 800px;
    width: 90%;
}

.dpr-cast-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4a);
    border-radius: 4px;
    margin-bottom: 4px;
}

/* AI Calendar Modal Styles */
.ai-calendar-modal {
    width: 95%;
    max-width: 900px;
}

.ai-calendar-summary {
    margin-bottom: 20px;
}

.ai-calendar-summary h4 {
    margin: 15px 0 10px 0;
    color: var(--accent);
}

.analysis-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.analysis-box p {
    margin: 5px 0;
}

.considerations-list {
    margin: 0;
    padding-left: 20px;
}

.considerations-list li {
    margin: 5px 0;
}

.badge-low { background: #4caf50; color: white; }
.badge-medium { background: #ff9800; color: white; }
.badge-high { background: #f44336; color: white; }
.badge-critical { background: #9c27b0; color: white; animation: pulse 1s infinite; }

.badge-very_high { background: #9c27b0; color: white; }

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

.ai-calendar-events {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ai-calendar-events table {
    margin: 0;
}

.ai-calendar-events td {
    vertical-align: top;
    padding: 8px;
}

.modal-footer label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Section Dependency Styling */
.section-disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.section-disabled::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ff9800;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    display: none;
}

.section-disabled:hover::after {
    display: block;
}

.section-disabled .collapsible-header {
    cursor: not-allowed;
}

.section-disabled .collapsible-header::before {
    content: "🔒 ";
}

/* Workflow phase headers (if we add them) */
.workflow-phase-header {
    background: var(--card-bg);
    padding: 8px 16px;
    margin: 20px 0 10px 0;
    border-radius: 8px;
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Make main container use flexbox for ordering */
.main-container {
    display: flex;
    flex-direction: column;
}

.main-container > section {
    order: 999; /* Default order, will be overridden by JS */
}

/* Workflow Progress Bar */
.workflow-progress-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.workflow-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.workflow-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.workflow-step {
    font-size: 13px;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
}

.workflow-step.done {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

/* Section Dependencies */
.section-disabled {
    position: relative;
}

.section-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    pointer-events: none;
}

.section-disabled .collapsible-header {
    cursor: not-allowed;
}

.lock-icon {
    opacity: 0.7;
}

/* ============================================
   Workflow Section Ordering
   ============================================ */
#workingView {
    display: flex;
    flex-direction: column;
}

/* Phase dividers */
.workflow-phase-divider {
    padding: 12px 20px;
    margin: 20px 0 10px 0;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    order: var(--phase-order, 0);
}

.workflow-phase-divider.phase-setup { --phase-order: 0; background: linear-gradient(90deg, #4caf50 0%, transparent 100%); }
.workflow-phase-divider.phase-script { --phase-order: 9; background: linear-gradient(90deg, #2196f3 0%, transparent 100%); }
.workflow-phase-divider.phase-preproduction { --phase-order: 19; background: linear-gradient(90deg, #ff9800 0%, transparent 100%); }
.workflow-phase-divider.phase-production { --phase-order: 29; background: linear-gradient(90deg, #f44336 0%, transparent 100%); }
.workflow-phase-divider.phase-analysis { --phase-order: 39; background: linear-gradient(90deg, #9c27b0 0%, transparent 100%); }

/* Enhanced disabled section styling */
.section-disabled {
    opacity: 0.4;
    position: relative;
    transition: opacity 0.3s ease;
}

.section-disabled:hover {
    opacity: 0.6;
}

.section-disabled .collapsible-header {
    cursor: help;
}

.section-disabled .collapsible-header .chevron {
    display: none;
}

.section-disabled .btn-primary,
.section-disabled .btn-secondary {
    pointer-events: none;
    opacity: 0.5;
}

/* Tooltip for disabled sections */
.section-disabled[title]::before {
    content: "🔒 " attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ff9800;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
}

.section-disabled[title]:hover::before {
    opacity: 1;
}

/* Progress indicator */
.workflow-progress {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    order: -1;
}

.workflow-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.workflow-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3, #ff9800, #f44336, #9c27b0);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.workflow-progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
}

.workflow-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.workflow-progress-step.completed {
    color: #4caf50;
}

.workflow-progress-step.active {
    color: var(--accent);
    font-weight: 600;
}

/* Uploaded filename display */
.uploaded-filename {
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    color: #4CAF50;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}


/* ============================================
   AI ACTOR SUGGESTIONS STYLES
   ============================================ */

.actor-suggestions-modal,
.all-actor-suggestions-modal {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.character-analysis-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.actor-suggestion-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg, #1a1d26);
    border: 1px solid var(--border, #2a2d3a);
    border-radius: 10px;
    align-items: flex-start;
}

.actor-suggestion-card:hover {
    border-color: var(--accent, #3b82f6);
}

.suggestion-photo {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-darker, #0f1118);
}

.suggestion-photo.small {
    width: 50px;
    height: 65px;
}

.suggestion-photo.tiny {
    width: 36px;
    height: 45px;
}

.suggestion-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-photo .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--bg-darker, #0f1118);
    color: var(--muted, #6b7280);
}

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

.suggestion-info.compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.suggestion-name {
    font-weight: 600;
    font-size: 15px;
}

.tier-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.a-list {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1d26;
}

.tier-badge.b-list {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.tier-badge.c-list {
    background: var(--bg-darker, #0f1118);
    color: var(--text-muted, #9ca3af);
    border: 1px solid var(--border, #2a2d3a);
}

.popularity-score {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
}

.suggestion-known-for {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 6px;
}

.known-for-label {
    color: var(--text, #e5e7eb);
}

.suggestion-reasoning {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.tmdb-link {
    font-size: 12px;
    color: var(--accent, #3b82f6);
    text-decoration: none;
}

.tmdb-link:hover {
    text-decoration: underline;
}

.suggestion-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.btn-assign-actor {
    white-space: nowrap;
}

/* All suggestions modal */
.all-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.character-suggestions-group {
    background: var(--card-bg, #1a1d26);
    border: 1px solid var(--border, #2a2d3a);
    border-radius: 10px;
    padding: 12px;
}

.character-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.character-group-header h4 {
    margin: 0;
    font-size: 14px;
}

.analysis-hint {
    cursor: help;
    font-size: 12px;
}

.already-assigned {
    font-size: 11px;
    color: #22c55e;
    margin-left: auto;
}

.no-suggestions {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

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

.other-suggestions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border, #2a2d3a);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.other-suggestion-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: var(--bg-darker, #0f1118);
    border-radius: 6px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Suggest button in entity card */
.btn-suggest-actor {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
}

.btn-suggest-actor:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* ============================================
   LOCATION SUGGESTION STYLES
   ============================================ */

.btn-suggest-location {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
}

.btn-suggest-location:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: scale(1.05);
}

.location-suggestions-modal,
.all-location-suggestions-modal {
    max-width: 800px;
    max-height: 85vh;
}

.location-suggestion-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: var(--card-bg, #1a1d24);
    border: 1px solid var(--border, #2a2d35);
    border-radius: 10px;
    margin-bottom: 12px;
    gap: 16px;
}

.location-suggestion-card:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.location-suggestion-card .suggestion-info {
    flex: 1;
}

.location-suggestion-card .suggestion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.location-suggestion-card .suggestion-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text, #fff);
}

.location-city {
    font-size: 13px;
    color: var(--muted, #888);
    background: var(--bg, #0f1118);
    padding: 2px 8px;
    border-radius: 4px;
}

.location-rates {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rate-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.rate-badge.small {
    padding: 2px 6px;
    font-size: 11px;
}

.min-hours-badge {
    background: var(--bg, #0f1118);
    border: 1px solid var(--border, #2a2d35);
    color: var(--text, #fff);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.suggestion-notes {
    font-size: 13px;
    color: var(--muted, #aaa);
    line-height: 1.5;
    margin-bottom: 10px;
}

.venue-link {
    color: #10b981;
    font-size: 13px;
    text-decoration: none;
}

.venue-link:hover {
    text-decoration: underline;
}

.search-summary-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

.location-suggestions-group {
    background: var(--card-bg, #1a1d24);
    border: 1px solid var(--border, #2a2d35);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.location-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.location-group-header h4 {
    margin: 0;
    font-size: 15px;
}

.location-type-badge {
    font-size: 11px;
    background: var(--bg, #0f1118);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--muted, #888);
}

.guidance-used {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #10b981;
}

.btn-assign-location {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    white-space: nowrap;
}

.btn-assign-location:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* ============================================
   AI LOCATION SUGGESTIONS STYLES
   ============================================ */

.btn-suggest-location {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-suggest-location:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.location-suggestions-modal,
.all-location-suggestions-modal {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.location-suggestion-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.location-suggestion-card .suggestion-info {
    flex: 1;
    min-width: 250px;
}

.location-suggestion-card .suggestion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.location-suggestion-card .suggestion-name {
    font-weight: 600;
    font-size: 16px;
}

.location-city {
    color: var(--muted, #a0a0b0);
    font-size: 13px;
}

.location-rates {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rate-badge {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.rate-badge.small {
    padding: 2px 6px;
    font-size: 11px;
}

.min-hours-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.suggestion-notes {
    color: var(--muted, #a0a0b0);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.venue-link {
    color: #60a5fa;
    font-size: 13px;
    text-decoration: none;
}

.venue-link:hover {
    text-decoration: underline;
}

.search-summary-box {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.location-suggestions-group {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.location-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.location-group-header h4 {
    margin: 0;
    font-size: 15px;
}

.location-type-badge {
    background: rgba(147, 51, 234, 0.2);
    color: #a78bfa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.guidance-used {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    font-style: italic;
}

.btn-assign-location {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.btn-assign-location:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Modal small size */
.modal-small {
    max-width: 500px;
}

.modal-small textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border, #2d2d44);
    background: var(--input-bg, #0f0f1a);
    color: var(--text, #eee);
    resize: vertical;
}

/* ============================================
   LOCATION SUGGESTIONS STYLES
   ============================================ */

.btn-suggest-location {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
}

.btn-suggest-location:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.location-suggestions-modal,
.all-location-suggestions-modal {
    max-width: 900px;
    max-height: 85vh;
}

.location-suggestion-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.location-suggestion-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.location-suggestion-card .suggestion-info {
    flex: 1;
}

.location-suggestion-card .suggestion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.location-suggestion-card .suggestion-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary, #fff);
}

.location-city {
    font-size: 13px;
    color: var(--text-muted, #888);
    background: var(--bg-secondary, #252540);
    padding: 3px 8px;
    border-radius: 4px;
}

.location-rates {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rate-badge {
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.rate-badge.small {
    font-size: 11px;
    padding: 2px 6px;
}

.min-hours-badge {
    font-size: 13px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.location-suggestion-card .suggestion-notes {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    line-height: 1.5;
    margin-bottom: 10px;
}

.venue-link {
    font-size: 13px;
    color: #10b981;
    text-decoration: none;
}

.venue-link:hover {
    text-decoration: underline;
}

.location-suggestion-card .suggestion-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.btn-assign-location {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* Location suggestions group (all locations modal) */
.location-suggestions-group {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.location-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.location-group-header h4 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary, #fff);
}

.location-type-badge {
    font-size: 11px;
    color: var(--text-muted, #888);
    background: var(--bg-secondary, #252540);
    padding: 2px 8px;
    border-radius: 4px;
}

.location-suggestions-group .top-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.location-suggestions-group .other-suggestions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #2a2a4a);
}

.location-suggestions-group .other-suggestion-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #2a2a4a);
}

.location-suggestions-group .other-suggestion-row:last-child {
    border-bottom: none;
}

.search-summary-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
}

.guidance-used {
    background: var(--bg-secondary, #252540);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted, #888);
}

.modal-small {
    max-width: 500px;
}

/* Venue badge on location cards */
.location-card .venue-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.location-card .venue-badge:hover {
    background: rgba(34, 139, 34, 1);
    transform: scale(1.05);
}

.location-card .venue-badge.peerspace {
    background: rgba(0, 121, 191, 0.95);
}

.location-card .venue-badge.peerspace:hover {
    background: rgba(0, 100, 160, 1);
}

.location-card .venue-badge.giggster {
    background: rgba(255, 92, 92, 0.95);
}

.location-card .venue-badge.giggster:hover {
    background: rgba(220, 60, 60, 1);
}

.location-card.has-venue {
    border: 2px solid rgba(40, 167, 69, 0.5);
}

.location-card .venue-rate {
    color: #28a745;
    font-weight: 500;
}

/* Linked venue badge on project location cards */
.entity-card .linked-venue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.entity-card .linked-venue-badge:hover {
    background: rgba(34, 139, 34, 1);
    transform: scale(1.05);
}

.entity-card .linked-venue-badge.peerspace {
    background: rgba(0, 121, 191, 0.9);
}

.entity-card .linked-venue-badge.peerspace:hover {
    background: rgba(0, 100, 160, 1);
}

.entity-card .linked-venue-badge.giggster {
    background: rgba(255, 92, 92, 0.9);
}

.entity-card .linked-venue-badge.giggster:hover {
    background: rgba(220, 60, 60, 1);
}

/* ===== SIDEBAR NAVIGATION ===== */
.app-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 240px;
    background: #0e1017;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .nav-lock {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.sidebar-toggle {
    position: absolute;
    top: 10px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    z-index: 101;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-nav {
    padding: 10px 0;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-title {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    padding: 8px 16px 4px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: color 0.2s;
    border-radius: 6px;
    margin: 0 6px;
}
.nav-group-title:hover {
    color: var(--accent);
    background: rgba(118, 199, 255, 0.06);
}
.nav-chevron {
    font-size: 12px;
    transition: transform 0.25s ease;
    opacity: 0.6;
}
.nav-group.nav-collapsed .nav-chevron {
    transform: rotate(-90deg);
}
.nav-group.nav-collapsed .nav-item {
    display: none;
}
/* Keep chevrons hidden when sidebar itself is collapsed */
.sidebar.collapsed .nav-chevron {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(118, 199, 255, 0.1);
    color: var(--text);
}

.nav-item.active {
    background: rgba(118, 199, 255, 0.15);
    color: var(--accent);
    border-left-color: var(--accent);
}

.nav-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-item.locked:hover {
    background: transparent;
    color: var(--muted);
}

.nav-icon {
    font-size: 16px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-label {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-lock {
    font-size: 10px;
    margin-left: 8px;
    opacity: 0.6;
}

.nav-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.nav-status.complete {
    background: var(--accent-2);
}

.nav-status.partial {
    background: #ffd36e;
}

.nav-status.empty {
    background: #444;
}

/* Main content adjustment */
.main-content {
    flex: 1;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
    width: calc(100% - 240px);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 240px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        width: 240px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #fff;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== STORYBOARD STYLES ===== */

.storyboard-container {
    padding: 10px;
}

/* Grid View */
.storyboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.storyboard-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.storyboard-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0a0b0e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.storyboard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.storyboard-image .no-image {
    color: #444;
    font-size: 32px;
    text-align: center;
}

.storyboard-info {
    padding: 10px;
}

.storyboard-info .shot-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent);
}

.storyboard-info .shot-name {
    font-size: 12px;
    color: var(--text);
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.storyboard-info .scene-ref {
    font-size: 11px;
    color: var(--muted);
}

/* Filmstrip View */
.storyboard-filmstrip {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filmstrip-scene {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.filmstrip-scene-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.filmstrip-frames {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}

.filmstrip-frame {
    flex-shrink: 0;
    width: 140px;
    background: #0a0b0e;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.filmstrip-frame .frame-image {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050507;
}

.filmstrip-frame .frame-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.filmstrip-frame .frame-image .no-image {
    color: #333;
    font-size: 24px;
}

.filmstrip-frame .frame-label {
    padding: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--card);
}

/* Timeline View */
.storyboard-timeline {
    position: relative;
    padding-left: 60px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -60px;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #000;
}

.timeline-connector {
    position: absolute;
    left: -42px;
    top: 40px;
    width: 2px;
    height: calc(100% - 40px);
    background: var(--border);
}

.timeline-content {
    display: flex;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.timeline-image {
    flex-shrink: 0;
    width: 200px;
    height: 112px;
    background: #0a0b0e;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-image .no-image {
    color: #333;
    font-size: 32px;
}

.timeline-info {
    flex: 1;
}

.timeline-title {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline-scene {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

/* Lightbox */
.storyboard-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 20px 15px;
    cursor: pointer;
    border-radius: 4px;
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

.lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: #fff;
    max-width: 600px;
}

/* ===== STRIPBOARD STYLES ===== */

.stripboard-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    min-height: 400px;
}

.stripboard-column {
    flex-shrink: 0;
    width: 200px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.stripboard-column.unscheduled {
    background: #0d0f14;
    border-style: dashed;
}

.stripboard-column-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stripboard-column-header .day-info {
    font-size: 11px;
    color: var(--muted);
}

.stripboard-strips {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    min-height: 300px;
}

.stripboard-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.scene-strip {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: grab;
    font-size: 12px;
    border-left: 4px solid var(--accent);
    background: #12141b;
    transition: transform 0.1s;
}

.scene-strip:hover {
    transform: scale(1.02);
}

.scene-strip.dragging {
    opacity: 0.5;
}

.scene-strip.int { border-left-color: #4a9eff; }
.scene-strip.ext { border-left-color: #ff9f4a; }
.scene-strip.day { background: linear-gradient(135deg, #1a1c24, #1f2130); }
.scene-strip.night { background: linear-gradient(135deg, #0d0e14, #12141b); }

.scene-strip .strip-heading {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scene-strip .strip-meta {
    color: var(--muted);
    font-size: 10px;
}

.stripboard-legend {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
    margin-left: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.int { background: #4a9eff; }
.legend-color.ext { background: #ff9f4a; }
.legend-color.day { background: #ffd36e; }
.legend-color.night { background: #6a6aff; }

.stripboard-add-day:hover {
    background: rgba(118, 199, 255, 0.1) !important;
}



/* ============================================
   NO-SIDEBAR MODE (dashboard/allProjects views)
   ============================================ */
.main-content.no-sidebar {
    margin-left: 0 !important;
    width: 100% !important;
}

/* ============================================
   LANDING ACTION CARDS (post-login dashboard)
   ============================================ */
.landing-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 40px auto 48px;
    max-width: 820px;
}

.landing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(18, 20, 27, 0.7);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    min-height: 240px;
}

.landing-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(42, 109, 255, 0.15);
}

.landing-card-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.landing-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.landing-card-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 260px;
}

.landing-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.landing-card-badge.ai {
    background: rgba(118, 199, 255, 0.12);
    color: var(--accent);
    border: 1px solid rgba(118, 199, 255, 0.25);
}

.landing-card-badge.browse {
    background: rgba(157, 255, 140, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(157, 255, 140, 0.2);
}

.landing-card.new-project {
    border-color: rgba(42, 109, 255, 0.3);
    background: linear-gradient(135deg, rgba(42, 109, 255, 0.08), rgba(18, 20, 27, 0.7));
}

.landing-card.recent-projects {
    border-color: rgba(157, 255, 140, 0.2);
    background: linear-gradient(135deg, rgba(157, 255, 140, 0.05), rgba(18, 20, 27, 0.7));
}

.landing-card.recent-projects:hover {
    border-color: var(--accent-2);
    box-shadow: 0 12px 40px rgba(157, 255, 140, 0.1);
}

/* Dashboard welcome text */
.dashboard-welcome {
    text-align: center;
    margin-top: 48px;
}

.dashboard-welcome h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.dashboard-welcome p {
    font-size: 16px;
    color: var(--muted);
    margin: 0;
}

/* Recent projects section below landing cards */
.landing-recent-section {
    max-width: 1000px;
    margin: 0 auto;
}

.landing-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.landing-recent-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.landing-recent-header .view-all-link {
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: none;
    font-family: inherit;
}

.landing-recent-header .view-all-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .landing-actions {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 24px auto 32px;
    }
    .landing-card {
        padding: 32px 24px;
        min-height: 180px;
    }
    .landing-card-icon {
        font-size: 40px;
    }
    .landing-card-title {
        font-size: 18px;
    }
    .dashboard-welcome h1 {
        font-size: 26px;
    }
}

/* Toggle All Scenes button */
.btn-toggle-scenes {
    min-width: auto;
}

.btn-toggle-scenes span:first-child {
    margin-right: 2px;
}

/* Hide per-card Elaborate All in card header — scene-level button is sufficient */
.shot-header .btn-elaborate-all {
    display: none;
}

/* ============================================
   BRANDED LIGHT THEME OVERRIDES (Phase 1)
   Logo colors: Navy #1e3a4f, Blue #6aa0d1,
   Light blue #8ec3e1/#98c8e4
   ============================================ */

/* --- Sidebar: Navy background in light theme --- */
[data-theme="light"] .sidebar {
    background: var(--sidebar-bg, #1e3a4f);
    border-right: 1px solid rgba(30, 58, 79, 0.3);
}

[data-theme="light"] .sidebar::-webkit-scrollbar-track {
    background: #1a3345;
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb {
    background: rgba(106, 160, 209, 0.4);
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 160, 209, 0.6);
}

/* --- Nav items in light theme sidebar --- */
[data-theme="light"] .nav-group-title {
    color: rgba(200, 220, 233, 0.6);
}

[data-theme="light"] .nav-group-title:hover {
    color: var(--sidebar-active, #6aa0d1);
    background: rgba(106, 160, 209, 0.1);
}

[data-theme="light"] .nav-item {
    color: var(--sidebar-text, #c8dce9);
}

[data-theme="light"] .nav-item:hover {
    background: rgba(106, 160, 209, 0.15);
    color: #ffffff;
}

[data-theme="light"] .nav-item.active {
    background: rgba(106, 160, 209, 0.2);
    color: #ffffff;
    border-left-color: var(--sidebar-active, #6aa0d1);
}

[data-theme="light"] .nav-item.locked {
    opacity: 0.35;
}

[data-theme="light"] .nav-item.locked:hover {
    background: transparent;
    color: var(--sidebar-text, #c8dce9);
}

[data-theme="light"] .nav-status.empty {
    background: rgba(200, 220, 233, 0.3);
}

/* --- Sidebar toggle button --- */
[data-theme="light"] .sidebar-toggle {
    background: var(--sidebar-active, #6aa0d1);
}

/* --- Header: clean white with navy text --- */
[data-theme="light"] .header {
    background: var(--header-bg, #ffffff);
    border-bottom: 2px solid #d4dbe3;
    box-shadow: 0 1px 4px rgba(30, 58, 79, 0.06);
}

[data-theme="light"] .brand {
    color: #1e3a4f;
}

/* --- Project dropdown in header --- */
[data-theme="light"] .header-project-btn {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: #1e3a4f;
}

[data-theme="light"] .header-project-btn:hover {
    background: #e8edf2;
}

[data-theme="light"] .header-project-menu {
    background: #ffffff;
    border-color: #d4dbe3;
    box-shadow: 0 8px 24px rgba(30, 58, 79, 0.12);
}

[data-theme="light"] .header-project-menu-item:hover {
    background: #f0f4f8;
}

[data-theme="light"] .header-project-menu-item.active {
    background: rgba(106, 160, 209, 0.12);
    color: #1e3a4f;
}

/* --- View headers: bold navy --- */
[data-theme="light"] .view-header h1 {
    color: var(--section-heading, #1e3a4f);
}

/* --- Cards and sections --- */
[data-theme="light"] .card,
[data-theme="light"] .project-card,
[data-theme="light"] .scene-card,
[data-theme="light"] .shot-card {
    background: #ffffff;
    border-color: #d4dbe3;
    box-shadow: 0 1px 3px rgba(30, 58, 79, 0.06);
}

[data-theme="light"] .scene-card:hover,
[data-theme="light"] .project-card:hover {
    border-color: #6aa0d1;
    box-shadow: 0 2px 8px rgba(106, 160, 209, 0.15);
}

/* --- Collapsible headers --- */
[data-theme="light"] .collapsible .collapsible-header {
    background: #f0f4f8;
    color: #1e3a4f;
}

[data-theme="light"] .collapsible .collapsible-header:hover {
    background: #e8edf2;
}

/* --- Shot section headers --- */
[data-theme="light"] .shot-basic-info .section-header {
    background: #f0f4f8;
    color: #1e3a4f;
}

/* --- Action buttons (secondary) --- */
[data-theme="light"] .btn-back {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: #1e3a4f;
}

[data-theme="light"] .btn-back:hover {
    background: #e8edf2;
}

/* --- Pills and badges --- */
[data-theme="light"] .pill {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: #1e3a4f;
}

[data-theme="light"] .pill.ok {
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
}

[data-theme="light"] .pill.warn {
    color: #e65100;
    background: rgba(230, 81, 0, 0.08);
}

[data-theme="light"] .badge {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: #5a6472;
}

/* --- Inputs and form fields --- */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"],
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: #ffffff;
    border-color: #d4dbe3;
    color: #1e3a4f;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    border-color: #6aa0d1;
    box-shadow: 0 0 0 3px rgba(106, 160, 209, 0.2);
}

/* --- Balance / credits card --- */
[data-theme="light"] .balance-card {
    background: linear-gradient(135deg, rgba(106, 160, 209, 0.12), rgba(142, 195, 225, 0.12));
    border-color: rgba(106, 160, 209, 0.25);
}

/* --- Tables --- */
[data-theme="light"] table th {
    background: #f0f4f8;
    color: #1e3a4f;
    border-color: #d4dbe3;
}

[data-theme="light"] table td {
    border-color: #e8edf2;
}

[data-theme="light"] table tr:hover td {
    background: #f8fafb;
}

/* --- Modals --- */
[data-theme="light"] .modal-overlay {
    background: rgba(30, 58, 79, 0.5);
}

[data-theme="light"] .modal-content,
[data-theme="light"] .modal {
    background: #ffffff;
    border-color: #d4dbe3;
    box-shadow: 0 16px 48px rgba(30, 58, 79, 0.2);
}

/* --- Toast / notifications --- */
[data-theme="light"] .toast {
    background: #ffffff;
    border-color: #d4dbe3;
    color: #1e3a4f;
    box-shadow: 0 4px 16px rgba(30, 58, 79, 0.12);
}

/* --- Footer --- */
[data-theme="light"] .footer {
    background: #ffffff;
    border-top: 1px solid #d4dbe3;
}

/* --- Progress bars --- */
[data-theme="light"] .progress-bar {
    background: #e8edf2;
}

[data-theme="light"] .progress-fill {
    background: linear-gradient(90deg, #6aa0d1, #8ec3e1);
}

/* --- Chip elements --- */
[data-theme="light"] .chip {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: #5a6472;
}

/* --- Shepherd tour override for light theme --- */
[data-theme="light"] .shepherd-element {
    background: #ffffff;
    border: 1px solid #d4dbe3;
    box-shadow: 0 8px 32px rgba(30, 58, 79, 0.18);
}

[data-theme="light"] .shepherd-text {
    color: #1e3a4f;
}

[data-theme="light"] .shepherd-header {
    background: #f0f4f8;
    border-bottom: 1px solid #d4dbe3;
}

[data-theme="light"] .shepherd-button {
    background: linear-gradient(135deg, #6aa0d1, #1e3a4f);
}

/* --- Dropdown menus --- */
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .context-menu {
    background: #ffffff;
    border-color: #d4dbe3;
    box-shadow: 0 8px 24px rgba(30, 58, 79, 0.12);
}

[data-theme="light"] .dropdown-item:hover,
[data-theme="light"] .context-menu-item:hover {
    background: #f0f4f8;
}

/* --- Accent link colors --- */
[data-theme="light"] a {
    color: #5a92bf;
}

[data-theme="light"] a:hover {
    color: #1e3a4f;
}

/* --- Schedule/calendar grid --- */
[data-theme="light"] .schedule-day,
[data-theme="light"] .calendar-cell {
    background: #ffffff;
    border-color: #d4dbe3;
}

[data-theme="light"] .schedule-day:hover,
[data-theme="light"] .calendar-cell:hover {
    border-color: #6aa0d1;
    background: #f8fafb;
}

/* --- Toolbar areas --- */
[data-theme="light"] .toolbar,
[data-theme="light"] .section-toolbar {
    background: #f8f9fb;
    border-color: #d4dbe3;
}


/* ============================================
   COMPREHENSIVE LIGHT THEME OVERRIDES (Phase 1 cont.)
   Fix hardcoded dark backgrounds that bleed in light mode
   ============================================ */

/* --- Main content area: solid light background --- */
[data-theme="light"] .main-content {
    background: var(--bg);
}

/* --- All hardcoded #0b0d13 / #0f1118 panels --- */
[data-theme="light"] .shot,
[data-theme="light"] .shot-card,
[data-theme="light"] .entity-card,
[data-theme="light"] .entity-prompt-area,
[data-theme="light"] .screenplay-viewer,
[data-theme="light"] .screenplay-content {
    background: #ffffff;
    color: var(--text);
}

/* --- Entity/actor/crew cards using var(--card-bg, #1a1a2e) --- */
[data-theme="light"] .project-actor-card,
[data-theme="light"] .crew-member-card,
[data-theme="light"] .location-card,
[data-theme="light"] .prop-card,
[data-theme="light"] .character-card {
    background: var(--card-bg, #ffffff);
    border-color: #d4dbe3;
    color: var(--text);
}

/* --- Stripboard columns --- */
[data-theme="light"] .stripboard-column,
[data-theme="light"] .stripboard-column.unscheduled {
    background: #ffffff;
    border-color: #d4dbe3;
}

[data-theme="light"] .stripboard-strip {
    background: #f8f9fb;
    border-color: #d4dbe3;
    color: var(--text);
}

[data-theme="light"] .stripboard-strip:hover {
    background: #f0f4f8;
}

/* --- Budget / cost / market panels --- */
[data-theme="light"] .budget-section,
[data-theme="light"] .budget-panel,
[data-theme="light"] .cost-breakdown,
[data-theme="light"] .market-panel {
    background: #ffffff;
    border-color: #d4dbe3;
    color: var(--text);
}

/* --- Schedule blocks --- */
[data-theme="light"] .schedule-block,
[data-theme="light"] .schedule-event,
[data-theme="light"] .day-panel {
    background: #ffffff;
    border-color: #d4dbe3;
    color: var(--text);
}

/* --- Scrollbar tracks for light theme (global) --- */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f0f4f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c4cdd6;
    border-radius: 4px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a0adb8;
}

/* --- Text color fixes for hardcoded light-on-dark text --- */
[data-theme="light"] .entity-name,
[data-theme="light"] .entity-type,
[data-theme="light"] .entity-description,
[data-theme="light"] .shot-name,
[data-theme="light"] .shot-description,
[data-theme="light"] .scene-title,
[data-theme="light"] .scene-meta {
    color: var(--text);
}

/* --- Stats/info rows --- */
[data-theme="light"] .stat-row,
[data-theme="light"] .info-row,
[data-theme="light"] .detail-row {
    border-color: #e8edf2;
}

/* --- Empty states --- */
[data-theme="light"] .empty-state {
    color: var(--muted);
    background: #f8f9fb;
    border-color: #d4dbe3;
}

/* --- Notification bar / status bar --- */
[data-theme="light"] .status-bar,
[data-theme="light"] .notification-bar {
    background: #f0f4f8;
    border-color: #d4dbe3;
    color: var(--text);
}

/* --- Search input inside header/sidebar --- */
[data-theme="light"] .search-input,
[data-theme="light"] .filter-input {
    background: #ffffff;
    border-color: #d4dbe3;
    color: var(--text);
}

/* --- Accordion/collapsible body content --- */
[data-theme="light"] .collapsible-body,
[data-theme="light"] .collapsible-content {
    background: #ffffff;
}

/* --- Loading/spinner overlays --- */
[data-theme="light"] .loading-overlay {
    background: rgba(245, 246, 240, 0.85);
}

/* --- Shot detail panel --- */
[data-theme="light"] .shot-details-panel,
[data-theme="light"] .shot-detail-view {
    background: #ffffff;
    color: var(--text);
}

/* --- Accent-colored section labels --- */
[data-theme="light"] .section-label {
    color: #1e3a4f;
    font-weight: 600;
}


/* ============================================
   MINI-TOUR HELP BUTTONS
   ============================================ */
.btn-help-mini {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    flex-shrink: 0;
}

.btn-help-mini:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.1);
}

[data-theme="light"] .btn-help-mini {
    background: #f0f4f8;
    border-color: #c8d4e0;
    color: #2563eb;
}

[data-theme="light"] .btn-help-mini:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ============================================
   CALL SHEET VIEWER MODAL (#12)
   ============================================ */
.cs-modal {
    max-width: 800px !important;
    width: 95%;
}

.cs-header {
    flex-wrap: wrap;
    gap: 8px;
}

.cs-header-sub {
    font-size: 13px;
    color: var(--muted, #888);
    margin-top: 2px;
}

.cs-body {
    padding: 0 !important;
}

.cs-times-strip {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border, #2a2d3a);
}

.cs-time-block {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-right: 1px solid var(--border, #2a2d3a);
}

.cs-time-block:last-child {
    border-right: none;
}

.cs-time-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted, #888);
    margin-bottom: 4px;
}

.cs-time-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent, #76c7ff);
}

.cs-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #2a2d3a);
}

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

.cs-section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text, #eef1f7);
}

.cs-location-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-location-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border, #2a2d3a);
}

.cs-info-value {
    font-weight: 600;
    font-size: 14px;
}

.cs-info-sub {
    font-size: 12px;
    color: var(--muted, #888);
    margin-top: 2px;
}

.cs-weather-strip {
    padding: 10px 20px;
    background: rgba(106, 160, 209, 0.08);
    border-bottom: 1px solid var(--border, #2a2d3a);
    font-size: 13px;
    color: var(--text, #eef1f7);
}

.cs-table-wrap {
    overflow-x: auto;
}

.cs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cs-table th {
    text-align: left;
    padding: 6px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--muted, #888);
    border-bottom: 1px solid var(--border, #2a2d3a);
    white-space: nowrap;
}

.cs-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

.cs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cs-notes-cell {
    max-width: 150px;
    font-size: 12px;
    color: var(--muted, #888);
}

.cs-crew-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-crew-dept {
    margin-bottom: 8px;
}

.cs-crew-dept-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent, #76c7ff);
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border, #2a2d3a);
}

.cs-crew-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 13px;
}

.cs-crew-position {
    width: 140px;
    flex-shrink: 0;
    color: var(--muted, #888);
}

.cs-crew-name {
    flex: 1;
    font-weight: 600;
}

.cs-crew-contact {
    font-size: 12px;
    color: var(--muted, #888);
}

.cs-note-item {
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.cs-note-item + .cs-note-item {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Light theme overrides for call sheet */
[data-theme="light"] .cs-weather-strip {
    background: rgba(106, 160, 209, 0.1);
}

[data-theme="light"] .cs-table td {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .cs-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .cs-note-item + .cs-note-item {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* ============================================
   BUDGET ESTIMATION LABELS (#16)
   ============================================ */
.budget-estimate-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 183, 77, 0.12);
    border: 1px solid rgba(255, 183, 77, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text);
}
.budget-estimate-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}
.budget-estimate-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}
[data-theme="light"] .budget-estimate-banner {
    background: rgba(255, 152, 0, 0.08);
    border-color: rgba(255, 152, 0, 0.25);
}

.budget-assign-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    vertical-align: middle;
}
.budget-assign-chip.partial {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 183, 77, 0.3);
}
.budget-assign-chip.all-assigned {
    background: rgba(76, 175, 80, 0.15);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
[data-theme="light"] .budget-assign-chip.partial {
    background: rgba(255, 152, 0, 0.1);
    color: #e65100;
    border-color: rgba(255, 152, 0, 0.3);
}
[data-theme="light"] .budget-assign-chip.all-assigned {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.3);
}

.budget-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}
.budget-badge.est {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 183, 77, 0.3);
}
.budget-badge.actual {
    background: rgba(76, 175, 80, 0.15);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
[data-theme="light"] .budget-badge.est {
    background: rgba(255, 152, 0, 0.08);
    color: #e65100;
    border-color: rgba(255, 152, 0, 0.25);
}
[data-theme="light"] .budget-badge.actual {
    background: rgba(76, 175, 80, 0.08);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.25);
}

.cost-detail-table tr.row-estimated td:first-child {
    font-style: italic;
}
.cost-detail-table tr.row-actual td:first-child {
    font-weight: 500;
}

/* ============================================
   PHASE 2 #5: HELP MASCOT / CONTEXTUAL ASSISTANT
   ============================================ */
.help-mascot-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #2a6dff, #1e40af);
    box-shadow: 0 4px 20px rgba(42, 109, 255, 0.4), 0 0 0 0 rgba(42, 109, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: mascot-pulse 3s ease-in-out infinite;
}
.help-mascot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(42, 109, 255, 0.5);
    animation: none;
}
.help-mascot-btn.active {
    animation: none;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}
.help-mascot-btn svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}
@keyframes mascot-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(42, 109, 255, 0.4), 0 0 0 0 rgba(42, 109, 255, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(42, 109, 255, 0.4), 0 0 0 10px rgba(42, 109, 255, 0); }
}

/* Help Panel */
.help-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    z-index: 8999;
    width: 340px;
    max-height: 480px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: help-panel-in 0.25s ease-out;
}
.help-panel.visible {
    display: flex;
}
@keyframes help-panel-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.help-panel-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #2a6dff, #1e40af);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.help-panel-header-icon {
    font-size: 22px;
}
.help-panel-header-text h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.help-panel-header-text p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.85;
}
.help-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}
.help-panel-section {
    margin-bottom: 14px;
}
.help-panel-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 8px;
}
.help-tip {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--hover);
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    cursor: default;
    transition: background 0.15s;
}
.help-tip:hover {
    background: var(--border);
}
.help-tip-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.help-tip-text {
    flex: 1;
}
.help-tip-text strong {
    color: var(--accent);
}
.help-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    margin-right: 6px;
    margin-bottom: 6px;
}
.help-action-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.help-panel-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.help-dyk {
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(42, 109, 255, 0.08), rgba(42, 109, 255, 0.03));
    border: 1px solid rgba(42, 109, 255, 0.15);
    font-size: 12px;
    color: var(--text);
    line-height: 1.45;
}
.help-dyk strong {
    color: var(--accent);
}

/* Light theme overrides */
[data-theme="light"] .help-mascot-btn {
    box-shadow: 0 4px 20px rgba(42, 109, 255, 0.3), 0 0 0 0 rgba(42, 109, 255, 0.2);
}
[data-theme="light"] .help-panel {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
[data-theme="light"] .help-dyk {
    background: linear-gradient(135deg, rgba(42, 109, 255, 0.06), rgba(42, 109, 255, 0.02));
}

/* ============================================
   PHASE 2 #11: FLOATING SCRIPT WINDOW
   ============================================ */
.floating-script-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 440px;
    height: 600px;
    min-width: 320px;
    min-height: 300px;
    z-index: 8500;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.floating-script-panel.dragging {
    box-shadow: 0 16px 56px rgba(0,0,0,0.45);
    opacity: 0.95;
}
.floating-script-panel.maximized {
    top: 60px !important;
    left: 20px !important;
    right: 20px !important;
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 80px) !important;
    border-radius: 14px;
}
.floating-script-panel.minimized {
    height: auto !important;
    min-height: auto;
}
.floating-script-panel.minimized .floating-script-toolbar,
.floating-script-panel.minimized .floating-script-content,
.floating-script-panel.minimized .floating-script-resize {
    display: none;
}
.floating-script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1e3a4f, #0f2333);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}
.floating-script-header:active {
    cursor: grabbing;
}
.floating-script-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.floating-script-controls {
    display: flex;
    gap: 4px;
}
.floating-script-controls .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}
.floating-script-controls .btn-icon:hover {
    background: rgba(255,255,255,0.2);
}
.floating-script-toolbar {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    flex-shrink: 0;
}
.floating-script-toolbar input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text);
    font-size: 12px;
}
.floating-script-toolbar input[type="text"]:focus {
    outline: none;
    border-color: rgba(42, 109, 255, 0.6);
}
.floating-script-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.75;
    white-space: pre-wrap;
    color: #d4d7e0;
}
.floating-script-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--muted) 50%);
    opacity: 0.4;
    border-radius: 0 0 14px 0;
}
.floating-script-resize:hover {
    opacity: 0.7;
}

/* Light theme */
[data-theme="light"] .floating-script-panel {
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}
[data-theme="light"] .floating-script-content {
    color: #333;
}
[data-theme="light"] .floating-script-header {
    background: linear-gradient(135deg, #1e3a4f, #2a5070);
}

/* ============================================
   PHASE 2 #11: FLOATING SCRIPT WINDOW
   ============================================ */
.floating-script-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.floating-script-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.floating-script-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Floating Window */
.floating-script-window {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 420px;
    height: 560px;
    min-width: 320px;
    min-height: 300px;
    z-index: 8000;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    resize: both;
}
.floating-script-window.visible {
    display: flex;
}
/* Drag handle / title bar */
.floating-script-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, #1e3a4f, #2a5070);
    cursor: move;
    user-select: none;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.floating-script-titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.floating-script-titlebar-actions {
    display: flex;
    gap: 4px;
}
.floating-script-titlebar-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.floating-script-titlebar-actions button:hover {
    background: rgba(255,255,255,0.25);
}
/* Search bar */
.floating-script-search {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.floating-script-search input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
}
.floating-script-search input:focus {
    outline: none;
    border-color: var(--accent);
}
.floating-script-search button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.floating-script-search button:hover {
    background: var(--border);
}
/* Content area */
.floating-script-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    color: var(--text);
}
.floating-script-body .screenplay-scene-heading {
    font-weight: 700;
    color: var(--text);
    background: rgba(42, 109, 255, 0.1);
    padding: 4px 8px;
    border-left: 3px solid rgba(42, 109, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}
.floating-script-body .screenplay-scene-heading:hover {
    background: rgba(42, 109, 255, 0.2);
}
.floating-script-body .screenplay-scene-heading.fs-highlighted {
    background: rgba(255, 215, 0, 0.25);
    border-left-color: gold;
    animation: highlight-pulse 0.6s ease-in-out;
}
.floating-script-body .screenplay-search-highlight {
    background: rgba(255, 215, 0, 0.4);
    color: #000;
    padding: 1px 3px;
    border-radius: 2px;
}
.floating-script-body .screenplay-search-current {
    background: rgba(255, 140, 0, 0.6);
    color: #000;
}
/* Status bar */
.floating-script-status {
    padding: 4px 12px;
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.05);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Light theme overrides */
[data-theme="light"] .floating-script-window {
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
}
[data-theme="light"] .floating-script-titlebar {
    background: linear-gradient(135deg, #1e3a4f, #2d5577);
}

/* ============================================
   PHASE 2 #3: SIDEBAR NAVIGATION REVAMP
   ============================================ */

/* Color-coded nav group headers */
.nav-group[data-group-color="blue"] .nav-group-title,
.nav-group-title[data-group="setup"] { color: #6aa0d1; }
.nav-group-title[data-group="core-analysis"] { color: #8ec3e1; }
.nav-group-title[data-group="my-database"] { color: #a78bfa; }
.nav-group-title[data-group="pre-production"] { color: #f59e0b; }
.nav-group-title[data-group="planning"] { color: #34d399; }
.nav-group-title[data-group="scheduling"] { color: #f87171; }
.nav-group-title[data-group="production"] { color: #fb923c; }
.nav-group-title[data-group="reports"] { color: #60a5fa; }

/* Group title improvements */
.nav-group-title {
    font-weight: 700;
    font-size: 10.5px;
    padding: 10px 16px 6px;
    letter-spacing: 0.8px;
    position: relative;
}
.nav-group-title::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 3px;
    background: currentColor;
    opacity: 0.4;
}
.nav-group-title:hover::before {
    opacity: 0.8;
}

/* Group dividers */
.nav-group + .nav-group {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 4px;
}

/* Improved nav items - larger touch targets */
.nav-item {
    padding: 10px 16px 10px 22px;
    margin: 1px 6px;
    border-radius: 8px;
    border-left: none;
    gap: 10px;
    min-height: 38px;
    position: relative;
}
.nav-item:hover {
    background: rgba(106, 160, 209, 0.1);
}
.nav-item.active {
    background: rgba(106, 160, 209, 0.15);
    border-left: none;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 3px;
    background: var(--accent);
}

/* Icon improvements */
.nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.nav-item:hover .nav-icon {
    transform: scale(1.1);
}
.nav-icon svg {
    width: 18px;
    height: 18px;
}

/* Lock icon refinement */
.nav-lock {
    opacity: 0.4;
}
.nav-lock svg {
    width: 12px;
    height: 12px;
}

/* Collapsed state - tooltip on hover */
.sidebar.collapsed .nav-item {
    position: relative;
    padding: 12px 0;
    margin: 2px 4px;
    border-radius: 8px;
}
.sidebar.collapsed .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Smoother group collapse animation */
.nav-group .nav-item {
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease, margin 0.25s ease;
    max-height: 50px;
    overflow: hidden;
}
.nav-group.nav-collapsed .nav-item {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Scrollbar improvements */
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(106, 160, 209, 0.2);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 160, 209, 0.4);
}

/* Light theme sidebar overrides */
[data-theme="light"] .nav-group + .nav-group {
    border-top-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-item:hover {
    background: rgba(30, 58, 79, 0.06);
}
[data-theme="light"] .nav-item.active {
    background: rgba(30, 58, 79, 0.1);
}
[data-theme="light"] .sidebar.collapsed .nav-item:hover::after {
    background: #1e3a4f;
}

/* ============================================
   PHASE 2 #2: TOP NAVIGATION TOOLBAR
   ============================================ */
.context-toolbar {
    position: fixed;
    top: 60px;
    left: 240px;
    right: 0;
    height: 42px;
    z-index: 90;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 4px;
    transition: left 0.3s ease;
    overflow-x: auto;
    overflow-y: hidden;
}
.sidebar.collapsed ~ .app-layout .context-toolbar,
.sidebar.collapsed ~ .context-toolbar {
    left: 60px;
}
/* Adjust for sidebar collapsed state */
body .context-toolbar {
    left: 240px;
}
body.sidebar-collapsed .context-toolbar {
    left: 60px;
}

.context-toolbar-section {
    display: flex;
    align-items: center;
    gap: 2px;
}
.context-toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
    flex-shrink: 0;
}
.context-toolbar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 700;
    margin-right: 6px;
    white-space: nowrap;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.tb-btn:hover {
    background: var(--hover);
    border-color: var(--border);
}
.tb-btn:active {
    background: rgba(42, 109, 255, 0.1);
}
.tb-btn svg {
    width: 15px;
    height: 15px;
}
.tb-btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.tb-btn.primary:hover {
    background: #1e5bb8;
}
.tb-btn.danger {
    color: #f87171;
}
.tb-btn.danger:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
}

/* Adjust main content to account for toolbar */
.main-content {
    margin-top: 42px;
}

/* Hide toolbar on mobile */
@media (max-width: 768px) {
    .context-toolbar {
        left: 0;
        top: 60px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-content {
        margin-top: 42px;
    }
}

/* Light theme overrides */
[data-theme="light"] .context-toolbar {
    background: #fff;
    border-bottom-color: #e2e5e9;
}
[data-theme="light"] .tb-btn:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}

/* ============================================
   PHASE 2 #17: MAIN PAGE SIMPLIFICATION
   Quick Action Dashboard
   ============================================ */
.project-quickactions {
    margin-bottom: 16px;
}
.project-qa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.project-qa-header h2 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}
.project-qa-toggle {
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    border: none;
    background: none;
    text-decoration: underline;
}
.project-qa-toggle:hover { color: var(--accent); }

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.qa-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.qa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: var(--accent);
}
.qa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
}
.qa-card[data-color="blue"]::before { background: #6aa0d1; }
.qa-card[data-color="purple"]::before { background: #a78bfa; }
.qa-card[data-color="amber"]::before { background: #f59e0b; }
.qa-card[data-color="green"]::before { background: #34d399; }
.qa-card[data-color="red"]::before { background: #f87171; }
.qa-card[data-color="orange"]::before { background: #fb923c; }
.qa-card[data-color="cyan"]::before { background: #22d3ee; }
.qa-card[data-color="pink"]::before { background: #f472b6; }

.qa-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.qa-card-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
}
.qa-card-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}
.qa-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(42, 109, 255, 0.15);
    color: var(--accent);
    font-weight: 700;
}

/* Project status strip */
.project-status-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
}
.project-status-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}
.project-status-steps {
    display: flex;
    gap: 4px;
    flex: 1;
}
.project-step {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background: var(--border);
    transition: background 0.3s;
}
.project-step.done { background: #34d399; }
.project-step.active { background: var(--accent); animation: step-pulse 1.5s ease-in-out infinite; }
@keyframes step-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.project-status-label {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

/* Light theme overrides */
[data-theme="light"] .qa-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
[data-theme="light"] .qa-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
[data-theme="light"] .project-status-strip {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ============================================
   PHASE 2 #10: STORYBOARD ZOOM/EXPAND/REARRANGE
   ============================================ */

/* Lightbox zoom controls */
.lightbox-zoom-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.75);
    padding: 6px 12px;
    border-radius: 10px;
    z-index: 10;
}
.lightbox-zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.lightbox-zoom-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}
.lightbox-zoom-level {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    min-width: 40px;
    text-align: center;
}
.lightbox-zoom-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    outline: none;
}
.lightbox-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

/* Zoomable lightbox image */
.lightbox-content img.zoomed {
    cursor: grab;
    transform-origin: center center;
    transition: transform 0.15s ease;
}
.lightbox-content img.zoomed:active {
    cursor: grabbing;
}
.lightbox-content img {
    max-width: 90vw;
    max-height: 75vh;
    transition: transform 0.2s ease;
}

/* Storyboard drag-and-drop styles */
.storyboard-grid .sortable-ghost {
    opacity: 0.3;
    border: 2px dashed var(--accent);
}
.storyboard-grid .sortable-chosen {
    box-shadow: 0 8px 24px rgba(42, 109, 255, 0.3);
    border-color: var(--accent);
}
.storyboard-grid .sortable-drag {
    opacity: 0.9;
}

/* Storyboard context menu */
.storyboard-ctx-menu {
    position: fixed;
    z-index: 9500;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    padding: 6px 0;
    min-width: 180px;
}
.storyboard-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.12s;
}
.storyboard-ctx-item:hover {
    background: var(--hover);
}
.storyboard-ctx-item.danger { color: #f87171; }
.storyboard-ctx-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ============================================
   PHASE 2 #14: AUTOMATIC CASTING
   ============================================ */
.autocast-results-modal {
    max-width: 600px;
}
.autocast-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.autocast-stat {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 13px;
}
.autocast-stat strong {
    display: block;
    font-size: 22px;
    margin-bottom: 2px;
}
.autocast-stat.success { background: rgba(39, 174, 96, 0.1); border-color: rgba(39, 174, 96, 0.3); }
.autocast-stat.success strong { color: #27ae60; }
.autocast-stat.fail { background: rgba(231, 76, 60, 0.1); border-color: rgba(231, 76, 60, 0.3); }
.autocast-stat.fail strong { color: #e74c3c; }
.autocast-stat.skip { background: var(--hover); }
.autocast-stat.skip strong { color: var(--muted); }

.autocast-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.autocast-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--hover);
}
.autocast-result-row.success { border-color: rgba(39, 174, 96, 0.25); }
.autocast-result-row.failed { border-color: rgba(231, 76, 60, 0.25); background: rgba(231, 76, 60, 0.05); }
.autocast-result-row.skipped { opacity: 0.65; }

.autocast-result-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.autocast-result-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.autocast-result-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}
.autocast-result-character {
    font-weight: 600;
    color: var(--text);
}
.autocast-result-arrow {
    color: var(--muted);
    font-size: 12px;
}
.autocast-result-actor {
    display: flex;
    align-items: center;
    gap: 4px;
}
.autocast-result-status {
    flex-shrink: 0;
}
.badge-success {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}
.badge-fail {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}
.badge-skip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--hover);
    color: var(--muted);
    border: 1px solid var(--border);
}

/* ============================================
   PHASE 3 #19: DEPARTMENTAL TAB VIEWS
   ============================================ */
.dept-section {
    padding: 0;
}
.dept-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 14px;
    flex-wrap: wrap;
}
.dept-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.dept-tab {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.dept-tab:hover {
    background: var(--border);
    color: var(--text);
}
.dept-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.dept-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.dept-stat-card {
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}
.dept-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}
.dept-stat-label {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.dept-content {
    min-height: 120px;
}
.dept-placeholder {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-size: 14px;
}
/* Scene cards within department view */
.dept-scene-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}
.dept-scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--hover);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.dept-scene-header:hover {
    background: var(--border);
}
.dept-scene-title {
    font-weight: 700;
    font-size: 14px;
}
.dept-scene-meta {
    font-size: 12px;
    color: var(--muted);
}
.dept-scene-body {
    padding: 12px 14px;
}
/* Equipment / data tables */
.dept-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 10px;
}
.dept-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--hover);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}
.dept-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.dept-table tr:hover td {
    background: rgba(42, 109, 255, 0.04);
}
.dept-table .badge-dept {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(42, 109, 255, 0.1);
    color: var(--accent);
}
.dept-crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.dept-crew-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--hover);
}
.dept-crew-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.dept-crew-info {
    flex: 1;
    min-width: 0;
}
.dept-crew-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dept-crew-role {
    font-size: 11px;
    color: var(--muted);
}
.dept-shot-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}
.dept-shot-card {
    min-width: 200px;
    max-width: 280px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--card);
    font-size: 12px;
}
.dept-shot-card h6 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
}
.dept-shot-card .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
}
.dept-shot-card .detail-row:last-child {
    border-bottom: none;
}
.dept-shot-card .detail-label {
    color: var(--muted);
    font-size: 11px;
}
.dept-shot-card .detail-value {
    font-weight: 600;
    font-size: 12px;
}

/* Light theme overrides */
[data-theme="light"] .dept-tab.active {
    background: #2a6dff;
    color: #fff;
}
[data-theme="light"] .dept-stat-value {
    color: #1e40af;
}

/* ============================================
   PHASE 3 #15: ACTOR POOL VISUAL REVAMP
   ============================================ */
.actor-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.actor-search {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text);
    font-size: 13px;
}
.actor-search:focus {
    border-color: var(--accent);
    outline: none;
}
.actor-type-filter {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text);
    font-size: 13px;
    min-width: 120px;
}
.actor-view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.actor-view-toggle .view-btn {
    padding: 6px 12px;
    border: none;
    background: var(--hover);
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s;
}
.actor-view-toggle .view-btn:hover {
    background: var(--border);
}
.actor-view-toggle .view-btn.active {
    background: var(--accent);
    color: #fff;
}

/* GRID VIEW (enhanced) */
.actor-grid-view .entity-card.actor-card {
    min-width: 200px;
    max-width: 240px;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.actor-grid-view .entity-card.actor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.actor-grid-view .entity-card-image.portrait {
    height: 180px;
    border-radius: 0;
    overflow: hidden;
}
.actor-grid-view .entity-card-image.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.actor-grid-view .entity-card.actor-card:hover .entity-card-image.portrait img {
    transform: scale(1.05);
}
.actor-grid-view .entity-card-info {
    padding: 10px 12px;
}
.actor-grid-view .entity-card-name {
    font-size: 14px;
    font-weight: 700;
}
.actor-grid-view .entity-card-stats {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
/* Actor role badge */
.actor-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.actor-role-badge.lead { background: rgba(42, 109, 255, 0.15); color: #2a6dff; }
.actor-role-badge.supporting { background: rgba(157, 255, 140, 0.15); color: #4caf50; }
.actor-role-badge.day_player { background: rgba(255, 183, 77, 0.15); color: #f39c12; }
.actor-role-badge.extra { background: rgba(189, 189, 189, 0.15); color: #999; }

/* LIST VIEW */
.actor-list-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}
.actor-list-view .entity-card.actor-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    min-width: 100%;
    max-width: 100%;
    border-radius: 10px;
    padding: 8px 12px;
    gap: 14px;
}
.actor-list-view .entity-card-image.portrait {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.actor-list-view .entity-card-image.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.actor-list-view .entity-image-overlay {
    display: none;
}
.actor-list-view .entity-card-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
}
.actor-list-view .entity-card-header {
    min-width: 150px;
}
.actor-list-view .entity-card-name {
    font-size: 14px;
    font-weight: 700;
}
.actor-list-view .entity-card-stats {
    font-size: 13px;
    min-width: 100px;
}
.actor-list-view .entity-card-meta {
    font-size: 12px;
    color: var(--muted);
}
.actor-list-view .entity-card-actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
}

/* Light theme */
[data-theme="light"] .actor-search,
[data-theme="light"] .actor-type-filter {
    background: #fff;
    border-color: #d0d5dd;
}
[data-theme="light"] .actor-grid-view .entity-card.actor-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ============================================
   PHASE 3 #4: FOCUS MODE (Reduce Site Overwhelm)
   ============================================ */
/* Focus mode toggle button */
.focus-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.focus-mode-btn:hover {
    background: var(--border);
    color: var(--text);
}
.focus-mode-btn.active {
    background: rgba(42, 109, 255, 0.12);
    color: var(--accent);
    border-color: var(--accent);
}
.focus-mode-btn .focus-icon {
    font-size: 14px;
    transition: transform 0.2s;
}
.focus-mode-btn.active .focus-icon {
    transform: scale(1.15);
}

/* When focus mode is active, hide non-active sections */
.focus-mode-active .card.collapsible {
    display: none !important;
}
.focus-mode-active .card.collapsible.focus-visible {
    display: block !important;
}
/* Keep always-visible sections */
.focus-mode-active #sectionEntitySync,
.focus-mode-active #sectionCreditPackages,
.focus-mode-active #sectionCurrentProject {
    display: block !important;
}
/* Focus mode section transition */
.focus-mode-active .card.collapsible.focus-visible {
    animation: focus-fade-in 0.25s ease-out;
}
@keyframes focus-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Focus mode breadcrumb */
.focus-breadcrumb {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--muted);
}
.focus-mode-active .focus-breadcrumb {
    display: flex;
}
.focus-breadcrumb-label {
    font-weight: 700;
    color: var(--accent);
}
.focus-breadcrumb-section {
    color: var(--text);
    font-weight: 600;
}
.focus-breadcrumb-nav {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.focus-breadcrumb-nav button {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.focus-breadcrumb-nav button:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Light theme */
[data-theme="light"] .focus-mode-btn.active {
    background: rgba(42, 109, 255, 0.08);
    border-color: #2a6dff;
}

/* ============================================
   PHASE 3 #6: CINEMA MODE (Horizontal Filmstrip)
   ============================================ */
.cinema-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cinema-mode-btn:hover {
    background: var(--border);
    color: var(--text);
}
.cinema-mode-btn.active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border-color: #7c3aed;
}

/* Cinema View */
#cinemaView {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cinema-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.cinema-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cinema-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cinema-back-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.cinema-back-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.cinema-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.cinema-progress {
    font-size: 13px;
    color: #8899aa;
    font-weight: 500;
}
.cinema-arrow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.cinema-arrow-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Horizontal Track */
.cinema-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.cinema-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding: 0;
}
.cinema-track::-webkit-scrollbar {
    height: 6px;
}
.cinema-track::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}
.cinema-track::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Scene Panel (each is a full-width snap point) */
.cinema-scene-panel {
    min-width: 100vw;
    max-width: 100vw;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 20px 32px;
    box-sizing: border-box;
}
.cinema-scene-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.cinema-scene-label {
    font-size: 14px;
    font-weight: 800;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cinema-scene-heading {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.cinema-scene-meta {
    font-size: 13px;
    color: #8899aa;
}

/* Shot Filmstrip inside scene panel */
.cinema-shots-strip {
    flex: 1;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 16px;
    scroll-snap-type: x proximity;
    align-items: stretch;
}
.cinema-shots-strip::-webkit-scrollbar {
    height: 5px;
}
.cinema-shots-strip::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}

/* Shot Card (filmstrip style) */
.cinema-shot-card {
    min-width: 300px;
    max-width: 340px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1a1f35, #151929);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    transition: border-color 0.2s, transform 0.2s;
}
.cinema-shot-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}
.cinema-shot-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #0d0f18;
    display: block;
}
.cinema-shot-img-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0f18, #151929);
    color: #4a5568;
    font-size: 36px;
}
.cinema-shot-body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cinema-shot-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}
.cinema-shot-id {
    font-size: 11px;
    color: #7c3aed;
    font-weight: 600;
}
.cinema-shot-desc {
    font-size: 12px;
    color: #8899aa;
    line-height: 1.4;
    max-height: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cinema-shot-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.cinema-shot-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #a0aec0;
}
.cinema-shot-chip.cost {
    color: #68d391;
    border-color: rgba(104, 211, 145, 0.2);
}
.cinema-shot-chip.duration {
    color: #63b3ed;
    border-color: rgba(99, 179, 237, 0.2);
}
.cinema-shot-chip.lights {
    color: #fbd38d;
    border-color: rgba(251, 211, 141, 0.2);
}

/* Progress Bar at Bottom */
.cinema-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.cinema-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    transition: width 0.3s ease;
    width: 0%;
    border-radius: 2px;
}

/* Empty state */
.cinema-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8899aa;
    gap: 12px;
    font-size: 15px;
}
.cinema-empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

/* Light theme */
[data-theme="light"] .cinema-header {
    background: linear-gradient(135deg, #1e3a4f, #2c5270);
}
[data-theme="light"] .cinema-scene-panel {
    background: #f5f6f0;
}
[data-theme="light"] .cinema-shot-card {
    background: #fff;
    border-color: #ddd;
}
[data-theme="light"] .cinema-shot-card:hover {
    border-color: #7c3aed;
}
[data-theme="light"] .cinema-shot-title { color: #1a202c; }
[data-theme="light"] .cinema-shot-desc { color: #4a5568; }
[data-theme="light"] .cinema-scene-heading { color: #1a202c; }
[data-theme="light"] .cinema-shot-img-placeholder {
    background: #e8e8e0;
    color: #a0aec0;
}

/* ============================================
   PHASE 3 #18: PLAYGROUND (Creative Workspace)
   ============================================ */
.playground-container {
    min-height: 400px;
    position: relative;
}
.playground-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Scene Lanes */
.pg-scene-lane {
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--hover);
    overflow: hidden;
}
.pg-scene-lane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(124, 58, 237, 0.06);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
}
.pg-scene-lane-header:hover {
    background: rgba(124, 58, 237, 0.1);
}
.pg-lane-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}
.pg-lane-title .pg-scene-num {
    color: #7c3aed;
    margin-right: 8px;
}
.pg-lane-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    align-items: center;
}
.pg-lane-chevron {
    font-size: 12px;
    transition: transform 0.2s;
}
.pg-scene-lane.collapsed .pg-lane-chevron {
    transform: rotate(-90deg);
}
.pg-scene-lane.collapsed .pg-shots-lane {
    display: none;
}

/* Shots Lane (horizontal scrollable) */
.pg-shots-lane {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 160px;
    align-items: stretch;
}
.pg-shots-lane::-webkit-scrollbar {
    height: 5px;
}
.pg-shots-lane::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Shot Cards in Playground */
.pg-shot-card {
    min-width: 220px;
    max-width: 240px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    position: relative;
}
.pg-shot-card:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}
.pg-shot-card:active {
    cursor: grabbing;
}
.pg-shot-card.sortable-ghost {
    opacity: 0.4;
    border: 2px dashed #7c3aed;
}
.pg-shot-card.sortable-chosen {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: rotate(1deg) scale(1.02);
}
.pg-shot-card.sortable-drag {
    opacity: 0.9;
}

/* Shot card parts */
.pg-shot-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #0d0f18;
}
.pg-shot-thumb-placeholder {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover);
    color: var(--muted);
    font-size: 28px;
}
.pg-shot-info {
    padding: 8px 10px;
}
.pg-shot-info-id {
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
}
.pg-shot-info-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0;
}
.pg-shot-info-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
    max-height: 2.7em;
    overflow: hidden;
}
.pg-shot-chips {
    display: flex;
    gap: 4px;
    padding: 4px 10px 8px;
    flex-wrap: wrap;
}
.pg-chip {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted);
}
.pg-chip.cost { color: #68d391; border-color: rgba(104, 211, 145, 0.2); }
.pg-chip.dur { color: #63b3ed; border-color: rgba(99, 179, 237, 0.2); }

/* Expanded Detail Panel */
.pg-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 7000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.pg-detail-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 640px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    padding: 24px;
}
.pg-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.pg-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pg-detail-close:hover { background: var(--border); color: var(--text); }
.pg-detail-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 14px;
}
.pg-detail-section {
    margin-bottom: 12px;
}
.pg-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 4px;
}
.pg-detail-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

/* Context menu */
.pg-context-menu {
    position: fixed;
    z-index: 8000;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 180px;
    padding: 6px 0;
    display: none;
}
.pg-context-menu.visible { display: block; }
.pg-ctx-item {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pg-ctx-item:hover {
    background: var(--hover);
}
.pg-ctx-item.danger { color: #ef4444; }
.pg-ctx-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Light theme */
[data-theme="light"] .pg-scene-lane { background: #f9f9f5; }
[data-theme="light"] .pg-scene-lane-header { background: rgba(124, 58, 237, 0.04); }
[data-theme="light"] .pg-shot-card { background: #fff; }
[data-theme="light"] .pg-shot-thumb-placeholder { background: #f0f0e8; }

/* ============================================
   GENERIC IMAGE LIGHTBOX
   ============================================ */
.image-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.image-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.image-lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.image-lightbox-close {
    position: absolute;
    top: -14px; right: -14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    transition: background 0.15s;
}
.image-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}
.image-lightbox-caption {
    margin-top: 12px;
    text-align: center;
    color: #eee;
    font-size: 14px;
    max-width: 600px;
}

/* Make shot card images clickable */
.shot-image img,
.shot-full-details-image img {
    cursor: pointer;
    transition: opacity 0.15s;
}
.shot-image img:hover,
.shot-full-details-image img:hover {
    opacity: 0.85;
}


/* Shot full details image */
.shot-full-details-image {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.shot-full-details-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Entity images clickable */
.entity-image-display img {
    cursor: pointer;
    transition: opacity 0.15s;
}
.entity-image-display img:hover {
    opacity: 0.85;
}

/* Playground detail image clickable */
.pg-detail-img {
    cursor: pointer;
    transition: opacity 0.15s;
}
.pg-detail-img:hover {
    opacity: 0.85;
}

