/* ═══════════════════════════════════════════════
   DOMINUS M3 — Condensación
   Sistema de diseño tipográfico v1 — 13-04-2026
   Prefijo: #dm3
═══════════════════════════════════════════════ */

#dm3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  color: #cbd5e1;
  -webkit-text-fill-color: #cbd5e1 !important;
  max-width: 900px;
  margin: 0 auto;
}

/* ── BANNER Y BARRA NAV ─────────────────────── */
#dm3 .dm3-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 10px;
  margin-bottom: 16px;
}
#dm3 .dm3-banner-title {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
}
#dm3 .dm3-banner-proyecto {
  font-size: 13px;
  font-weight: 700;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa !important;
}
#dm3 .dm3-btn-dash {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #2d4f7a;
  color: #f1f5f9;
  background: #091220;
  cursor: pointer;
  -webkit-text-fill-color: #f1f5f9 !important;
}
#dm3 .dm3-btn-help {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #4c1d95;
  color: #f1f5f9;
  background: #1e1035;
  cursor: pointer;
  -webkit-text-fill-color: #f1f5f9 !important;
}
#dm3 .dm3-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 10px;
  margin-top: 16px;
}
#dm3 .dm3-btn-prev {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  background: #0d1f36;
  color: #f1f5f9;
  border: 1.5px solid #2d4f7a;
  cursor: pointer;
  -webkit-text-fill-color: #f1f5f9 !important;
}
#dm3 .dm3-btn-next {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  border: 1.5px solid #3b82f6;
  cursor: pointer;
  -webkit-text-fill-color: #fff !important;
}
#dm3 .dm3-navbar-center {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* ── HEADER MÓDULO ──────────────────────────── */
#dm3 .dm3-header {
  padding: 20px 24px 16px;
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 10px;
  margin-bottom: 16px;
}
#dm3 .dm3-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9 !important;
  margin: 0 0 6px;
}
#dm3 .dm3-subtitle {
  font-size: 13px;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* ── TABS COMPLEJO ──────────────────────────── */
#dm3 .dm3-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 10px;
  padding: 8px;
}
#dm3 .dm3-tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b;
  -webkit-text-fill-color: #64748b !important;
  transition: all 0.2s;
}
#dm3 .dm3-tab.active {
  background: #1e3a5f;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa !important;
  border: 1.5px solid #3b82f6;
}

/* ── SECCIONES A/B ──────────────────────────── */
#dm3 .dm3-seccion-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
#dm3 .dm3-sec-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #2d4f7a;
  background: #091220;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
}
#dm3 .dm3-sec-tab.active {
  background: #1e3a5f;
  color: #f1f5f9;
  border-color: #3b82f6;
  -webkit-text-fill-color: #f1f5f9 !important;
}

/* ── BLOQUE SECCIÓN ─────────────────────────── */
#dm3 .dm3-bloque {
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
#dm3 .dm3-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  -webkit-text-fill-color: #475569 !important;
  padding: 16px 0 8px;
  border-bottom: 1px solid #1e3a5f;
  margin-bottom: 14px;
}
#dm3 .dm3-section-title:first-child { padding-top: 0; }

/* ── GRID CAMPOS ────────────────────────────── */
#dm3 .dm3-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#dm3 .dm3-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
#dm3 .dm3-field { display: flex; flex-direction: column; }
#dm3 .dm3-label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  -webkit-text-fill-color: #cbd5e1 !important;
  opacity: 1 !important;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
#dm3 .dm3-input, #dm3 .dm3-select {
  padding: 10px 14px;
  font-size: 15px;
  color: #f1f5f9;
  background: #060e1a;
  border: 1.5px solid #1e3a5f;
  border-radius: 8px;
  -webkit-text-fill-color: #f1f5f9 !important;
  opacity: 1 !important;
  width: 100%;
  box-sizing: border-box;
}
#dm3 .dm3-input:focus, #dm3 .dm3-select:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
#dm3 .dm3-input[readonly], #dm3 .dm3-input[disabled] {
  color: #64748b;
  -webkit-text-fill-color: #64748b !important;
  cursor: not-allowed;
}
#dm3 .dm3-hint {
  font-size: 12px;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa !important;
  font-style: italic;
  margin-top: 4px;
  opacity: 1 !important;
}

/* ── TABLA CAPAS ────────────────────────────── */
#dm3 .dm3-tabla-capas {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
#dm3 .dm3-tabla-capas th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #1e3a5f;
}
#dm3 .dm3-tabla-capas td {
  font-size: 14px;
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0 !important;
  padding: 10px 12px;
  border-bottom: 1px solid #0d1f36;
}
#dm3 .dm3-tabla-capas td.mu-val {
  font-size: 14px;
  font-weight: 600;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa !important;
}
#dm3 .dm3-tabla-capas td input {
  background: #060e1a;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9 !important;
  width: 80px;
}
#dm3 .dm3-col-n    { width: 36px; }
#dm3 .dm3-col-mat  { min-width: 200px; }
#dm3 .dm3-col-lam  { width: 90px; }
#dm3 .dm3-col-e    { width: 80px; }
#dm3 .dm3-col-mu   { width: 90px; }
#dm3 .dm3-col-r    { width: 90px; }
#dm3 .dm3-col-sd   { width: 80px; }

/* ── RESULTADOS ─────────────────────────────── */
#dm3 .dm3-resultados {
  background: #060e1a;
  border: 1.5px solid #1e3a5f;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 16px;
}
#dm3 .dm3-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
#dm3 .dm3-res-card {
  background: #0d1f36;
  border: 1.5px solid #2d4f7a;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}
#dm3 .dm3-res-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
  margin-bottom: 6px;
}
#dm3 .dm3-res-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9 !important;
}
#dm3 .dm3-res-unit {
  font-size: 13px;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
}
#dm3 .ok  { color: #4ade80 !important; -webkit-text-fill-color: #4ade80 !important; }
#dm3 .err { color: #f87171 !important; -webkit-text-fill-color: #f87171 !important; }
#dm3 .warn { color: #fbbf24 !important; -webkit-text-fill-color: #fbbf24 !important; }

/* ── TABLA HR RESULTADOS ────────────────────── */
#dm3 .dm3-tabla-hr {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
#dm3 .dm3-tabla-hr th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8 !important;
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #1e3a5f;
}
#dm3 .dm3-tabla-hr td {
  font-size: 14px;
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #0d1f36;
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0 !important;
}
#dm3 .dm3-badge-ok {
  background: #052e16;
  color: #4ade80;
  -webkit-text-fill-color: #4ade80 !important;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
#dm3 .dm3-badge-err {
  background: #450a0a;
  color: #f87171;
  -webkit-text-fill-color: #f87171 !important;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ── CONCLUSIÓN FINAL ───────────────────────── */
#dm3 .dm3-conclusion {
  background: #0d1f36;
  border: 2px solid #2d4f7a;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 16px;
  text-align: center;
}
#dm3 .dm3-conclusion.cumple  { border-color: #4ade80; }
#dm3 .dm3-conclusion.no-cumple { border-color: #f87171; }
#dm3 .dm3-conclusion-icon { font-size: 36px; margin-bottom: 8px; }
#dm3 .dm3-conclusion-text {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9 !important;
}

/* ── BTN GUARDAR ────────────────────────────── */
#dm3 .dm3-btn-guardar {
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  -webkit-text-fill-color: #fff !important;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 16px;
}
#dm3 .dm3-btn-guardar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#dm3 .dm3-msg {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
}
#dm3 .dm3-msg.ok  { background: #052e16; color: #4ade80; -webkit-text-fill-color: #4ade80 !important; }
#dm3 .dm3-msg.err { background: #450a0a; color: #f87171; -webkit-text-fill-color: #f87171 !important; }

/* ── LOADING ────────────────────────────────── */
#dm3 .dm3-loading {
  text-align: center;
  padding: 60px 20px;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa !important;
  font-size: 15px;
}

@media (max-width: 640px) {
  #dm3 .dm3-grid-2,
  #dm3 .dm3-grid-3,
  #dm3 .dm3-res-grid { grid-template-columns: 1fr; }
}
