/* Mismo estilo que el login de app.samaria.one (clases sa-*): Figtree, campos con
   etiqueta flotante, botones pildora y panel con foto. Los id de cada pagina los usa
   el JavaScript; las clases se pueden cambiar libremente. */

:root {
  --blue: #2563eb;
  --blue-d: #1d4fd8;
  --navy: #0f172a;
  --sky: #dcebff;
  --deep: #0b2a6b;
  --bg: #f5f7fb;
  --muted: #51607a;
  --line: #74829e;
  --soft: #d5dcea;
  --red: #b42318;
  --red-bg: #fdecea;
  --green: #15803d;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
body {
  font-family: Figtree, system-ui, sans-serif;
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .6); outline-offset: 3px; border-radius: 8px; }

/* ---------- layout: contenido a la izquierda, panel con foto a la derecha ---------- */

.sa {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 44% 1fr;
}

.sa-left {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  padding: 28px 56px 24px;
}

.sa-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.sa-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.sa-logo i {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue);
  display: grid;
  place-items: center;
}
.sa-logo img { width: 19px; height: 19px; display: block; }

.sa-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 0; }
.sa-mode { width: 100%; max-width: 416px; }

.sa-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- texto ---------- */

h1 { font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1.02; }
.sa-sub { margin-top: 12px; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.sa-tiny { margin-top: 20px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.sa-tiny b { color: var(--navy); font-weight: 700; }
.sa-lnk { color: var(--blue); font-weight: 700; }
.sa-lnk:hover { text-decoration: underline; }

/* ---------- estados ---------- */

.sa-okic {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 20px;
  background: var(--sky);
  color: var(--blue);
  display: grid;
  place-items: center;
}
.sa-okic svg { width: 30px; height: 30px; }
.sa-okic.err { background: var(--red-bg); color: var(--red); }

.spinner {
  width: 36px;
  height: 36px;
  margin-bottom: 22px;
  border-radius: 50%;
  border: 3px solid var(--sky);
  border-top-color: var(--blue);
  animation: sa-spin .7s linear infinite;
}
@keyframes sa-spin { to { transform: rotate(360deg); } }

/* ---------- formulario ---------- */

.sa-form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }

.sa-ctl {
  position: relative;
  height: 56px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.sa-ctl input {
  width: 100%;
  height: 100%;
  padding: 22px 16px 6px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  outline: none;
}
/* La etiqueta va despues del input en el HTML para poder subirla con CSS
   (placeholder=" " marca cuando el campo tiene texto). */
.sa-ctl label {
  position: absolute;
  left: 17px;
  top: 17px;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  color: var(--muted);
  transform-origin: 0 0;
  pointer-events: none;
  transition: transform .22s var(--ease), color .2s;
}
.sa-ctl input:focus + label,
.sa-ctl input:not(:placeholder-shown) + label,
.sa-ctl input:-webkit-autofill + label { transform: translateY(-10px) scale(.78); }
.sa-ctl:focus-within { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); }
.sa-ctl:focus-within label { color: var(--blue); }

.inline-error { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--red); padding: 0 4px; }

.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .28);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.sa-btn:hover:not(:disabled) { background: var(--blue-d); transform: translateY(-1px); }
.sa-btn:disabled { cursor: default; opacity: .6; box-shadow: none; }

/* ---------- panel con foto ---------- */

.sa-right { position: sticky; top: 0; height: 100vh; padding: 16px 16px 16px 0; }

.sa-panel {
  position: relative;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--deep);
  isolation: isolate;
}
.sa-panel > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.sa-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(rgba(15, 23, 42, .18) 0, rgba(15, 23, 42, 0) 28%, rgba(15, 23, 42, 0) 44%, rgba(11, 42, 107, .62));
}

.sa-gw { position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 28px; }
.sa-gc {
  width: min(500px, 100%);
  padding: 26px 26px 22px;
  border-radius: 30px;
  color: #fff;
  background: rgba(15, 23, 42, .46);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .2);
}
.sa-gic {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px rgba(255, 255, 255, .25);
  display: grid;
  place-items: center;
}
.sa-gic svg { width: 28px; height: 28px; }
.sa-gc h3 { margin-top: 18px; font-size: 26px; font-weight: 900; letter-spacing: -.035em; line-height: 1.05; }
.sa-gc p { margin-top: 10px; font-size: 15.5px; font-weight: 500; line-height: 1.5; opacity: .95; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .sa { display: flex; flex-direction: column; }
  .sa-right { order: -1; position: relative; height: 280px; padding: 12px 12px 0; }
  .sa-panel { border-radius: 24px; }
  .sa-panel::after { background: linear-gradient(rgba(15, 23, 42, 0) 40%, rgba(11, 42, 107, .35)); }
  .sa-panel > img { object-position: 50% 38%; }
  .sa-gw { left: 12px; right: 12px; bottom: 12px; }
  .sa-gc { width: 100%; padding: 14px 16px; border-radius: 20px; }
  .sa-gic { width: 38px; height: 38px; border-radius: 12px; }
  .sa-gic svg { width: 20px; height: 20px; }
  .sa-gc h3 { margin-top: 10px; font-size: 18px; }
  .sa-gc p {
    margin-top: 4px;
    font-size: 12.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sa-left { min-height: 0; flex: 1; padding: 20px 22px; }
  .sa-stage { padding: 26px 0 30px; align-items: flex-start; }
  h1 { font-size: 34px; }
  .sa-foot { justify-content: center; text-align: center; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .sa-left { padding-top: 20px; }
  .sa-stage { padding: 14px 0; }
  .sa-form { gap: 13px; margin-top: 20px; }
  h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-duration: .001ms !important; animation-duration: 2.4s !important; }
}
