/* STUDIO PRO - Dark Theme inspired by Adobe Lightroom & MEKO COLOR */
:root {
  --bg-darkest: #090d16;
  --bg-dark: #0f172a;
  --bg-card: #141d30;
  --bg-surface: #1e293b;
  --bg-surface-hover: #27354f;
  --border-color: #24324a;
  --border-focus: #3b82f6;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-main: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   GLOBAL NOWRAP RULE FOR ALL BUTTONS, LABELS, BADGES AND TEXT
   ============================================================ */
button,
label,
.btn,
.btn *,
.stat-item,
.stat-item *,
.brand-title,
.brand-title *,
.brand-badge,
.header-center-stats,
.header-actions,
.header-actions *,
.roster-title,
.roster-title *,
.roster-stt,
.roster-status-badge,
.roster-name,
.roster-code,
.roster-header-top,
.roster-filter-tabs,
.filter-tab,
.subject-badge,
.subject-name-big,
.current-subject-info,
.current-subject-info *,
.stage-top-bar,
.stage-view-modes,
.stage-view-btn,
.split-label,
.split-divider-knob,
.btn-big-capture,
.btn-big-capture *,
.auto-advance-toggle,
.auto-advance-toggle *,
.lightroom-header-tabs,
.lr-tab-btn,
.lr-tab-btn *,
.lr-section-title,
.lr-section-title *,
.lr-slider-header,
.lr-slider-header *,
.lr-slider-val,
.ai-diagnose-top,
.ai-diagnose-top *,
.ai-diagnose-text,
.ai-luminance-meter,
.ai-luminance-meter *,
.option-grid,
.option-card,
.lightroom-floating-bar,
.btn-batch-floating,
.btn-batch-floating *,
.toast-notice,
.toast-notice *,
.modal-title,
.modal-close,
.badge-pill {
  white-space: nowrap !important;
}

/* Studio Header */
.studio-header {
  height: 60px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 50;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 10px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
}

.header-center-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-surface);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.stat-dot.green { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.stat-dot.yellow { background: var(--accent-yellow); }

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

.btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}
.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

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

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Main Studio Layout: 3 Columns */
.studio-main {
  flex: 1;
  display: grid;
  grid-template-columns: 310px 1fr 390px;
  overflow: hidden;
  position: relative;
}

/* LEFT COLUMN: Single Shooting Queue */
.col-roster {
  background: var(--bg-dark);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.roster-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.roster-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roster-search-bar {
  position: relative;
}

.roster-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  outline: none;
}
.roster-search-input:focus {
  border-color: var(--accent-blue);
}

.roster-search-icon {
  position: absolute;
  left: 10px;
  top: 8px;
  color: var(--text-dim);
}

.roster-filter-tabs {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.filter-tab {
  flex: 1;
  padding: 5px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.filter-tab.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.roster-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  position: relative;
}

.roster-card:hover {
  background: var(--bg-surface);
  border-color: rgba(59, 130, 246, 0.4);
}

.roster-card.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.roster-card.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--accent-blue);
  border-radius: 0 4px 4px 0;
}

.roster-thumb {
  width: 44px;
  height: 58px;
  border-radius: var(--radius-sm);
  background: #1e293b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.roster-thumb-empty {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
}

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

.roster-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.roster-stt {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.roster-status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 600;
}
.roster-status-badge.captured {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.roster-status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.roster-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.roster-code {
  font-size: 11px;
  color: var(--text-dim);
}

/* CENTER COLUMN: Camera & Stage & Split Comparison */
.col-stage {
  background: #060911;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.stage-top-bar {
  height: 48px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 13px;
}

.current-subject-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-badge {
  background: var(--accent-blue);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}

.subject-name-big {
  font-weight: 700;
  font-size: 14px;
}

.stage-view-modes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stage-view-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.stage-view-btn.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

/* Stage Canvas Area */
.stage-content-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

/* Split Before/After Slider Container (MEKO COLOR style) */
.split-compare-box {
  position: relative;
  width: 480px;
  height: 672px;
  max-height: 85vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  border: 2px solid var(--border-color);
  background: #0f172a;
  user-select: none;
}

.split-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.split-layer.before {
  z-index: 1;
}

.split-layer.after {
  z-index: 2;
  overflow: hidden;
  width: 50%;
  border-right: 2px solid white;
}

.split-layer img,
.split-layer canvas,
.split-layer video {
  width: 480px;
  height: 672px;
  object-fit: cover;
  display: block;
}

.split-label {
  position: absolute;
  top: 14px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 5;
}
.split-label.before { left: 14px; }
.split-label.after { right: 14px; }

/* Interactive Curtain Divider Handle */
.split-divider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: white;
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.split-divider-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 12px;
  font-weight: bold;
}

/* Big Photographer Action Bar (Bottom of Stage) */
.stage-action-bar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 20;
}

.camera-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-big-capture {
  flex: 1;
  max-width: 480px;
  padding: 12px 24px;
  border-radius: 30px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
  transition: all 0.2s ease;
}

.btn-big-capture:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.65);
}

.btn-big-capture:active {
  transform: translateY(1px);
}

.auto-advance-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  white-space: nowrap !important;
  flex-shrink: 0;
}
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.auto-advance-toggle input[type="checkbox"] {
  accent-color: var(--accent-green);
}

/* RIGHT COLUMN: Lightroom Color & AI Suite */
.col-lightroom {
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lightroom-header-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.lr-tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.lr-tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.lightroom-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Floating Bottom Bar for Batch Apply */
.lightroom-floating-bar {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-batch-floating {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-batch-floating:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.65);
  transform: translateY(-1px);
}

.btn-batch-floating:active {
  transform: translateY(1px);
}

/* Section Box */
.lr-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.lr-section-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
}

.lr-section-title span.sub {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-dim);
}

/* AI Diagnostics Badge */
.ai-diagnose-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-diagnose-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.ai-diagnose-text {
  font-size: 12px;
  color: var(--text-main);
}

.ai-luminance-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.meter-bar {
  flex: 1;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  width: 60%;
  transition: width 0.3s ease;
}

/* Slider Controls (Lightroom format) */
.lr-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.lr-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.lr-slider-val {
  font-family: monospace;
  font-weight: 600;
  color: var(--text-main);
}

.lr-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #334155;
  border-radius: 2px;
  outline: none;
}

.lr-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease;
}
.lr-range-input::-webkit-slider-thumb:hover {
  background: var(--accent-blue);
}

/* Color gradients on Kelvin & Tint */
.lr-range-input.temp-gradient {
  background: linear-gradient(to right, #60a5fa, #94a3b8, #fbbf24);
}
.lr-range-input.tint-gradient {
  background: linear-gradient(to right, #4ade80, #94a3b8, #f472b6);
}

/* AI Suit & Background Option Grids */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-card {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}
.option-card:hover {
  background: var(--bg-surface-hover);
  color: white;
}
.option-card.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-cyan);
}

/* Card Preview Drawer */
.card-preview-box {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.card-preview-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Toast message */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-main);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-notice.success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.toast-notice.error {
  border-color: var(--accent-red);
  color: var(--accent-red);
}
