/* ==========================================================================
   NOVA Production & Design Studio Hub — Luxury Dark Design System
   ========================================================================== */

:root {
  --bg-main: #09090B;
  --bg-surface: #121216;
  --bg-card: #18181E;
  --bg-input: #111114;
  --bg-hover: #22222B;
  
  --gold-main: #C9A96E;
  --gold-hover: #DFBF85;
  --gold-glow: rgba(201, 169, 110, 0.18);
  --gold-subtle: rgba(201, 169, 110, 0.1);
  
  --text-main: #F4F4F5;
  --text-muted: #8E8E98;
  --text-dim: #5A5A64;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(201, 169, 110, 0.4);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header */
.studio-header {
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
  z-index: 50;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--gold-main);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold-main);
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #FFF;
}

.studio-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-main);
  text-transform: uppercase;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.stat-num {
  color: var(--gold-main);
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--text-muted);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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

.btn-primary {
  background: var(--gold-main);
  border: 1px solid var(--gold-main);
  color: #000;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--gold-hover);
  box-shadow: 0 0 16px var(--gold-glow);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #EF4444;
  color: #FFF;
  border-color: #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-magic {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid var(--gold-main);
  color: var(--gold-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-magic:hover {
  background: var(--gold-main);
  color: #000;
  box-shadow: 0 0 16px var(--gold-glow);
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--gold-main);
  color: var(--gold-main);
}

.btn-subtle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-subtle:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* Workspace Layout */
.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Sidebar */
.designs-sidebar {
  width: 290px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

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

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

.sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.badge-count {
  background: var(--gold-subtle);
  color: var(--gold-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.designs-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.design-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.design-nav-item:hover {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.design-nav-item.active {
  background: var(--bg-card);
  border-color: var(--gold-main);
  box-shadow: 0 0 12px var(--gold-subtle);
}

.nav-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
  border: 1px solid var(--border-subtle);
}

.nav-item-meta {
  flex: 1;
  min-width: 0;
}

.nav-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
}

/* Studio Main */
.studio-main {
  flex: 1;
  background: var(--bg-main);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
}

/* Hero Section */
.design-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.25rem;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.design-code-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-main);
  letter-spacing: 0.1em;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-headline {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-origin-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

.hero-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-dropdown-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: right;
}

.status-dropdown-wrap label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.status-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--gold-main);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  outline: none;
}

/* Studio Tabs */
.studio-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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

.tab-btn.active {
  color: var(--gold-main);
  background: var(--bg-card);
  box-shadow: inset 0 -2px 0 var(--gold-main);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: block;
}

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

/* Tab 1: Master Artwork Grid */
.master-art-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
}

.master-preview-panel, .master-versions-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

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

.panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pill-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.pill-badge.gold {
  background: var(--gold-subtle);
  border-color: var(--gold-main);
  color: var(--gold-main);
  font-weight: 600;
}

.checkerboard-stage {
  width: 100%;
  height: 420px;
  background-color: #0E0E11;
  background-image: 
    linear-gradient(45deg, #16161C 25%, transparent 25%), 
    linear-gradient(-45deg, #16161C 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #16161C 75%), 
    linear-gradient(-45deg, transparent 75%, #16161C 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.primary-art-display {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

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

.versions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.25rem;
}

.version-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.version-card:hover {
  border-color: var(--text-main);
}

.version-card.active {
  border-color: var(--gold-main);
  background: var(--gold-subtle);
}

.version-card-thumb {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: #000;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.version-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
}

.version-card-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.story-prompts-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editor-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.editor-section label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.editor-row {
  display: flex;
  gap: 1rem;
}

.studio-textarea, .studio-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  resize: vertical;
  transition: var(--transition);
}

.studio-textarea:focus, .studio-input:focus {
  border-color: var(--gold-main);
  box-shadow: 0 0 10px var(--gold-subtle);
}

/* Tab 2: Packshots */
.category-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.cat-pill:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.cat-pill.active {
  background: var(--gold-main);
  border-color: var(--gold-main);
  color: #000;
}

.packshots-showcase-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.5rem;
}

.active-packshot-viewer {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.current-color-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.current-sku-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-main);
}

.packshot-main-frame {
  width: 100%;
  height: 460px;
  background: #0E0E12;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.packshot-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.swatches-and-variants-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.swatches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.swatch-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.swatch-btn:hover {
  border-color: var(--gold-main);
}

.swatch-btn.active {
  border-color: var(--gold-main);
  background: var(--gold-subtle);
}

.swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}

.swatch-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.variants-table-wrap {
  margin-top: 1rem;
  max-height: 280px;
  overflow-y: auto;
}

.variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.variants-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.variants-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.variants-table tr:hover td {
  background: var(--bg-card);
}

/* Tab 3: Photoshoots */
.photoshoot-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.photo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.photo-card:hover {
  border-color: var(--gold-main);
  transform: translateY(-2px);
}

.photo-card-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  background: #0E0E12;
}

.photo-card-meta {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.photo-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Tab 4: Tech Packs */
.techpack-category-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tp-cat-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tp-cat-btn.active {
  background: var(--bg-card);
  border-color: var(--gold-main);
  color: var(--gold-main);
}

.techpack-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.tp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tp-card.full-width {
  grid-column: 1 / -1;
}

.tp-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.field-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.field-row {
  display: flex;
  gap: 0.75rem;
}

.tp-actions {
  display: flex;
  justify-content: flex-end;
}

/* Tab 5: Logs */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.log-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-desc {
  font-size: 0.85rem;
  color: var(--text-main);
}

.log-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--gold-main);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  animation: slideUp 0.3s ease;
}

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

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-main);
}
