/**
 * Estilos canónicos y prémium para Calculadora de saponificación y jabonería artesanal
 * Fijate Tools - Design System Midnight Slate
 */

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

  /* Colores tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Acentos de jabonería y botánica */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --primary-text: #065f46;

  --amber: #d97706;
  --amber-light: #fef3c7;
  --amber-text: #92400e;

  --blue: #2563eb;
  --blue-light: #dbeafe;
  --blue-text: #1e40af;

  /* Estados semánticos emparejados (Lección 282) */
  --status-optimal-bg: #dcfce7;
  --status-optimal-text: #14532d;
  --status-optimal-border: #86efac;

  --status-warning-bg: #fef3c7;
  --status-warning-text: #78350f;
  --status-warning-border: #fcd34d;

  --status-danger-bg: #fee2e2;
  --status-danger-text: #7f1d1d;
  --status-danger-border: #fca5a5;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #1a2433;
  --border-color: #243042;
  --border-focus: #34d399;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-light: rgba(16, 185, 129, 0.16);
  --primary-text: #a7f3d0;

  --amber: #f59e0b;
  --amber-light: rgba(245, 158, 11, 0.16);
  --amber-text: #fde68a;

  --blue: #3b82f6;
  --blue-light: rgba(59, 130, 246, 0.16);
  --blue-text: #bfdbfe;

  --status-optimal-bg: rgba(34, 197, 94, 0.16);
  --status-optimal-text: #86efac;
  --status-optimal-border: rgba(34, 197, 94, 0.35);

  --status-warning-bg: rgba(245, 158, 11, 0.16);
  --status-warning-text: #fde68a;
  --status-warning-border: rgba(245, 158, 11, 0.35);

  --status-danger-bg: rgba(239, 68, 68, 0.16);
  --status-danger-text: #fca5a5;
  --status-danger-border: rgba(239, 68, 68, 0.35);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

h1, h2, h3, h4, h5, h6,
.brand-title,
.card-title,
.seo-main-heading,
.faq-section-title {
  font-family: var(--font-heading);
}

.mono,
.weight-value,
.breakdown-val,
.additive-dose {
  font-family: var(--font-mono);
}

/* Layout */
.main-wrapper.tool-layout {
  max-width: 1240px;
  width: 100%;
  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;
  width: 100%;
}

/* Barra de presets preconfigurados */
.card-presets-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

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

.presets-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  display: inline-block;
  margin-right: 0.5rem;
}

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

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

.preset-chip-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.preset-chip-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.preset-chip-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.preset-chip-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(5, 150, 105, 0.15);
  color: var(--primary-text);
}

.preset-chip-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.preset-chip-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Grid de la calculadora */
.soap-calculator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .soap-calculator-grid {
    grid-template-columns: 1fr;
  }
}

.calc-config-column,
.calc-results-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Tarjetas */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.card-header-styled {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.header-icon-emerald { background: var(--primary-light); color: var(--primary); }
.header-icon-amber { background: var(--amber-light); color: var(--amber); }
.header-icon-blue { background: var(--blue-light); color: var(--blue); }
.header-icon-purple { background: rgba(147, 51, 234, 0.15); color: #9333ea; }
.header-icon-teal { background: rgba(13, 148, 136, 0.15); color: #0d9488; }

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form controls */
.form-group-block {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font-main);
  color: var(--text-main);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.custom-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 40px;
  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%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix .form-control {
  padding-right: 2.2rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  font-family: var(--font-mono);
}

.form-row-compact {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.form-row-compact .form-group {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
}

/* Alkali tabs */
.alkali-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.alkali-tab {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s ease;
  min-height: 48px;
}

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

.alkali-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-text);
  box-shadow: var(--shadow-sm);
}

.tab-bold {
  font-weight: 700;
  font-size: 0.88rem;
}

.tab-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.alkali-tab.active .tab-desc {
  color: var(--primary-text);
  opacity: 0.85;
}

/* Sliders */
.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Water config box */
.water-config-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.water-tabs-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.water-tab {
  background: transparent;
  border: none;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.water-tab:hover {
  color: var(--text-main);
}

.water-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.input-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.water-label {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 500;
}

.water-sync-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  color: var(--blue-text);
  font-family: var(--font-mono);
}

/* Selector y buscador de aceites */
.oil-selector-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .oil-selector-bar {
    grid-template-columns: 1fr;
  }
}

.oil-search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.oil-search-wrapper .form-control {
  padding-left: 2.3rem;
}

.oil-dropdown-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
}

.dropdown-item-oil {
  padding: 0.65rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.dropdown-item-oil:last-child {
  border-bottom: none;
}

.dropdown-item-oil:hover {
  background: var(--bg-card-subtle);
}

.dropdown-oil-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropdown-oil-inci {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dropdown-oil-sap {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 700;
}

/* Tabla de aceites del lote */
.recipe-oils-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}

.recipe-oils-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.recipe-oils-table th {
  background: var(--bg-card-subtle);
  padding: 0.75rem 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.recipe-oils-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.oil-table-input {
  max-width: 100px;
  height: 36px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-left: auto;
}

.table-oil-name {
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.table-oil-inci {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.table-total-row td {
  background: var(--bg-card-subtle);
  font-size: 0.9rem;
  border-bottom: none;
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background-color 0.15s ease;
}

.btn-delete-row:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Reescalado de fórmula */
.rescale-formula-bar {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.rescale-label-group {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rescale-buttons-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-rescale-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-rescale-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.custom-rescale-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-rescale-box .form-control {
  width: 90px;
  height: 32px;
  padding: 0 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* Aceite personalizado */
.custom-oil-trigger-area {
  margin-top: 0.5rem;
}

.btn-outline-text {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 4px 0;
}

.btn-outline-text:hover {
  text-decoration: underline;
}

.custom-oil-panel {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 0.75rem;
}

.custom-oil-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.custom-oil-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

/* Herramientas de taller: Moldes y aditivos */
.aux-tabs-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.aux-tab {
  flex: 1;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
}

.aux-tab:hover {
  color: var(--text-main);
}

.aux-tab.active {
  background: var(--bg-card);
  border-color: var(--amber);
  color: var(--amber-text);
  box-shadow: var(--shadow-sm);
}

.mold-type-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.mold-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .mold-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.mold-result-banner {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--amber);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mold-result-item {
  display: flex;
  flex-direction: column;
}

.mold-result-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mold-result-val {
  font-size: 0.96rem;
  color: var(--text-main);
}

/* Aditivos */
.additives-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

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

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

.additive-dose {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.25rem 0;
}

.additive-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.additive-calc-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.additive-calc-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

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

/* Alerta de seguridad química */
.safety-alert-card {
  background: var(--status-warning-bg);
  border: 1px solid var(--status-warning-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.safety-icon-col {
  color: var(--status-warning-text);
  flex-shrink: 0;
  margin-top: 2px;
}

.safety-content-col {
  flex: 1;
}

.safety-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--status-warning-text);
  margin-bottom: 0.4rem;
}

.safety-list {
  font-size: 0.82rem;
  color: var(--status-warning-text);
  padding-left: 1.1rem;
  line-height: 1.45;
}

.safety-list li {
  margin-bottom: 0.3rem;
}

/* Columna derecha: Resumen de pesadas */
.results-summary-card {
  border-top: 4px solid var(--primary);
}

.primary-weights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.weight-card {
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.weight-card-alkali {
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.weight-card-water {
  background: var(--blue-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.weight-tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.weight-card-alkali .weight-tag { color: var(--primary-text); }
.weight-card-water .weight-tag { color: var(--blue-text); }

.weight-value {
  font-size: 1.65rem;
  line-height: 1.1;
  font-weight: 800;
}

.weight-card-alkali .weight-value { color: var(--primary-text); }
.weight-card-water .weight-value { color: var(--blue-text); }

.weight-note {
  font-size: 0.74rem;
  margin-top: 0.35rem;
  opacity: 0.85;
}

.weight-card-alkali .weight-note { color: var(--primary-text); }
.weight-card-water .weight-note { color: var(--blue-text); }

.batch-breakdown-list {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.breakdown-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-oils { background: #10b981; }
.dot-lye { background: #3b82f6; }
.dot-scent { background: #f59e0b; }

.breakdown-row.total-row {
  border-top: 1px solid var(--border-color);
  padding-top: 0.6rem;
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--text-main);
  font-weight: 700;
}

.breakdown-row.note-row {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.text-highlight {
  color: var(--primary);
}

.batch-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Botones principales */
.btn-primary,
.btn-secondary {
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  padding: 0 1rem;
}

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

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

.btn-secondary {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.btn-sm {
  height: 34px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}

/* Banner de diagnóstico dermatológico */
.diagnosis-banner {
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--status-optimal-border);
  background: var(--status-optimal-bg);
}

.diagnosis-banner.is-warning {
  border-color: var(--status-warning-border);
  background: var(--status-warning-bg);
}

.diagnosis-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--status-optimal-text);
  margin-bottom: 0.25rem;
}

.diagnosis-banner.is-warning .diagnosis-title {
  color: var(--status-warning-text);
}

.diagnosis-desc {
  font-size: 0.8rem;
  color: var(--status-optimal-text);
  line-height: 1.4;
}

.diagnosis-banner.is-warning .diagnosis-desc {
  color: var(--status-warning-text);
}

.diagnosis-tips {
  margin-top: 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: var(--status-warning-text);
}

.diagnosis-tips li {
  margin-bottom: 0.25rem;
}

/* Barras métricas de las 7 cualidades cosméticas */
.qualities-meter-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quality-meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quality-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.quality-name {
  font-weight: 600;
  color: var(--text-main);
}

.quality-range-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quality-score-badge {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--status-optimal-bg);
  color: var(--status-optimal-text);
}

.quality-score-badge.status-low,
.quality-score-badge.status-high {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.quality-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card-subtle);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

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

.quality-bar-fill.status-low,
.quality-bar-fill.status-high {
  background: var(--amber);
}

/* Perfil lipídico de ácidos grasos */
.fatty-acids-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.fa-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

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

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

.fa-val {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary);
}

.fa-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.fa-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Modal Canónico */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.custom-modal-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.custom-modal-body {
  padding: 1.4rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
}

.custom-modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-card-subtle);
}

/* Sección SEO */
.seo-guide-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.seo-main-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.seo-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.seo-article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.seo-article p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.seo-article ul {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  line-height: 1.6;
}

.seo-article ul li {
  margin-bottom: 0.4rem;
}

.table-responsive {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.seo-table th,
.seo-table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.seo-table th {
  background: var(--bg-card-subtle);
  font-weight: 700;
}

/* FAQ */
.seo-faq-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.faq-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Flexbox utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mb-sm { margin-bottom: 0.4rem; }
.mb-md { margin-bottom: 0.85rem; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary); }

.badge-sm {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-text);
}

.value-badge {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary);
}

/* Estilos de impresión A4 para Ficha de Lote */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .card-presets-bar,
  .rescale-formula-bar,
  .custom-oil-trigger-area,
  .oil-selector-bar,
  .btn-delete-row,
  .batch-actions-grid,
  .seo-guide-section,
  .fijate-footer,
  .custom-modal-backdrop,
  .soap-calculator-grid {
    display: none !important;
  }
  #print-sheet-template {
    display: block !important;
    padding: 1.5cm;
    font-size: 10pt;
    line-height: 1.4;
  }
  .print-sheet-header {
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  .print-sheet-title {
    font-size: 16pt;
    font-weight: bold;
  }
  .print-sheet-meta {
    font-size: 9pt;
    color: #444;
  }
  .print-section-title {
    font-size: 11pt;
    font-weight: bold;
    margin: 14px 0 6px 0;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 3px;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 9.5pt;
  }
  .print-table th,
  .print-table td {
    border: 1px solid #999;
    padding: 5px 8px;
    text-align: left;
  }
  .print-table th {
    background-color: #f0f0f0;
  }
  .print-weights-box {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
  }
  .print-weight-card {
    border: 2px solid #000;
    padding: 8px 12px;
    flex: 1;
    text-align: center;
  }
  .print-weight-val {
    font-size: 14pt;
    font-weight: bold;
  }
  .print-safety-warning {
    border: 1px dashed #000;
    padding: 8px;
    font-size: 8.5pt;
    margin-top: 15px;
  }
}
