/* ============================================================
   ESTILO.CSS – Estilos base de "Se Busca"
   Se aplica a TODAS las páginas (login, registro, edición, etc.)
   ============================================================ */

/* ----- VARIABLES GLOBALES ----- */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --title-color: #0F172A;
  --body-color: #64748B;
  --border-color: #E2E8F0;
  --border-color-strong: #CBD5E1;

  /* Paleta principal (Coral) */
  --primary: #FF7B54;
  --primary-dark: #E5613A;
  --primary-soft: #FFF0EC;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;

  /* Categorías (se mantienen diferenciadas) */
  --mascota: #0D9488;
  --mascota-soft: #F0FDFA;
  --nino: #2563EB;
  --nino-soft: #EFF4FF;
  --persona: #7C3AED;
  --persona-soft: #F5F3FF;

  --font: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 28px rgba(15,23,42,0.10);
}

/* ----- RESET ----- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--title-color);
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
}

/* ----- UTILIDADES COMUNES ----- */
.container { max-width: 1080px; margin: 0 auto; }

/* ----- BOTONES GENÉRICOS (fuera de páginas específicas) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color-strong);
  background: var(--surface);
  color: var(--title-color);
  cursor: pointer;
  transition: 0.15s ease;
  font-family: var(--font);
}
.btn i { font-size: 16px; color: var(--body-color); transition: 0.15s ease; }
.btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn:hover i { color: #fff; }

/* ----- INPUTS, SELECTS, TEXTAREAS (formularios) ----- */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-color-strong);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--title-color);
  transition: 0.15s ease;
}
textarea { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
input::placeholder, textarea::placeholder { color: var(--body-color); }

/* ----- CHIPS (selección múltiple) ----- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border-color-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--body-color);
  cursor: pointer;
  transition: 0.15s ease;
}
.chip input:checked + span {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ----- TARJETAS ----- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.card-header i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ----- GRID DE FORMULARIOS ----- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* ----- BOTÓN PRINCIPAL ----- */
.btn-submit {
  width: 100%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-family: var(--font);
  transition: 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover { background: var(--primary-dark); }

/* ----- CHECKBOX DE CONSENTIMIENTO ----- */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  margin: 4px 0 18px;
  line-height: 1.5;
  color: var(--body-color);
}
.consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.consent label { font-weight: 400; margin: 0; color: var(--body-color); }

/* ----- FOTO DE PERFIL ----- */
.photo-upload { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-box {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--primary-soft); border: 2px dashed var(--border-color-strong);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; color: var(--primary); font-size: 30px;
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

/* ----- VOLVER ----- */
.btn-back {
  background: var(--surface);
  border: 1px solid var(--border-color-strong);
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--title-color);
  font-family: var(--font);
  transition: 0.15s ease;
}
.btn-back:hover { background: var(--bg); border-color: var(--body-color); }

/* ----- ENCABEZADO DE PÁGINA ----- */
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header h1 i { color: var(--primary); font-size: 22px; }
.page-header p { margin: 0; color: var(--body-color); font-size: 14px; }

/* ----- ETIQUETAS Y AYUDAS ----- */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 6px;
}
.required { color: var(--danger); }
.hint { font-size: 12px; color: var(--body-color); display: block; margin-top: 8px; }

/* ============================================================
   TARJETA DE AUTENTICACIÓN (login y registro de tutor)
   ============================================================ */
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.auth-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--title-color);
}
.auth-card p {
  color: var(--body-color);
  font-size: 14px;
  margin: 0 0 24px;
}
.auth-input-icon {
  position: relative;
  margin-bottom: 16px;
}
.auth-input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--body-color);
  font-size: 17px;
  pointer-events: none;
}
.auth-input-icon input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border-color-strong);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  color: var(--title-color);
  transition: 0.15s ease;
}
.auth-input-icon input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--body-color);
}
.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-link a:hover { text-decoration: underline; }
.auth-alert {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13.5px;
  display: none;
}



.btn-qr {
  background: #6B21A8;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-qr:hover { background: #5B1A92; }







.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-box {
  background: #fff;
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #6b7a8f;
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0b1a33;
}


/* ===== CONTENEDOR DEL QR CON LOGO SUPERPUESTO ===== */
.qr-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  margin: 0 auto;
}
.qr-wrapper img.qr-img {
  display: block;
  max-width: 220px;
  height: auto;
  border-radius: 12px;
}
.qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  pointer-events: none; /* para que no interfiera con clicks */
}
.qr-logo img {
  width: 38px;
  height: 38px;
  display: block;
}
