/* ===========================================================
   Tokens — Universidad José Vasconcelos (página autónoma)
   =========================================================== */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --surface-3: #f1f4f9;
  --border: #e3e8ef;
  --border-soft: #ecf0f6;
  --border-strong: #c9d2e0;
  --ink: #0f1a36;
  --ink-2: #1f2a44;
  --muted: #5b6678;
  --muted-2: #7d8696;
  --faint: #a8b1bf;
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --blue-3: #1d4ed8;
  --blue-deep: #1e3a8a;
  --blue-soft: #dbe7fb;
  --blue-bg: #ebf2ff;
  --green: #059669;
  --green-bg: #e6f6ee;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #dc2626;
  --red-soft: #fbd5d5;
  --red-bg: #fde6e6;
  --purple: #7c3aed;
  --purple-bg: #efe5fd;
  --ff-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--ff-sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ===========================================================
   Login screen — Azul SaaS
   =========================================================== */

.login-wrap {
  min-height: 100vh;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}

/* ----- Left brand panel ----- */
.login-brand {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-3) 55%, var(--blue-deep) 100%);
  color: #fff;
  position: relative;
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-brand::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.22) 0, transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.12) 0, transparent 42%);
  pointer-events: none;
}
.login-brand::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 80%);
}

.lb-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.lb-logo {
  font-family: var(--ff-sans);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
}
.lb-logo .sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.78);
  text-transform: uppercase;
  margin-top: 10px;
  font-weight: 600;
}
.lb-version {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  padding: 5px 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
}

.lb-hero { position: relative; z-index: 1; }
.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
}
.lb-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: rgba(255,255,255,0.65);
}
.lb-title {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 18px;
  max-width: 520px;
}
.lb-lede {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.84);
  max-width: 480px;
  margin: 0;
}

/* Glass preview cards */
.lb-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 36px;
  max-width: 540px;
}
.lb-mini {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 16px 16px 14px;
  backdrop-filter: blur(8px);
}
.lb-mini .icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 12px;
}
.lb-mini .icon svg { width: 16px; height: 16px; }
.lb-mini .v {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}
.lb-mini .l {
  font-size: 11.5px;
  color: rgba(255,255,255,0.78);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.lb-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.lb-foot a { color: rgba(255,255,255,0.9); }
.lb-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lb-foot .dot { color: rgba(255,255,255,0.4); }

/* ----- Right form panel ----- */
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  background: var(--surface);
}

.login-card { width: 100%; max-width: 420px; }

.login-form-header { margin-bottom: 28px; }
.login-form-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.login-form-eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--blue);
}
.login-form-title {
  font-family: var(--ff-sans);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.login-form-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.login-field { margin-bottom: 16px; }
.login-field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.login-field-label a {
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
}
.login-field-label a:hover { text-decoration: underline; text-underline-offset: 3px; }

.login-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 4px 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-bg);
}
.login-input-wrap.error {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-bg);
}
.login-input-wrap svg.lead {
  width: 16px; height: 16px;
  color: var(--muted-2);
  margin-right: 10px;
  flex: none;
}
.login-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  min-width: 0;
}
.login-input-wrap input::placeholder { color: var(--faint); }
.login-input-wrap input.mono { font-family: var(--ff-mono); font-size: 13.5px; letter-spacing: 0.04em; }

.login-eye-btn {
  background: transparent;
  border: none;
  width: 34px; height: 34px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--muted-2);
  margin-right: 2px;
}
.login-eye-btn:hover { background: var(--surface-3); color: var(--ink-2); }
.login-eye-btn svg { width: 16px; height: 16px; }

/* ----- Row checkbox + fecha ----- */
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 22px;
}
.login-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2);
  user-select: none;
  cursor: pointer;
  font-weight: 500;
}
.login-check input { display: none; }
.login-check .box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  display: grid; place-items: center;
  transition: background 0.12s, border-color 0.12s;
}
.login-check input:checked + .box { background: var(--blue); border-color: var(--blue); }
.login-check input:checked + .box::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ----- Submit ----- */
.login-submit {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue);
  border-radius: 9px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.12s, box-shadow 0.12s;
  box-shadow: 0 1px 0 rgba(15,26,54,0.05), 0 6px 18px -8px rgba(37,99,235,0.45);
}
.login-submit:hover {
  background: var(--blue-3);
  border-color: var(--blue-3);
  box-shadow: 0 1px 0 rgba(15,26,54,0.05), 0 10px 24px -10px rgba(37,99,235,0.55);
}
.login-submit:disabled { opacity: 0.7; cursor: progress; }
.login-submit svg { width: 16px; height: 16px; }

/* ----- Error ----- */
.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--red-bg);
  border: 1px solid var(--red-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
}
.login-error svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.login-error .strong { font-weight: 600; }

/* ----- Divider "cuentas de desarrollo" ----- */
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 18px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ----- Cuentas DEV ----- */
.dev-accounts {
  border: 1px dashed var(--blue-soft);
  background: var(--blue-bg);
  border-radius: 11px;
  padding: 14px;
}
.dev-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-3);
  margin-bottom: 12px;
}
.dev-head svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.dev-tag {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.dev-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.dev-acc {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  text-align: left;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.05s;
}
.dev-acc:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.dev-acc:active { transform: translateY(1px); }
.dev-av {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}
.dev-av.tone-blue   { background: var(--blue-bg);   color: var(--blue); }
.dev-av.tone-green  { background: var(--green-bg);  color: var(--green); }
.dev-av.tone-amber  { background: var(--amber-bg);  color: var(--amber); }
.dev-av.tone-red    { background: var(--red-bg);    color: var(--red); }
.dev-av.tone-purple { background: var(--purple-bg); color: var(--purple); }
.dev-info { min-width: 0; line-height: 1.25; }
.dev-rol {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-user {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.dev-desc {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* ----- Footer ----- */
.login-foot {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.login-foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.login-foot a:hover { color: var(--ink); }
.login-foot .sep { color: var(--faint); }

/* spinner */
.spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Entry animations */
.login-card { animation: card-in 0.5s cubic-bezier(.2,.7,.2,1) both; }
.lb-hero, .lb-preview { animation: brand-in 0.7s cubic-bezier(.2,.7,.2,1) both; }
.lb-preview { animation-delay: 0.15s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes brand-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
