:root {
  /* Macrodent look (HSL) */
  --bg: 220 15% 97%;
  --card: 0 0% 100%;
  --text: 220 45% 18%;
  --muted: 220 12% 45%;
  --border: 220 15% 88%;

  --navy: 220 45% 18%;
  --navy-2: 220 40% 28%;

  --green: 158 64% 40%;
  --shadow: 0 14px 34px rgba(16, 24, 40, .10);

  --r: 14px;
}

/* Evita que el layout “salte” cuando aparece/desaparece el scrollbar */
html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: hsl(var(--bg));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

.md-page {
  min-height: 100vh;
  background: hsl(var(--bg));
  color: hsl(var(--text));
  padding: 32px 16px;
}

.md-wrap {
  max-width: 42rem;
  margin: 0 auto;
}

/* Header */
.md-header {
  text-align: center;
}

.md-logo {
  height: 7rem;
  width: auto;
  display: block;
  margin: 0 auto 16px;
}

.md-title {
  margin: 0;
  font-weight: 700;
  font-size: 30px;
}

.md-subtitle {
  margin: 8px 0 0;
  color: hsl(var(--muted));
  font-size: 16px;
}

/* Stepper */
.md-steps {
  margin: 32px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0px;
  flex-wrap: wrap;
}

.md-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 73.18px;
}

.md-stepIcon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: hsl(220 10% 55%);
  background: hsl(220 10% 96%);
  border: 1px solid hsl(var(--border));
}

.md-stepIcon svg {
  width: 20px;
  height: 20px;
}

.md-stepLabel {
  font-size: 12px;
  color: hsl(var(--muted));
  font-weight: 600;
}

.md-stepLine {
  width: 48px;
  height: 2px;
  background: hsl(var(--border));
  border-radius: 999px;
  margin: -20px 8px 0px;
  /* para subir la línea a la altura del icono */
}

/* Línea verde cuando el paso anterior está done */
.md-step.is-done+.md-stepLine {
  background: hsl(var(--green));
}

/* States */
.md-step.is-active .md-stepIcon {
  background: hsl(var(--navy));
  border-color: hsl(var(--navy));
  color: white;
  box-shadow: 0 0 0 4px rgba(26, 39, 68, 0.178);
}

.md-step.is-active .md-stepLabel {
  color: hsl(var(--navy));
}

.md-step.is-done .md-stepIcon {
  background: hsl(var(--green));
  border-color: hsl(var(--green));
  color: white;
}

.md-step.is-done .md-stepLabel {
  color: hsl(var(--green));
}

.md-step.is-done .md-stepIcon svg {
  display: none;
}

.md-step.is-done .md-stepIcon::after {
  content: "";
  width: 18px;
  height: 18px;
  display: block;

  /* SVG como máscara */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;

  background-color: white;
  /* color del icono */
}

/* Card */
.md-card {
  background: hsl(var(--card));
  border-radius: 12px;
  overflow: hidden;
  /* sombra fina, solo abajo */
  box-shadow: 0 8px 8px rgba(16, 24, 40, 0.082);
}

.md-cardHeader {
  padding: 24px 24px 8px;
}

.md-cardTitle {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.md-cardDesc {
  margin: 7px 0 0;
  font-size: 14px;
  color: hsl(var(--muted));
}

.md-cardBody {
  padding: 18px 24px 24px;
}

.md-view[hidden] {
  display: none !important;
}

/* Form */
.md-form {
  display: block;
}

.md-field--full {
  width: 100%;
}

.md-check,
.md-form label.md-label {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

.md-label {
  display: block;
  font-size: 14px;
  font-weight: 500;

}

.md-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(220 30% 97%);
  color: hsl(var(--text));
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  font-size: 14px;
  margin-top: 8px;
}

.md-input:focus {
  border-color: hsl(var(--navy));
  box-shadow: 0 0 0 3px rgba(26, 39, 68, .14);
  background: white;
}

.md-select {
  padding-right: 34px;
  background: white;
}

.md-help {
  min-height: 16px;
  font-size: 11px;
  color: hsl(0 70% 50%);
}

.md-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 23px;
}

@media(min-width: 680px) {
  .md-grid2 {
    grid-template-columns: 1fr 1fr;

  }
}

.md-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.md-segBtn {
  font-size: 14px;
  border-radius: 12px;
  border: 2px solid hsl(var(--border));
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 14.5px;
  font-weight: 500;
  color: hsl(var(--text));
  transition: border-color .15s ease, background .15s ease;
}

.md-segBtn:hover {
  border-color: hsl(220 20% 78%);
}

.md-segBtn.is-active {
  border-color: hsl(var(--navy));
  box-shadow: none;
  background: hsl(220, 7%, 94%);
}

.md-segIcon svg {
  width: 20px;
  height: 20px;
}

.md-juridicaCard {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(220 30% 98%);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(16, 24, 40, .03);
  margin-top: 20px;
}

/* Espaciado entre los dos campos dentro del cuadrito */
.md-juridicaCard .md-field+.md-field {
  margin-top: 14px;
}

/* (Opcional) Que los inputs dentro se vean más “integrados” como en la imagen */
.md-juridicaCard .md-input {
  background: hsl(220 30% 98%);
}

/* Buttons */
.md-btn {
  font-size: 14px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 32px;
  margin-top: 20px;
  transition: transform .05s ease, filter .15s ease, background .15s ease;
}

.md-btn:active {
  transform: translateY(1px);
}

.md-btnPrimary {
  background: hsl(var(--navy));
  color: white;
}

.md-btnPrimary:hover {
  background: hsl(var(--navy-2));
}

.md-btnLight {
  background: hsl(220 20% 96%);
  border-color: hsl(var(--border));
  color: hsl(var(--text));
}

.md-btnLight:hover {
  filter: brightness(.98);
}

.md-btnWide {
  width: 100%;
}

.md-btnArrow {
  font-size: 16px;
  margin-left: 6px;
}

.md-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.md-icoLeft {
  font-size: 16px;
}

.md-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

/* Policy */
.md-sectionTitle {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
}

.md-policyHead {
  margin-bottom: 12px;
}

.md-policyMeta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.md-policyIcon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: hsl(var(--navy));
  margin-top: 0px;
  /* ✅ sube/baja el icono como la captura */
  flex: 0 0 22px;
}

.md-policyIcon svg {
  width: 24px;
  height: 24px;
}

.md-policyText {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ✅ Título como la imagen: navy, un poco más grande y fuerte */
.md-policyTitle {
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--navy));
  line-height: 1.2;
}

/* ✅ Versión: más pequeña, gris, pegada */
.md-policyVersion {
  font-size: 12px;
  color: hsl(var(--muted));
  line-height: 1.2;
}

.md-policyBox ul {
  margin-bottom: 0px;
}

.md-policyBox {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: white;
  padding: 20px 30px;
  max-height: 320px;
  overflow: auto;
  margin: 24px 0px 0px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #1f2937;
  line-height: 1.6;
  text-align: justify;
}

/* Content inside policy box */
.md-policyBox h2 {
  font-size: 16px;
  margin: 0 0 10px;
  color: hsl(var(--navy));
}

.md-policyBox h3 {
  font-size: 13px;
  margin: 14px 0 8px;
}

.md-policyBox h4 {
  font-size: 12px;
  margin: 12px 0 6px;
}

.md-policyBox p,
.md-policyBox li {
  font-size: 14px;
  color: hsl(var(--muted));
  line-height: 1.55;
}

/* Asegura que TODOS los bloques hereden */
.md-policyBox p,
.md-policyBox li,
.md-policyBox div {
  text-align: justify;
}

.md-checks {
  margin-top: 24px;
  background: hsl(220 20% 96%);
  border-radius: 12px;
  padding: 16px;
}

.md-check {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.md-check+.md-check {
  margin-top: 6px;
}

.md-check input {
  display: none;
}

.md-checkMark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid hsl(220 10% 60%);
  background: white;
  flex: 0 0 18px;
  margin-top: 2px;
  position: relative;
}

.md-checkText {
  font-size: 14px;
  color: hsl(var(--text));
  line-height: 1.45;
  text-align: justify;
}

.md-check input:checked+.md-checkMark {
  border-color: hsl(var(--navy));
  background: hsl(var(--navy));
}

.md-check input:checked+.md-checkMark::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;

  width: 12px;
  height: 12px;
  margin: auto;

  /* SVG Lucide como máscara */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;

  background-color: white;
  /* color del check */
}

/* Spinner small */
.md-miniSpinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: white;
  border-radius: 999px;
  display: inline-block;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Confirmation */
.md-confirmTop {
  text-align: center;
}

.md-okCircle {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: hsl(158 52% 92%);
  color: hsl(var(--green));
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
}

.md-okCircle svg {
  width: 40px;
  height: 40px;
}

.md-confirmTitle {
  margin: 34px 0px 9px;
  font-size: 24px;
  font-weight: 700;
}

.md-confirmDesc {
  margin: 6px 0 0;
  font-size: 16px;
  color: hsl(var(--muted));
}

.md-folioCard {
  margin-top: 25px;
  border: 2px solid hsl(var(--border));
  border-radius: 12px;
  padding: 24px;
  background: white;
  max-width: 624px;
  text-align: center;
  position: relative;
}

.md-folioLabel {
  font-size: 12px;
  color: hsl(var(--muted));
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 500;
}

.md-folioValue {
  margin-top: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 24px;
  color: hsl(var(--navy));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
}

.md-folioSub {
  margin-top: 6px;
  font-size: 14px;
  color: hsl(var(--text));
  font-weight: 500;
}

.mt {
  margin-top: 14px;
}

.mt2 {
  margin-top: 14px;
}

.md-copyIcon svg {
  width: 16px;
  height: 16px;
}

.md-copyToast {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  background: hsl(var(--navy));
  color: white;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.md-linkBtn {
  margin: 14px auto 0;
  background: transparent;
  border: 0;
  color: hsl(var(--muted));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}

.md-linkBtn:hover {
  color: hsl(var(--navy));
}

.md-refresh svg {
  width: 16px;
  height: 16px;
}

/* Footer */
.md-footer {
  text-align: center;
  margin-top: 24px;
  color: hsl(var(--muted));
  font-size: 12px;
}

p {
  margin-bottom: 0px;
}

/* =========================
   SELECT CUSTOM (como imagen 2)
========================= */

.md-selectCustom {
  position: relative;
  margin-top: 8px;
}

/* el select real queda para submit, pero no se ve */
.md-selectNative {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  height: 40px;
}

/* botón que se ve como input */
.md-selectBtn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(220 30% 97%);
  color: hsl(var(--text));
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
  font-size: 14px;
  text-align: left;
}

.md-selectText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* flecha */
.md-selectBtn .md-selectIcon {
  position: static;
  margin-top: -5px;
  width: 18px;
  height: 18px;
  color: hsl(220 10% 55%);
  pointer-events: none;
}

.md-selectCustom.is-open .md-selectBtn,
.md-selectBtn:focus {
  outline: none;
  border-color: hsl(var(--navy));
  box-shadow: 0 0 0 3px rgba(26, 39, 68, .14);
}

/* menu */
.md-selectMenu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
  display: none;
}

.md-selectCustom.is-open .md-selectMenu {
  display: block;
}

/* =========================
   OPCIONES DEL SELECT CUSTOM
========================= */

/* opción */
.md-selectOption {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  padding: 5px 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: hsl(var(--text));
  font-size: 14px;
  text-align: left;
}

/* “chulo” izquierda (por defecto invisible, pero ocupa espacio) */
.md-selectTick {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  border-radius: 6px;
  color: transparent;
}

.md-selectOption .md-selectTick svg {
  width: 16px;
  height: 16px;
}

/* ====== Seleccionado por defecto: AZUL + CHULO BLANCO (como imagen 2) ====== */
.md-selectOption.is-selected {
  background: rgba(26, 39, 68, .92);
  color: #fff;
}

.md-selectOption.is-selected .md-selectTick {
  color: #fff;
  /* ✅ chulo visible sobre azul */
}

/* ====== Hover: el hover manda (se vuelve azul), y el seleccionado se apaga ====== */
.md-selectCustom.is-hovering .md-selectOption.is-selected {
  background: transparent;
  color: hsl(var(--text));
}

.md-selectCustom.is-hovering .md-selectOption.is-selected .md-selectTick {
  color: hsl(var(--navy));
  /* ✅ chulo visible cuando el seleccionado está apagado */
}

/* ====== Hover sobre cualquier opción: AZUL ====== */
.md-selectOption:hover {
  background: rgba(26, 39, 68, .92);
  color: #fff;
}

/* En hover, por defecto NO mostrar chulo (para NO seleccionadas) */
.md-selectOption:hover .md-selectTick {
  color: transparent;
}

/* Si estás hover justo sobre el seleccionado, sí debe verse el chulo */
.md-selectOption.is-selected:hover .md-selectTick {
  color: #fff;
}

/* flash styles */
.md-flash {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.md-flash.error {
  background: hsl(0 80% 96%);
  color: hsl(0 70% 40%);
  border: 1px solid hsl(0 60% 85%);
}

.md-flash.success {
  background: hsl(158 60% 95%);
  color: hsl(158 50% 35%);
  border: 1px solid hsl(158 40% 80%);
}

/*modal firma digital*/
.md-modal[hidden] {
  display: none;
}

.md-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
}

.md-modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.md-modalCard {
  position: relative;
  width: min(760px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  padding: 16px;
}

.md-modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.md-modalTitle {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--navy));
}

.md-modalClose {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
}

.md-modalDesc {
  margin: 0 0 12px;
  font-size: 13px;
  color: hsl(var(--muted));
}

.md-signWrap {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.md-signCanvas {
  width: 100%;
  height: 220px;
  /* visual */
  display: block;
  touch-action: none;
  /* IMPORTANTE para móviles */
}

.md-signError {
  display: block;
  margin-top: 8px;
  color: hsl(0 70% 45%);
}

.md-modalActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.md-modalRight {
  display: flex;
  gap: 10px;
}

/* ====== Card Tabla datos ====== */
.hd-card {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(20, 20, 20, .04);
}

/* ====== Filtros ====== */
.hd-filters {
  padding: 14px 14px;
}

.hd-filtersRow {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.1fr .9fr .9fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 1200px) {
  .hd-filtersRow {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .hd-filtersRow {
    grid-template-columns: 1fr;
  }
}

/* ===== Filtros EMPLEADOS ===== */
.hd-filters--employee .hd-filtersRow{
  grid-template-columns: 1.2fr 1.2fr 1.2fr .9fr; /* folio, doc, nombre, firma */
}

/* mantiene responsive igual */
@media (max-width: 1200px){
  .hd-filters--employee .hd-filtersRow{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 576px){
  .hd-filters--employee .hd-filtersRow{
    grid-template-columns: 1fr;
  }
}

.hd-field {
  position: relative;
}

.hd-input {
  width: 100%;
  height: 38px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.hd-input:focus {
  border-color: #cfd7e6;
  box-shadow: 0 0 0 3px rgba(32, 83, 255, .08);
}

.hd-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa6b2;
  font-size: 14px;
}

.hd-field .hd-ico+.hd-input {
  padding-left: 34px;
}

.hd-select {
  appearance: none;
  padding-right: 34px;
}

.hd-chev {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa6b2;
  pointer-events: none;
  font-size: 12px;
}

/* ====== Tabla ====== */
.hd-table thead th {
  font-size: 12px;
  letter-spacing: .02em;
  color: #7b8794;
  border-top: none;
  border-bottom: 1px solid #eef1f5 !important;
  padding: 14px 16px;
  background: #fff;
}

.hd-table tbody td {
  border-top: 1px solid #f1f3f7;
  padding: 16px 16px;
  vertical-align: middle;
  font-size: 14px;
}

.hd-table tbody tr:hover {
  background: #fbfcfe;
}

.hd-folio {
  font-weight: 700;
}

.hd-fecha .hd-date {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.2;
}

.hd-name {
  font-weight: 700;
}

.hd-sub {
  color: #8a94a6;
  font-size: 12px;
}

.hd-contact {
  font-size: 13px;
}

/* pill tipo doc */
.hd-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 7px;
  background: #eef1f5;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

/* badges Natural/Jurídica como la imagen */
.hd-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.hd-badge-blue {
  background: rgba(32, 83, 255, .12);
  color: #1f4fe0;
}

.hd-badge-dark {
  background: #1f2937;
  color: #fff;
}

/* botones evidencia */
.hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e6eaf0;
  background: #fff;
  color: #111827;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.hd-btn:hover {
  background: #f8fafc;
  text-decoration: none;
  color: #111827;
}

.hd-btn i {
  color: #6b7280;
}

.hd-btn-disabled {
  opacity: .55;
  cursor: not-allowed;
}

/*Estilos contenido tabla*/

.folio-one {
  white-space: nowrap;
  font-weight: 700;
}

.date2 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.1;
}

.date2-top {
  font-size: 12px;
  color: hsl(var(--muted));
  font-weight: 600;
}

.date2-bot {
  font-size: 12px;
  color: hsl(var(--muted));
}

/*Botones de nueva politica y sing up*/
.md-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.md-topbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
}

/* Azul exacto al título */
.md-topbtn-primary {
  background: hsl(var(--navy));
  color: #fff;
}

.md-topbtn-primary:hover {
  filter: brightness(.96);
  box-shadow: 0 6px 14px rgba(16, 24, 40, .10);
  transform: translateY(-1px);
}

.md-topbtn-primary:active {
  transform: translateY(0);
  filter: brightness(.93);
}

/* Blanco */
.md-topbtn-outline {
  background: #fff;
  color: hsl(var(--navy));
  border: 1px solid hsl(var(--border));
}

.md-topbtn-outline:hover {
  background: #f8fafc;
}

/* BOTÓN NUEVA POLITICA: NO cambie a azul claro */
.md-topbtn-primary,
.md-topbtn-primary:visited {
  color: #fff;
}

.md-topbtn-primary:hover,
.md-topbtn-primary:focus,
.md-topbtn-primary:active {
  color: #fff;
  /* <- clave */
  text-decoration: none;
  /* por si se subraya */
}

/* --- BOTÓN SALIR: que NO se vuelva azul --- */
.md-topbtn-outline,
.md-topbtn-outline:visited {
  color: hsl(var(--navy));
  text-decoration: none;
}

.md-topbtn-outline:hover,
.md-topbtn-outline:focus,
.md-topbtn-outline:active {
  color: hsl(var(--navy));
  /* <- clave */
  text-decoration: none;
  background: #f8fafc;
}

/* ===== Modal Policy (igual captura) ===== */

.md-modal.modal-dialog {
  max-width: 980px;
  /* ancho grande como la imagen */
}

.md-modalContent {
  border-radius: 10px;
  border: 1px solid #e9edf3;
  overflow: hidden;
}

.md-modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
}

.md-modalTitle {
  font-weight: 600;
  font-size: 18px;
  color: #111827;
}

.md-x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}

.md-x:hover {
  background: #f3f4f6;
  color: #111827;
}

.md-modalBody {
  padding: 18px 18px 14px;
  background: #fff;
}

.md-modalFooter {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #eef1f5;
  background: #fff;
}

.md-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .md-grid2 {
    grid-template-columns: 1fr;
  }
}

.md-field {
  display: block;
}

.md-label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.md-req {
  color: #ef4444;
}

.md-help2 {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

.md-input {
  width: 100%;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.md-inputSoft {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.md-input:focus {
  border-color: #cfd7e6;
  box-shadow: 0 0 0 3px rgba(32, 83, 255, .08);
}

.mt2 {
  margin-top: 14px;
}

/* Botones del footer como la captura */
.md-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.md-btnLight {
  background: #fff;
  border-color: #e5e7eb;
  color: #374151;
}

.md-btnLight:hover {
  background: #f8fafc;
}

.md-btnPrimary {
  background: hsl(var(--navy));
  /* Macrodent */
  color: #fff;
}

.md-btnPrimary:hover {
  filter: brightness(.96);
}

/* Editor */
.md-editorWrap {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

/* Quill ajustes para verse como tu imagen */
#pol_editor .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid #eef1f5;
  padding: 10px 12px;
}

#pol_editor .ql-container.ql-snow {
  border: 0;
  min-height: 320px;
}

#pol_editor .ql-editor {
  min-height: 320px;
  font-size: 14px;
  color: #374151;
}

#pol_editor .ql-editor hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 18px 0;
}

/* Quill HR visible */
.ql-editor hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 14px 0;
}

#pol_editor .ql-picker-label {
  border-radius: 6px;
}

.md-base {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

/* Mensajes */
.md-msg {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
}

.md-msgError {
  color: #b91c1c;
}

.md-msgOk {
  color: #047857;
}

/* Boton administrador */
.md-roleBtn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 15px;

  font-size: 14px;
  font-weight: 500;

  color: #6b7280; /* gris */
  text-decoration: none; /* 👈 CLAVE */

  padding: 6px 10px;
  border-radius: 8px;

  background: transparent;
}

/* 🔒 fuerza que NUNCA se subraye */
.md-roleBtn:hover,
.md-roleBtn:focus,
.md-roleBtn:active {
  text-decoration: none;
  color: #6b7280;
}

/* ✅ SOLO el fondo cambia */
.md-roleBtn:hover {
  background-color: #e5e7eb;
  color: #111827e5;
}

a.no-underline,
a.no-underline:hover,
a.no-underline:focus {
  text-decoration: none;
}

/* =========================
   LOGIN estilo "imagen"
   ========================= */
.auth-page{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card{
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.auth-brand{
  margin-bottom: 26px;
}

.auth-form{
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  text-align: left;
}

.auth-group{
  margin-bottom: 18px;
}

.auth-label{
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}

/* Inputs rectos y blancos (no pill, no beige) */
.auth-input{
  width: 100%;
  height: 46px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  background: #ffffff;
  outline: none;
  box-shadow: none;
}

.auth-input:focus{
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.25);
}

/* Password con ojito */
.auth-passwrap{
  position: relative;
}

.auth-passwrap .auth-input{
  padding-right: 44px;
}

.auth-toggle{
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
}

/* Botón ancho oscuro como la imagen */
.auth-btn{
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 6px;
  background: #0b1b33;
  color: #fff;
  font-weight: 600;
  margin-top: 6px;
}

.auth-btn:hover{
  background: #09162b;
}

/* Links centrados */
.auth-links{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.auth-links a{
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
}

.auth-links a:hover{
  text-decoration: underline;
}

/* =========================
   FIX ALTURA LOGIN (según alto de pantalla)
   ========================= */

/* alturas aproximadas del nav y footer (ajústalas si cambias tamaños) */
:root{
  --nav-h: 68px;
  --footer-h: 130px;
}

/* En la página de login NO uses el padding-top enorme del main */
.page-auth main{
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* La zona del login llena el espacio real entre nav y footer */
.page-auth .auth-page{
  min-height: calc(100vh);
  padding: 24px 16px;
}

/* Cuando la pantalla es bajita, reduce un poco espacios (evita “apretado”) */
@media (max-height: 750px){
  .page-auth .auth-page{
    padding: 50px 50px;
    min-height: auto; /* deja que el contenido mande */
  }
  .page-auth .auth-brand{
    margin-bottom: 12px;
  }
  .page-auth .auth-group{
    margin-bottom: 12px;
  }
}
@media (max-width: 991px){
  :root{ --footer-h: 210px; }
}
@media (max-width: 576px){
  :root{ --footer-h: 210px; }
}

/* Botones bloqueados Confirmar */
.md-btn.is-loading,
.md-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* opcional: que no cambie hover cuando está disabled */
.md-btn:disabled:hover {
  transform: none;
  filter: none;
}