/* NEXO – Login | Grupo National */
:root {
  --nx-brand: #0F5FA6;
  --nx-brand-dark: #0A4479;
  --nx-ink: #0F2A44;
  --nx-ink-2: #3E5163;
  --nx-muted: #5B6B7C;
  --nx-line: #D5DEE8;
  --nx-line-soft: #EDF1F5;
  --nx-bg: #F3F6FA;
  --nx-teal: #1BA0B5;
  --nx-green: #7AC943;
  --nx-orange: #F28C28;
  --nx-error: #B42318;
  --nx-error-bg: #FEF3F2;
  --nx-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--nx-ink);
  background: var(--nx-bg);
  -webkit-font-smoothing: antialiased;
}

.nx-page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.nx-header {
  height: 88px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: #fff;
  border-bottom: 1px solid #E3E9F0;
  position: relative;
  z-index: 2;
}
.nx-brand { display: flex; align-items: center; gap: 20px; }
.nx-brand img { height: 40px; width: auto; display: block; }
.nx-brand-divider { width: 1px; height: 32px; background: var(--nx-line); }
.nx-brand-name { font-size: 22px; font-weight: 800; letter-spacing: .12em; color: var(--nx-brand); }

/* ---------- Layout ---------- */
.nx-main { flex: 1 1 auto; display: flex; flex-wrap: wrap; }

/* ---------- Hero (panel azul) ---------- */
.nx-hero {
  flex: 999 1 560px;
  min-width: 0;
  background: var(--nx-brand);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 120px 18% 96px 8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}
.nx-hero > * { position: relative; }
.nx-ring { position: absolute !important; border-radius: 50%; pointer-events: none; }
.nx-ring--1 { left: -160px; top: -120px; width: 420px; height: 420px; border: 64px solid rgba(255,255,255,.06); }
.nx-ring--2 { right: 22%; bottom: -220px; width: 380px; height: 380px; border: 56px solid rgba(255,255,255,.05); }

.nx-eyebrow { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; letter-spacing: .14em; }
.nx-eyebrow::before { content: ""; width: 40px; height: 3px; background: var(--nx-orange); border-radius: 2px; }

.nx-hero h1 {
  margin: 0;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.035em;
  max-width: 680px;
}
.nx-hero p { margin: 0; font-size: 19px; line-height: 1.6; color: #DCE9F7; max-width: 560px; }

.nx-chips { display: flex; flex-wrap: wrap; gap: 10px; max-width: 600px; padding: 0; margin: 0; list-style: none; }
.nx-chips li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 14px; font-weight: 600;
}
.nx-chips svg { width: 16px; height: 16px; flex: none; }

.nx-bars { display: flex; gap: 12px; margin-top: 8px; }
.nx-bars span { width: 58px; height: 5px; border-radius: 3px; }
.nx-bars span:nth-child(1) { background: var(--nx-teal); }
.nx-bars span:nth-child(2) { background: var(--nx-green); }
.nx-bars span:nth-child(3) { background: var(--nx-orange); }

/* ---------- Panel de acceso ---------- */
.nx-access {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 40px 56px;
}
.nx-card-wrap { width: 100%; max-width: 520px; margin-top: -8px; position: relative; z-index: 2; }

.nx-card {
  background: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 24px 60px rgba(15,42,68,.12), 0 2px 6px rgba(15,42,68,.06);
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nx-card-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.nx-card-logo img { width: 124px; height: auto; display: block; }

.nx-card-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.nx-kicker { font-size: 13px; font-weight: 700; letter-spacing: .18em; color: var(--nx-brand); }
.nx-card-head h2 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.nx-card-head p { margin: 0; font-size: 16px; color: var(--nx-muted); }

/* Mensaje de error general (credenciales inválidas, cuenta inactiva, etc.) */
.nx-alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--nx-error-bg);
  border: 1px solid #FECDCA;
  color: var(--nx-error);
  font-size: 14px; line-height: 1.45;
}
.nx-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.nx-alert ul { margin: 0; padding: 0; list-style: none; }

.nx-field { display: flex; flex-direction: column; gap: 8px; }
.nx-field label { font-size: 15px; font-weight: 700; }

.nx-input {
  display: flex; align-items: center; gap: 12px;
  height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.nx-input--pass { padding-right: 8px; }
.nx-input:focus-within { border-color: var(--nx-brand); box-shadow: 0 0 0 4px rgba(15,95,166,.14); }
.nx-input > svg { width: 20px; height: 20px; flex: none; color: var(--nx-muted); }
.nx-input input {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent;
  font: inherit; font-size: 16px; color: var(--nx-ink);
}
.nx-input input::placeholder { color: #8795A3; }

.nx-field--error .nx-input { border-color: var(--nx-error); }
.nx-field-error { margin: 0; font-size: 13px; color: var(--nx-error); }

.nx-eye {
  width: 44px; height: 44px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--nx-ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nx-eye:hover { background: var(--nx-line-soft); }
.nx-eye svg { width: 20px; height: 20px; }
.nx-eye .nx-eye-off { display: none; }
.nx-eye[aria-pressed="true"] .nx-eye-on { display: none; }
.nx-eye[aria-pressed="true"] .nx-eye-off { display: block; }

.nx-btn {
  margin-top: 8px;
  height: 60px;
  border: 0; border-radius: var(--nx-radius);
  background: var(--nx-brand); color: #fff;
  font: inherit; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15,95,166,.25);
  transition: background .15s, opacity .15s;
}
.nx-btn:hover { background: var(--nx-brand-dark); }
.nx-btn svg { width: 22px; height: 22px; }
.nx-btn[disabled] { opacity: .7; cursor: progress; }

.nx-eye:focus-visible, .nx-btn:focus-visible { outline: 3px solid var(--nx-orange); outline-offset: 2px; }

.nx-help { margin: 0; text-align: center; font-size: 14px; color: var(--nx-muted); }

.nx-secure {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--nx-line-soft);
  font-size: 14px; color: var(--nx-ink-2);
}
.nx-secure svg { width: 16px; height: 16px; }

.nx-footer { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--nx-muted); }

/* ---------- Responsive ---------- */
/* SHOWCASE: responsive login layout */
@media (min-width: 1000px) {
  .nx-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 500px); }
  .nx-hero { padding: clamp(48px, 9vh, 120px) 16% clamp(40px, 8vh, 96px) 8%; }
  .nx-access { padding: 0 clamp(24px, 3vw, 48px) 32px; }
  .nx-card-wrap { max-width: none; }
}
@media (min-width: 1000px) and (max-height: 860px) {
  .nx-header { height: 68px; }
  .nx-brand img { height: 34px; }
  .nx-card { padding: 32px 40px 24px; gap: 16px; }
  .nx-card-logo { display: none; }
  .nx-card-head { gap: 6px; }
  .nx-card-head h2 { font-size: 30px; }
  .nx-input { height: 48px; }
  .nx-btn { height: 52px; margin-top: 4px; }
  .nx-secure { padding-top: 12px; }
  .nx-hero { gap: 20px; }
  .nx-hero h1 { font-size: clamp(36px, min(4.6vw, 7.5vh), 64px); }
  .nx-hero p { font-size: 17px; }
}
@media (max-width: 999px) {
  .nx-main { display: flex; flex-direction: column; }
  .nx-hero, .nx-access { flex: none; }
  .nx-hero { clip-path: none; padding: 40px 24px 56px; gap: 16px; }
  .nx-hero h1 { font-size: clamp(30px, 7vw, 48px); }
  .nx-hero p { font-size: 16px; }
  .nx-chips, .nx-bars { display: none; }
  .nx-access { padding: 0 16px 32px; }
  .nx-card-wrap { margin: -28px auto 0; max-width: 480px; }
  .nx-card { border-radius: 20px; padding: 28px 24px 24px; gap: 16px; }
  .nx-card-logo { display: none; }
  .nx-card-head h2 { font-size: 28px; }
  .nx-input { height: 50px; }
  .nx-btn { height: 54px; }
}
@media (max-width: 520px) {
  .nx-header { height: 64px; padding: 0 20px; }
  /* Prioritize authentication on phones; keep hero below the form. */
  .nx-access { order: -1; padding: 16px 16px 24px; }
  .nx-card-wrap { margin: 0 auto; }
  .nx-hero { padding: 32px 24px; }
  .nx-brand { gap: 14px; }
  .nx-brand img { height: 30px; }
  .nx-brand-name { font-size: 18px; }
  .nx-hero p { font-size: 17px; }
  .nx-card-head h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.nx-alert[hidden] { display: none !important; }
