@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand: #0c526a;
  --brand-500: #136784;
  --ink: #12202a;
  --muted: #93a7b1;
  --border: #dbe5ea;
  --danger: #dc4c4c;
}

* { box-sizing: border-box; }

.login-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(12,82,106,.10), transparent 40%),
    radial-gradient(circle at 88% 85%, rgba(46,196,198,.10), transparent 42%),
    linear-gradient(180deg, #eef3f5 0%, #e4ecef 100%);
}

.login-shell {
  width: min(1040px, 100%);
  height: min(640px, 92vh);
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(12,82,106,.22);
  animation: loginCard .6s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes loginCard {
  from { opacity: 0; transform: translateY(18px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Panel izquierdo: escudo pulsante ---------- */
.login-hero {
  width: 42%;
  flex: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: linear-gradient(175deg, #0c526a 0%, #083247 100%);
  overflow: hidden;
}

.login-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(63,198,216,.16), transparent 55%);
}

.login-emblem {
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(63,198,216,.55);
  animation: loginRing 2.4s ease-out infinite;
}

.login-ring-delay {
  border-color: rgba(63,198,216,.35);
  animation-delay: 1.2s;
}

@keyframes loginRing {
  0%        { transform: scale(.86); opacity: .7; }
  70%, 100% { transform: scale(1.28); opacity: 0; }
}

.login-emblem-core {
  width: 178px;
  height: 178px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-emblem-core img {
  height: 104px;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  animation: loginFloat 4.5s ease-in-out infinite;
}

@keyframes loginFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.login-hero-copy {
  position: relative;
  text-align: center;
  padding: 0 32px;
}

.login-hero-copy h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .28em;
  color: #eaf4f8;
}

.login-hero-copy p {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(200,224,232,.72);
}

/* ---------- Panel derecho: formulario ---------- */
.login-form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}

.login-form-inner {
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-lettering {
  width: 176px;
  margin-bottom: 26px;
}

.login-form-side h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.login-lead {
  margin: 6px 0 26px;
  font-size: 13px;
  color: #5d7280;
}

#loginForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-group label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field-group input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(19,103,132,.12);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #5d7280;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.login-submit {
  margin-top: 6px;
  width: 100%;
  padding: 13px 0;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12,82,106,.28);
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}

.login-submit:hover { background: #094356; }
.login-submit:active { transform: translateY(1px); }

.login-submit.is-loading {
  pointer-events: none;
  opacity: .85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-submit.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: loginSpin 1s linear infinite;
}

@keyframes loginSpin { to { transform: rotate(360deg); } }

.login-note {
  min-height: 18px;
  font-size: 12.5px;
  text-align: center;
  color: #5d7280;
}

.login-note.is-error {
  color: var(--danger);
  font-weight: 600;
}

.login-footer {
  position: absolute;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.login-footer img {
  height: 16px;
  opacity: .75;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .login-shell { height: auto; flex-direction: column; }
  .login-hero { width: 100%; padding: 40px 0; gap: 28px; }
  .login-emblem { width: 170px; height: 170px; }
  .login-emblem-core { width: 130px; height: 130px; }
  .login-emblem-core img { height: 78px; }
  .login-form-side { padding: 36px 28px 84px; }
}
