/* =========================================================
   RDS · login (tarjeta centrada) e instalación
   ========================================================= */
.login-body { min-height: 100vh; background: var(--bg); overflow-x: hidden; }

.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 16px; }

.login-card {
  width: 100%; max-width: 410px; display: flex; flex-direction: column; gap: 16px;
  padding: 34px 30px 26px; border-radius: 22px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line-2) 80%, transparent);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
}
[data-theme="light"] .login-card { box-shadow: 0 30px 70px -30px rgba(30, 40, 80, .3); }

.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 4px; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 8px; box-shadow: 0 14px 30px -10px #3D63DA; }
.brand-mark.lg svg { width: 34px; height: 34px; }
.login-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.login-head p { margin: 0; color: var(--muted); font-size: 14px; }

.input-ico { position: relative; }
.input-ico > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .15s; }
.input-ico:focus-within > .ico { color: var(--accent); }
.input-ico input { padding-left: 44px; height: 48px; font-size: 15px; }
.input-ico input#clave { padding-right: 48px; }
.ver-clave {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer;
}
.ver-clave:hover { color: var(--text); background: var(--surface-3); }
.ver-clave .ico { width: 18px; height: 18px; }
.hint.caps { color: var(--warn); font-weight: 700; }

/* interruptor "mantener sesión" */
.recordar { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-size: 14px; font-weight: 600; }
.recordar input { position: absolute; opacity: 0; pointer-events: none; }
.recordar .sw { position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s; }
.recordar .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .18s; }
.recordar input:checked + .sw { background: var(--accent); border-color: var(--accent); }
.recordar input:checked + .sw::after { transform: translateX(16px); }
.recordar input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.recordar small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

#btn-ingresar { height: 50px; font-size: 15.5px; border-radius: 12px; margin-top: 2px; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girar .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }

.login-help { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.login-foot { margin: 0; color: var(--faint); font-size: 12.5px; }

/* --- instalación (setup.php) --- */
.setup { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.setup-card { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 16px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.setup-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { margin: -8px 0 4px; color: var(--muted); }
.login-mobile-brand { display: none; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.login-mobile-brand.show { display: flex; }

@media (max-width: 480px) {
  .login-wrap { justify-content: flex-start; padding-top: 40px; }
  .login-card { padding: 28px 20px 22px; border-radius: 20px; }
  .setup-card { padding: 24px 18px; }
}
