/**
 * Estilos para el Conversor de Pinturas de Miniaturas y Modelismo
 * Compatible con temas claro y oscuro, tipografías Outfit / Inter / JetBrains Mono
 * Estándares fijate.com (Mobile-first, botones >= 40px, selects anti-desbordamiento)
 */

:root {
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores base para tema oscuro */
  --bg-page: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-hover: #222d42;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-color-focus: #3b82f6;

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);

  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.25);

  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --amber: #f59e0b;
  --rose: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.15);

  --accent: #7c3aed;
  --accent-glow: rgba(124, 58, 237, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Reseteo y contención general */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Layout institucional */
.main-wrapper.tool-layout {
  width: 100%;
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
}

/* Navegación por pestañas */
.paint-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.paint-nav-tabs::-webkit-scrollbar {
  display: none;
}

.paint-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.paint-nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.paint-nav-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.paint-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Paneles de pestañas */
.paint-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.paint-tab-pane.is-active {
  display: block;
}

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

/* Tarjeta de controles y selección de origen */
.card-filter-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.75rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

select.form-control {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

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

/* Ficha de la pintura activa seleccionada */
.active-paint-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.paint-swatch-hero {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast);
}

.paint-hero-info {
  flex: 1 1 auto;
  min-width: 0;
}

.paint-hero-title {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.paint-hero-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.paint-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  text-transform: lowercase;
}

.badge-tag.badge-code {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.btn-action-case {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-action-case:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
}

.btn-action-case.is-in-case {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

/* Cuadrícula de mejores equivalencias por marca */
.section-heading-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 2rem 0 1rem;
}

.section-title {
  font-size: 1.15rem;
  margin: 0;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.brand-equivalences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand-match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.brand-match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.brand-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.brand-badge-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.badge-quality {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-perfect {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-excellent {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-good {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-fair {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.35);
}

.brand-match-body {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}

.match-swatch-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.owned-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--emerald);
  color: #ffffff;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid var(--bg-surface);
}

.match-details {
  min-width: 0;
  flex: 1 1 auto;
}

.match-paint-title {
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-range-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.25rem;
}

.match-metrics {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.match-score strong {
  color: var(--text-primary);
}

.match-delta {
  font-family: var(--font-mono);
}

.brand-match-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-select-alt, .btn-toggle-case-small {
  flex: 1 1 0%;
  height: 36px;
  padding: 0 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-select-alt:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--primary);
}

.btn-toggle-case-small.is-active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald);
  color: #34d399;
}

/* Tríada de pintura interactiva */
.triad-steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

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

.triad-card-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.triad-card-swatch {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.triad-step-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  display: block;
}

.triad-step-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.triad-closest-box {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.triad-closest-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.triad-closest-name {
  display: block;
  color: var(--text-primary);
}

.triad-closest-brand {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Lista de todas las alternativas */
.all-matches-list {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

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

.match-row:hover {
  background: var(--bg-surface-hover);
}

.match-row-swatch {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.match-row-info {
  flex: 1 1 auto;
  min-width: 0;
}

.match-row-name {
  font-size: 0.9rem;
  display: block;
}

.match-row-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.match-row-quality {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}

.match-row-delta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-select-alt-inline {
  height: 34px;
  padding: 0 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-select-alt-inline:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

/* Gotero y Selector Libre */
.custom-picker-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.picker-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.color-input-large-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.color-picker-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 64px;
  height: 64px;
  min-width: 64px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: none;
  padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-input::-webkit-color-swatch {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
}

.color-hex-badge {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.eyedropper-dropzone {
  margin-top: 1rem;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg-surface-elevated);
}

.eyedropper-canvas-box {
  display: none;
  margin-top: 1rem;
  text-align: center;
}

.eyedropper-canvas-box canvas {
  max-width: 100%;
  border-radius: var(--radius-sm);
  cursor: crosshair;
  border: 1px solid var(--border-color);
}

.custom-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.custom-match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-match-swatch {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.custom-match-name {
  font-size: 0.95rem;
  margin: 0 0 0.2rem;
}

.custom-match-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.custom-match-score {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-use-as-source {
  width: 100%;
  height: 38px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-use-as-source:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Recetario */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.recipe-header {
  margin-bottom: 1.25rem;
}

.recipe-title {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.recipe-faction {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.recipe-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.recipe-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recipe-step-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.recipe-step-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  min-width: 50px;
  text-align: center;
}

.recipe-step-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.recipe-step-content {
  flex: 1 1 auto;
  min-width: 0;
}

.recipe-step-content strong {
  font-size: 0.85rem;
  display: block;
}

.recipe-step-brand {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.recipe-step-notes {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0.2rem 0 0;
}

.recipe-owned-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Maletín de pinturas */
.case-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
}

.case-count-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0;
}

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

.btn-case-action {
  height: 40px;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-primary-action {
  background: var(--primary);
  color: #ffffff;
  border: none;
}

.btn-primary-action:hover {
  background: var(--primary-hover);
}

.btn-danger-action {
  background: transparent;
  color: var(--rose);
  border: 1px solid var(--rose);
}

.btn-danger-action:hover {
  background: rgba(239, 68, 68, 0.1);
}

.case-paints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.case-paint-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.case-item-swatch {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.case-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.case-item-name {
  font-size: 0.9rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-remove-case {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-remove-case:hover {
  color: var(--rose);
}

.empty-case-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-case-box svg {
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.empty-case-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.empty-case-desc {
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Modales */
.paint-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.paint-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.paint-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform var(--transition-fast);
}

.paint-modal.is-active .paint-modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.modal-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-modal {
  height: 42px;
  min-height: 42px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.btn-modal-ok {
  background: var(--rose);
  border: none;
  color: #ffffff;
}

.btn-modal-ok:hover {
  opacity: 0.9;
}

.modal-textarea {
  width: 100%;
  height: 180px;
  padding: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 1.25rem;
}

/* Toast flotante */
.paint-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-fast);
}

.paint-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.paint-toast.toast-success .toast-icon {
  color: var(--emerald);
}

.paint-toast.toast-info .toast-icon {
  color: var(--primary);
}

/* Adaptación responsive */
@media (max-width: 768px) {
  .active-paint-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-action-case {
    width: 100%;
  }

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

  .paint-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
