/* ================================================
   1. ROOT VARIABLES & GLOBAL STYLES
   ================================================ */
:root {
  /* --- User Brand Palette (From Dashboard) --- */
  --color-primary: #5a189a;
  --color-secondary: #ffc300;
  --color-tertiary: #c0c0c0;
  
  /* --- Theme Variables --- */
  --color-background: #f4f7f9;
  --color-card-background: #ffffff;
  --color-text: #333333;
  --color-soft-gray: #6b7280;
  --color-light-gray: #e5e7eb;
  --color-dark-purple: #3c096c;
  --color-success: #28a745;
  --color-error: #dc3545;
  --color-border: #e0e0e0;

  /* --- Glass/UI Variables --- */
  --bg-body: var(--color-background);
  --bg-glass-panel: rgba(255, 255, 255, 0.55);
  --bg-glass-card: rgba(255, 255, 255, 0.6);
  --bg-input: rgba(255, 255, 255, 0.75);
  --glass-blur: blur(18px) saturate(180%);
  
  --border-glass: rgba(255, 255, 255, 0.7);
  
  --shadow-glass: 0 8px 32px rgba(90, 24, 154, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-card: 0 4px 16px rgba(90, 24, 154, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  
  --font-main: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-head: 'Montserrat', sans-serif;
  
  --radius-std: 16px;
  --radius-round: 50px;
}

/* ================================================
   2. DARK MODE OVERRIDES ("Studio Black")
   ================================================ */
body.dark {
  --bg-body: #050505; 
  --bg-glass-panel: rgba(15, 10, 25, 0.65); 
  --bg-glass-card: rgba(20, 15, 35, 0.6); 
  --bg-input: rgba(30, 25, 45, 0.75); 
  
  --color-text: #ffffff;
  --color-soft-gray: #a3a3a3;
  --color-border: #3c096c; 
  --border-glass: rgba(90, 24, 154, 0.35);
  --color-secondary: #ffd60a; 
  --color-background: #050505;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(90, 24, 154, 0.15);
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    color: var(--color-text);
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: block;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 20% 20%, rgba(90,24,154,0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(255,195,0,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

html {
    height: 100%;
    width: 100%;
}

/* Glass Container Style */
.container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
    overflow: hidden;
}

body.dark .container {
    color: #FFF;
}

.container {
    overflow: hidden;
}


/* ================================================
   2. HEADER
   ================================================ */
.header-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
}

body.dark .header-section {
    background: var(--bg-glass-panel);
    border-color: var(--border-glass);
}

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

.action-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--color-dark-purple);
    transform: translateY(-1px);
}

.action-btn.export-header-btn {
    background: linear-gradient(135deg, var(--color-secondary), #ffd60a);
    color: #3E1F47;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 195, 0, 0.3);
}

.action-btn.export-header-btn:hover {
    background: linear-gradient(135deg, #ffd60a, #ffdd38);
    box-shadow: 0 4px 12px rgba(255, 195, 0, 0.4);
}

.toggle-details-btn {
    display: none;
    min-width: 0;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0 14px;
    height: 36px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 20px rgba(90, 24, 154, 0.16);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toggle-details-btn:hover {
    transform: translateY(-1px);
    background: #4f0f98;
    box-shadow: 0 10px 26px rgba(90, 24, 154, 0.2);
}

.toggle-details-btn i {
    font-size: 0.95rem;
}

@media (max-width: 900px) {
  .toggle-details-btn {
      display: inline-flex;
  }

  .header-section {
      align-items: center;
  }

  .header-actions {
      order: 4;
  }

  .toggle-details-btn {
      order: 3;
  }

  .add-shot-header-btn {
      order: 5;
  }

  #sceneTitle {
      flex: 1;
      min-width: 0;
      text-align: center;
  }
}

body.dark .action-btn {
    background: var(--color-secondary);
    color: #3E1F47;
}

body.dark .action-btn:hover {
    background: #ffd60a;
}

.back-btn {
    background: none; border: none; font-size: 1.2rem;
    color: var(--color-soft-gray); cursor: pointer;
    padding: 8px; border-radius: 50%;
    transition: all 0.2s;
}
.back-btn:hover {
    background: rgba(90,24,154,0.15);
    color: var(--color-primary);
    transform: scale(1.05);
}
body.dark .back-btn:hover {
    background: rgba(255,255,255,0.12);
}

#sceneTitle {
    flex-grow: 1;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shortcut-hint {
    font-size: 0.7rem;
    color: var(--color-soft-gray);
    margin-left: 10px;
    padding: 2px 8px;
    background: rgba(90, 24, 154, 0.08);
    border-radius: 8px;
}
body.dark #sceneTitle {
    color: white;
    text-shadow: 0 0 10px rgba(90, 24, 154, 0.6);
}

.add-shot-header-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.add-shot-header-btn:hover {
    transform: scale(1.05);
}

/* ================================================
   2.5 STATS BAR
   ================================================ */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    color: var(--color-text);
}

.stat-item + .stat-item {
    border-left: 1px solid var(--border-glass);
}

body.dark .stat-item {
    color: #fff;
}

.stat-item i {
    font-size: 1rem;
    color: var(--color-primary);
}

.stat-item span {
    font-weight: 700;
    font-size: 0.95rem;
}

.stat-item small {
    color: var(--color-soft-gray);
    font-size: 0.75rem;
}

body.dark .stat-item i { color: var(--color-secondary); }

.stat-item span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-item small {
    font-size: 0.7rem;
    color: var(--color-soft-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}


.progress-stat {
    position: relative;
}

.progress-ring {
    position: relative;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--color-light-gray);
    stroke-width: 3;
}
body.dark .progress-ring-bg { stroke: #333; }

.progress-ring-circle {
    fill: none;
    stroke: var(--color-success);
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s ease;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-text);
    text-shadow: 0 0 4px rgba(0,0,0,0.5);
}

body.dark .progress-text { color: var(--color-secondary); }



/* ================================================
   3. COMPACT CONTROLS
   ================================================ */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px 20px 0;
}

.control-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.search-wrapper {
    position: relative;
    flex: 2;
    min-width: 220px;
}
.search-wrapper .fa-search {
    position: absolute; top: 50%; left: 10px; transform: translateY(-50%);
    color: var(--color-soft-gray); font-size: 0.85rem;
}

#searchInput {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px 7px 32px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--bg-input);
    color: var(--color-text);
    font-size: 0.82rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
#searchInput:focus { 
    outline: none; 
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px rgba(255, 195, 0, 0.1);
}

.compact-select {
    flex: 1;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--bg-input);
    color: var(--color-text);
    font-size: 0.82rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.compact-select:focus { outline: none; border-color: var(--color-secondary); }

.view-toggle {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.view-btn {
    background: var(--bg-input);
    border: none;
    padding: 5px 9px;
    cursor: pointer;
    color: var(--color-soft-gray);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.auto-sequence-btn {
    flex: 1;
    min-width: 130px;
    padding: 7px 10px;
    font-size: 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--bg-input);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* AI Tools button in header */
.ai-tools-wrapper {
    position: relative;
}

.ai-tools-btn {
    background: var(--bg-glass-panel) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--color-primary) !important;
    box-shadow: none !important;
    font-weight: 600;
}

.ai-tools-btn:hover {
    background: rgba(90,24,154,0.1) !important;
    border-color: var(--color-primary) !important;
    transform: none !important;
}

body.dark .ai-tools-btn {
    color: var(--color-secondary) !important;
    border-color: var(--border-glass) !important;
}

body.dark .ai-tools-btn:hover {
    border-color: var(--color-secondary) !important;
    color: var(--color-secondary) !important;
}

/* AI dropdown panel */
.ai-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-glass-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.16);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 500;
    animation: dropIn 0.15s ease;
}

.ai-dropdown.collapsed {
    display: none;
}

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

.ai-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 13px;
    border: none;
    border-radius: 9px;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-main);
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
}

.ai-dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.ai-dropdown-item:hover {
    background: rgba(90,24,154,0.08);
    color: var(--color-primary);
}

body.dark .ai-dropdown-item { color: #fff; }
body.dark .ai-dropdown-item i { color: var(--color-secondary); }
body.dark .ai-dropdown-item:hover {
    background: rgba(255,195,0,0.08);
    color: var(--color-secondary);
}

.ai-dropdown .ai-hint {
    padding: 4px 13px 6px;
    border-top: 1px solid var(--border-glass);
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--color-soft-gray);
    display: block;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: var(--bg-input);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--color-soft-gray);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(90, 24, 154, 0.1);
    color: var(--color-primary);
}

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

.view-btn.active:hover {
    background: var(--color-dark-purple);
}

.auto-sequence-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1.5px solid var(--color-border);
    background: var(--bg-input);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auto-sequence-btn:hover {
    border-color: var(--color-primary);
    background: rgba(90, 24, 154, 0.05);
}

body.dark .auto-sequence-btn {
    color: var(--color-secondary);
}

body.dark .auto-sequence-btn:hover {
    border-color: var(--color-secondary);
    background: rgba(255, 195, 0, 0.05);
}

.ai-toggle-btn {
    background: var(--bg-input);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: 100%;
}
body.dark .ai-toggle-btn { color: var(--color-secondary); }

.ai-toggle-btn:hover { 
    background: rgba(0,0,0,0.05); 
    border-color: var(--color-primary);
}
body.dark .ai-toggle-btn:hover { background: rgba(255,255,255,0.05); border-color: var(--color-secondary); }
.ai-toggle-btn i { font-size: 0.95rem; }

#aiChevron {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.ai-toggle-btn.active #aiChevron {
    transform: rotate(180deg);
}

.ai-panel {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.ai-panel.collapsed {
    display: none;
}

@media (max-width: 900px) {
  .toggle-details-btn {
      display: inline-flex;
  }

  .container.shotlist-collapsed .stats-bar,
  .container.shotlist-collapsed .controls-section,
  .container.shotlist-collapsed .header-actions {
      display: none;
  }

  .container.shotlist-collapsed .header-section {
      padding-bottom: 8px;
  }
}

/* Gradients kept for AI buttons as they are feature highlights */
.generate-shots-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FFA07A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.generate-shots-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #FF5252 0%, #FF7043 50%, #FF8A65 100%);
}

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

.draft-shot-btn {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 50%, #2ECC71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.draft-shot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.5);
    background: linear-gradient(135deg, #3DBDB4 0%, #39907D 50%, #27AE60 100%);
}

.draft-shot-btn:active {
    transform: translateY(0);
}

.templates-btn {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 50%, #6C3483 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
    width: 100%;
}

.templates-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 89, 182, 0.5);
    background: linear-gradient(135deg, #884EA0 0%, #7D3C98 50%, #5B2C6F 100%);
}

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

#saveTemplateBtn {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 50%, #6C3483 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4) !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
}

#saveTemplateBtn:hover {
    background: linear-gradient(135deg, #884EA0 0%, #7D3C98 50%, #5B2C6F 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(155, 89, 182, 0.5) !important;
}

#saveTemplateBtn:active {
    transform: translateY(0) !important;
}

.ai-hint {
    font-size: 0.75rem; 
    color: var(--color-soft-gray); 
    text-align: center; 
    margin-top: 2px;
    line-height: 1.3;
}

/* Enhanced Batch Actions */
.batch-actions-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 500px;
    background: var(--bg-glass-panel);
    border: 2px solid var(--color-secondary);
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--color-text);
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    z-index: 100;
}

.batch-actions-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

body.dark .batch-actions-container {
    background: rgba(20, 20, 20, 0.9);
    border-color: var(--color-secondary);
}


body.dark .batch-actions-container { border-color: #ffd60a; }

.batch-actions-container .batch-header span {
    color: var(--color-text);
}


.clear-selection-btn {
    color: var(--color-soft-gray);
}

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


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

.batch-actions-container.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

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

.batch-header span {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}
body.dark .batch-header span { color: var(--color-secondary); }

.clear-selection-btn {
    background: none;
    border: none;
    color: var(--color-soft-gray);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

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

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

.batch-action-btn {
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.batch-action-btn.complete {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}
body.dark .batch-action-btn.complete { background: rgba(46, 125, 50, 0.2); color: #66bb6a; }

.batch-action-btn.complete:hover {
    background: #2e7d32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.batch-action-btn.duplicate {
    background: rgba(21, 101, 192, 0.1);
    color: #1565c0;
}
body.dark .batch-action-btn.duplicate { background: rgba(21, 101, 192, 0.2); color: #42a5f5; }

.batch-action-btn.duplicate:hover {
    background: #1565c0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.batch-action-btn.delete {
    background: rgba(198, 40, 40, 0.1);
    color: #c62828;
}
body.dark .batch-action-btn.delete { background: rgba(198, 40, 40, 0.2); color: #ef5350; }

.batch-action-btn.delete:hover {
    background: #c62828;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.batch-action-btn.export {
    background: rgba(230, 81, 0, 0.1);
    color: #e65100;
}
body.dark .batch-action-btn.export { background: rgba(230, 81, 0, 0.2); color: #ff9800; }

.batch-action-btn.export:hover {
    background: #e65100;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
}

/* ================================================
   4. ENHANCED EMPTY STATE
   ================================================ */
.no-items-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

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

.empty-state-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.empty-state-animation .fa-film {
    font-size: 4rem;
    color: var(--color-light-gray);
    animation: pulse 2s ease-in-out infinite;
}
body.dark .empty-state-animation .fa-film { color: #333; }

.empty-state-animation .plus-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--color-primary);
    animation: bounce 2s ease-in-out infinite;
}
body.dark .empty-state-animation .plus-icon { color: var(--color-secondary); }

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.no-items-message h3 {
    margin: 10px 0;
    color: var(--color-primary);
    font-size: 1.3rem;
}
body.dark .no-items-message h3 { color: #fff; }

.no-items-message p {
    color: var(--color-soft-gray);
    margin-bottom: 20px;
}

.empty-state-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.empty-action-btn {
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.empty-action-btn.primary {
    background: var(--color-primary);
    color: white;
}

.empty-action-btn.primary:hover {
    background: var(--color-dark-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.empty-action-btn.secondary {
    background: var(--bg-glass-card);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
body.dark .empty-action-btn.secondary { color: var(--color-secondary); border-color: var(--color-secondary); }

.empty-action-btn.secondary:hover {
    background: var(--color-primary);
    color: white;
}
body.dark .empty-action-btn.secondary:hover { background: var(--color-secondary); color: #000; }

.quick-guide {
    background: var(--bg-input);
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
    border: 1px solid var(--border-glass);
}

.quick-guide p {
    margin: 0 0 15px 0;
    color: var(--color-primary);
}
body.dark .quick-guide p { color: var(--color-secondary); }

.quick-guide ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-guide li {
    padding: 8px 0;
    color: var(--color-soft-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-guide li i {
    color: var(--color-primary);
    font-size: 1rem;
}
body.dark .quick-guide li i { color: var(--color-secondary); }

/* Loading Skeleton */
.loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.skeleton-shot {
    background: var(--bg-glass-card);
    border-radius: 12px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.skeleton-shot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

.skeleton-shot::after {
    content: '';
    display: block;
    height: 80px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}
body.dark .skeleton-shot::after { background: rgba(255,255,255,0.05); }

/* ================================================
   5.5 TABLE VIEW
   ================================================ */
.shot-table {
    background: var(--bg-glass-card);
    border-top: 1px solid var(--border-glass);
    overflow: auto;
    flex: 1;
    min-height: 0;       /* critical — lets flex child shrink below content size */
    box-shadow: none;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    margin: 0;
    border-radius: 0;
}

.shot-table-content {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.shot-table-content td {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    padding: 16px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.shot-table-content th {
    background: var(--bg-glass-card);
    color: var(--color-primary);
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(90, 24, 154, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.shot-table-content thead {
    position: sticky;
    top: 0;
    z-index: 998;
}



.shot-table-content th:hover {
    background: linear-gradient(135deg, rgba(90, 24, 154, 0.12), rgba(90, 24, 154, 0.16));
    cursor: pointer;
}

.shot-table-content th.sort-asc::after,
.shot-table-content th.sort-desc::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.shot-table-content th.sort-asc::after {
    border-bottom: 6px solid var(--color-primary);
}

.shot-table-content th.sort-desc::after {
    border-top: 6px solid var(--color-primary);
}

.shot-table-content td {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    padding: 16px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.shot-table-content tbody tr.completed {
    background: rgba(40, 167, 69, 0.08);
}

.shot-table-content tbody tr.incomplete {
    background: rgba(255, 193, 7, 0.06);
}

.shot-table-content tbody tr:hover {
    background: rgba(90, 24, 154, 0.04);
    transition: background-color 0.2s ease;
}

.shot-table-content tbody tr {
    position: relative;
    z-index: 1;
}

.shot-table-content thead,
.shot-table-content th {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--bg-glass-card);
}

.shot-table-content tbody tr:hover td {
    background: transparent;
}

/* Responsive column widths */
.checkbox-col { width: 50px; text-align: center; }
.scene-col { width: 80px; }
.shot-col { width: 70px; }
.type-col { width: 140px; max-width: 140px; overflow: hidden; }
.description-col { min-width: 200px; max-width: 360px; overflow: hidden; }
.angle-col { width: 120px; }
.movement-col { width: 120px; }
.lens-col { width: 100px; }
.location-col { width: 100px; }
.duration-col { width: 80px; text-align: center; }
.status-col { width: 100px; text-align: center; }
.actions-col { width: 120px; text-align: center; }

.shot-table-content th, .shot-table-content td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-col .shot-type {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description-col {
  white-space: normal;
  overflow-wrap: break-word;
}

/* Mobile responsiveness */
@media (max-width: 1200px) {
    .description-col { min-width: 150px; }
    .angle-col, .movement-col { width: 100px; }
}

@media (max-width: 768px) {
    .shot-table-content {
        font-size: 0.75rem;
    }

    .shot-table-content th,
    .shot-table-content td {
        padding: 12px 8px;
    }

    .checkbox-col { width: 40px; }
    .scene-col, .shot-col { width: 60px; }
    .type-col { width: 120px; }
    .description-col { min-width: 120px; }
    .angle-col, .movement-col, .lens-col, .location-col { width: 80px; }
    .duration-col, .status-col { width: 70px; }
    .actions-col { width: 100px; }
}

.shot-table .shot-sequence {
    font-weight: 800;
    color: var(--color-primary);
    font-size: 1rem;
    display: inline-block;
    background: rgba(90, 24, 154, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    min-width: 32px;
    text-align: center;
}

.shot-table .shot-type {
    background: linear-gradient(135deg, var(--color-primary), var(--color-dark-purple));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(90, 24, 154, 0.3);
    display: inline-block;
    max-width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.shot-table-content th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shot-table-content td {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.description-col {
    max-width: 340px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: top;
}

.description-col .shot-description,
.description-col {
    word-break: break-word;
    overflow-wrap: break-word;
}

.shot-table .completion-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.shot-table .completion-status.completed {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(34, 197, 94, 0.1));
    color: var(--color-success);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.shot-table .completion-status.incomplete {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(251, 191, 36, 0.1));
    color: #92400e;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.shot-table .shot-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.shot-table .action-btn {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-soft-gray);
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shot-table .action-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 24, 154, 0.3);
}

.shot-table .action-btn.edit-btn:hover {
    background: var(--color-primary);
}

.shot-table .action-btn.duplicate-btn:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.shot-table .action-btn.delete-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.preview-col { width: 90px; text-align: center; }
.shot-preview-thumb { width: 80px; height: 45px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border-glass); }
.duration-cell { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.duration-bar-bg { width: 100%; height: 8px; background: rgba(0,0,0,0.08); border-radius: 6px; overflow: hidden; }
.duration-bar-fill { height: 100%; border-radius: 6px; transition: width 0.3s ease; }

.kanban-container, .timeline-container, .storyboard-container {
    background: var(--bg-glass-card);
    border-top: 1px solid var(--border-glass);
    padding: 20px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    border-radius: 0;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
}
.kanban-column {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px;
    min-height: 220px;
}
.kanban-column h4 { margin: 0 0 8px; font-size: 0.9rem; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; }

.shot-card {
    background: var(--bg-body);
    border: 1px solid var(--border-glass);
    border-left: 6px solid var(--color-primary);
    border-radius: 14px;
    overflow: hidden;
    cursor: grab;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.shot-card.completed { opacity: 0.85; border-color: var(--color-success); }
.shot-card-thumb { width: 100%; height: 100px; object-fit: cover; }
.shot-card-body { padding: 8px; }
.shot-card-top { display: flex; justify-content: space-between; align-items: center; }
.shot-card-top .shot-type { padding: 2px 8px; font-size: 0.65rem; }
.shot-card-metas { display: flex; justify-content: space-between; font-size: 0.7rem; margin-top: 6px; color: var(--color-soft-gray); }
.shot-card-actions { display: flex; gap: 6px; padding: 8px; background: rgba(0,0,0,0.03); }
.shot-card-actions .action-btn { flex: 1; font-size: 0.7rem; }

.timeline-track { display: flex; gap: 8px; align-items: center; min-height: 140px; }
.timeline-bar { height: 60px; border-radius: 10px; position: relative; display: flex; align-items: center; padding: 6px 8px; color: white; font-weight: 700; font-size: 0.75rem; }
.timeline-bar strong { margin-right: 6px; }

.timeline-legend { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.8rem; color: var(--color-soft-gray); border-bottom: 1px solid var(--border-glass); margin-bottom: 12px; }
.timeline-grid { display: flex; flex-direction: column; gap: 12px; }
.timeline-axis { display: flex; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border-glass); }
.timeline-axis-marker { min-width: 80px; font-size: 0.75rem; color: var(--color-soft-gray); text-align: left; }
.timeline-body { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.timeline-row { display: grid; grid-template-columns: 220px 1fr; gap: 10px; align-items: center; }
.timeline-label { font-size: 0.8rem; color: var(--color-text); }
.timeline-bar-wrap { position: relative; width: 100%; height: 42px; background: rgba(0,0,0,0.04); border-radius: 8px; overflow: hidden; }
.timeline-bar-wrap::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px dashed rgba(90,24,154,0.16); }
.timeline-bar { position: absolute; top: 3px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; padding: 0 6px; box-sizing: border-box; cursor: grab; }
.timeline-bar.draggable:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.timeline-bar span { font-size: 0.68rem; color: rgba(255,255,255,0.95); }
.timeline-handle { position: absolute; width: 10px; top: 0; bottom: 0; cursor: ew-resize; background: rgba(255,255,255,0.25); }
.timeline-handle.handle-left { left: -6px; }
.timeline-handle.handle-right { right: -6px; }

.timeline-help { background: var(--bg-glass-card); border: 1px solid var(--border-glass); border-radius: 8px; padding: 12px; margin-top: 8px; font-size: 0.8rem; }
.timeline-help h4 { margin: 0 0 8px; color: var(--color-primary); }
.timeline-help ol { margin: 0; padding-left: 20px; }
.timeline-help li { margin-bottom: 4px; }

.storyboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.storyboard-card { border: 1px solid var(--border-glass); border-radius: 12px; overflow: hidden; background: var(--bg-body); box-shadow: 0 2px 9px rgba(0,0,0,0.08); cursor: pointer; }
.storyboard-thumb { width: 100%; height: 140px; object-fit: cover; }
.storyboard-caption { padding: 8px; font-size: 0.8rem; }
.storyboard-caption p { margin: 6px 0; color: var(--color-text); }

.shot-details-row td { padding: 8px 12px 8px 12px; background: rgba(90,24,154,0.05); }
.shot-details-row.hidden { display: none; }
.shot-detail-line { margin-bottom: 3px; font-size: 0.78rem; color: var(--color-soft-gray); }

.hidden {
    display: none !important;
}

/* Confetti Canvas */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ================================================
   6. MODALS (Glass Modal)
   ================================================ */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center; 
    align-items: flex-end;
}
@media(min-width: 500px) { .modal { align-items: center; } }

.modal-content {
    background: var(--bg-glass-panel);
    width: 100%; 
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    border: 1px solid var(--border-glass);
    color: var(--color-text);
}
@media(min-width: 500px) { .modal-content { border-radius: 20px; width: 90%; } }

@keyframes slideUp { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
}

.close-btn { 
    float: right; 
    font-size: 1.5rem; 
    cursor: pointer; 
    margin-top: -5px;
    color: var(--color-soft-gray);
    transition: color 0.2s;
}

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

.modal-subtitle {
    color: var(--color-soft-gray);
    font-size: 0.9rem;
    margin: -10px 0 20px 0;
}

form label { 
    display: block; 
    font-size: 0.9rem; 
    font-weight: 700; 
    margin: 14px 0 8px; 
    color: var(--color-text); 
}

form input, form textarea {
    width: 100%; 
    min-height: 48px;
    padding: 12px 14px; 
    border: 1.5px solid var(--border-glass);
    border-radius: 10px;
    font-family: inherit; 
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--color-text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(90, 24, 154, 0.1);
}
body.dark form input:focus, body.dark form textarea:focus { 
    border-color: var(--color-secondary); 
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.1);
}

.form-row { display: flex; gap: 10px; }
.half { flex: 1; }

details { 
    margin-top: 15px; 
    border: 1px solid var(--border-glass); 
    padding: 8px; 
    border-radius: 8px; 
}

summary { 
    font-size: 0.85rem; 
    color: var(--color-primary); 
    cursor: pointer; 
    font-weight: 600; 
}
body.dark summary { color: var(--color-secondary); }

.details-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    margin-top: 10px; 
}

.detail-group {
    display: flex;
    flex-direction: column;
}

.detail-group label {
    margin: 0 0 4px 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.detail-group input,
.detail-group select {
    padding: 8px;
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-input);
    color: var(--color-text);
}

.detail-group input:focus,
.detail-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

#scriptContentInput {
    min-height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 15px;
    border: 2px solid var(--border-glass);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--color-text);
    resize: vertical;
}

#scriptContentInput:focus {
    border-color: var(--color-primary);
}
body.dark #scriptContentInput:focus { border-color: var(--color-secondary); }

#scriptContentInput::placeholder {
    color: var(--color-soft-gray);
    font-style: italic;
}

#nlShotInput {
    min-height: 100px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 12px;
    border: 2px solid var(--border-glass);
    border-radius: 8px;
    resize: vertical;
}

#nlShotInput:focus {
    border-color: var(--color-primary);
}
body.dark #nlShotInput:focus { border-color: var(--color-secondary); }

.ai-style-selector {
    margin-bottom: 15px;
}

.ai-style-selector label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
    color: var(--color-text);
}

.radio-group input[type="radio"] {
    width: auto;
    accent-color: var(--color-primary);
}
body.dark .radio-group input[type="radio"] { accent-color: var(--color-secondary); }

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.template-card {
    background: var(--bg-glass-card);
    border: 2px solid var(--border-glass);
    border-radius: 14px;
    min-height: 120px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
}

.template-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.template-card:hover i {
    transform: scale(1.15);
}
body.dark .template-card:hover { border-color: var(--color-secondary); }

.template-card i {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
}
body.dark .template-card i { color: var(--color-secondary); }

.template-card h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.template-card p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-soft-gray);
    line-height: 1.3;
}

.modal-buttons { 
    margin-top: 20px; 
    padding-top: 12px;
    border-top: 1px solid var(--border-glass);
    display: flex; 
    gap: 12px; 
    justify-content: flex-end; 
}

.primary-btn {
    min-height: 48px;
    background: var(--color-primary); 
    color: white; 
    padding: 14px 28px;
    border: none; 
    border-radius: 10px; 
    width: 100%; 
    font-weight: 700; 
    cursor: pointer;
    transition: all 0.25s ease;
}

.primary-btn:hover {
    background: var(--color-dark-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 24, 154, 0.3);
}
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(62, 31, 71, 0.3);
}

.secondary-btn {
    min-height: 48px;
    background: var(--bg-input);
    color: var(--color-text);
    padding: 14px 28px;
    border: 2px solid var(--border-glass);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.secondary-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
body.dark .secondary-btn:hover { 
    background: rgba(255,255,255,0.05);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.delete-btn-text { 
    background: none; 
    border: none; 
    color: #d32f2f; 
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}
body.dark .delete-btn-text { color: #ef5350; }

.delete-btn-text:hover {
    color: #a52020;
}

.delete-btn { 
    background: #d32f2f; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #b71c1c;
}

.compact-modal {
    max-width: 420px;
    border-radius: 20px;
}

/* Spinner */
.spinner-small {
    display: none; 
    width: 18px; 
    height: 18px; 
    border: 2.5px solid var(--color-primary);
    border-top-color: rgba(90, 24, 154, 0.3); 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
    margin: 0 auto;
}
body.dark .spinner-small {
    border-color: var(--color-secondary);
    border-top-color: rgba(255, 195, 0, 0.3);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-message {
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    background: #333; 
    color: #fff; 
    min-height: 44px;
    padding: 14px 24px; 
    border-radius: 12px;
    opacity: 0; 
    visibility: hidden; 
    transition: 0.3s; 
    z-index: 3000; 
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast-message.show { opacity: 1; visibility: visible; bottom: 30px; }
.toast-message.error { 
    background: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
.toast-message.success { 
    background: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Drag & Drop Styles */
.sortable-ghost {
    opacity: 0.3;
    background-color: rgba(90, 24, 154, 0.1);
}

.sortable-drag {
    opacity: 0.7;
    transform: scale(0.98);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ================================================
   MOBILE RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 600px) {
    .container {
        padding: 12px;
    }
    
    /* Form elements */
    form label {
        font-size: 0.9rem;
        margin: 12px 0 6px;
    }
    
    #searchInput {
        font-size: 0.95rem;
    }
    
    .compact-select {
        font-size: 0.9rem;
    }
    
    /* Grid gaps */
    .templates-grid {
        gap: 10px;
    }
    
    .batch-buttons {
        gap: 6px;
    }
    
    /* AI panel buttons full width */
    .ai-panel .primary-btn,
    .ai-panel .secondary-btn {
        width: 100%;
    }
    
    /* Checkboxes scaled */
    input[type="checkbox"] {
        transform: scale(1.2);
    }
    
    /* Modal adjustments */
    .modal-content {
        border-radius: 18px 18px 0 0;
        padding: 20px;
    }
    
    @media(min-width: 500px) { 
        .modal-content { 
            border-radius: 18px; 
        } 
    }
}

/* Shot Detail View Modal */
.shot-detail-modal .modal-content {
    max-width: 560px;
}

.shot-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.shot-detail-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-primary);
    background: rgba(90,24,154,0.1);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.dark .shot-detail-num { background: rgba(255,195,0,0.12); color: var(--color-secondary); }

.shot-detail-title {
    flex: 1;
}

.shot-detail-title h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.shot-detail-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.shot-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.shot-detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.shot-detail-field .field-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-soft-gray);
}

.shot-detail-field .field-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.shot-detail-field .field-value.empty {
    color: var(--color-soft-gray);
    font-style: italic;
    font-weight: 400;
}

.shot-detail-description {
    background: rgba(90,24,154,0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
body.dark .shot-detail-description { background: rgba(255,255,255,0.04); }

.shot-detail-description .field-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-soft-gray);
    margin-bottom: 6px;
    display: block;
}

.shot-detail-description p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
}

.shot-detail-notes {
    background: rgba(255,195,0,0.06);
    border: 1px solid rgba(255,195,0,0.2);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.5;
}

.shot-detail-notes .field-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-soft-gray);
    margin-bottom: 4px;
    display: block;
}

.shot-detail-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    margin-bottom: 16px;
}

.shot-detail-status span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.status-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-success);
    cursor: pointer;
}

.shot-detail-actions {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-glass);
}

.shot-detail-actions .primary-btn {
    flex: 1;
}

.shot-detail-actions .secondary-btn {
    flex: 1;
}

/* Row click cursor */
.shot-table-content tbody tr:not(.shot-details-row) {
    cursor: pointer;
}

/* Draft Shot Modal */
.draft-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.draft-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), #7b2ff7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(90, 24, 154, 0.35);
}

.draft-modal-icon i {
    color: #fff;
    font-size: 1.1rem;
}

.draft-modal-header h3 {
    margin: 0 0 2px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.draft-modal-header .modal-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-soft-gray);
}

#nlShotInput {
    min-height: 110px;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 14px;
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    resize: vertical;
    background: var(--bg-input);
    color: var(--color-text);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#nlShotInput:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(90, 24, 154, 0.1);
}
body.dark #nlShotInput:focus { border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(255,195,0,0.1); }

.draft-count-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.count-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-input);
    color: var(--color-primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.count-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
body.dark .count-btn { color: var(--color-secondary); }
body.dark .count-btn:hover { background: var(--color-secondary); color: #000; border-color: var(--color-secondary); }

#draftShotCount {
    width: 64px;
    min-height: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-input);
    color: var(--color-text);
    padding: 6px 8px;
    -moz-appearance: textfield;
}
#draftShotCount::-webkit-outer-spin-button,
#draftShotCount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#draftShotCount:focus { outline: none; border-color: var(--color-primary); }
body.dark #draftShotCount:focus { border-color: var(--color-secondary); }

.count-hint {
    font-size: 0.78rem;
    color: var(--color-soft-gray);
    font-style: italic;
    flex: 1;
}

/* Required asterisk */
.required {
    color: var(--color-error);
    margin-left: 2px;
}
.choose-media-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 8px 14px; border-radius: 10px;
  border: 1px dashed var(--color-primary, #5a189a);
  background: rgba(90,24,154,0.05); color: var(--color-primary, #5a189a);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .2s ease; width: 100%;
  justify-content: center;
}
.choose-media-btn:hover { background: rgba(90,24,154,0.12); }
body.dark .choose-media-btn { border-color: #f6e05e; color: #f6e05e; background: rgba(246,224,94,0.06); }
body.dark .choose-media-btn:hover { background: rgba(246,224,94,0.12); }

.photo-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.photo-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-input, #f8fafc); color: var(--color-soft-gray, #718096);
  font-family: inherit; transition: all .2s ease;
}
.photo-action-btn:hover { border-color: var(--color-primary, #5a189a); color: var(--color-primary, #5a189a); }

/* ── VIEWER MODE BANNER ── */
.viewer-mode-banner {
  width: 100%;
  padding: 10px 20px;
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 999;
}
.viewer-mode-banner i { color: #f59e0b; flex-shrink: 0; }
.viewer-mode-banner span { white-space: normal; }
body.dark .viewer-mode-banner { background: rgba(251,191,36,0.08); color: #fcd34d; border-color: rgba(251,191,36,0.2); }
