/* ===========================
   SISTEMA DE DISEÑO CORPORATIVO
   =========================== */

:root {
  --bg-page: #f3f4f6;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --primary: #1b5cff;
  --primary-dark: #1748c7;
  --danger: #dc2626;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08);
  --transition-fast: 0.15s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===========================
   BASE
   =========================== */

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 72px; /* espacio header fijo */
}

/* ===========================
   HEADER
   =========================== */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  color: #1f2937;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  border-bottom: 1px solid #e5e7eb;
}

.logo {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ===========================
   NAV
   =========================== */

nav {
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  position: sticky;
  top: 72px;
  z-index: 900;
}

nav a {
  color: #4b5563;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

nav a:hover {
  background-color: #eef2ff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(27, 92, 255, 0.25);
  transform: translateY(-1px);
}

/* ===========================
   CONTENEDOR PRINCIPAL
   =========================== */

.container {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 16px 40px;
}

.content {
  width: 100%;
  max-width: 900px;
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px 26px 28px;
}

/* Encabezado de la página */

.page-header {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.page-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ===========================
   SECCIONES DEL FORM
   =========================== */

.form-section {
  margin-top: 18px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
}

.section-help {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Lista de campos */

.form-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-list li {
  margin-bottom: 14px;
}

/* Labels y campos */

label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

input,
textarea,
select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-family: inherit;
  background-color: #f9fafb;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(27, 92, 255, 0.2);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* ===========================
   BOTÓN PRINCIPAL
   =========================== */

.primary-button {
  width: 100%;
  margin-top: 32px !important;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: 0 8px 18px rgba(27, 92, 255, 0.35);
}

.primary-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(27, 92, 255, 0.4);
}

.primary-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(27, 92, 255, 0.3);
}

/* Nota de pie en la tarjeta */

.footer-note {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===========================
   NOTIFICACIONES Y MODAL
   =========================== */

.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 22px;
  border-radius: 10px;
  font-size: 14px;
  color: #ffffff;
  text-align: center;
  z-index: 2000;
  display: none;
  min-width: 260px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.notification.success {
  background-color: #16a34a;
}

.notification.error {
  background-color: #dc2626;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  z-index: 1900;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #ffffff;
  padding: 22px 24px 18px;
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.35);
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.modal-content p {
  font-size: 15px;
  margin-bottom: 16px;
}

.modal-content button {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.modal-content button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* ===========================
   FOOTER GENERAL
   =========================== */

footer {
  background: #111827;
  color: #e5e7eb;
  text-align: center;
  padding: 18px 12px 22px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
}

footer a {
  color: #60a5fa;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

footer img.clicked {
  animation: rollToRight 3s ease-in-out;
  pointer-events: none;
}

@keyframes rollToRight {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(100px) rotate(360deg);
  }
  100% {
    transform: translateX(0);
  }
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
  .content {
    padding: 18px 16px 22px;
    border-radius: 14px;
  }

  .page-header h2 {
    font-size: 20px;
  }

  nav {
    overflow-x: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 10px 16px;
  }

  .logo {
    font-size: 20px;
  }

  .primary-button {
    font-size: 14px;
  }
}

/* Campo de solo lectura para datos personales */
.readonly-field {
  background: #f3f4f6;
  border: 1px dashed #bdbdbd;
  border-radius: 7px;
  padding: 7px 12px;
  color: #374151;
  display: inline-block;
  min-width: 120px;
  cursor: default;
  font-size: 15px;
}

/* Sección de identidad personal diferenciada */
.form-section.personal-info {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 18px 10px 18px;
  margin-bottom: 22px;
}
