/* GM Activos v2 — base: reset, splash, login, campos y botones */
/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--f-body);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 4px; }

/* -- SPLASH --------------------------------------- */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--c-navy);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.75rem;
  transition: opacity .6s ease, visibility .6s ease;
}
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-ring {
  position: relative; width: 100px; height: 100px;
}
.splash-ring svg {
  position: absolute; inset: 0;
  animation: rotateSvg 2s linear infinite;
}
@keyframes rotateSvg { to { transform: rotate(360deg); } }
.splash-logo-inner {
  position: absolute; inset: 12px;
  background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo-inner img { width: 54px; height: 54px; object-fit: contain; }

.splash-text { text-align: center; }
.splash-title {
  font-family: var(--f-head);
  font-size: 1.6rem; font-weight: 800;
  color: #fff; letter-spacing: -.01em; line-height: 1.1;
}
.splash-title em { color: var(--c-blue2); font-style: normal; }
.splash-sub {
  font-size: .7rem; font-weight: 500;
  color: rgba(255,255,255,.4);
  letter-spacing: .2em; text-transform: uppercase;
  margin-top: .35rem;
}

.splash-progress {
  width: 140px; height: 2px;
  background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden;
}
.splash-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--c-blue), var(--c-blue2));
  border-radius: 2px;
  animation: fillProgress 1.8s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes fillProgress { to { width: 100%; } }

/* -- LOGIN ---------------------------------------- */
#screen-login {
  position: fixed; inset: 0; z-index: 500;
  background: var(--c-navy);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  transition: opacity .4s ease, visibility .4s ease;
}
#screen-login::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: radial-gradient(ellipse 90% 70% at 50% -10%, rgba(0,108,170,.3) 0%, transparent 70%);
  pointer-events: none;
}
#screen-login.out { opacity: 0; visibility: hidden; pointer-events: none; }

/* -- RESET / RECUPERAR CONTRASEÑA ---------- */
#screen-reset {
  position: fixed; inset: 0; z-index: 510;
  background: var(--c-navy);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  transition: opacity .4s ease, visibility .4s ease;
  opacity: 0; visibility: hidden; pointer-events: none;
}
#screen-reset::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: radial-gradient(ellipse 90% 70% at 50% -10%, rgba(0,108,170,.3) 0%, transparent 70%);
  pointer-events: none;
}
#screen-reset.on { opacity: 1; visibility: visible; pointer-events: auto; }

.login-wrap {
  width: 100%; max-width: 400px; position: relative; z-index: 1;
  animation: loginIn .5s cubic-bezier(.34,1.4,.64,1);
}
@keyframes loginIn { from { opacity:0; transform: translateY(24px) scale(.97); } }

.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo {
  width: 80px; height: 80px; border-radius: 50%;
  background: #fff; margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(255,255,255,.08), 0 0 0 16px rgba(255,255,255,.04);
}
.login-logo img { width: 58px; height: 58px; object-fit: contain; }
.login-brand {
  font-family: var(--f-head);
  font-size: 1.6rem; font-weight: 800;
  color: #fff; letter-spacing: -.01em;
}
.login-brand em { color: var(--c-blue2); font-style: normal; }
.login-tagline {
  font-size: .7rem; color: rgba(255,255,255,.4);
  letter-spacing: .16em; text-transform: uppercase; margin-top: .3rem;
}

.login-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-xl);
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(20px);
}
.login-card .field { margin-bottom: 1rem; }
.login-card .field:last-of-type { margin-bottom: 1.25rem; }

/* -- CAMPOS --------------------------------------- */
.label {
  display: block; font-size: .7rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: .4rem;
}
.label-light { color: rgba(255,255,255,.5); }
.label-dark  { color: var(--c-text3); }

.input {
  width: 100%; font-family: var(--f-body); font-size: .9rem;
  padding: .72rem 1rem; border-radius: var(--r-md);
  outline: none; transition: all .2s;
}
.input-glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
}
.input-glass::placeholder { color: rgba(255,255,255,.3); }
.input-glass:focus {
  border-color: var(--c-blue2);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(36,128,214,.25);
}
.input-solid {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
}
.input-solid::placeholder { color: var(--c-text3); }
.input-solid:focus {
  border-color: var(--c-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,108,170,.1);
}
select.input { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237A90A4' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
textarea.input { resize: vertical; min-height: 80px; }

/* -- BOTONES --------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--f-body); font-weight: 600; font-size: .875rem;
  border: none; border-radius: var(--r-md); cursor: pointer;
  padding: .72rem 1.25rem; transition: all .2s; white-space: nowrap;
  line-height: 1;
}
.btn-w { width: 100%; }
.btn-blue {
  background: var(--c-blue); color: #fff;
  box-shadow: var(--s-blue);
}
.btn-blue:hover { background: var(--c-blue2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,108,170,.35); }
.btn-blue:active { transform: none; }
.btn-blue:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent; color: var(--c-text2);
  border: 1.5px solid var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-blue); color: var(--c-blue); background: var(--c-blue3); }

.btn-glass {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255,255,255,.18); }

.btn-green  { background: var(--c-green); color: #fff; }
.btn-green:hover { background: #0b8a4f; transform: translateY(-1px); }

.btn-red    { background: var(--c-red); color: #fff; }
.btn-red:hover { background: #a82424; }

.btn-sm { padding: .5rem .9rem; font-size: .8rem; }
.btn-xs { padding: .35rem .7rem; font-size: .74rem; }
.btn-icon-sq {
  width: 36px; height: 36px; padding: 0;
  background: var(--c-blue3); color: var(--c-blue);
  border: 1.5px solid var(--c-blue4); border-radius: var(--r-md);
}
.btn-icon-sq:hover { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
