@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600&display=swap");

:root {
  --bg1: #f8fbff;
  --bg2: #f6f6ff;
  --ink: #1f2937;
  --muted: rgba(31, 41, 55, .65);
  --blue: #1677ff;
  --line: rgba(31, 41, 55, .14);
  --danger: #ef4444;
  --warning: #f59e0b;
}

body {
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(800px 380px at 20% 15%, rgba(191, 224, 255, .35), transparent 60%),
    radial-gradient(800px 380px at 85% 20%, rgba(205, 193, 255, .22), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 12px;
}

.card-min {
  width: min(440px, 90vw);
  background: rgba(255, 255, 255, .86);
  border: 1px solid #000;
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(6px);
}

.brand {
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  user-select: none;
}
.brand img {
  width: min(240px, 70%);
  height: auto;
  object-fit: contain;
}
.brand-text {
  text-align: center;
  font-weight: 700;
  font-size: .98rem;
  color: var(--ink);
  letter-spacing: .3px;
  margin-top: 2px;
}

/* Flechita para volver a la página de presentación */
.back-arrow {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #000;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  z-index: 20;
}
.back-arrow:hover {
  background: #fff;
  border-color: rgba(31, 41, 55, .3);
  color: var(--ink);
}

.campo-password { position: relative; }
.campo-password .input { padding-right: 42px; }
.btn-ver-password {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: rgba(31, 41, 55, .55);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}
.btn-ver-password:hover {
  color: var(--ink);
  background: rgba(31, 41, 55, .06);
}

.title {
  text-align: center;
  font-size: 1.45rem;
  margin: 6px 0 2px;
  font-weight: 600;
  letter-spacing: .1px;
}
.subtitle {
  text-align: center;
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: .98rem;
}

.btn-sso {
  width: 100%;
  border-radius: 12px;
  padding: 11px 12px;
  border: 1px solid #000;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}
.btn-sso:hover {
  background: #fcfdff;
  border-color: rgba(31, 41, 55, .22);
  color: var(--ink);
}

.gmark { width: 18px; height: 18px; display: inline-block; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  color: rgba(31, 41, 55, .55);
  font-weight: 500;
  user-select: none;
  font-size: .95rem;
}
.or::before, .or::after {
  content: "";
  height: 1px;
  background: rgba(31, 41, 55, 0.15) !important;
  flex: 1;
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #000;
  padding: 11px 12px;
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, .95);
}
.input:focus {
  border-color: rgba(22, 119, 255, .55);
  box-shadow: 0 0 0 .2rem rgba(22, 119, 255, .12);
}

.btn-main {
  width: 100%;
  border: 1px solid #000;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.btn-main:hover {
  border-color: rgba(31, 41, 55, .26);
  background: #fbfdff;
}

.help, .small-links {
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
  color: rgba(31, 41, 55, .70);
  font-size: .95rem;
}
.help a, .small-links a {
  color: var(--blue);
  text-decoration: none;
}
.help a:hover, .small-links a:hover { text-decoration: underline; }

/* Toast */
.toast {
  width: min(720px, 94vw);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.bg-danger { background: linear-gradient(135deg, var(--danger), #fb7185) !important; }
.bg-warning { background: linear-gradient(135deg, var(--warning), #fbbf24) !important; color: #1f2937 !important; }
.btn-close-white { filter: invert(1); }