/* ==========================================================================
   MINIJERSEY 3D STUDIO — PROFESSIONAL DESIGN SYSTEM & 3D STYLING
   ========================================================================== */

:root {
  /* Core Brand Colors */
  --bg-app: #0b0d11;
  --bg-surface: #14171d;
  --bg-surface-raised: #1a1e27;
  --bg-surface-active: #222834;
  --border-subtle: #272d3b;
  --border-strong: #384256;
  
  /* Text & Typography */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-accent: #38bdf8;
  
  /* Accent Colors */
  --accent-primary: #e11d48;       /* Corsa Red */
  --accent-primary-hover: #be123c;
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  
  /* UI Metrics */
  --header-height: 64px;
  --sidebar-width: 440px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows & Depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.25);
  --shadow-cyan-glow: 0 0 18px rgba(6, 182, 212, 0.35);
  
  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Main Layout Grid */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   HEADER & TOP TOOLBAR
   ========================================================================== */
.app-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 40;
  user-select: none;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), #9f1239);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}
.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Center History & View Switcher */
.toolbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-raised);
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-strong);
  margin: 0 4px;
}

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

.tool-btn:hover:not(:disabled) {
  background: var(--bg-surface-active);
  color: #ffffff;
}

.tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tool-btn.highlight-tool {
  color: var(--accent-cyan);
}
.tool-btn.highlight-tool.active {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--accent-cyan);
  color: #ffffff;
  box-shadow: var(--shadow-cyan-glow);
}

/* 3D Model Mode Switcher Pill */
.model-select-pill {
  display: flex;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.model-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.model-switch-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.model-switch-btn.active {
  background: var(--accent-cyan);
  color: #0b1120;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.model-upload-btn {
  background: rgba(37, 99, 235, 0.15) !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  color: #93c5fd !important;
}

.model-upload-btn:hover {
  background: rgba(37, 99, 235, 0.3) !important;
  color: #ffffff !important;
}

/* 3D Camera Angles Quick Pill */
.camera-angles-pill {
  display: flex;
  background: var(--bg-app);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.cam-angle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cam-angle-btn:hover {
  color: #ffffff;
}

.cam-angle-btn.active {
  background: var(--bg-surface-active);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  font-size: 13px;
  padding: 8px 14px;
}

.btn-xs {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-surface-active);
  border-color: var(--border-strong);
  color: #ffffff;
}

.btn-danger {
  background: #7f1d1d;
  color: #fecaca;
  border-color: #991b1b;
}
.btn-danger:hover {
  background: #991b1b;
  color: #ffffff;
}

/* ==========================================================================
   STUDIO MAIN: 3D VIEWPORT & SIDEBAR
   ========================================================================== */
.studio-main {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
}

/* 3D Canvas Workspace */
.canvas-workspace {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #181d26 0%, #0a0c10 80%);
  overflow: hidden;
}

.workspace-background {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  pointer-events: none;
}

/* 3D WebGL Canvas Container */
.viewport-3d-container {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: grab;
}
.viewport-3d-container:active {
  cursor: grabbing;
}
.viewport-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* 3D Orbit Interaction Hint Badge */
.orbit-3d-hint {
  position: absolute;
  top: 18px;
  background: rgba(20, 23, 29, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.orbit-3d-hint svg {
  color: var(--accent-cyan);
  animation: pulse-spin 6s linear infinite;
}

@keyframes pulse-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Floating Stage Controls (Bottom) */
.stage-floating-bar {
  position: absolute;
  bottom: 24px;
  background: rgba(20, 23, 29, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

.floating-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.floating-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}
.floating-btn.secondary-floating {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.floating-btn.secondary-floating:hover {
  background: var(--bg-surface-active);
  color: #ffffff;
}

.floating-divider {
  width: 1px;
  height: 22px;
  background: var(--border-strong);
}

/* ==========================================================================
   SIDEBAR CONTROLS & TABS
   ========================================================================== */
.studio-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 30;
}

/* Sidebar Tab Navigation */
.sidebar-tabs {
  display: flex;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  user-select: none;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
  background: var(--bg-surface);
}

.tab-btn svg {
  opacity: 0.8;
}
.tab-btn.active svg {
  opacity: 1;
  color: var(--accent-primary);
}

/* Sidebar Panels */
.sidebar-panels-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-tab {
  display: none;
  flex-direction: column;
  gap: 20px;
}
.panel-tab.active {
  display: flex;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

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

.badge-action {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.badge-action:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   PRESET GRID
   ========================================================================== */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preset-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

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

.preset-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.preset-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preset-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.preset-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   ZONE COLOR LIST & PICKERS
   ========================================================================== */
.zone-color-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition-fast);
}

.zone-item:hover, .zone-item.highlighted {
  border-color: var(--border-strong);
  background: var(--bg-surface-active);
}

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

.zone-icon-bullet {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.zone-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.zone-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-input {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--border-strong);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  padding: 0;
  outline: none;
}
.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.color-hex-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 64px;
}

/* Quick Swatches Palette */
.quick-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.quick-swatch {
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.quick-swatch:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

/* ==========================================================================
   PATTERN GRID
   ========================================================================== */
.pattern-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pattern-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.pattern-card:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.pattern-card.active {
  border-color: var(--accent-primary);
  background: var(--bg-surface-active);
  color: #ffffff;
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.pattern-preview {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}

.pattern-solid { background: #e11d48; }
.pattern-vintage-band { background: linear-gradient(180deg, #e11d48 35%, #ffffff 35%, #ffffff 65%, #e11d48 65%); }
.pattern-rainbow { background: linear-gradient(180deg, #2563eb 20%, #ef4444 40%, #000 60%, #eab308 80%, #16a34a 100%); }
.pattern-dots { background: radial-gradient(#ffffff 25%, #e11d48 26%); background-size: 14px 14px; }
.pattern-chevrons { background: repeating-linear-gradient(45deg, #e11d48, #e11d48 10px, #ffffff 10px, #ffffff 20px); }
.pattern-gradient { background: linear-gradient(180deg, #e11d48, #09090b); }
.pattern-mesh { background: radial-gradient(circle, #ffffff 15%, transparent 20%), #e11d48; background-size: 8px 8px; }
.pattern-topo { background: repeating-radial-gradient(circle at 50% 50%, #e11d48, #e11d48 6px, #ffffff 7px, #e11d48 8px); }
.pattern-diagonal { background: linear-gradient(135deg, #e11d48 40%, #ffffff 40%, #ffffff 60%, #e11d48 60%); }
.pattern-vertical { background: linear-gradient(90deg, #e11d48 40%, #ffffff 40%, #ffffff 45%, #e11d48 45%, #e11d48 55%, #ffffff 55%, #ffffff 60%, #e11d48 60%); }

/* Controls Rows & Sliders */
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.range-slider {
  flex: 1;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.range-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  min-width: 42px;
  text-align: right;
}

/* ==========================================================================
   DROPZONE & LOGOS
   ========================================================================== */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-surface-raised);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-active);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.dropzone-content svg {
  color: var(--accent-cyan);
}

.dropzone-text {
  font-size: 13px;
  color: var(--text-primary);
}

.dropzone-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Stock Badges */
.stock-logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stock-badge-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.stock-badge-btn:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
  background: var(--bg-surface-active);
}

.mini-flag.ita {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, #009246 33.3%, #ffffff 33.3%, #ffffff 66.6%, #ce2b37 66.6%);
  box-shadow: var(--shadow-sm);
}

/* Applied Logos List */
.applied-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.empty-state-small {
  text-align: center;
  padding: 16px;
  background: var(--bg-surface-raised);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.applied-logo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.applied-logo-card.selected {
  border-color: var(--accent-primary);
  background: var(--bg-surface-active);
}

.logo-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-thumb {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: #09090b;
  object-fit: contain;
  border: 1px solid var(--border-strong);
}

.logo-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

/* Selected Logo Editor & Smart Snapper */
.selected-item-editor {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.editor-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.selected-name {
  color: var(--accent-cyan);
}

.smart-snap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.snap-btn {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}
.snap-btn:hover {
  background: var(--bg-surface-active);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

.transform-sliders-box {
  background: var(--bg-app);
  border-radius: var(--radius-md);
  padding: 10px;
  border: 1px solid var(--border-subtle);
}

.action-buttons-row {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   CARDS, INPUTS & FORMS
   ========================================================================== */
.card-box {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.card-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-label-sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent-primary);
}

.form-select-sm {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
}

.toggle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input {
  accent-color: var(--accent-primary);
}

/* ==========================================================================
   MODALS (TECH PACK & EXPORT)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-lg {
  width: 900px;
  max-width: 100%;
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(225, 29, 72, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}
.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.export-options-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
}

.export-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.export-card.highlight-card {
  border-color: var(--accent-primary);
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.08) 0%, var(--bg-surface-raised) 100%);
  box-shadow: 0 0 24px rgba(225, 29, 72, 0.15);
}

.export-card-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.export-card-icon {
  color: var(--accent-cyan);
}
.highlight-card .export-card-icon {
  color: var(--accent-primary);
}

.export-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.export-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.export-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.export-features-list li {
  color: #d1d5db;
}

.export-buttons-group {
  margin-top: auto;
  padding-top: 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-danger-link {
  background: transparent;
  border: none;
  color: #f87171;
  cursor: pointer;
  text-decoration: underline;
}
.text-danger-link:hover {
  color: #ef4444;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 360px;
  }
  .export-options-grid {
    grid-template-columns: 1fr;
  }
}
