.buscador-page {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.buscador-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 2rem 2rem 2.5rem;
}

.buscador-back-btn {
  display: inline-block;
  margin-bottom: 1rem;
  color: #047857;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.15s ease;
}

.buscador-back-btn:hover {
  color: #065f46;
  text-decoration: underline;
}

.buscador-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: #111827;
}

.buscador-subtitle {
  color: #4b5563;
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.buscador-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 1.05rem;
}

.buscador-vacio {
  margin-top: 1rem;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  font-size: 1rem;
}

/* --- Card de resultado --- */
.buscador-resultado {
  margin-top: 1.5rem;
  animation: buscador-fadeIn 0.25s ease-out;
}

.buscador-resultado-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #d1fae5;
  border-radius: 14px;
  padding: 1.5rem;
}

.buscador-resultado-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #d1fae5;
}

.buscador-resultado-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.buscador-resultado-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.buscador-resultado-nombre {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #064e3b;
}

/* --- Info Grid --- */
.buscador-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.buscador-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.buscador-info-icono {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.buscador-info-texto {
  flex: 1;
  min-width: 0;
}

.buscador-info-label {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.buscador-info-valor {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.buscador-emails {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.buscador-emails-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.buscador-email-texto {
  flex: 1;
  word-break: break-all;
}

.buscador-btn-eliminar {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}

.buscador-btn-eliminar:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.buscador-correo-radio {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.95rem;
  background: #fff;
  border: 2px solid #fde68a;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 1.05rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.buscador-correo-radio:hover {
  background: #fefce8;
  border-color: #f59e0b;
}

.buscador-correo-radio input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #f59e0b;
  margin: 0;
}

.buscador-correo-radio span {
  flex: 1;
  word-break: break-all;
  color: #374151;
}

.buscador-btn-editar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 2px solid #10b981;
  color: #047857;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.buscador-btn-editar:hover {
  background: #10b981;
  color: #fff;
}

/* --- Formulario de edición --- */
.buscador-form-editar {
  margin-top: 1.5rem;
  background: #fffbeb;
  border: 2px solid #fde68a;
  border-radius: 14px;
  padding: 1.5rem;
  animation: buscador-fadeIn 0.25s ease-out;
}

.buscador-editar-titulo {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #92400e;
}

.buscador-aviso {
  display: flex;
  gap: 0.7rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.buscador-aviso-icono {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.buscador-aviso p {
  margin: 0;
  color: #78350f;
  font-size: 1rem;
  line-height: 1.5;
}

.buscador-campo {
  margin-bottom: 1rem;
}

.buscador-campo label {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: #374151;
}

.buscador-correo-actual {
  margin: 0;
  padding: 0.7rem 0.95rem;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #6b7280;
  font-size: 1.05rem;
  word-break: break-all;
}

.buscador-input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  font-size: 1.1rem;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.buscador-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.buscador-editar-feedback {
  margin: 0.6rem 0 0.5rem;
  font-size: 1rem;
  min-height: 1.2em;
}

.buscador-editar-feedback.error {
  color: #b91c1c;
  font-weight: 600;
}

.buscador-editar-feedback.info {
  color: #1e40af;
}

.buscador-editar-feedback.ok {
  color: #047857;
  font-weight: 600;
}

.buscador-editar-acciones {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.buscador-btn {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
  font-family: inherit;
}

.buscador-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.buscador-btn-primary {
  background: #10b981;
  color: #fff;
}

.buscador-btn-primary:hover:not(:disabled) {
  background: #059669;
}

.buscador-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.buscador-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

/* --- Mensaje de éxito --- */
.buscador-exito {
  margin-top: 1.5rem;
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  animation: buscador-fadeIn 0.3s ease-out;
}

.buscador-exito-icono {
  display: inline-flex;
  width: 56px;
  height: 56px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.buscador-exito h3 {
  margin: 0 0 0.5rem;
  color: #064e3b;
  font-size: 1.4rem;
}

.buscador-exito p {
  margin: 0.35rem 0;
  color: #065f46;
  font-size: 1.05rem;
  line-height: 1.45;
}

.buscador-exito-nuevo strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.15rem;
  word-break: break-all;
  color: #064e3b;
}

.buscador-exito-aviso {
  font-size: 0.95rem !important;
  color: #047857 !important;
  margin-top: 0.75rem !important;
}

/* --- Disclaimer --- */
.buscador-disclaimer {
  display: flex;
  gap: 0.85rem;
  margin-top: 2rem;
  padding: 1.25rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.buscador-disclaimer-icono {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.buscador-disclaimer p {
  margin: 0 0 0.4rem;
  color: #1e3a8a;
  font-size: 1rem;
  line-height: 1.5;
}

.buscador-disclaimer p:last-of-type {
  margin-bottom: 0.65rem;
}

.buscador-disclaimer-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.buscador-disclaimer-link:hover {
  background: #1d4ed8;
  color: #fff;
}

/* --- Modal de confirmación de eliminación --- */
.buscador-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: buscador-fadeIn 0.15s ease-out;
}

.buscador-modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: buscador-modal-in 0.2s ease-out;
}

.buscador-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.buscador-modal-icono {
  font-size: 1.75rem;
  line-height: 1;
}

.buscador-modal-header h3 {
  margin: 0;
  color: #991b1b;
  font-size: 1.3rem;
  font-weight: 700;
}

.buscador-modal-body p {
  margin: 0.5rem 0;
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.5;
}

.buscador-modal-email {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1.1rem !important;
  font-weight: 700;
  color: #991b1b !important;
  word-break: break-all;
  text-align: center;
}

.buscador-modal-info {
  color: #6b7280 !important;
  font-size: 0.95rem !important;
}

.buscador-modal-aviso {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  color: #92400e !important;
  font-size: 0.95rem !important;
  font-weight: 600;
}

.buscador-modal-acciones {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.buscador-btn-danger {
  background: #dc2626;
  color: #fff;
}

.buscador-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

@keyframes buscador-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes buscador-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
  .buscador-page { margin: 1.5rem auto; }
  .buscador-container { padding: 1.5rem 1.25rem 2rem; }
  .buscador-header h1 { font-size: 1.5rem; }
  .buscador-subtitle { font-size: 1rem; }
  .buscador-resultado-card { padding: 1.25rem; }
  .buscador-resultado-header { gap: 1rem; }
  .buscador-resultado-avatar { width: 50px; height: 50px; font-size: 1.1rem; }
  .buscador-resultado-nombre { font-size: 1.2rem; }
  .buscador-form-editar { padding: 1.25rem; }
  .buscador-editar-acciones { flex-direction: column-reverse; }
  .buscador-disclaimer { flex-direction: column; gap: 0.5rem; }
  .buscador-disclaimer-link { text-align: center; }
  .buscador-modal-box { padding: 1.25rem; }
  .buscador-modal-header h3 { font-size: 1.15rem; }
  .buscador-modal-acciones { flex-direction: column-reverse; }
  .buscador-emails-item { flex-wrap: wrap; }
}
