/* Tipografía, espaciado y neutros del brand kit de Alkemy; el verde primario es
   el primaryColor de la Universidad en Alkymetrics (company.primaryColor). */
:root {
  --udec-green: #00482b;
  --ink: #262626;
  --text-secondary: #5f5f5f;
  --surface: #ffffff;
  --surface-sunken: #f6f6f6;
  --divider: #f2f2f2;
  --divider-strong: #e8e8e8;
  --disabled: #cecece;
  --error-text: #aa3030;
  --error-fill: #ef4444;
  --error-bg: #fdecec;
  --warning-text: #ae7008;
  --warning-bg: #fef5e7;
  --info-text: #048197;
  --info-bg: #e6f8fb;
  --success-text: #0b835c;
  --success-bg: #e7f8f2;
  --elevation-2: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 4px solid var(--udec-green);
  border-radius: 8px;
  box-shadow: var(--elevation-2);
  padding: 32px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--divider);
}
.logo-udec { height: 64px; width: auto; }
.logo-alkemy { height: 24px; width: auto; }
.brand-divider { width: 1px; height: 40px; background: var(--divider-strong); }

.view { text-align: center; }
.view[hidden] { display: none; }

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}
h1:focus { outline: none; }

.lead {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

.stack { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 4px; text-align: left; }

label { font-size: 14px; font-weight: 500; line-height: 20px; }

/* 16px en los inputs evita el zoom automático de iOS al enfocar. */
input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--divider-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
input:focus { outline: none; border-color: var(--udec-green); box-shadow: 0 0 0 2px rgba(0, 72, 43, .2); }
input[aria-invalid="true"] { border-color: var(--error-fill); }

.field-error { margin: 0; color: var(--error-text); font-size: 12px; line-height: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--udec-green); outline-offset: 2px; }

/* Como en el sistema de Alkemy: más claro en hover, más oscuro al presionar. */
.btn-primary { background: var(--udec-green); border-color: var(--udec-green); color: #fff; }
.btn-primary:hover { filter: brightness(1.25); }
.btn-primary:active { filter: brightness(.85); }

.btn-secondary { background: transparent; border-color: var(--text-secondary); color: var(--text-secondary); }
.btn-secondary:hover { background: rgba(160, 160, 160, .1); }
.btn-secondary:active { background: rgba(160, 160, 160, .2); }

.view-left h1, .view-left .lead { text-align: left; }

.btn-lg { height: 48px; font-size: 16px; font-weight: 600; }
.btn:disabled { background: var(--disabled); border-color: var(--disabled); color: var(--text-secondary); cursor: not-allowed; filter: none; }

.summary { margin: 0 0 16px; padding: 0; text-align: left; border-top: 1px solid var(--divider); }
.summary > div { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.summary dt {
  margin: 0 0 2px;
  color: var(--udec-green);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.summary dd { margin: 0; font-size: 14px; line-height: 20px; }

.notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--info-bg);
  color: #034c59;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}
.notice-neutral { background: var(--surface-sunken); color: var(--ink); }

.checks { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; text-align: left; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 14px; font-weight: 400; line-height: 20px; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; padding: 0; accent-color: var(--udec-green); }

.btn-link {
  align-self: center;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-link:hover { color: var(--ink); text-decoration: underline; }

.consent-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: 14px;
  font-weight: 600;
}
.consent-links a, .consent-links .btn-link { color: #346087; font-size: 14px; padding: 0; text-decoration: none; }
.consent-links a:hover, .consent-links .btn-link:hover { color: var(--udec-green); text-decoration: underline; }

.spinner {
  width: 40px;
  height: 40px;
  margin: 8px auto 24px;
  border: 4px solid var(--divider-strong);
  border-top-color: var(--udec-green);
  border-radius: 9999px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.status {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 24px;
  font-weight: 700;
}
.status-success { background: var(--success-bg); color: var(--success-text); }
.status-error { background: var(--error-bg); color: var(--error-text); }
.status-warning { background: var(--warning-bg); color: var(--warning-text); }
.status-info { background: var(--info-bg); color: var(--info-text); }

@media (max-width: 480px) {
  .page { align-items: flex-start; }
  .card { padding: 24px 16px; }
  .logo-udec { height: 48px; }
  .logo-alkemy { height: 20px; }
}
