:root {
  --d360-primary:#0ea5e9;
  --d360-primary-600:#0b77b6;
  --d360-text:#e6eefc;
  --d360-muted:#b7c2d8;
  --surface:rgba(11,18,32,.90);
  --ring:rgba(103,232,249,.25);
  --shadow:0 8px 20px rgba(0,0,0,.75);
}

*,
*::before,
*::after { box-sizing:border-box; border-radius:0 !important; }

html, body { min-height:100%; }

body.central-login {
  min-height:100vh;
  margin:0;
  color:var(--d360-text);
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial;
  background-color:#071a2b;
  background-image:linear-gradient(180deg,rgba(5,10,20,.30),rgba(5,10,20,.30)),url("../general/img/fondo.png");
  background-repeat:repeat;
  background-size:auto;
  background-attachment:fixed;
  display:grid;
  place-items:center;
}

body.central-login::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(5,10,20,.30),rgba(5,10,20,.30));
}

.auth { position:relative; z-index:1; width:min(92vw,360px); }
.panel {
  backdrop-filter:blur(6px);
  background:var(--surface);
  border:1px solid rgba(255,255,255,.06);
  box-shadow:var(--shadow);
  padding:14px 16px 16px;
}
.brand { display:flex; justify-content:center; margin:4px 0; }
.brand img { width:min(75%,260px); height:auto; display:block; }
.subtitle { text-align:center; color:var(--d360-muted); font-size:.95rem; margin:14px 0 18px; padding-top:10px; }
.subtitle::before { content:""; display:block; width:42px; height:1px; margin:0 auto 10px; background:rgba(183,194,216,.35); }
.login-kicker { color:#dce6fb; font-size:1rem; font-weight:700; text-align:center; margin:0 0 14px; }
.login-form { display:grid; gap:12px; }
.field { position:relative; }
.field input,
.login-form > label input {
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(8,12,22,.6);
  outline:none;
  padding:12px 44px;
  color:var(--d360-text);
  font:inherit;
  font-size:15.5px;
}
.login-form > label { display:grid; gap:6px; color:var(--d360-text); font-size:.92rem; font-weight:700; }
.field input::placeholder { color:#c9d3ea88; }
.field input:focus,
.login-form > label input:focus { border-color:rgba(103,232,249,.45); box-shadow:0 0 0 3px var(--ring); background:rgba(10,16,28,.7); }
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:autofill {
  -webkit-text-fill-color:var(--d360-text);
  caret-color:var(--d360-text);
  box-shadow:0 0 0 1000px rgba(8,12,22,.6) inset;
  border-color:rgba(255,255,255,.12);
  transition:background-color 9999s ease-in-out 0s;
}
.field input:-moz-autofill {
  box-shadow:0 0 0 1000px rgba(8,12,22,.6) inset;
  color:var(--d360-text);
}
.icon-left,.icon-right { position:absolute; top:50%; transform:translateY(-50%); width:20px; height:20px; opacity:.95; }
.icon-left { left:10px; }
.icon-right { right:8px; }
.toggle-visibility { position:absolute; right:4px; top:50%; transform:translateY(-50%); background:transparent; border:0; padding:6px; color:#dfe6f5; cursor:pointer; }
.toggle-visibility svg { display:block; width:20px; height:20px; }
.toggle-visibility .eye-closed { display:none; }
.toggle-visibility.is-visible .eye-open { display:none; }
.toggle-visibility.is-visible .eye-closed { display:block; }
.login-form button:not(.toggle-visibility) {
  width:100%;
  border:0;
  padding:12px 14px;
  font:inherit;
  font-size:15.5px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(180deg,var(--d360-primary),var(--d360-primary-600));
  box-shadow:0 6px 14px rgba(0,0,0,.20);
  cursor:pointer;
}
.links { margin-top:8px; text-align:center; }
.links a { color:var(--d360-muted); text-decoration:none; font-weight:600; }
.links a:hover { color:#d8e2f6; text-decoration:underline; }
.sysmsg,.message { margin:8px 0 10px; padding:10px 12px; font-size:.92rem; line-height:1.25; background:#123; color:#dfe6f5; }
.sysmsg.error,.message.error { background:#a00; color:#fee; }
.codes { white-space:pre-line; overflow-wrap:anywhere; background:rgba(8,12,22,.6); border:1px solid rgba(255,255,255,.12); padding:10px; color:var(--d360-text); }
.central-login p { color:var(--d360-muted); }
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.totp-form { justify-items:center; }
.totp-qr { display:grid; place-items:center; margin:12px 0; }
.totp-qr img { display:block; width:190px; height:190px; background:#fff; padding:8px; }
.totp-form > button:not(.totp-link) { justify-self:stretch; }
.totp-field { width:100%; text-align:center; }
.field input.totp-code { width:11.5ch !important; min-width:11.5ch; padding:12px 10px; text-align:center; font-size:1.18rem; font-variant-numeric:tabular-nums; letter-spacing:.32em; }
.field input.recovery-code { width:100%; padding:12px 14px; text-align:left; letter-spacing:.04em; }
.totp-option { margin:0; text-align:center; }
.login-form button.totp-link { width:auto; padding:2px 0; border:0; background:transparent; box-shadow:none; color:var(--d360-muted); font:inherit; font-size:.9rem; font-weight:600; cursor:pointer; }
.totp-link:hover,.totp-link:focus-visible { color:#d8e2f6; text-decoration:underline; }
.login-form .password-label { display:block; margin:0; color:var(--d360-muted); font-size:.88rem; font-weight:500; line-height:1.2; }
.login-form .password-field { margin-top:-5px; }
.login-form .password-field input { padding-right:44px; }
.password-help { display:block; margin-top:-4px; color:var(--d360-muted); font-size:.76rem; line-height:1.2; }
@media (max-width:650px) {
  body.central-login { background-attachment:scroll; }
  .auth { width:min(92vw,360px); }
}
