/* =========================================================================
   MODAL DE ACCESO, REGISTRO Y FICHA DE PERFIL
   ========================================================================= */
html.vdt-modal-open,
body.vdt-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

#modal-cuenta,
.vdt-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 23, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  touch-action: none;
  overscroll-behavior: contain;
  z-index: 200;
}

#modal-cuenta[hidden],
.vdt-modal-backdrop[hidden] {
  display: none;
}

.vdt-card {
  position: relative;
  background: var(--bg-card);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
}

.vdt-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vdt-modal-close:hover {
  background: var(--bg-hover);
}

.vdt-header { text-align: center; margin-bottom: 20px; }
.vdt-header h2 { color: var(--text-main); font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.vdt-modal-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 240px;
  margin: 0 auto 10px;
  object-fit: contain;
}
.vdt-header p { margin-top: 4px; color: var(--text-muted); font-size: 0.88rem; }

.vdt-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--bg-subtle); padding: 4px; border-radius: 12px; }
.vdt-tabs button { flex: 1; border: none; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 0.88rem; cursor: pointer; background: transparent; color: var(--text-muted); transition: background 0.15s ease, color 0.15s ease; }
.vdt-tabs button.activo { background: var(--color-primary); color: #fff; }

.vdt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vdt-campo { margin-bottom: 13px; }
.vdt-campo label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 5px; color: var(--text-main); }
.vdt-campo input, .vdt-campo select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 0.92rem; background: #fff; color: var(--text-main); }
.vdt-campo input:focus, .vdt-campo select:focus { outline: none; border-color: var(--color-primary); }

.vdt-cedula-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.vdt-cedula-group:focus-within {
  border-color: var(--color-primary);
}

.vdt-campo .vdt-cedula-select {
  width: auto;
  border: none;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #f8fafc;
  padding: 0 8px 0 10px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.vdt-campo .vdt-cedula-input {
  border: none;
  border-radius: 0;
  width: 100%;
  min-width: 0;
  padding: 10px 10px;
  outline: none;
  background: transparent;
}

.vdt-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.vdt-pw-wrap input {
  padding-right: 42px;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.vdt-pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.vdt-pw-toggle:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.vdt-pw-toggle svg {
  pointer-events: none;
  display: block;
}

.vdt-pw-toggle .vdt-eye-off {
  display: none;
}

.vdt-pw-toggle[aria-pressed="true"] .vdt-eye-open {
  display: none;
}

.vdt-pw-toggle[aria-pressed="true"] .vdt-eye-off {
  display: block;
}

.vdt-pw-rules {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
}

.vdt-pw-rules[hidden] {
  display: none;
}

.vdt-pw-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.vdt-pw-rules li:last-child {
  margin-bottom: 0;
}

.vdt-req-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: transparent;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vdt-pw-rules li.is-valid {
  color: #15803d;
  font-weight: 500;
}

.vdt-pw-rules li.is-valid .vdt-req-icon {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.vdt-turnstile-wrap {
  margin: 12px 0 6px;
  display: flex;
  justify-content: center;
}

.vdt-btn { width: 100%; padding: 12px; border: none; border-radius: var(--radius-pill); background: var(--color-primary); color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; margin-top: 6px; transition: opacity 0.15s ease; }
.vdt-btn:hover { opacity: 0.9; }
.vdt-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.vdt-btn--link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.vdt-btn--secundario { background: var(--bg-subtle); color: var(--text-main); margin-top: 10px; }
.vdt-btn--secundario:hover { background: var(--bg-hover); opacity: 1; }

.vdt-alerta { padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 16px; }
.vdt-alerta--error { background: #fef2f2; color: var(--status-danger); border: 1px solid #fecaca; }
.vdt-alerta--exito { background: #f0fdf4; color: var(--status-success); border: 1px solid #bbf7d0; }

.vdt-panel-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.vdt-panel-nombre { margin: 10px 0 2px; font-size: 1.2rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.vdt-panel-municipio { display: block; color: var(--text-muted); font-size: 0.86rem; }
.vdt-panel-tabs { margin-top: 16px; }

.vdt-campo .vdt-input-readonly {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-subtle);
  cursor: default;
}

.vdt-campo .vdt-input-readonly:focus {
  border-color: var(--border-subtle);
}

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

.vdt-badge { display: inline-block; background: var(--bg-subtle); color: var(--text-main); border: 1px solid var(--border-strong); font-weight: 700; font-size: 0.72rem; padding: 3px 10px; border-radius: var(--radius-pill); letter-spacing: 0.03em; }
.vdt-check { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; background: var(--status-verified); color: #fff; border-radius: 50%; font-size: 0.68rem; font-weight: bold; vertical-align: middle; flex-shrink: 0; }
.vdt-info-lista { list-style: none; margin: 16px 0; border-top: 1px solid var(--border-subtle); }
.vdt-info-lista li { padding: 10px 0; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.9rem; }
.vdt-info-lista li span { text-align: right; word-break: break-word; color: var(--text-main); }

/* =========================================================================
   RESPONSIVE: MÓVILES (< 768px) — AJUSTE COMPACTO DE CAMPOS EN PAREJA
   ========================================================================= */
@media (max-width: 767px) {
  .vdt-campo input,
  .vdt-campo select {
    font-size: 16px;
  }

  .vdt-grid .vdt-campo label {
    font-size: 12.5px;
  }

  .vdt-grid .vdt-campo input,
  .vdt-grid .vdt-campo .vdt-cedula-select {
    font-size: 13.5px;
  }

  .vdt-grid .vdt-campo input {
    padding-left: 10px;
    padding-right: 10px;
  }
}
