:root {
  --login-primary: #2456a6;
  --login-primary-dark: #0f233d;
  --login-accent: #2da8df;
  --login-page: #eef4fb;
  --login-surface: #ffffff;
  --login-border: #d8e2ef;
  --login-text: #14243b;
  --login-muted: #62718a;
  --login-danger: #b91c1c;
  --login-radius: 8px;
  --login-shadow: 0 24px 70px rgba(15, 35, 61, 0.2);
  --login-font: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

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

body#loginBody {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
  color: var(--login-text);
  background: linear-gradient(135deg, #f7fbff 0%, var(--login-page) 58%, #e3eef9 100%);
  font-family: var(--login-font);
  line-height: 1.5;
  text-align: left;
}

#brickwall {
  position: fixed;
  inset: 0;
  background: transparent;
  overflow: hidden;
}

#brickwall::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 70vw);
  height: min(720px, 70vw);
  background: radial-gradient(circle, rgba(45, 168, 223, 0.14) 0%, rgba(45, 168, 223, 0.08) 38%, rgba(45, 168, 223, 0) 70%);
  transform: translate(-50%, -50%);
  content: "";
}

#loginBox {
  position: relative;
  left: auto;
  top: auto;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  margin: 0;
  padding: 34px 38px 24px;
  color: var(--login-text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 226, 239, 0.95);
  border-radius: var(--login-radius);
  box-shadow: var(--login-shadow);
  text-align: center;
  backdrop-filter: blur(14px);
}

#loginBox::after,
#blur,
#background {
  display: none !important;
}

#logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 82px;
  margin: 0 auto 10px;
}

#logo a img {
  max-width: 270px;
  max-height: 76px;
}

#login-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 6px 12px;
  color: var(--login-danger);
  background: #fff5f5;
  border: 1px solid #f5c2c7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.banner:not(:empty) {
  margin: 0 0 18px;
  color: var(--login-muted);
  font-size: 13px;
  text-align: center;
}

form#login {
  width: 100%;
  margin: 0;
}

form#login fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  color: var(--login-text);
  background: #fff;
  border: 1px solid #b9c7d9;
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #7b8798;
  font-style: normal;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px rgba(45, 168, 223, 0.18);
  outline: 0;
}

form#login .submit.button,
form#login button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: stretch;
  width: 100%;
  min-height: 44px;
  margin: 2px 0 0;
  padding: 10px 16px;
  color: #fff;
  background: var(--login-primary);
  border: 1px solid var(--login-primary);
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(36, 86, 166, 0.22);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

form#login .submit.button:hover,
form#login button[type="submit"]:hover,
form#login .submit.button:focus,
form#login button[type="submit"]:focus {
  color: #fff;
  background: var(--login-primary-dark);
  border-color: var(--login-primary-dark);
  box-shadow: 0 12px 28px rgba(15, 35, 61, 0.24);
}

form#login .submit.button[disabled],
form#login button[type="submit"][disabled] {
  cursor: progress;
  opacity: 0.7;
}

#reset-link {
  display: inline-flex;
  margin: 2px 0 0;
  color: var(--login-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

#reset-link:hover,
#reset-link:focus {
  color: var(--login-primary-dark);
  text-decoration: underline;
}

#loading.dialog {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--login-radius);
}

#loading.dialog h1 {
  color: var(--login-primary-dark);
  font-size: 18px;
}

#company {
  position: static;
  width: auto;
  margin: 22px 0 0;
  color: var(--login-muted);
  font-size: 12px;
  text-align: center;
}

#company .content {
  display: inline-flex;
  padding: 0;
  color: var(--login-muted);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
}

#poweredBy {
  display: none !important;
}

#poweredBy .osticket-logo {
  width: 48px;
  filter: none;
}

.external-auth {
  width: 100%;
}

.external-auth-box {
  width: 100%;
  border-color: var(--login-border);
}

@media screen and (max-width: 760px) {
  body#loginBody {
    align-items: flex-start;
    padding: 24px 16px;
  }

  #brickwall::before {
    width: 420px;
    height: 420px;
  }

  #loginBox {
    width: 100%;
    margin-top: 56px;
    padding: 28px 22px 22px;
  }

}
