/* ===============================
   RESET + BASE
================================ */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f0f2f5;
  color: #333;
}

/* ===============================
   MODAL BACKDROP
================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   MODAL CONTAINER
================================ */
.modal-container {
  background: #fff;
  width: 90%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ===============================
   HEADER
================================ */
.modal-header {
  padding: 16px 20px;
  background: #0d6efd;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  font-size: 22px;
  cursor: pointer;
}

/* ===============================
   BODY
================================ */
.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Títulos de sección */
.modal-body h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
  font-weight: 600;
  color: #444;
}

/* ===============================
   FORM CONTROLS
================================ */
label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

input,
select {
  width: 100%;
  padding: 9px 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

input::placeholder {
  color: #aaa;
}

/* ===============================
   GRID GENERAL
================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* ===============================
   DATOS FAMILIARES
================================ */
.familia-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* Cada renglón */
.familia-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 12px;
  align-items: center;
}

/* Etiqueta */
.familia-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

/* Inputs familiares (usan el mismo estilo base) */
.familia-row input {
  margin-top: 0;
}

/* ===============================
   FOOTER
================================ */
.modal-footer {
  padding: 14px 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e0e0e0;
}

button {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-primary {
  background: #0d6efd;
  color: #fff;
}

.modal-hidden {
    display: none;
}

