/* ═══════════════════════════════════════════════════════════════════════════
   POST-MODERN INDUSTRIAL CYBERPUNK THEME
   Technical HUD / Architectural Blueprint Aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  /* Color System */
  --bg-void: #000814;
  --bg-elevated: #001029;
  --bg-surface: #00183d;
  --bg-surface-hover: #002451;
  
  --accent-red: #fb0445;
  --accent-red-glow: rgba(251, 4, 69, 0.3);
  --accent-red-dim: rgba(251, 4, 69, 0.15);
  
  --danger-color: #ef4444;
  
  --technical-indigo: #4f46e5;
  --technical-indigo-glow: rgba(79, 70, 229, 0.3);
  --technical-indigo-dim: rgba(79, 70, 229, 0.15);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-on-accent: #ffffff;
  
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.2);
  --border-medium: rgba(255, 255, 255, 0.3);
  
  /* Platform Colors */
  --youtube: #ff0000;
  --instagram: #e1306c;
  --tiktok: #00f2ea;
  
  /* Typography */
  --font-display: 'Archivo Black', 'Inter', sans-serif;
  --font-data: 'JetBrains Mono', monospace;
  --font-interface: 'Inter', 'Noto Sans', sans-serif;
  --font-ui: 'Inter', 'Noto Sans', sans-serif;
  
  /* Shadows - Updated for softer, modern tech look */
  --shadow-block: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-block-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-block-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-glow-red: 0 0 20px var(--accent-red-glow);
  --shadow-glow-indigo: 0 0 20px var(--technical-indigo-glow);
  
  /* Transitions */
  --transition-snap: 0.1s ease;
  --transition-smooth: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-interface);
  font-weight: 300;
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Grid Overlay Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* Dot Pattern Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.main-wrapper {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 2rem;
  transition: margin-left var(--transition-smooth);
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLIENT SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.client-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: sticky;
  top: 0;
}

.client-sidebar.collapsed {
  width: 60px;
}

.client-sidebar.collapsed .sidebar-content {
  display: none;
}

.client-sidebar.collapsed .sidebar-header h3 {
  display: none;
}

.client-sidebar.collapsed .btn-sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

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

.sidebar-tabs {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.sidebar-tab {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: all var(--transition-snap);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.sidebar-tab:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.sidebar-tab.active {
  background: var(--accent-red-dim);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.client-sidebar.collapsed .sidebar-tabs {
  display: none;
}

/* Product list styles */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.25rem;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-snap);
}

.product-group-header:hover {
  color: var(--text-primary);
}

.product-group-header-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-group-header .chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-snap);
}

.product-group.collapsed .product-group-header .chevron {
  transform: rotate(-90deg);
}

.product-group-header .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  opacity: 0.7;
  transition: opacity var(--transition-snap);
}

.product-group-header:hover .btn {
  opacity: 1;
}

.product-group.collapsed .product-item {
  display: none;
}

.product-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem;
  transition: all var(--transition-snap);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-elevated);
}

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

.product-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-code {
  font-family: var(--font-data);
  font-size: 0.6rem;
  color: var(--technical-indigo);
  background: var(--technical-indigo-dim);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

/* Bundle product codes in red */
.product-item.bundle .product-code {
  color: var(--accent-red);
  background: var(--accent-red-dim);
}

/* Product Type Toggle Buttons */
.product-type-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-elevated);
  padding: 0.25rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.product-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.product-type-btn svg {
  width: 16px;
  height: 16px;
}

.product-type-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.product-type-btn.active {
  background: var(--technical-indigo);
  border-color: var(--technical-indigo);
  color: var(--text-primary);
  box-shadow: 0 0 8px var(--technical-indigo-glow);
}

/* Bundle Products Selection */
.bundle-products-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
}

.bundle-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.bundle-product-chip:hover {
  border-color: var(--technical-indigo);
  background: var(--technical-indigo-dim);
  color: var(--text-primary);
}

.bundle-product-chip.selected {
  background: var(--technical-indigo);
  border-color: var(--technical-indigo);
  color: var(--text-primary);
  box-shadow: 0 0 8px var(--technical-indigo-glow);
}

.bundle-product-chip-code {
  font-weight: 600;
}

.bundle-product-chip-check {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.bundle-product-chip.selected .bundle-product-chip-check {
  opacity: 1;
}

/* Tooltip for bundle chips */
.bundle-product-chip::after {
  content: attr(data-product-name);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.625rem;
  background: var(--bg-void);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-family: var(--font-interface);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.bundle-product-chip:hover::after {
  opacity: 1;
}

.product-name {
  font-family: var(--font-interface);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.product-desc {
  font-family: var(--font-interface);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-header h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.btn-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-muted);
  padding: 0;
}

.btn-sidebar-toggle:hover {
  background: var(--accent-red-dim);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-snap);
}

/* Mobile: Style close button */
@media (max-width: 1200px) {
  .client-sidebar.open .btn-sidebar-toggle {
    width: 32px;
    height: 32px;
    background: var(--bg-void);
  }
  
  .client-sidebar.open .btn-sidebar-toggle svg {
    width: 18px;
    height: 18px;
  }
  
  .client-sidebar.open .btn-sidebar-toggle:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
  }
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-action-group {
  display: flex;
  gap: 0.5rem;
}

.sidebar-action-group .btn {
  flex: 1;
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.client-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem;
  transition: all var(--transition-snap);
  cursor: pointer;
  position: relative;
}

.client-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-red);
  transform: scaleY(0);
  transition: transform var(--transition-smooth);
}

.client-chip:hover {
  border-color: var(--accent-red);
  box-shadow: var(--shadow-block-sm);
  transform: translateX(2px);
}

.client-chip:hover::before {
  transform: scaleY(1);
}

.client-chip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.client-chip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.client-chip-code {
  font-family: var(--font-data);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--technical-indigo);
  background: var(--technical-indigo-dim);
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.1em;
  margin-bottom: 0;
  display: inline-block;
}

.client-chip-name {
  font-family: var(--font-interface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-chip-actions {
  display: flex;
  gap: 0.25rem;
}

.client-chip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-muted);
  padding: 0;
}

.client-chip-btn:hover {
  background: var(--bg-void);
  color: var(--text-primary);
}

.client-chip-btn.edit:hover {
  border-color: var(--technical-indigo);
  color: var(--technical-indigo);
}

.client-chip-btn.delete:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: var(--accent-red-dim);
}

.client-chip-btn svg {
  width: 12px;
  height: 12px;
}

.client-chip-description {
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.client-chip-desc-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.client-chip-desc-key {
  color: var(--technical-indigo);
  flex-shrink: 0;
}

.client-chip-desc-value {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Client Modal */
.client-modal-content {
  max-width: 700px;
  width: 95vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.client-modal-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.client-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-interface);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition-snap);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: inset 0 0 20px var(--accent-red-dim);
}

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

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-interface);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition-snap);
  resize: vertical;
  min-height: 150px;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: inset 0 0 20px var(--accent-red-dim);
}

.form-textarea::placeholder {
  color: var(--text-muted);
}

.client-input-mode-toggle {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.mode-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-snap);
  border-radius: 2px;
}

.mode-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.mode-toggle-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.mode-toggle-btn.active {
  background: var(--accent-red);
  color: var(--text-on-accent);
}

.mode-toggle-btn.active:hover {
  background: var(--accent-red);
  color: var(--text-on-accent);
}

.hidden {
  display: none !important;
}

.description-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.description-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.description-field-row input {
  flex: 1;
}

.description-field-row .form-input:first-child {
  flex: 0.4;
}

.description-field-row .form-input:nth-child(2) {
  flex: 0.6;
}

.description-field-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-muted);
  padding: 0;
  flex-shrink: 0;
}

.description-field-remove:hover {
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.description-field-remove svg {
  width: 14px;
  height: 14px;
}

#confirmationMessage {
  padding-bottom: 1rem;
}

.client-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.empty-clients {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.empty-clients svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-clients p {
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Mobile sidebar toggle button */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-snap);
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 2px;
}

.mobile-sidebar-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--accent-red);
  transition: all var(--transition-snap);
}

.mobile-sidebar-toggle:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: var(--shadow-block-sm);
}

.mobile-sidebar-toggle:hover svg {
  color: white;
}

/* Hamburger animation to X when sidebar is open */
.mobile-sidebar-toggle svg line {
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Transform hamburger to X when sidebar is open */
.mobile-sidebar-toggle.open svg line:nth-child(1) {
  transform: rotate(45deg) translateY(6px);
}

.mobile-sidebar-toggle.open svg line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-sidebar-toggle.open svg line:nth-child(3) {
  transform: rotate(-45deg) translateY(-6px);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 8, 20, 0.9);
  z-index: 899;
  animation: fadeIn 0.2s ease;
}

.sidebar-overlay.active {
  display: block;
}

/* Responsive */
@media (max-width: 1200px) {
  .mobile-sidebar-toggle {
    display: flex;
  }

  .client-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    max-height: 100vh;
    z-index: 900;
    margin: 0;
    transform: translateX(-100%);
    width: 320px;
    max-width: 320px;
    transition: transform 0.3s ease;
  }

  .client-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 20px rgba(0, 0, 0, 0.8);
  }

  .main-wrapper {
    margin-left: 0;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    padding: 1rem;
    padding-top: 1.5rem; /* Extra space for fixed hamburger button */
  }
  
  .client-sidebar {
    width: 85vw;
    max-width: 85vw;
  }
  
  .mobile-sidebar-toggle {
    top: 0.75rem;
    left: 0.75rem;
    width: 40px;
    height: 40px;
    padding: 0.5rem;
  }
  
  .mobile-sidebar-toggle svg {
    width: 20px;
    height: 20px;
  }
  
  /* Videos section */
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  /* Uploaded videos/images grid */
  .uploaded-videos-grid {
    grid-template-columns: 1fr !important;
  }
  
  .uploaded-images-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Better button sizing */
  .btn {
    font-size: 0.7rem;
    padding: 0.65rem 1rem;
  }
  
  .btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

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

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.tool-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--accent-red);
}

.tool-divider {
  font-family: var(--font-data);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-desc {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.tagline {
  font-family: var(--font-data);
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

.tagline a {
  color: var(--technical-indigo);
  text-decoration: none;
  transition: color var(--transition-snap);
}

.tagline a:hover {
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.tool-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeInDown 0.4s ease 0.1s both;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.nav-tab svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
}

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

.nav-tab.active {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
}

.nav-tab.active::before {
  width: 100%;
}

.nav-tab.active svg {
  stroke: var(--accent-red);
}

/* Tool Views */
.tool-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tool-view.active {
  display: block;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  font-family: var(--font-data);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-snap);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-red);
  color: white;
  box-shadow: var(--shadow-block-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-accent {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.btn-accent:hover {
  background: var(--accent-red);
  color: white;
  box-shadow: var(--shadow-glow-red);
}

.btn-secondary {
  background: transparent;
  color: var(--tiktok);
  border: 1px solid var(--tiktok);
}

.btn-secondary:hover {
  background: var(--tiktok);
  color: var(--bg-void);
}

.btn-trim {
  background: transparent;
  color: var(--technical-indigo);
  border: 1px solid var(--technical-indigo);
}

.btn-trim:hover {
  background: var(--technical-indigo);
  color: white;
  box-shadow: var(--shadow-glow-indigo);
}

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

.btn-ghost:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

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

.btn:disabled:hover,
.btn.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUT SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.input-section {
  animation: fadeInUp 0.4s ease 0.1s both;
}

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

.input-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  transition: all var(--transition-smooth);
}

.input-container:focus-within {
  border-color: var(--accent-red);
  box-shadow: inset 0 0 30px var(--accent-red-dim);
}

.link-input {
  width: 100%;
  min-height: 180px;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: vertical;
  line-height: 1.8;
}

.link-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-interface);
}

.link-input:focus {
  outline: none;
  border-color: var(--border-light);
}

.input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LINK BUBBLES
   ═══════════════════════════════════════════════════════════════════════════ */

.bubbles-container {
  margin-top: 1.5rem;
}

.bubbles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.bubble-count {
  font-family: var(--font-data);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bubbles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.link-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  animation: bubbleIn 0.2s ease;
  transition: all var(--transition-snap);
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.link-bubble:hover {
  border-color: var(--border-light);
}

.link-bubble.youtube { border-left: 3px solid var(--youtube); }
.link-bubble.instagram { border-left: 3px solid var(--instagram); }
.link-bubble.tiktok { border-left: 3px solid var(--tiktok); }

.link-bubble.youtube .platform-icon { color: var(--youtube); }
.link-bubble.instagram .platform-icon { color: var(--instagram); }
.link-bubble.tiktok .platform-icon { color: var(--tiktok); }

.platform-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.link-text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition-snap);
}

.link-text:hover {
  color: var(--technical-indigo);
}

.bubble-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-snap);
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}

.link-bubble:hover .bubble-copy {
  opacity: 1;
  pointer-events: auto;
}

.bubble-copy:hover {
  background: var(--technical-indigo);
}

.bubble-copy svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.bubble-copy:hover svg {
  color: white;
}

.bubble-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-snap);
  flex-shrink: 0;
}

.bubble-remove:hover {
  background: var(--accent-red);
}

.bubble-remove svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.bubble-remove:hover svg {
  color: white;
}

.bubble-status {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bubble-status.loading {
  animation: spin 1s linear infinite;
}

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

.spin {
  animation: spin 1s linear infinite;
}

.bubble-status svg {
  width: 14px;
  height: 14px;
  transition: opacity var(--transition-snap);
}

.bubble-status.success svg { color: #34c759; }

.bubble-status.error .error-icon { 
  color: var(--accent-red);
  position: absolute;
  opacity: 1;
}

.bubble-status.error .redo-icon { 
  color: var(--technical-indigo);
  position: absolute;
  opacity: 0;
}

.bubble-status.error:hover .error-icon {
  opacity: 0;
}

.bubble-status.error:hover .redo-icon {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEOS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.videos-section {
  margin-top: 3rem;
  animation: fadeInUp 0.4s ease;
}

.videos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.videos-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.videos-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.video-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-smooth);
  animation: cardIn 0.3s ease;
}

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

.video-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-block);
  transform: translateY(-2px);
}

.video-card.collapsed .card-content {
  display: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-subtle);
}

.card-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.card-platform {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.card-platform.youtube { border-color: var(--youtube); color: var(--youtube); }
.card-platform.instagram { border-color: var(--instagram); color: var(--instagram); }
.card-platform.tiktok { border-color: var(--tiktok); color: var(--tiktok); }

.card-platform svg {
  width: 16px;
  height: 16px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.card-title {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.card-url {
  font-family: var(--font-data);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-snap);
  user-select: none;
}

.card-url:hover {
  color: var(--technical-indigo);
  text-decoration: underline;
}

.card-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-muted);
}

.card-delete:hover {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.card-delete svg {
  width: 16px;
  height: 16px;
}

.card-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--border-subtle);
  transition: all var(--transition-snap);
  flex-shrink: 0;
}

.video-card.collapsed .card-toggle {
  transform: rotate(-90deg);
}

.card-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.card-content {
  padding: 1.25rem;
}

.card-video-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-rename {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.rename-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rename-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all var(--transition-snap);
}

.rename-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: inset 0 0 20px var(--accent-red-dim);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-actions .btn {
  flex: 1 1 auto;
  min-width: calc(50% - 0.25rem);
  justify-content: center;
  font-size: 0.7rem;
  padding: 0.6rem 0.5rem;
}

.card-actions .btn svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 8, 20, 0.95);
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.modal-header .clickable-title {
  cursor: pointer;
  transition: color var(--transition-snap);
}

.modal-header .clickable-title:hover {
  color: var(--accent-red);
}

.btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--border-subtle);
  border: none;
  cursor: pointer;
  transition: all var(--transition-snap);
}

.btn-close:hover {
  background: var(--accent-red);
}

.btn-close svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.btn-close:hover svg {
  color: white;
}

/* Navigation buttons for meta copy modal */
.btn-icon-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-secondary);
}

.btn-icon-nav:hover {
  background: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-icon-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-icon-nav svg {
  width: 16px;
  height: 16px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  height: calc(90vh - 80px);
  max-height: 600px;
}

.preview-section {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  border-right: 1px solid var(--border-subtle);
}

.video-preview-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}

.preview-video {
  max-width: 100%;
  max-height: 450px;
  display: block;
  border: 1px solid var(--border-subtle);
}

.crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.crop-overlay.active {
  display: block;
  pointer-events: auto;
}

.crop-frame {
  position: absolute;
  border: 2px solid var(--accent-red);
  box-shadow: 0 0 0 9999px rgba(0, 8, 20, 0.8);
  cursor: move;
  min-width: 50px;
  min-height: 50px;
}

/* Resize handles */
.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border: 2px solid white;
  z-index: 10;
}

.resize-handle[data-handle="nw"] { top: -6px; left: -6px; cursor: nw-resize; }
.resize-handle[data-handle="n"] { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.resize-handle[data-handle="ne"] { top: -6px; right: -6px; cursor: ne-resize; }
.resize-handle[data-handle="w"] { top: 50%; left: -6px; transform: translateY(-50%); cursor: w-resize; }
.resize-handle[data-handle="e"] { top: 50%; right: -6px; transform: translateY(-50%); cursor: e-resize; }
.resize-handle[data-handle="sw"] { bottom: -6px; left: -6px; cursor: sw-resize; }
.resize-handle[data-handle="s"] { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.resize-handle[data-handle="se"] { bottom: -6px; right: -6px; cursor: se-resize; }

.controls-section {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 100;
  background: var(--bg-elevated);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 101;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.control-label svg {
  width: 16px;
  height: 16px;
  color: var(--technical-indigo);
}

/* Timeline */
.timeline-container {
  position: relative;
  height: 60px;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.timeline-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.timeline-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

.timeline-range {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--accent-red-dim);
  border-left: 3px solid var(--accent-red);
  border-right: 3px solid var(--accent-red);
}

.timeline-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: var(--accent-red);
  cursor: ew-resize;
  z-index: 2;
}

.timeline-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 20px;
  background: white;
}

.timeline-handle.start { left: 0; }
.timeline-handle.end { right: 0; }

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.time-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.time-separator {
  color: var(--text-muted);
}

.duration-display {
  margin-left: auto;
  color: var(--accent-red);
}

/* Ratio Buttons */
.ratio-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 101;
}

.ratio-btn {
  padding: 0.6rem 1rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-snap);
  letter-spacing: 0.05em;
}

.ratio-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.ratio-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

/* Export Name Input */
.export-name-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all var(--transition-snap);
}

.export-name-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: inset 0 0 20px var(--accent-red-dim);
}

.export-name-input::placeholder {
  color: var(--text-muted);
}

/* Editor Actions */
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 101;
}

.editor-actions .btn {
  justify-content: center;
}

.editor-actions .btn-ghost {
  flex: 0 0 auto;
}

.editor-actions .btn-accent,
.editor-actions .btn-primary {
  flex: 1;
}

.editor-actions .btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.editor-actions .btn.loading svg {
  animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  transition: bottom 0.3s ease;
}

.toast-container .toast {
  pointer-events: auto;
}

/* Stack toasts above processing indicator when it's visible */
.toast-container.stacked {
  bottom: calc(1.5rem + 150px); /* Processing indicator height + spacing */
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-block);
  animation: toastIn 0.3s ease;
  font-family: var(--font-data);
  font-size: 0.8rem;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 3px solid #34c759;
}

.toast.error {
  border-left: 3px solid var(--accent-red);
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: #34c759; }
.toast.error .toast-icon { color: var(--accent-red); }

.toast-message {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROCESSING INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.processing-indicator {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 350px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), var(--shadow-glow-indigo);
  z-index: 1500;
  animation: slideInUp 0.3s ease;
}

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

.processing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.processing-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.processing-icon {
  width: 16px;
  height: 16px;
  color: var(--technical-indigo);
  animation: spin 1s linear infinite;
}

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

#processingCount {
  color: var(--accent-red);
  font-weight: 700;
}

.btn-minimize {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-minimize svg {
  width: 16px;
  height: 16px;
}

.processing-list {
  max-height: 300px;
  overflow-y: auto;
  transition: var(--transition-smooth);
}

.processing-indicator.minimized .processing-list {
  max-height: 0;
  overflow: hidden;
}

.processing-indicator.minimized .btn-minimize svg {
  transform: rotate(180deg);
}

.processing-job {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.processing-job:last-child {
  border-bottom: none;
}

.job-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.job-title {
  font-family: var(--font-interface);
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-status {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 1rem;
}

.job-progress {
  margin-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   UPLOAD SECTION (Video Transcriber Tool)
   ═══════════════════════════════════════════════════════════════════════════ */

.upload-section {
  margin-bottom: 2rem;
}

.upload-container {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-medium);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.upload-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-red-dim) 0%, transparent 50%, var(--technical-indigo-dim) 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.upload-container:hover,
.upload-container.drag-over {
  border-color: var(--accent-red);
  background: var(--bg-surface);
}

.upload-container:hover::before,
.upload-container.drag-over::before {
  opacity: 1;
}

.upload-container.drag-over {
  transform: scale(1.01);
  box-shadow: var(--shadow-glow-red);
}

.upload-icon {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

.upload-icon svg {
  width: 64px;
  height: 64px;
  stroke: var(--text-muted);
  transition: all var(--transition-smooth);
}

.upload-container:hover .upload-icon svg,
.upload-container.drag-over .upload-icon svg {
  stroke: var(--accent-red);
  transform: translateY(-5px);
}

.upload-text {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.upload-text h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-text p {
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.upload-formats {
  position: relative;
  z-index: 1;
}

.upload-formats span {
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Uploaded Videos Section */
.uploaded-videos-section {
  animation: fadeInUp 0.4s ease;
}

.uploaded-videos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.uploaded-videos-header h2 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.uploaded-videos-actions {
  display: flex;
  gap: 0.75rem;
}

.uploaded-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .uploaded-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .uploaded-videos-grid {
    grid-template-columns: 1fr;
  }
}

/* Uploaded Video Card */
.uploaded-video-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.uploaded-video-card:hover {
  border-color: var(--border-light);
}

.uploaded-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  cursor: pointer;
}

.uploaded-card-preview {
  width: 60px;
  height: 45px;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.uploaded-card-preview:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red-glow);
}

.uploaded-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  transition: all var(--transition-smooth);
  pointer-events: none;
}

.preview-play-icon svg {
  width: 18px;
  height: 18px;
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.uploaded-card-preview:hover .preview-play-icon {
  background: rgba(0, 0, 0, 0.2);
}

.uploaded-card-preview.playing .preview-play-icon {
  opacity: 0;
}

.preview-expand-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-snap);
  pointer-events: none;
}

.preview-expand-icon svg {
  width: 12px;
  height: 12px;
  color: white;
}

.uploaded-card-preview:hover .preview-expand-icon {
  opacity: 1;
}

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

.uploaded-card-title {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.uploaded-card-title.clickable-title {
  cursor: pointer;
  transition: color var(--transition-snap);
}

.uploaded-card-title.clickable-title:hover {
  color: var(--accent-red);
}

.uploaded-card-meta {
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.uploaded-card-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.uploaded-card-controls .card-delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-snap);
}

.uploaded-card-controls .card-delete:hover {
  color: var(--accent-red);
}

.uploaded-card-controls .card-delete svg {
  width: 18px;
  height: 18px;
}

.uploaded-card-controls .card-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: transform var(--transition-smooth);
}

.uploaded-card-controls .card-toggle svg {
  width: 20px;
  height: 20px;
}

.uploaded-video-card.collapsed .card-toggle {
  transform: rotate(-180deg);
}

.uploaded-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.uploaded-video-card.collapsed .uploaded-card-content {
  display: none;
}

/* Actions row */
.uploaded-card-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.uploaded-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.uploaded-card-actions .btn {
  flex: 1;
  min-width: 100px;
  justify-content: center;
  font-size: 0.7rem;
  padding: 0.5rem 0.75rem;
}

/* Transcription area */
.uploaded-card-right {
  width: 100%;
}

/* Transcription in uploaded card */
.uploaded-card-content .transcription-container {
  margin: 0;
}

.uploaded-card-content .transcription-body {
  max-height: 150px;
  overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.uploaded-card-content .transcription-body.collapsed {
  max-height: 0;
  overflow: hidden;
  padding: 0;
}

/* Transcription placeholder */
.transcription-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60px;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
  text-align: center;
  color: var(--text-muted);
}

.transcription-placeholder svg {
  width: 24px;
  height: 24px;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.transcription-placeholder span {
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.uploaded-card-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Transcription status badge on uploaded card */
.transcription-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.transcription-badge svg {
  width: 12px;
  height: 12px;
}

.transcription-badge.processing {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--technical-indigo);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRANSCRIPTION STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Transcribe buttons */
.btn-transcribe {
  background: transparent;
  color: #10b981;
  border: 1px solid #10b981;
}

.btn-transcribe:hover {
  background: #10b981;
  color: white;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.btn-transcribe-small {
  width: 44px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #10b981;
  border: 1px solid #10b981;
  cursor: pointer;
  transition: all var(--transition-snap);
  flex-shrink: 0;
}

.btn-transcribe-small:hover {
  background: #10b981;
  color: white;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-transcribe-small svg {
  width: 16px;
  height: 16px;
}

/* Card actions row layout */
.card-actions .action-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.card-actions .action-row .btn-transcribe-small {
  flex: 0 0 44px;
}

.card-actions .action-row .edit-btn {
  flex: 1;
}

/* Bubbles actions */
.bubbles-actions {
  display: flex;
  gap: 0.5rem;
}

/* Transcription container in cards */
.transcription-container {
  margin-top: 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-void);
}

.transcription-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.transcription-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 500;
  color: #10b981;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.transcription-actions {
  display: flex;
  gap: 0.25rem;
}

.transcription-action-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-subtle);
  border: none;
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-muted);
}

.transcription-action-btn:hover {
  background: #10b981;
  color: white;
}

.transcription-action-btn svg {
  width: 14px;
  height: 14px;
}

.transcription-body {
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.transcription-body.collapsed {
  max-height: 0;
  overflow: hidden;
  padding: 0;
}

.transcription-text {
  padding: 0.8rem;
  font-family: var(--font-interface);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.transcription-text p {
  margin: 0 0 0.75rem 0;
}

.transcription-text p:last-child {
  margin-bottom: 0;
}

.transcript-timestamp {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.4rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 2px;
}

/* Transcription Modal */
.transcription-modal-content {
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.transcription-modal-content .modal-header {
  flex-shrink: 0;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transcription-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-void);
}

.transcript-segments {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.transcript-segment {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.transcript-segment.no-timestamp {
  padding-left: 4.5rem;
}

.transcript-timestamp-modal {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  flex-shrink: 0;
  min-width: 3rem;
  text-align: center;
  height: fit-content;
}

.transcript-segment-text {
  font-family: var(--font-interface);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.transcript-full-text {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-medium);
}

.transcript-full-text-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.transcript-full-text p {
  font-family: var(--font-interface);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Upload indicator */
.upload-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.2);
  z-index: 1500;
  animation: slideInUp 0.3s ease;
}

.upload-indicator .processing-header {
  background: rgba(245, 158, 11, 0.1);
}

.upload-indicator .processing-icon {
  color: #f59e0b;
}

.upload-indicator #uploadCount {
  color: #f59e0b;
}

.upload-indicator .progress-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Uploading animation */
.uploading-animation {
  background: linear-gradient(
    90deg,
    #f59e0b 0%,
    #fbbf24 25%,
    #f59e0b 50%,
    #fbbf24 75%,
    #f59e0b 100%
  );
  background-size: 200% 100%;
  animation: uploadingShimmer 1.5s ease-in-out infinite;
}

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

.upload-indicator.minimized .processing-list {
  max-height: 0;
  overflow: hidden;
}

.upload-indicator.minimized .btn-minimize svg {
  transform: rotate(180deg);
}

/* Transcription indicator */
.transcription-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.2);
  z-index: 1400;
  animation: slideInUp 0.3s ease;
}

.transcription-indicator .processing-header {
  background: rgba(16, 185, 129, 0.1);
}

.transcription-indicator .processing-icon {
  color: #10b981;
}

.transcription-indicator #transcriptionCount {
  color: #10b981;
}

.transcription-indicator .progress-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.transcription-indicator.minimized .processing-list {
  max-height: 0;
  overflow: hidden;
}

.transcription-indicator.minimized .btn-minimize svg {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO VIEWER MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.video-viewer-modal-content {
  max-width: 1100px;
  width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-viewer-layout {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Video Section */
.video-viewer-video-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.video-viewer-container {
  flex: 1;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 500px;
}

.viewer-video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.video-viewer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  margin-top: 0.5rem;
}

.video-viewer-controls .btn {
  padding: 0.5rem;
  min-width: 40px;
}

.video-viewer-controls .btn svg {
  width: 20px;
  height: 20px;
}

.viewer-timeline {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
}

.viewer-progress {
  height: 100%;
  position: relative;
}

.viewer-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--technical-indigo));
  transition: width 0.1s linear;
}

.viewer-time {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}

/* Transcription Section */
.video-viewer-transcription-section {
  width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.viewer-transcription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.5rem;
}

.viewer-transcription-header > span {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.viewer-transcription-actions {
  display: flex;
  gap: 0.5rem;
}

.viewer-transcription-actions .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
}

.viewer-transcription-actions .btn svg {
  width: 12px;
  height: 12px;
}

.viewer-transcription-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 300px;
  max-height: 500px;
}

.viewer-no-transcription {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--text-muted);
  text-align: center;
}

.viewer-no-transcription svg {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.viewer-no-transcription span {
  font-family: var(--font-data);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.viewer-transcription-segments {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.viewer-segment {
  padding: 0.5rem 0.75rem;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-snap);
}

.viewer-segment:hover {
  background: var(--bg-surface);
  border-left-color: var(--border-medium);
}

.viewer-segment.active {
  background: var(--accent-red-dim);
  border-left-color: var(--accent-red);
}

.viewer-segment-time {
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--technical-indigo);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.viewer-segment-text {
  font-family: var(--font-interface);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 900px) {
  .video-viewer-layout {
    flex-direction: column;
  }
  
  .video-viewer-transcription-section {
    width: 100%;
    max-height: 250px;
  }
  
  .viewer-transcription-content {
    min-height: 150px;
    max-height: 200px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   META COPY MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.meta-copy-modal-content {
  max-width: 1100px;
  width: 95vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Wider modal when client feedback panel is shown */
.meta-copy-modal-content:has(.meta-copy-body.with-client-feedback) {
  max-width: 1500px;
}

.meta-copy-modal-content .modal-header {
  flex-shrink: 0;
}

/* Meta Copy Body - Horizontal Layout */
.meta-copy-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* With client feedback panel */
.meta-copy-body.with-client-feedback .content-modal-preview {
  width: 25%;
  min-width: 200px;
}

.meta-copy-body.with-client-feedback .meta-copy-content {
  width: 45%;
}

/* When meta-copy-content is hidden (for 'other' design series) */
.meta-copy-body.with-client-feedback .meta-copy-content[style*="display: none"],
.meta-copy-body.with-client-feedback .meta-copy-content[style*="display:none"] {
  display: none !important;
}

.meta-copy-body.with-client-feedback:has(.meta-copy-content[style*="display: none"]) .content-modal-preview,
.meta-copy-body.with-client-feedback:has(.meta-copy-content[style*="display:none"]) .content-modal-preview {
  width: 50% !important;
  max-width: none !important;
  flex: 1 !important;
}

.meta-copy-body.with-client-feedback:has(.meta-copy-content[style*="display: none"]) .meta-copy-client-feedback,
.meta-copy-body.with-client-feedback:has(.meta-copy-content[style*="display:none"]) .meta-copy-client-feedback {
  width: 50% !important;
  min-width: 0 !important;
  flex: 1 !important;
}

/* Content Preview Panel - Left Side */
.content-modal-preview {
  width: 35%;
  max-width: 400px;
  min-width: 250px;
  background: var(--bg-darker);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.meta-copy-preview-media {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.meta-copy-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.meta-copy-preview-placeholder svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

.meta-copy-preview-placeholder span {
  font-family: var(--font-data);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Content Area - Right Side */
.meta-copy-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Loading State */
.meta-copy-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 1rem;
}

.meta-copy-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.meta-copy-loading span {
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Results */
.meta-copy-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* AI Adjustment Section */
.meta-copy-adjustment-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.meta-copy-adjustment-header label {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.meta-copy-adjustment-container {
  width: 100%;
}

.meta-copy-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 0;
}

.meta-copy-prompt-chips:empty {
  display: none;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  font-family: var(--font-interface);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  max-width: 100%;
  transition: all 0.2s;
}

.prompt-chip:hover {
  border-color: var(--accent-red);
  background: var(--bg-panel);
}

.prompt-chip-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

.prompt-chip-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.prompt-chip-remove:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

.prompt-chip-remove svg {
  width: 12px;
  height: 12px;
}

.meta-copy-adjustment-input {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-interface);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.meta-copy-adjustment-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.meta-copy-adjustment-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

#regenerateAllBtn.loading svg {
  animation: spin 0.8s linear infinite;
}

#regenerateAllBtn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.meta-copy-field {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.meta-copy-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.meta-copy-field-header label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.meta-copy-field-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.meta-copy-field-header .btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}

/* Regenerate button */
.regenerate-field-btn {
  padding: 0.4rem !important;
  color: var(--text-muted);
}

.regenerate-field-btn:hover {
  color: var(--technical-indigo);
}

.regenerate-field-btn.loading svg {
  animation: spin 0.8s linear infinite;
}

.regenerate-field-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.meta-copy-field-content {
  padding: 0.75rem;
  font-family: var(--font-interface);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  min-height: 60px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: text;
}

.meta-copy-field-content:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.meta-copy-field-content:focus {
  outline: none;
  background: var(--bg-elevated);
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.meta-copy-field-content:empty:before {
  content: 'Click to edit...';
  color: var(--text-muted);
  opacity: 0.5;
}

/* Headlines */
.meta-copy-headlines {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meta-copy-headline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-copy-headline:last-child {
  border-bottom: none;
}

.headline-number {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--technical-indigo);
  background: var(--technical-indigo-dim);
  padding: 0.25rem 0.5rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.headline-text {
  flex: 1;
  font-family: var(--font-interface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.headline-copy-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition-snap);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.headline-copy-btn svg {
  width: 14px;
  height: 14px;
}

.headline-copy-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: var(--accent-red-dim);
}

/* Meta Copy Button */
.btn-meta-copy {
  background: transparent;
  color: #1877f2;
  border: 1px solid #1877f2;
}

.btn-meta-copy:hover {
  background: #1877f2;
  color: white;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.3);
}

/* Small Meta Copy Button (for video cards) */
.btn-meta-copy-small {
  width: 44px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #1877f2;
  border: 1px solid #1877f2;
}

.btn-meta-copy-small svg {
  width: 18px;
  height: 18px;
}

.btn-meta-copy-small:hover {
  background: #1877f2;
  color: white;
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.3);
}

/* Share Button */
.btn-share {
  background: transparent;
  color: #8b5cf6;
  border: 1px solid #8b5cf6;
}

.btn-share:hover {
  background: #8b5cf6;
  color: white;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMAGE TOOL STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Uploaded Images Section */
.uploaded-images-section {
  animation: fadeInUp 0.4s ease;
}

.uploaded-images-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.uploaded-images-header h2 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.uploaded-images-actions {
  display: flex;
  gap: 0.75rem;
}

.uploaded-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .uploaded-images-grid {
    grid-template-columns: 1fr;
  }
}

/* Uploaded Image Card */
.uploaded-image-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.uploaded-image-card:hover {
  border-color: var(--border-light);
}

.uploaded-image-card.collapsed .image-card-content {
  display: none;
}

.image-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  cursor: pointer;
}

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

.image-card-title {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.image-card-title.clickable-title {
  cursor: pointer;
  transition: color var(--transition-snap);
}

.image-card-title.clickable-title:hover {
  color: var(--accent-red);
}

.image-card-meta {
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.image-card-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-card-controls .card-delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-snap);
}

.image-card-controls .card-delete:hover {
  color: var(--accent-red);
}

.image-card-controls .card-delete svg {
  width: 18px;
  height: 18px;
}

.image-card-controls .card-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-snap);
}

.image-card-controls .card-toggle svg {
  width: 16px;
  height: 16px;
}

.uploaded-image-card.collapsed .card-toggle {
  transform: rotate(-90deg);
}

/* Image Card Content - Large Preview like Batch Downloader */
.image-card-content {
  padding: 1.25rem;
}

.image-preview-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.image-preview-wrapper:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red-glow);
}

.image-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.image-preview-wrapper:hover .image-preview-overlay {
  opacity: 1;
}

.image-preview-overlay svg {
  width: 36px;
  height: 36px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.image-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.image-card-actions .btn {
  flex: 1 1 auto;
  min-width: calc(50% - 0.25rem);
  justify-content: center;
  font-size: 0.7rem;
  padding: 0.6rem 0.5rem;
}

.image-card-actions .btn svg {
  width: 14px;
  height: 14px;
}

/* Image description container (like transcription container) */
.image-description-container {
  margin-top: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.image-description-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.image-description-label {
  font-family: var(--font-data);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--technical-indigo);
}

.image-description-body {
  padding: 0.75rem;
  font-family: var(--font-interface);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
}

.image-description-body.collapsed {
  max-height: 0;
  padding: 0 0.75rem;
  overflow: hidden;
}

/* Image Viewer Modal */
.image-viewer-modal-content {
  max-width: 1100px;
  width: 95vw;
  max-height: 90vh;
  overflow: hidden;
}

.image-viewer-layout {
  display: flex;
  height: calc(90vh - 60px);
  max-height: 700px;
}

.image-viewer-image-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-void);
  border-right: 1px solid var(--border-subtle);
  min-width: 0;
}

.image-viewer-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

.viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--border-subtle);
}

.image-viewer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
}

.image-dimensions {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Description Section */
.image-viewer-description-section {
  width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.viewer-description-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.5rem;
}

.viewer-description-header > span {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--technical-indigo);
}

.viewer-description-actions {
  display: flex;
  gap: 0.5rem;
}

.viewer-description-actions .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
}

.viewer-description-actions .btn svg {
  width: 12px;
  height: 12px;
}

.viewer-description-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 300px;
  max-height: 500px;
}

.viewer-no-description {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--text-muted);
  text-align: center;
}

.viewer-no-description svg {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.viewer-no-description span {
  font-family: var(--font-data);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.viewer-description-text {
  font-family: var(--font-interface);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* Image Upload Indicator */
.image-upload-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 70, 229, 0.2);
  z-index: 1500;
  animation: slideInUp 0.3s ease;
}

.image-upload-indicator .processing-icon {
  color: var(--technical-indigo);
}

.image-upload-indicator.minimized .processing-list {
  max-height: 0;
  overflow: hidden;
}

.image-upload-indicator.minimized .btn-minimize svg {
  transform: rotate(180deg);
}

/* Series Upload Indicator */
.series-upload-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
  z-index: 1500;
  animation: slideInUp 0.3s ease;
}

.series-upload-indicator .processing-icon {
  color: var(--accent-red);
}

.series-upload-indicator.minimized .processing-list {
  max-height: 0;
  overflow: hidden;
}

.series-upload-indicator.minimized .btn-minimize svg {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 900px) {
  .image-viewer-layout {
    flex-direction: column;
  }
  
  .image-viewer-description-section {
    width: 100%;
    max-height: 250px;
  }
  
  .viewer-description-content {
    min-height: 150px;
    max-height: 200px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr;
    max-height: none;
    height: auto;
  }
  
  .preview-section {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 600px) {
  .app {
    padding: 0;
  }
  
  .main-wrapper {
    padding: 0.75rem;
    padding-top: 1.25rem; /* Extra space for fixed hamburger button */
  }
  
  /* Sidebar fills almost entire screen on small phones */
  .client-sidebar {
    width: 92vw;
    max-width: 92vw;
  }
  
  /* Make toggle button more compact on small screens */
  .mobile-sidebar-toggle {
    top: 0.5rem;
    left: 0.5rem;
    width: 38px;
    height: 38px;
    padding: 0.45rem;
  }
  
  .mobile-sidebar-toggle svg {
    width: 18px;
    height: 18px;
  }
  
  .logo h1 {
    font-size: 1.25rem;
  }
  
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  .videos-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .videos-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  
  .videos-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.65rem;
    padding: 0.5rem 0.5rem;
  }
  
  .processing-indicator {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 1rem;
  }
  
  .upload-indicator,
  .transcription-indicator,
  .image-upload-indicator,
  .series-upload-indicator {
    width: calc(100vw - 2rem);
    left: 1rem;
    bottom: 1rem;
  }
  
  .toast-container {
    right: 1rem;
    left: 1rem;
  }
  
  .bubbles-actions {
    flex-wrap: wrap;
  }
  
  .bubbles-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  /* Text overflow fixes */
  .card-title,
  .card-url,
  .uploaded-card-title,
  .image-card-title {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  /* Tool title responsiveness */
  .tool-title {
    font-size: 0.75rem;
  }
  
  .tool-name {
    font-size: 0.75rem;
  }
  
  .tool-desc {
    font-size: 0.65rem;
  }
  
  /* Navigation tabs */
  .tool-nav {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .nav-tab {
    padding: 0.6rem 1rem;
    font-size: 0.65rem;
  }
  
  .nav-tab span {
    display: none;
  }
  
  .nav-tab svg {
    width: 20px;
    height: 20px;
  }
  
  /* Input section */
  .input-container {
    padding: 1rem;
  }
  
  .link-input {
    min-height: 120px;
    font-size: 0.8rem;
  }
  
  /* Link bubbles */
  .link-bubble {
    max-width: 100%;
  }
  
  .link-text {
    max-width: 180px;
  }
  
  /* Card actions */
  .card-actions .btn {
    font-size: 0.65rem;
    padding: 0.5rem 0.4rem;
    min-width: calc(50% - 0.25rem);
  }
  
  /* Modal content */
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: calc(100vh - 2rem);
  }
  
  /* Header */
  .header {
    margin-bottom: 2rem;
    padding-top: 0.5rem; /* Space for hamburger button */
  }
  
  .logo-img {
    height: 40px;
  }
  
  /* Ensure content doesn't overlap with hamburger */
  .logo {
    position: relative;
    z-index: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-medium);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLIENT ASSIGNMENT
   ═══════════════════════════════════════════════════════════════════════════ */

.client-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-chip-card:hover:not(.processing) {
  border-color: var(--accent-red);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.client-chip-card.unknown {
  border-color: var(--text-tertiary);
  border-style: dashed;
  opacity: 0.7;
}

.client-chip-card.unknown:hover {
  opacity: 1;
  border-style: solid;
}

.client-chip-card.processing {
  border-color: var(--accent-blue);
  background: var(--bg-secondary);
  opacity: 0.8;
  pointer-events: none;
}

.client-chip-card.processing .client-chip-card-name {
  color: var(--accent-blue);
}

.client-chip-card.processing .client-chip-card-icon {
  opacity: 1;
  color: var(--accent-blue);
}

.client-chip-card-code {
  color: var(--accent-red);
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.client-chip-card-name {
  color: var(--text-primary);
}

.client-chip-card-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

.client-chip-card-icon.spinning {
  animation: spin 1s linear infinite;
}

/* Chip Card Row */
.chip-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Product Chip Card */
.product-chip-card-container {
  display: inline-block;
}

.product-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-chip-card:hover:not(.unassigned) {
  border-color: var(--accent-blue);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.product-chip-card.unassigned:hover {
  opacity: 1;
  border-color: var(--text-tertiary);
}

.product-chip-card.unassigned {
  border-color: var(--text-tertiary);
  border-style: dashed;
  opacity: 0.6;
}

.product-chip-card.unassigned:hover {
  opacity: 1;
  border-style: solid;
}

.product-chip-card-code {
  color: var(--accent-blue);
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.product-chip-card-name {
  color: var(--text-primary);
}

.product-chip-card-dash {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  font-weight: 700;
}

.product-chip-card-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* Client Assignment Modal */
.client-assignment-modal .modal-content {
  max-width: 500px;
  max-height: 80vh;
}

.client-assignment-info {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 2px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.client-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.client-selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-selection-item:hover {
  border-color: var(--accent-red);
  background: var(--bg-secondary);
  transform: translateX(4px);
}

.client-selection-item.selected {
  border-color: var(--accent-red);
  background: rgba(210, 41, 32, 0.1);
}

.client-selection-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-selection-code {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-red);
  font-family: 'Courier New', monospace;
}

.client-selection-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.client-selection-check {
  width: 20px;
  height: 20px;
  color: var(--accent-red);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.client-selection-item.selected .client-selection-check {
  opacity: 1;
}

.client-selection-item:not(.selected) .client-selection-check {
  opacity: 0.2;
}

/* Product Assignment Modal */
.product-assignment-modal .modal-content {
  max-width: 500px;
  max-height: 80vh;
}

.product-assignment-info {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 2px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.product-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.product-selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-selection-item:hover {
  border-color: var(--accent-blue);
  background: var(--bg-secondary);
  transform: translateX(4px);
}

.product-selection-item.selected {
  border-color: var(--accent-blue);
  background: rgba(76, 164, 255, 0.1);
}

.product-selection-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-selection-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.product-selection-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.product-selection-dash {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
}

.product-selection-check {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-selection-item.selected .product-selection-check {
  opacity: 1;
}

.product-selection-item:not(.selected) .product-selection-check {
  opacity: 0.2;
}

/* Inline Chip Dropdowns */
.chip-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}

.chip-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 8px;
}

.chip-dropdown-item:hover {
  background: var(--bg-secondary);
}

.chip-dropdown-item.selected {
  background: rgba(210, 41, 32, 0.08);
}

.chip-dropdown-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
}

.chip-dropdown-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  font-family: 'Courier New', monospace;
  margin-right: 8px;
}

.chip-dropdown-check {
  width: 16px;
  height: 16px;
  color: var(--accent-red);
  flex-shrink: 0;
}

.product-dropdown .chip-dropdown-check {
  color: var(--accent-blue);
}

.chip-dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════════════════════════ */

::selection {
  background: var(--accent-red);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTHENTICATION & USER MANAGEMENT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Login Page */
.login-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-block);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 48px;
  width: auto;
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  text-align: center;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2rem 0;
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-error {
  background: rgba(251, 4, 69, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  padding: 0.75rem;
  color: var(--accent-red);
  font-size: 0.875rem;
  text-align: center;
}

.btn-block {
  width: 100%;
}

/* Settings Section */
.settings-section {
  padding: 2rem;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-primary);
}

/* Users Grid */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.user-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all var(--transition-smooth);
}

.user-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-block-sm);
}

.user-card.inactive {
  opacity: 0.5;
}

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.user-info h3 {
  font-size: 1.125rem;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
}

.user-role {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-role.master-admin {
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.user-role.user {
  background: var(--technical-indigo-dim);
  color: var(--technical-indigo);
  border: 1px solid var(--technical-indigo);
}

.user-actions {
  display: flex;
  gap: 0.5rem;
}

.user-permissions {
  margin-bottom: 1rem;
}

.user-permissions h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.user-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-permission-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-data);
}

.user-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.user-meta p {
  margin: 0.25rem 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  transition: var(--transition-smooth);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background: white;
}

/* Permissions Checkboxes */
.permissions-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background var(--transition-smooth);
}

.checkbox-label:hover {
  background: var(--bg-surface);
}

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

.checkbox-label span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Password Generated Modal */
.password-generated-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.password-generated-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow-block);
}

.password-generated-content h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.password-generated-content p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.password-display {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1rem;
  font-family: var(--font-data);
  font-size: 1.25rem;
  text-align: center;
  color: var(--accent-red);
  margin-bottom: 1.5rem;
  user-select: all;
}

.password-generated-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CAMPAIGNS & SERIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  font-family: var(--font-data);
}

.breadcrumb-item {
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-smooth);
}

.breadcrumb-item:hover:not(.active) {
  color: var(--text-primary);
}

.breadcrumb-item.active {
  color: var(--accent-red);
  cursor: default;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--border-light);
}

/* Campaigns Section */
.campaigns-section {
  padding: 1rem 0;
}

.campaigns-header {
  margin-bottom: 2rem;
}

.campaigns-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.campaigns-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.campaigns-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-data);
  margin: 0;
}

.series-detail-product-code {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  background: rgba(255, 159, 10, 0.15);
  border: 1px solid rgba(255, 159, 10, 0.3);
  border-radius: 3px;
  color: #ffa726;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.375rem;
}

.series-detail-product-name {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 400;
}

.campaigns-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.campaigns-header-actions .btn,
.campaigns-header-actions select,
.campaigns-header-actions .dropdown-menu-container > .btn {
  height: 40px;
}

.client-switcher select,
.campaigns-header-actions select {
  min-width: 200px;
}

/* Campaigns Client Grid */
.campaigns-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.client-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-red);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.client-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-block);
}

.client-card:hover::before {
  transform: scaleX(1);
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.client-card-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.client-card-code {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.client-card-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.client-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.client-card-stat-value {
  font-family: var(--font-data);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-red);
}

.client-card-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Campaigns Grid */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.campaign-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.campaign-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--technical-indigo));
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.campaign-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-block);
}

.campaign-card:hover::before {
  transform: scaleX(1);
}

.campaign-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.campaign-card-title {
  flex: 1;
}

.campaign-card-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem 0;
  word-break: break-word;
}

.campaign-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.campaign-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.campaign-status-badge.pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.campaign-status-badge.approval {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.campaign-status-badge.published {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.campaign-card-actions {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 10;
}

.campaign-card-stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.campaign-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.campaign-stat-value {
  font-family: var(--font-data);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-red);
}

.campaign-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.campaign-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.campaign-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-data);
}

/* Series Grid */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.series-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.series-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--technical-indigo);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.series-card:hover {
  border-color: var(--technical-indigo);
  transform: translateY(-2px);
  box-shadow: var(--shadow-block);
}

.series-card:hover::before {
  transform: scaleX(1);
}

.series-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.series-card-title {
  flex: 1;
}

.series-card-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem 0;
  word-break: break-word;
}

.series-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.series-status-select {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  text-transform: uppercase;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.series-status-select:hover {
  border-color: var(--accent-red);
}

.series-status-select:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 2px var(--accent-red-dim);
}

.series-product-select {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 159, 10, 0.08);
  border: 1px solid rgba(255, 159, 10, 0.3);
  color: #ffa726;
  cursor: pointer;
  transition: all var(--transition-smooth);
  max-width: 120px;
}

.series-product-select:hover {
  background: rgba(255, 159, 10, 0.15);
  border-color: rgba(255, 159, 10, 0.5);
}

.series-product-select:focus {
  outline: none;
  border-color: rgba(255, 159, 10, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 159, 10, 0.15);
}

.series-product-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.series-design-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: var(--font-data);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.series-design-tag.design-meta {
  border-color: rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

.series-design-tag.design-other {
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(79, 70, 229, 0.08);
  color: #8b7ff8;
}

.series-product-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: var(--font-data);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 159, 10, 0.3);
  background: rgba(255, 159, 10, 0.08);
  color: #ffa726;
  cursor: help;
  transition: all 0.15s ease;
}

.series-product-tag:hover {
  background: rgba(255, 159, 10, 0.15);
  border-color: rgba(255, 159, 10, 0.5);
  transform: translateY(-1px);
}

/* Series Approval Status Bar */
.series-approval-status {
  padding: 0.75rem 0 0 0;
  border-top: 1px solid var(--border-subtle);
}

.approval-status-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.approval-status-bar {
  position: relative;
  display: flex;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.status-segment {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

/* Status segment colors with z-index priority (left to right) */
.status-segment.status-scheduled {
  background: #ff00ff;
  z-index: 5;
}

.status-segment.status-approved {
  background: #00ff41;
  z-index: 4;
}

.status-segment.status-revised {
  background: #ffff00;
  z-index: 3;
}

.status-segment.status-rejected {
  background: var(--accent-red);
  z-index: 2;
}

.status-segment.status-pending {
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

/* Hover effect to show count */
.status-segment:hover {
  opacity: 0.8;
  cursor: help;
}

/* Context Menu */
.context-menu {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-block-lg);
  min-width: 180px;
  padding: 0.5rem;
  z-index: 10000;
  animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.context-menu-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.context-menu-item:hover {
  background: var(--bg-hover);
  color: var(--color-accent);
}

.context-menu-item:hover svg {
  opacity: 1;
}

.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.series-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* Dropdown menu */
.dropdown-menu-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-block-lg);
  min-width: 180px;
  padding: 0.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-smooth);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-red);
}

.dropdown-item.danger {
  color: var(--danger-color);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* Export Status Dropdown */
.export-all-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-status-dropdown {
  min-width: 220px;
}

.dropdown-menu-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.5rem;
}

.dropdown-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  user-select: none;
}

.dropdown-checkbox-item:hover {
  background: var(--bg-surface-hover);
}

.dropdown-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--technical-indigo);
}

.dropdown-checkbox-item span {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.dropdown-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 0;
}

.series-card-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0 0 1rem 0;
}

.series-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.series-stat svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.series-stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.series-stat-value {
  font-family: var(--font-data);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--technical-indigo);
}

.series-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: none;
}

/* Series Stats Cards */
.series-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-smooth);
  flex: 1 1 200px;
  min-width: 200px;
}

.stat-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-block-sm);
}

.stat-card svg {
  width: 40px;
  height: 40px;
  color: var(--accent-red);
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-data);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Series Upload Section */
.series-upload-section {
  margin-bottom: 2rem;
}

.series-upload {
  min-height: 120px;
  padding: 1.5rem;
}

.series-upload svg {
  width: 36px;
  height: 36px;
  margin-bottom: 0.75rem;
}

.series-upload p {
  margin: 0;
}

.series-upload .upload-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Series Content Grid */
.series-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.series-content-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-smooth);
}

.series-content-item:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-block-sm);
}

.series-content-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-surface);
}

.series-content-info {
  padding: 0.75rem;
}

.series-content-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  margin-top: -0.5rem;
}

.series-content-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  text-transform: uppercase;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.series-content-type.video {
  background: rgba(251, 4, 69, 0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red-dim);
}

.series-content-type.image {
  background: rgba(79, 70, 229, 0.15);
  color: var(--technical-indigo);
  border: 1px solid var(--technical-indigo-dim);
}

.series-content-type svg {
  width: 12px;
  height: 12px;
}

.series-content-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  cursor: pointer;
  transition: color var(--transition-smooth);
  
  /* Truncate to single line */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.series-content-name:hover {
  color: var(--accent-red);
}

/* Aspect ratio chips */
.aspect-ratio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.aspect-ratio-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

.aspect-ratio-chip:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
}

.aspect-ratio-chip.current {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--text-on-accent);
}

.aspect-ratio-chip.current .aspect-ratio-symbol {
  opacity: 1;
}

.aspect-ratio-symbol {
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.8;
}

.aspect-ratio-label {
  line-height: 1;
  font-weight: 500;
}

/* Modal aspect ratio switcher */
.modal-aspect-ratio-switcher {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  z-index: 10;
}

.modal-aspect-ratio-switcher .aspect-ratio-chip {
  cursor: pointer;
  transition: all var(--transition-smooth);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.modal-aspect-ratio-switcher .aspect-ratio-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}

.modal-aspect-ratio-switcher .aspect-ratio-chip.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--text-on-accent);
}

.modal-aspect-ratio-switcher .aspect-ratio-chip.active:hover {
  transform: translateY(-2px);
}

.modal-aspect-ratio-switcher .aspect-ratio-symbol {
  opacity: 1;
}

/* Ensure preview container has relative positioning */
.content-modal-preview {
  position: relative;
}

.series-content-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  margin-top: 0.5rem;
}

.series-content-status svg {
  width: 12px;
  height: 12px;
}

.series-content-status.transcribing {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.series-content-status.transcribed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.series-content-status.generating {
  background: rgba(79, 70, 229, 0.15);
  color: var(--technical-indigo);
  border: 1px solid var(--technical-indigo-dim);
}

.series-content-status.status-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.series-content-status.status-approved {
  background: rgba(0, 255, 65, 0.1);
  color: #00ff41;
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.series-content-status.status-changes_requested {
  background: rgba(255, 255, 0, 0.1);
  color: #ffff00;
  border: 1px solid rgba(255, 255, 0, 0.3);
}

.series-content-status.status-rejected {
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border: 1px solid rgba(251, 4, 69, 0.3);
}

.series-content-status.status-scheduled {
  background: rgba(255, 0, 255, 0.1);
  color: #ff00ff;
  border: 1px solid rgba(255, 0, 255, 0.3);
}

/* Magenta border for scheduled content cards */
.series-content-item.scheduled {
  border-color: #ff00ff !important;
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.3);
}

/* Share button styled as inline status badge */
.btn-share-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-data);
  background: rgba(0, 255, 255, 0.1);
  color: #00ffff;
  border: 1px solid rgba(0, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-snap);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-share-inline:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

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

.btn-share-inline svg {
  width: 12px;
  height: 12px;
}

.series-content-meta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  background: var(--accent-red);
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-interface);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.series-content-meta-btn:hover {
  background: #d60338;
  border-color: #d60338;
  box-shadow: var(--shadow-glow-red);
}

.series-content-meta-btn svg {
  width: 14px;
  height: 14px;
}

.series-content-item.has-meta-copy {
  border-color: var(--accent-red);
}

.series-content-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.series-content-item:hover .series-content-actions {
  opacity: 1;
}

.series-content-action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.series-content-action-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.series-content-action-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-primary);
}

/* Icon buttons for cards */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-smooth);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-surface);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-icon.edit:hover {
  border-color: var(--technical-indigo);
  color: var(--technical-indigo);
}

.btn-icon.delete:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Danger button for confirmations */
.btn-danger {
  background: var(--accent-red);
  color: var(--text-primary);
  border: 1px solid var(--accent-red);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-interface);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-danger:hover {
  background: #d60338;
  border-color: #d60338;
  box-shadow: var(--shadow-glow-red);
}

/* Responsive */
@media (max-width: 768px) {
  .campaigns-header-top {
    flex-direction: column;
    align-items: stretch;
  }
  
  .campaigns-header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .campaigns-header-actions .btn,
  .campaigns-header-actions select,
  .campaigns-header-actions .dropdown-menu-container > .btn {
    height: 36px;
  }
  
  .campaigns-header-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .campaigns-header-actions .btn svg {
    width: 14px;
    height: 14px;
  }
  
  .client-switcher select,
  .campaigns-header-actions select {
    min-width: 150px;
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  .campaigns-client-grid,
  .campaigns-grid,
  .series-grid {
    grid-template-columns: 1fr;
  }
  
  .series-content-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .series-stats {
    grid-template-columns: 1fr;
  }
  
  /* Meta Copy Modal - Stack vertically on mobile */
  .meta-copy-body {
    flex-direction: column;
  }
  
  .meta-copy-body.with-client-feedback .content-modal-preview,
  .meta-copy-body.with-client-feedback .meta-copy-content {
    width: 100%;
  }
  
  .content-modal-preview {
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .meta-copy-client-feedback {
    width: 100%;
    min-width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 400px;
  }
}

/* ============================================================================
   CONTEXT MENU (for shareable links)
   ============================================================================ */

.context-menu {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  min-width: 220px;
  padding: 0.5rem 0;
  animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-menu-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-snap);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.context-menu-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: all var(--transition-snap);
}

.context-menu-item:hover {
  background: var(--bg-surface);
  color: var(--accent-red);
}

.context-menu-item:hover svg {
  color: var(--accent-red);
  transform: scale(1.1);
}

.context-menu-item-danger {
  color: var(--accent-red);
}

.context-menu-item-danger:hover {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.context-menu-item-danger svg {
  color: var(--accent-red);
}

/* Shareable link highlight */
.series-content-item.has-shareable-link {
  border: 2px solid var(--tiktok);
  box-shadow: 0 0 16px rgba(0, 242, 234, 0.2);
}

.series-content-item.has-shareable-link:hover {
  border-color: var(--tiktok);
  box-shadow: 0 0 24px rgba(0, 242, 234, 0.3);
}

/* Meta Copy Modal - Client Feedback Panel */
.meta-copy-client-feedback {
  width: 30%;
  min-width: 280px;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.client-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.client-feedback-header h4 {
  font-family: var(--font-data);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.client-feedback-header svg {
  width: 16px;
  height: 16px;
}

.client-feedback-status label,
.client-feedback-url label,
.client-feedback-comments label {
  display: block;
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.client-feedback-status .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 2px;
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  transition: var(--transition-snap);
}

.client-feedback-status .status-badge.status-pending {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.client-feedback-status .status-badge.status-approved {
  background: rgba(0, 255, 65, 0.1);
  border-color: #00ff41;
  color: #00ff41;
}

.client-feedback-status .status-badge.status-changes_requested {
  background: rgba(255, 255, 0, 0.1);
  border-color: #ffff00;
  color: #ffff00;
}

.client-feedback-status .status-badge.status-rejected {
  background: var(--accent-red-dim);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.client-feedback-url-value {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  word-break: break-all;
  font-family: var(--font-data);
}

.client-feedback-url-value .empty-state {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-interface);
}

.client-feedback-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.client-feedback-comments-list .empty-state {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.client-comment-item {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 0.75rem;
}

.client-comment-item.system-comment {
  background: rgba(79, 70, 229, 0.05);
  border-color: var(--technical-indigo-dim);
}

.client-comment-text {
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.client-comment-item.system-comment .client-comment-text {
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-size: 0.8rem;
  font-style: italic;
}

.client-comment-meta {
  font-size: 0.7rem;
  font-family: var(--font-data);
  color: var(--text-muted);
}

/* ============================================================================
   COMPACT TABLE VIEW
   ============================================================================ */

/* View Toggle Button */
.view-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.25rem;
  align-items: center;
  margin-left: auto;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  color: var(--text-muted);
}

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

.view-toggle-btn.active {
  background: var(--accent-red);
  color: var(--text-inverse);
}

.view-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Table View Container */
.series-content-table-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.series-content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.series-content-table thead {
  background: var(--bg-void);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.series-content-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}

.series-content-table thead tr:first-child th {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.series-content-table thead tr:first-child th[rowspan] {
  vertical-align: middle;
  background: var(--bg-void);
}

.series-content-table thead tr:first-child th[colspan] {
  background: rgba(79, 70, 229, 0.05);
  border-left: 2px solid var(--technical-indigo);
  border-right: 2px solid var(--technical-indigo);
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
}

.series-content-table thead tr:last-child th {
  padding: 0.25rem 0.5rem 0.5rem 0.5rem;
  font-size: 0.65rem;
  background: rgba(79, 70, 229, 0.03);
}

.series-content-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth);
  cursor: pointer;
}

.series-content-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.series-content-table tbody tr:hover {
  background: var(--bg-hover) !important;
}

.series-content-table tbody tr.has-shareable-link {
  background: rgba(79, 70, 229, 0.03);
}

.series-content-table tbody tr.has-shareable-link:nth-child(even) {
  background: rgba(79, 70, 229, 0.05);
}

.series-content-table tbody tr.has-shareable-link:hover {
  background: rgba(79, 70, 229, 0.08) !important;
}

.series-content-table tbody tr.scheduled {
  background: rgba(251, 191, 36, 0.05);
}

.series-content-table tbody tr.scheduled:nth-child(even) {
  background: rgba(251, 191, 36, 0.07);
}

.series-content-table tbody tr.scheduled:hover {
  background: rgba(251, 191, 36, 0.1) !important;
}

.series-content-table td {
  padding: 0.625rem 0.75rem;
  vertical-align: middle;
  font-size: 0.875rem;
}

/* Thumbnail Column */
.table-thumbnail-cell {
  width: 50px;
  padding: 0.5rem !important;
  text-align: center;
  vertical-align: middle;
}

.table-thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  display: block;
  margin: 0 auto;
  background: var(--bg-void);
}

/* Content Name Column */
.table-name-cell {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 200px;
}

.table-name-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.table-copy-filename-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition-smooth);
  border-radius: 4px;
  flex-shrink: 0;
}

.table-name-cell:hover .table-copy-filename-btn {
  opacity: 1;
}

.table-copy-filename-btn:hover {
  background: var(--bg-elevated);
  color: var(--accent-red);
}

.table-copy-filename-btn svg {
  width: 14px;
  height: 14px;
}

/* Status Badge (inline in name cell) */
.table-name-cell .table-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}

.table-status-badge.status-pending {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
}

.table-status-badge.status-approved {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

.table-status-badge.status-changes_requested {
  background: rgba(251, 146, 60, 0.1);
  color: rgb(251, 146, 60);
}

.table-status-badge.status-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

.table-status-badge.status-scheduled {
  background: rgba(251, 191, 36, 0.1);
  color: rgb(251, 191, 36);
}

.table-status-badge svg {
  width: 10px;
  height: 10px;
}

/* Meta Copy Fields Columns */
.table-meta-copy-cell {
  padding: 0.5rem !important;
  background: rgba(79, 70, 229, 0.02);
  width: 80px;
  max-width: 80px;
}

.table-meta-copy-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.table-meta-icon-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.375rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.table-meta-icon-btn svg {
  width: 14px;
  height: 14px;
}

.table-meta-icon-btn:not(.disabled):hover {
  background: var(--bg-elevated);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.table-meta-icon-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.table-meta-icon-btn.copying {
  animation: copyPulse 0.3s ease;
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

/* Actions Column */
.table-actions-cell {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem !important;
  width: 30px;
  max-width: 40px; 
  margin: auto;
}

.table-action-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.375rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.table-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
}

.table-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Hide grid when table view is active */
.series-content-grid.table-view-active {
  display: none;
}

/* Show table when table view is active */
.series-content-table-wrapper {
  display: none;
}

.series-content-table-wrapper.active,
.series-list-table-wrapper.active {
  display: block;
}

/* Series List Table Specific Styles */
.series-list-table-wrapper {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}

/* Series Header Row (Collapsible Group Header) */
.series-header-row {
  background: var(--bg-void) !important;
  border-top: 2px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.series-header-row:hover {
  background: var(--bg-elevated) !important;
}

.series-collapse-cell {
  padding: 0.5rem !important;
  width: 40px;
  text-align: center;
}

.series-collapse-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.series-collapse-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-red);
}

.series-collapse-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-smooth);
  transform: rotate(90deg);
}

.series-collapse-btn.collapsed svg {
  transform: rotate(0deg);
}

/* Expand/Collapse All Button in Table Header */
.series-expand-all-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.375rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin: 0 auto;
}

.series-expand-all-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.series-expand-all-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-smooth);
  transform: rotate(90deg);
}

.series-expand-all-btn.collapsed svg {
  transform: rotate(0deg);
}

.series-header-cell {
  padding: 0.75rem 1rem !important;
}

.series-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.series-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.series-header-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.series-header-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-data);
  background: var(--bg-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.series-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.series-product-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-weight: 600;
}

/* Content Rows under Series Header */
.series-content-row {
  background: var(--bg-base);
  border-left: 2px solid transparent;
  transition: all var(--transition-smooth);
}

.series-content-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

.series-content-row:hover {
  background: var(--bg-hover) !important;
  border-left-color: var(--accent-red);
}

.series-content-row.has-shareable-link {
  background: rgba(79, 70, 229, 0.02);
}

.series-content-row.has-shareable-link:nth-child(even) {
  background: rgba(79, 70, 229, 0.04);
}

.series-content-row.has-shareable-link:hover {
  background: rgba(79, 70, 229, 0.08) !important;
}

.series-content-row.scheduled {
  background: rgba(251, 191, 36, 0.03);
}

.series-content-row.scheduled:nth-child(even) {
  background: rgba(251, 191, 36, 0.05);
}

.series-content-row.scheduled:hover {
  background: rgba(251, 191, 36, 0.1) !important;
}


.series-indent-cell {
  width: 40px;
  padding: 0 !important;
  background: rgba(79, 70, 229, 0.03);
  border-left: 2px solid var(--technical-indigo-dim);
}

/* Hide grid when table view is active for series list */
.series-grid.table-view-active {
  display: none;
}

/* Meta Copy Field Popover */
.meta-copy-popover {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 90vw;
  max-height: 500px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-void);
}

.popover-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.popover-close {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-smooth);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popover-close:hover {
  background: var(--bg-hover);
  color: var(--accent-red);
}

.popover-close svg {
  width: 16px;
  height: 16px;
}

.popover-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  max-height: 350px;
}

.popover-field-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-default);
}

.popover-field-content:empty::before {
  content: 'No content';
  color: var(--text-muted);
  font-style: italic;
}

.popover-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-void);
}

.popover-footer .btn {
  min-width: 80px;
}

/* Popover Arrow (optional visual indicator) */
.meta-copy-popover::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  display: none; /* Can be shown with positioning logic */
}

.meta-copy-popover.arrow-top::before {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent var(--border-color) transparent;
  display: block;
}

.meta-copy-popover.arrow-bottom::before {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-color: var(--border-color) transparent transparent transparent;
  display: block;
}

/* Responsive popover */
@media (max-width: 768px) {
  .meta-copy-popover {
    width: 90vw;
    max-width: 400px;
  }
}

/* Copy feedback animation */
@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.table-copy-content.copying,
.table-headline-btn.copying {
  animation: copyPulse 0.3s ease;
}

/* Responsive Table */
@media (max-width: 1400px) {
  .table-name-cell {
    min-width: 180px;
  }
}

@media (max-width: 1200px) {
  .table-name-cell {
    min-width: 150px;
  }
  
  .series-stats {
    gap: 0.75rem;
  }
  
  .stat-card {
    flex: 1 1 180px;
    min-width: 180px;
    padding: 1rem;
  }
  
  .table-meta-icon-btn {
    padding: 0.25rem;
  }
  
  .table-meta-icon-btn svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 1024px) {
  .series-content-table-wrapper,
  .series-list-table-wrapper {
    overflow-x: auto;
  }
  
  .series-content-table,
  .series-list-table {
    min-width: 900px;
  }
}

@media (max-width: 768px) {
  .view-toggle {
    display: none;
  }
  
  /* Hide logout text on mobile */
  #logoutBtn span {
    display: none;
  }
  
  #logoutBtn {
    margin-left: 0.5rem !important;
  }
  
  /* Hide generate all links text on mobile */
  #generateAllLinksBtn span {
    display: none;
  }
  
  .series-stats {
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
  }
  
  .stat-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.375rem;
    gap: 0.375rem;
    flex-direction: row;
    align-items: center;
  }
  
  .stat-card:hover {
    transform: none;
  }
  
  .stat-card svg {
    width: 18px;
    height: 18px;
  }
  
  .stat-info {
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
  }
  
  .stat-value {
    font-size: 1rem;
    white-space: nowrap;
  }
  
  .stat-label {
    font-size: 0.6rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
