/* Urbizi — login del panel de agentes (y restablecer contraseña). Se carga después de login.css. */
:root {
  --urb-blue: #003585; --urb-blue-700: #002a6b; --urb-green: #7baf1e;
  --urb-ink: #18202e; --urb-ink-2: #3d4757; --urb-muted: #667085;
  --urb-line: #dfe3ea; --urb-bg: #f4f6f9;
  --urb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body#loginBody { background: var(--urb-bg); }
body#loginBody {
  font-family: var(--urb-font); color: var(--urb-ink); font-size: 15px; line-height: 1.5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 32px 16px; text-align: left;
  border-top: 3px solid var(--urb-blue);
}
/* fuera el fondo fotográfico, el desenfoque y el velo de #loginBox:after */
#brickwall, #blur, #background, #background-compat { display: none !important; }
#loginBox::after, #loginBox:after { display: none !important; content: none !important; }
#loginBox form { width: auto; margin: 0; }
#loginBox fieldset { margin: 0; }
#loginBox fieldset input { margin-bottom: 0; }
#loginBox h3 { margin: 0; }

#loginBox {
  position: static; width: 100%; max-width: 400px; margin: 0; padding: 32px;
  background: #fff; border: 1px solid var(--urb-line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  text-align: left; top: auto; left: auto; transform: none;
}
#loginBox h1#logo { margin: 0 0 24px; padding: 0; height: auto; text-align: left; }
#loginBox h1#logo a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--urb-ink); }
#loginBox h1#logo .valign-helper { display: none; }
#loginBox h1#logo img.urb-login-mark { width: 44px; height: 44px; max-height: none; max-width: none; display: block; }
.urb-login-brand { display: flex; flex-direction: column; line-height: 1.2; }
.urb-login-brand strong { font-size: 18px; font-weight: 650; color: var(--urb-ink); }
.urb-login-brand span { font-size: 13.5px; font-weight: 400; color: var(--urb-muted); margin-top: 2px; }

#login-message, #loginBox h3#login-message {
  margin: 0 0 16px; padding: 0; font-size: 14px; font-weight: 500; color: #b42318; text-align: left;
}
#login-message:empty { display: none; }
#loginBox .banner { margin: 0 0 16px; color: var(--urb-muted); text-align: left; }
#loginBox .banner:empty, #loginBox .banner small:empty { display: none; }

#loginBox form, #loginBox fieldset { margin: 0; padding: 0; border: 0; }
#loginBox fieldset { display: flex; flex-direction: column; gap: 12px; }
#loginBox input[type="text"], #loginBox input[type="password"], #loginBox input[type="email"] {
  display: block; width: 100%; margin: 0; min-height: 44px; padding: 10px 12px;
  font: 400 15px/1.4 var(--urb-font); color: var(--urb-ink); font-style: normal;
  background: #fff; border: 1px solid #c9cfd9; border-radius: 6px; box-shadow: none;
}
#loginBox input:focus { border-color: var(--urb-blue); box-shadow: 0 0 0 3px rgba(0, 53, 133, .12); outline: none; }
#loginBox ::placeholder { color: #8a93a3; font-style: normal; }

#loginBox fieldset h3 { order: 2; display: block !important; margin: 0; font-size: 14px; font-weight: 400; text-align: left; }
#loginBox fieldset h3 a { color: var(--urb-blue); text-decoration: none; }
#loginBox fieldset h3 a:hover { text-decoration: underline; }
#loginBox fieldset h3 a.hidden { display: none; }

#loginBox button.submit, #loginBox .button, #loginBox input[type="submit"] {
  order: 1; float: none; width: 100%; min-height: 44px; margin: 4px 0 0; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--urb-font); color: #fff; text-shadow: none;
  background: var(--urb-blue); background-image: none; border: 1px solid var(--urb-blue); border-radius: 6px;
  box-shadow: none; cursor: pointer;
}
#loginBox button.submit:hover, #loginBox .button:hover, #loginBox input[type="submit"]:hover { background: var(--urb-blue-700); border-color: var(--urb-blue-700); }

#loginBox .or hr { border: 0; border-top: 1px solid var(--urb-line); margin: 20px 0; }
#loginBox .external-auth { text-align: center; }
#loginBox .external-auth + br { display: none; }

#loginBox #company {
  position: static; width: auto; left: auto; bottom: auto; margin: 24px 0 0; padding: 16px 0 0;
  border-top: 1px solid var(--urb-line); background: none; box-shadow: none; text-align: left;
}
#loginBox #company .content {
  display: block; color: var(--urb-muted); font-size: 12.5px; text-shadow: none;
  background: none; padding: 0; border: 0; border-radius: 0; box-shadow: none;
}
#loginBox .or { width: auto; }

#poweredBy {
  position: static; margin: 20px 0 0; padding: 0; background: none; border: 0; box-shadow: none;
  color: var(--urb-muted); font-size: 12px; text-shadow: none; display: flex; align-items: center; gap: 6px;
}
#poweredBy img.osticket-logo { height: 16px; opacity: .55; filter: grayscale(1); }

#loading.dialog { border-radius: 8px; }

@media (max-width: 480px) {
  body#loginBody { justify-content: flex-start; padding-top: 24px; }
  #loginBox { padding: 24px 20px; }
}

/* v2: fondo azul de marca */
html, body#loginBody { background: var(--urb-blue); }
body#loginBody { border-top: 0; background: var(--urb-blue) linear-gradient(180deg, var(--urb-blue) 0%, #002b6e 100%); }
#loginBox { border: 0; box-shadow: 0 24px 48px rgba(0, 18, 51, .35); }
#loginBox h1#logo img.urb-login-mark { background: #fff; }
#poweredBy { color: rgba(255, 255, 255, .6); }
#poweredBy img.osticket-logo { filter: grayscale(1) brightness(3); opacity: .6; }

/* Inicio de sesión con Microsoft 365 arriba; el usuario local queda como alternativa */
#loginBox { display: flex; flex-direction: column; }
#loginBox h1#logo { order: 0; } #loginBox #login-message { order: 1; } #loginBox .banner { order: 2; }
#loginBox .external-auth { order: 3; } #loginBox .or { order: 4; } #loginBox #loading { order: 5; }
#loginBox form#login { order: 6; } #loginBox #company { order: 7; }
#loginBox > br { display: none; }
#loginBox .or { position: relative; text-align: center; margin: 18px 0; width: auto; }
#loginBox .or hr { position: absolute; left: 0; right: 0; top: 50%; margin: 0; border: 0; border-top: 1px solid var(--urb-line); }
#loginBox .or::before { content: "o con usuario local"; position: relative; z-index: 1; padding: 0 12px; background: #fff; color: var(--urb-muted); font-size: 13px; }
#loginBox .external-auth { margin: 0; }
#loginBox .external-auth a.external-sign-in { display: block; text-decoration: none !important; }
#loginBox .external-auth .external-auth-box {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 44px; padding: 0 16px; width: 100%;
  background: #fff; border: 1px solid #8c8c8c; border-radius: 6px; box-shadow: none;
  color: #1f1f1f; font: 600 15px/1 var(--urb-font); cursor: pointer;
}
#loginBox .external-auth a:hover .external-auth-box { background: #f3f3f3; }
#loginBox .external-auth .external-auth-icon { width: 20px; height: 20px; flex: 0 0 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Crect x='1' y='1' width='9' height='9' fill='%23f25022'/%3E%3Crect x='11' y='1' width='9' height='9' fill='%237fba00'/%3E%3Crect x='1' y='11' width='9' height='9' fill='%2300a4ef'/%3E%3Crect x='11' y='11' width='9' height='9' fill='%23ffb900'/%3E%3C/svg%3E") no-repeat center / 20px 20px; border: 0; padding: 0; margin: 0; }
#loginBox .external-auth .external-auth-icon i { display: none; }
/* la traducción dice "Registrarse con": se reemplaza por el texto correcto */
#loginBox .external-auth .external-auth-name { font-size: 0; padding: 0; margin: 0; border: 0; }
#loginBox .external-auth .external-auth-name::after { content: "Iniciar sesión con Microsoft"; font-size: 15px; }
#loginBox .external-auth .external-auth-name { display: inline-block; width: auto; max-width: none; white-space: nowrap; line-height: 1; vertical-align: middle; }
#loginBox .external-auth .external-auth-name::after { white-space: nowrap; }
#loginBox .external-auth .external-auth-box { line-height: 1; white-space: nowrap; }

/* Solo Microsoft 365: sin formulario local (respaldo en login.php?local=1) */
#loginBox form#login.urb-sso-only { display: none; }
.urb-login-hint { order: 2; margin: 0 0 18px; color: var(--urb-muted); font-size: 14.5px; text-align: left; }
#loginBox .external-auth .external-auth-box { min-height: 46px; }
