/* ============================================================
   ESCALADOR Y MEJORADOR DE IMÁGENES CON IA - FIJATE TOOLS
   Diseño moderno, fluido, accesible y 100 % local (Real-ESRGAN)
   ============================================================ */

:root {
  color-scheme: dark;
  --bg-body: #0c0f17;
  --bg-surface: #141824;
  --bg-card: rgba(26, 32, 48, 0.7);
  --bg-card-hover: rgba(32, 40, 60, 0.85);
  --bg-input: #101420;
  --bg-viewer: #07090e;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #ff8507;
  --primary: #ff8507;
  --primary-hover: #ff9924;
  --primary-glow: rgba(255, 133, 7, 0.25);
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-viewer: #e2e8f0;
  --border-color: #e2e8f0;
  --border-focus: #ff8507;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   CABECERA
   ============================================================ */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.btn-back-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.btn-back-tools:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(255, 133, 7, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(255, 133, 7, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.badge-local {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

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

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

.badge-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 20px;
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 500;
}

/* Botones genéricos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.hide {
  display: none !important;
}

/* ============================================================
   ESTRUCTURA PRINCIPAL (LAYOUT)
   ============================================================ */
.app-main {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.tool-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================================
   PANEL LATERAL (SIDEBAR)
   ============================================================ */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
}

.config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  backdrop-filter: blur(10px);
}

.config-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-select, .form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.form-select:focus, .form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Selector de Modo IA (Cards) */
.mode-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 133, 7, 0.4);
}

.mode-option.active {
  background: rgba(255, 133, 7, 0.1);
  border-color: var(--primary);
}

.mode-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.mode-text strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

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

/* Selector de Escala */
.scale-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-scale {
  padding: 12px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.btn-scale:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.btn-scale.active {
  background: rgba(255, 133, 7, 0.15);
  border-color: var(--primary);
}

.scale-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.scale-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Botones de acción principales */
.action-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-action {
  width: 100%;
  padding: 14px 18px;
  background: var(--primary);
  color: #0b0f17 !important;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
}

.btn-primary-action:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 133, 7, 0.4);
}

.btn-primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-cancel-action {
  width: 100%;
  padding: 10px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-cancel-action:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-download-action {
  width: 100%;
  padding: 13px;
  background: var(--accent-emerald);
  color: #0b0f17;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  transition: var(--transition);
}

.btn-download-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Barra de progreso */
.progress-box {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

#progress-status-text {
  color: var(--text-primary);
}

#progress-percentage {
  color: var(--primary);
  font-family: var(--font-mono);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Panel de estadísticas */
.stats-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
}

.stat-row:last-child {
  border-bottom: none;
}

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

.stat-val {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

.highlight-val {
  color: var(--accent-emerald);
}

/* ============================================================
   ÁREA DE TRABAJO Y VISOR (WORKSPACE)
   ============================================================ */
.workspace-area {
  min-height: 580px;
  display: flex;
  flex-direction: column;
}

/* Dropzone */
.dropzone-box {
  flex: 1;
  min-height: 520px;
  background: var(--bg-card);
  border: 2px dashed rgba(255, 133, 7, 0.3);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--primary);
  background: rgba(255, 133, 7, 0.04);
  transform: translateY(-2px);
}

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

.dropzone-inner {
  text-align: center;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dropzone-icon-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 133, 7, 0.1);
  border: 1px solid rgba(255, 133, 7, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.dropzone-inner h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

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

.dropzone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.d-tag {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.btn-select-file {
  margin-top: 8px;
  padding: 12px 24px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-select-file:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  color: var(--primary);
}

/* ============================================================
   VISOR COMPARATIVO ANTES / DESPUÉS
   ============================================================ */
.compare-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.viewer-toolbar {
  padding: 12px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.viewer-tabs {
  display: flex;
  gap: 6px;
}

.v-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.v-tab:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.v-tab.active {
  background: rgba(255, 133, 7, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tool {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

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

.zoom-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  color: var(--text-secondary);
}

/* Escenario del visor (Canvas / Frame) */
.viewer-stage {
  position: relative;
  width: 100%;
  min-height: 520px;
  background: var(--bg-viewer);
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: grab;
}

.viewer-stage.grabbing {
  cursor: grabbing;
}

.compare-box {
  position: relative;
  display: inline-block;
  max-width: 96%;
  max-height: 580px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  cursor: ew-resize;
}

.image-layer {
  display: block;
  position: relative;
}

.upscaled-layer {
  position: relative;
  z-index: 1;
}

.upscaled-layer img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.original-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
}

.original-layer img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Badges sobre la imagen */
.layer-badge {
  position: absolute;
  top: 14px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  z-index: 5;
  pointer-events: none;
}

.badge-left {
  left: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

.badge-right {
  right: 14px;
  background: rgba(255, 133, 7, 0.85);
  border: 1px solid rgba(255, 133, 7, 0.4);
  color: #0b0f17;
}

/* Manija deslizante central */
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  margin-left: -20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  pointer-events: auto;
}

.handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
}

.handle-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary);
  color: #0b0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 2;
  transition: transform 0.15s ease;
}

.slider-handle:hover .handle-button {
  transform: scale(1.1);
}

.viewer-hint {
  padding: 10px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   MODALES (ESTILO FIJATE TOOLS)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease-out;
}

.modal-card.modal-lg {
  max-width: 680px;
}

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

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.modal-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-box.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.modal-icon-box.info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}

.btn-modal-close {
  position: absolute;
  right: 0;
  top: 0;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

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

.modal-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-danger {
  background: var(--accent-rose);
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

/* Cuadrícula de Muestras */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.sample-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sample-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.sample-thumb {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
}

.photo-thumb {
  background-image: radial-gradient(circle at center, #ff8507 0%, #1e293b 80%);
}

.anime-thumb {
  background-image: radial-gradient(circle at center, #06b6d4 0%, #312e81 80%);
}

.text-thumb {
  background-image: radial-gradient(circle at center, #10b981 0%, #0f172a 80%);
}

.sample-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

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

.sample-card small {
  font-size: 11px;
  color: var(--text-muted);
}

/* Guía modal */
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-item p {
  font-size: 13px;
  margin-bottom: 4px;
}

/* ============================================================
   RESPONSIVE (ADAPTABILIDAD MÓVIL Y TABLET)
   ============================================================ */
@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    position: static;
  }

  .samples-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    justify-content: space-between;
  }

  .badge-privacy span {
    display: none;
  }

  .viewer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .viewer-actions {
    justify-content: space-between;
  }
}
