/* ==========================================================================
   The Print Pyramid Photo Studio - Photo Selection Suite
   Styles: Modern, Minimalist White Aesthetic with Indigo/Violet Accents
   ========================================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #818cf8;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #ffffff;

  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-glow: 0 10px 25px -5px rgba(99, 102, 241, 0.25);

  --status-selected: #10b981;
  --status-selected-bg: #ecfdf5;
  --status-selected-border: #a7f3d0;
  --status-selected-glow: 0 0 12px rgba(16, 185, 129, 0.25);

  --status-unselected: #e11d48;
  --status-unselected-bg: #fff1f2;
  --status-unselected-border: #fecdd3;
  --status-unselected-glow: 0 0 12px rgba(225, 29, 72, 0.25);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 20px 40px -12px rgba(15, 23, 42, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --header-height: 72px;
  --subbar-height: 58px;
  --filmstrip-height: 120px;
  --footer-height: 40px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-main);
  position: relative;
}

/* ==========================================================================
   1. Locked Header & Permanent Studio Branding
   ========================================================================== */
.app-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  position: relative;
  z-index: 40;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-permanent {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none; /* Locked branding */
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo-wrapper {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
  transition: transform var(--transition-fast);
}

.brand-logo-wrapper img,
.brand-logo-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.brand-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-locked-badge svg {
  width: 10px;
  height: 10px;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.2;
  margin-top: 2px;
}

/* Collaborating Studio / Associate Photographer Input */
.collaborator-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px 6px 3px 12px;
  gap: 6px;
  transition: all var(--transition-fast);
  max-width: 250px;
  min-width: 150px;
  flex-shrink: 1;
}

.collaborator-box:focus-within {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.collaborator-box label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.collaborator-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  width: 100%;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collaborator-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.save-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--status-selected);
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.save-indicator.active {
  opacity: 1;
}

/* Header Action Right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Counter Pills in Header (Auto-hides on <= 1550px as subbar has identical counters) */
.stats-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 2px 4px;
  gap: 2px;
  flex-shrink: 0;
}

@media (max-width: 1550px) {
  .header-actions .stats-group {
    display: none;
  }
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.stat-chip.stat-total {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.stat-chip.stat-selected {
  background: var(--status-selected-bg);
  color: var(--status-selected);
  border: 1px solid var(--status-selected-border);
}

.stat-chip.stat-unselected {
  background: var(--status-unselected-bg);
  color: var(--status-unselected);
  border: 1px solid var(--status-unselected-border);
}

.stat-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-light);
  box-shadow: var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.4);
}

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

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

.btn-outline:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

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

/* ==========================================================================
   2. Sub-Header Toolbar (Filter Tabs, Search, View Controls)
   ========================================================================== */
.app-subbar {
  height: var(--subbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.subbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Tab Pills */
.filter-tabs {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.tab-btn .badge-count {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-btn.tab-selected.active {
  color: var(--status-selected);
}

.tab-btn.tab-selected.active .badge-count {
  background: var(--status-selected-bg);
  color: var(--status-selected);
}

.tab-btn.tab-unselected.active {
  color: var(--status-unselected);
}

.tab-btn.tab-unselected.active .badge-count {
  background: var(--status-unselected-bg);
  color: var(--status-unselected);
}

/* Search Bar */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 34px;
  font-size: 0.8rem;
  color: var(--text-primary);
  outline: none;
  width: 180px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.search-input:focus {
  width: 240px;
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* View Mode Toggles */
.view-switch {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.view-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.view-btn.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   3. Main Photo Stage / Viewer Area
   ========================================================================== */
.main-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Empty State / Welcome Dropzone */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 680px;
  width: 92%;
  padding: 40px;
  background: var(--bg-surface);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: all var(--transition-fast);
  animation: fadeIn 0.4s ease-out;
}

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

.empty-state-container.drag-over {
  border-color: var(--accent-primary);
  background: rgba(79, 70, 229, 0.02);
  transform: scale(1.01);
}

.empty-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-icon-circle svg {
  width: 36px;
  height: 36px;
}

.empty-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 480px;
}

.source-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
}

.source-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-card:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.source-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-primary);
}

.source-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.source-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.demo-trigger-wrapper {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-demo {
  background: #fdf4ff;
  border: 1px solid #f0abfc;
  color: #a21caf;
  font-size: 0.8rem;
  padding: 6px 14px;
}

.btn-demo:hover {
  background: #fae8ff;
  color: #86198f;
}

/* Photo Viewer Main Canvas */
.photo-viewer {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b0f19; /* High-contrast neutral dark backdrop for true color review */
}

.photo-canvas-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
}

.photo-canvas-wrapper.is-panning {
  cursor: grabbing;
}

.active-image {
  max-width: 96%;
  max-height: 94%;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease-out, opacity 0.2s ease;
  will-change: transform;
  border-radius: 4px;
}

/* Floating Status Badge on Active Photo */
.status-floating-pill {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-float);
  transition: all var(--transition-bounce);
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

@keyframes badgePop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.status-floating-pill.status-selected {
  background: rgba(16, 185, 129, 0.92);
  color: #ffffff;
  border: 2px solid #34d399;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.status-floating-pill.status-unselected {
  background: rgba(225, 29, 72, 0.92);
  color: #ffffff;
  border: 2px solid #fb7185;
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.4);
}

.status-floating-pill .badge-icon {
  width: 18px;
  height: 18px;
}

.status-floating-pill .badge-shortcut-hint {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

/* Floating Photo Info (Bottom Left of Canvas) */
.photo-info-floating {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.photo-info-name {
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-info-counter {
  color: #94a3b8;
  font-weight: 500;
}

.photo-info-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}

/* Floating Zoom & Pan Controls (Top Right of Canvas) */
.canvas-controls-floating {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.canvas-control-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.canvas-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.canvas-control-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Navigation Chevrons (Previous / Next) */
.nav-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-fast);
}

.nav-arrow-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-float);
  color: var(--accent-primary);
}

.nav-arrow-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-arrow-prev { left: 24px; }
.nav-arrow-next { right: 24px; }

/* Grid Review View Mode */
.grid-stage {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
  background: var(--bg-main);
}

.grid-card {
  position: relative;
  aspect-ratio: 3/2;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #e2e8f0;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.grid-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.grid-card.active-grid-item {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.grid-card.is-unselected {
  opacity: 0.65;
  filter: grayscale(40%);
}

.grid-card.is-unselected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(225, 29, 72, 0.15);
  pointer-events: none;
}

.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-card-status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.grid-card-status.selected {
  background: var(--status-selected);
}

.grid-card-status.unselected {
  background: var(--status-unselected);
}

.grid-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   4. Bottom Filmstrip Thumbnail Carousel
   ========================================================================== */
.filmstrip-bar {
  height: var(--filmstrip-height);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: relative;
  z-index: 30;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
}

.filmstrip-scroll-wrapper {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px;
  scroll-behavior: smooth;
}

.filmstrip-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
}

.filmstrip-scroll-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.filmstrip-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.filmstrip-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Filmstrip Thumb Item */
.thumb-card {
  position: relative;
  height: 84px;
  aspect-ratio: 3/2;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e2e8f0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.thumb-card:hover {
  transform: translateY(-2px);
}

.thumb-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
  transform: translateY(-4px) scale(1.04);
}

.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-card.is-unselected img {
  opacity: 0.55;
  filter: grayscale(50%);
}

.thumb-card-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.thumb-card-badge.badge-selected {
  background: var(--status-selected);
}

.thumb-card-badge.badge-unselected {
  background: var(--status-unselected);
}

.thumb-card-index {
  position: absolute;
  bottom: 3px;
  left: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 600;
}

/* ==========================================================================
   5. Locked Footer & Shortcut Cheatsheet Ribbon
   ========================================================================== */
.app-footer {
  height: var(--footer-height);
  background: #0f172a;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 0.74rem;
  z-index: 40;
  border-top: 1px solid #1e293b;
}

.footer-credits-locked {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  pointer-events: none; /* Locked branding */
}

.footer-brand-title {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-dev-tag {
  color: #64748b;
}

.footer-shortcuts-ribbon {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1;
}

kbd {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 700;
  color: #f8fafc;
  box-shadow: 0 1px 0 #0f172a;
}

.kbd-special {
  background: var(--accent-gradient);
  border-color: #6366f1;
  color: #ffffff;
}

/* ==========================================================================
   6. Modals (Import, Export, Help)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-bounce);
  border: 1px solid var(--border-light);
}

.modal-backdrop.open .modal-window {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.modal-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.modal-tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

/* File Dropzone in Modal */
.dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-surface-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone-box:hover,
.dropzone-box.drag-over {
  border-color: var(--accent-primary);
  background: rgba(79, 70, 229, 0.04);
}

.dropzone-box svg {
  width: 44px;
  height: 44px;
  color: var(--accent-primary);
}

.dropzone-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.dropzone-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Form Controls in Modal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-control {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.4;
}

.input-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-subtle);
}

/* Export Cards */
.export-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.export-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.export-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-card h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.export-card p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 60px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--accent-primary);
}

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

.toast.toast-success {
  border-left-color: var(--status-selected);
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast.toast-danger {
  border-left-color: var(--status-unselected);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .brand-tagline, .brand-locked-badge {
    display: none;
  }
  .footer-shortcuts-ribbon {
    display: none;
  }
  .collaborator-box {
    max-width: 200px;
  }
}

/* ==========================================================================
   Direct Move to _Unselected Folder Button
   ========================================================================== */
.btn-move-unselected {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  color: #e11d48;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-move-unselected:hover:not(:disabled) {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.btn-move-unselected.has-items {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  animation: movePulse 2.5s infinite ease-in-out;
}

@keyframes movePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35); }
  50% { box-shadow: 0 4px 20px rgba(225, 29, 72, 0.6); }
}

.btn-move-unselected:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Download Auto-Mover .BAT Script Button
   ========================================================================== */
.btn-download-bat {
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  color: #4f46e5;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-download-bat:hover:not(:disabled) {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-download-bat.has-items {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-download-bat:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   FULLSCREEN MODE (Edge-to-Edge Distraction-Free Studio Review)
   Both top header & bottom bars hide completely!
   Status badge becomes compact & unobtrusive.
   ========================================================================== */
:fullscreen,
body.is-fullscreen {
  background: #000000 !important;
  overflow: hidden !important;
}

:fullscreen .app-header,
:fullscreen .app-subbar,
:fullscreen .filmstrip-bar,
:fullscreen .app-footer,
body.is-fullscreen .app-header,
body.is-fullscreen .app-subbar,
body.is-fullscreen .filmstrip-bar,
body.is-fullscreen .app-footer {
  display: none !important;
}

:fullscreen .main-stage,
body.is-fullscreen .main-stage {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #000000 !important;
  z-index: 99999 !important;
  padding: 0 !important;
  margin: 0 !important;
}

:fullscreen .photo-viewer,
body.is-fullscreen .photo-viewer {
  width: 100vw !important;
  height: 100vh !important;
  background: #000000 !important;
}

:fullscreen .photo-canvas-wrapper,
body.is-fullscreen .photo-canvas-wrapper {
  width: 100vw !important;
  height: 100vh !important;
}

:fullscreen .active-image,
body.is-fullscreen .active-image {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Compact, Minimal Status Badge in Fullscreen */
:fullscreen .status-floating-pill,
body.is-fullscreen .status-floating-pill {
  top: 14px !important;
  left: 14px !important;
  padding: 4px 10px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  border-width: 1.5px !important;
  backdrop-filter: blur(8px) !important;
  opacity: 0.85;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

:fullscreen .status-floating-pill:hover,
body.is-fullscreen .status-floating-pill:hover {
  opacity: 1;
  transform: scale(1.05);
}

:fullscreen .status-floating-pill .badge-shortcut-hint,
body.is-fullscreen .status-floating-pill .badge-shortcut-hint {
  display: none !important;
}

:fullscreen .status-floating-pill .badge-icon,
body.is-fullscreen .status-floating-pill .badge-icon {
  width: 13px !important;
  height: 13px !important;
}

/* Compact Info in Fullscreen */
:fullscreen .photo-info-floating,
body.is-fullscreen .photo-info-floating {
  bottom: 14px !important;
  left: 14px !important;
  padding: 4px 10px !important;
  font-size: 0.7rem !important;
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.65) !important;
}

:fullscreen .photo-info-floating:hover,
body.is-fullscreen .photo-info-floating:hover {
  opacity: 1;
}

/* Chevrons in Fullscreen */
:fullscreen .nav-arrow-btn,
body.is-fullscreen .nav-arrow-btn {
  width: 46px !important;
  height: 46px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  opacity: 0.35;
}

:fullscreen .nav-arrow-btn:hover,
body.is-fullscreen .nav-arrow-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
}

:fullscreen .canvas-controls-floating,
body.is-fullscreen .canvas-controls-floating {
  top: 14px !important;
  right: 14px !important;
  opacity: 0.5;
  transition: opacity 0.2s;
}

:fullscreen .canvas-controls-floating:hover,
body.is-fullscreen .canvas-controls-floating:hover {
  opacity: 1;
}

/* ==========================================================================
   Subscription 7-Day Warning Notification Banner
   ========================================================================== */
.subscription-warning-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 2px solid #fde68a;
  color: #92400e;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 60;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
  animation: bannerSlideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bannerSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.subscription-warning-banner .banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscription-warning-banner .warning-icon {
  font-size: 1.2rem;
  animation: pulseIcon 1.8s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.subscription-warning-banner .btn-close-banner {
  background: transparent;
  border: none;
  color: #b45309;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.subscription-warning-banner .btn-close-banner:hover {
  color: #78350f;
}

/* User Session Profile Chip in Header */
.user-session-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.user-session-chip .user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-selected);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.header-studio-name {
  color: var(--text-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-license-badge {
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-primary);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
}

.header-license-badge.expiring-soon {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.btn-logout-icon:hover {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}


