/**
 * Calculadora de capacidad real de lavadora y secadora - Estilos canónicos
 * Fijate Tools
 */

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

  /* Colores temáticos */
  --color-primary: #0284c7;
  --color-primary-hover: #0369a1;
  --color-primary-light: #e0f2fe;
  --color-primary-subtle: #f0f9ff;
  
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;

  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;

  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;

  --color-info: #2563eb;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;

  /* Superficies y bordes estándar claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border-card: #e2e8f0;
  --border-subtle: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Modo oscuro corporativo */
[data-theme="dark"] {
  --bg-page: #090d16;
  --bg-card: #111827;
  --bg-subtle: #1f2937;
  --bg-muted: #374151;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --border-card: #1f2937;
  --border-subtle: #374151;

  --color-primary: #38bdf8;
  --color-primary-hover: #0284c7;
  --color-primary-light: rgba(56, 189, 248, 0.15);
  --color-primary-subtle: rgba(56, 189, 248, 0.08);

  --color-success: #4ade80;
  --color-success-bg: rgba(74, 222, 128, 0.12);
  --color-success-border: rgba(74, 222, 128, 0.25);

  --color-warning: #fbbf24;
  --color-warning-bg: rgba(251, 191, 36, 0.12);
  --color-warning-border: rgba(251, 191, 36, 0.25);

  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.12);
  --color-danger-border: rgba(248, 113, 113, 0.25);

  --color-info: #60a5fa;
  --color-info-bg: rgba(96, 165, 250, 0.12);
  --color-info-border: rgba(96, 165, 250, 0.25);
}

/* Reset y estructura global */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.hero-title,
.faq-section-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.kpi-num,
.badge-tag,
code {
  font-family: var(--font-mono);
}

/* Layout con barra lateral */
.tool-layout {
  max-width: 1240px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
  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;
  width: 100%;
}

/* Hero y resumen de la herramienta */
.tool-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tool-hero h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-main);
  line-height: 1.25;
}

.tool-hero p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.5;
  max-width: 850px;
}

/* Tarjeta principal de la aplicación */
.app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Selector superior de electrodoméstico */
.appliance-selector-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 1.75rem;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 200px;
  min-width: 0;
}

.control-group-sm {
  flex: 0 1 140px;
}

.control-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-label .label-sub {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.form-select,
.form-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Presets rápidos para un clic */
.presets-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.presets-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: none;
  margin-right: 0.25rem;
}

.btn-preset {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-preset:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
}

.btn-preset-reset {
  background-color: transparent;
  border-color: transparent;
  color: var(--color-danger);
  margin-left: auto;
}

.btn-preset-reset:hover {
  background-color: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger);
}

/* Grid de simulación principal: Escotilla / Tambor y Selector de prendas */
.simulation-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Columna izquierda: El tambor visual de lavadora */
.drum-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1rem;
}

.drum-stage-box {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Simulación de la escotilla 3D */
.washer-door-outer {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #94a3b8 0%, #475569 55%, #1e293b 100%);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.5);
  padding: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .washer-door-outer {
  background: radial-gradient(circle at 35% 35%, #64748b 0%, #334155 55%, #0f172a 100%);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.2), inset 0 -4px 8px rgba(0, 0, 0, 0.8);
}

/* Junta de goma o fuelle */
.washer-rubber-gasket {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #334155 60%, #1e293b 85%, #0f172a 100%);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.7);
  padding: 10px;
  position: relative;
}

/* Interior del tambor de acero inoxidable */
.drum-cavity {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #475569 0%, #1e293b 65%, #0b0f19 100%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Batidores del tambor (3 aspas a 120 grados) */
.drum-baffle {
  position: absolute;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.4) 0%, rgba(203, 213, 225, 0.7) 50%, rgba(100, 116, 139, 0.4) 100%);
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}
.drum-baffle-1 {
  width: 8px;
  height: 50px;
  top: 10px;
  left: calc(50% - 4px);
}
.drum-baffle-2 {
  width: 8px;
  height: 50px;
  bottom: 25px;
  left: 35px;
  transform: rotate(60deg);
}
.drum-baffle-3 {
  width: 8px;
  height: 50px;
  bottom: 25px;
  right: 35px;
  transform: rotate(-60deg);
}

/* Capa de llenado dinámico de ropa */
.drum-laundry-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.75) 0%, rgba(3, 105, 161, 0.9) 100%);
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}

/* Animación sutil de agua o ropa */
.drum-laundry-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
}

.fill-items-preview {
  font-size: 1.5rem;
  letter-spacing: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  user-select: none;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* Estado de sobrecarga en el tambor */
.drum-laundry-fill.fill-status-warning {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.8) 0%, rgba(180, 83, 9, 0.95) 100%);
}
.drum-laundry-fill.fill-status-danger {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.85) 0%, rgba(185, 28, 28, 0.95) 100%);
}

/* Zona superior de la "Regla de la mano" */
.drum-hand-zone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 18%; /* El 18 % superior debe quedar libre para el ancho de la mano */
  border-bottom: 2px dashed rgba(255, 255, 255, 0.4);
  background: rgba(22, 163, 74, 0.15);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.3s ease;
}

.drum-hand-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.45);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
}

.drum-hand-zone.hand-blocked {
  background: rgba(220, 38, 38, 0.4);
  border-bottom-color: rgba(248, 113, 113, 0.8);
}
.drum-hand-zone.hand-blocked .drum-hand-indicator {
  background: rgba(220, 38, 38, 0.85);
}

/* Reflejo de cristal de la puerta */
.door-glass-reflection {
  position: absolute;
  top: 5%;
  left: 10%;
  width: 80%;
  height: 40%;
  border-radius: 50% 50% 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 5;
  transform: rotate(-15deg);
}

/* Pomo de la escotilla */
.door-handle {
  position: absolute;
  right: -8px;
  top: calc(50% - 24px);
  width: 12px;
  height: 48px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
  border-radius: 4px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

/* Insignia de diagnóstico de la Regla de la mano */
.hand-rule-badge-box {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  transition: all 0.2s ease;
}

.hand-rule-badge-box.status-ok {
  background-color: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
}
.hand-rule-badge-box.status-warning {
  background-color: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning);
}
.hand-rule-badge-box.status-danger {
  background-color: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--color-danger);
}

.hand-rule-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Tarjeta de métricas y KPIs */
.kpi-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

.kpi-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
}

.kpi-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-num small {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-bar {
  height: 6px;
  background-color: var(--bg-muted);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
}

.kpi-bar-fill.bar-warning {
  background-color: var(--color-warning);
}
.kpi-bar-fill.bar-danger {
  background-color: var(--color-danger);
}

/* Columna derecha: Añadir prendas y listas */
.items-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

/* Pestañas de categorías de prendas */
.category-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-card);
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Rejilla de prendas seleccionables */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.item-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.item-card:hover {
  border-color: var(--color-primary);
}

.item-card.has-items {
  border-color: var(--color-primary);
  background-color: var(--color-primary-subtle);
}

.item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.item-emoji {
  font-size: 1.35rem;
  line-height: 1;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

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

.item-name {
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.item-specs {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
}

.item-specs span {
  font-family: var(--font-mono);
}

.item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-item-qty {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-item-qty:hover:not(:disabled) {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

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

.item-qty-badge {
  min-width: 26px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Lista / resumen de colada seleccionada */
.selected-summary-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

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

.summary-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.selected-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-pill-remove {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
}
.btn-pill-remove:hover {
  color: var(--color-danger);
}

/* Bloque comparativo de Secadora */
.dryer-compatibility-section {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.dryer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dryer-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.dryer-title-area h3 {
  font-size: 1.125rem;
  margin: 0;
  color: var(--text-main);
}
.dryer-title-area p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.dryer-result-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border: 1px solid var(--border-card);
  background-color: var(--bg-card);
}

/* Alertas técnicas de cruceta y mecánica */
.mechanical-alert-card {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.84375rem;
  line-height: 1.45;
}

.mechanical-alert-card strong {
  color: var(--color-danger);
}

/* Tabla comparativa de programas y tejidos */
.table-responsive-box {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  background-color: var(--bg-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84375rem;
  text-align: left;
}

.custom-table th {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-card);
  color: var(--text-main);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* Acordeón FAQ y Guía SEO */
.faq-section {
  margin: 2.5rem 0;
}

.faq-section h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--color-primary);
}

.faq-summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--text-subtle);
  flex-shrink: 0;
}

details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid var(--border-card);
  padding-top: 0.85rem;
}

.faq-content p {
  margin: 0.5rem 0;
}

.faq-content ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

/* Modal accesible personalizado (prohibido window.alert) */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-backdrop.is-active {
  display: flex;
}

.custom-modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

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

.custom-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
}

.custom-modal-body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.custom-modal-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.btn-modal-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Responsividad en tablet y móvil */
@media (max-width: 900px) {
  .simulation-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .drum-column {
    position: static;
  }

  .drum-stage-box {
    padding: 1.25rem;
  }

  .washer-door-outer {
    width: 220px;
    height: 220px;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }

  .tool-hero {
    padding: 1.25rem 1rem;
  }

  .app-card {
    padding: 1rem;
  }

  .appliance-selector-bar {
    flex-direction: column;
    gap: 0.85rem;
  }

  .control-group,
  .control-group-sm {
    flex: 1 1 100%;
    width: 100%;
  }

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

  .kpi-container {
    grid-template-columns: 1fr;
  }
}
