:root {
  --purple: #873E6C;
  --purple-dark: #6B2E55;
  --purple-darker: #4A1E3A;
  --purple-glow: rgba(135, 62, 108, 0.15);
}

input:focus {
  border: 1px solid var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
  outline: none;
}

:-webkit-input-placeholder {
  color: #94a3b8;
  font-style: italic;
}

:-moz-placeholder {
  color: #94a3b8;
  font-style: italic;
}

html {
  height: 100%;
  font-size: 100%;
  overflow-y: scroll;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  font-smoothing: antialiased;
  height: 100%;
  line-height: 1.5em;
  margin: 0;
  text-align: center;
  background: #f1f5f9;
}

#brickwall {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#background-compat {
  display: none;
}

#blur {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-filter: blur(7px);
  filter: blur(7px);
  overflow: hidden;
  z-index: -1;
}

body,
input {
  font-family: "Lato", helvetica, arial, sans-serif;
  color: #1e293b;
}

#loginBox {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  isolation: isolate;
  width: 400px;
  padding: 2.5em 2em;
  text-align: center;
  box-sizing: border-box;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
}

#loginBox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#loginBox::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  z-index: -2;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3));
  pointer-events: none;
}

h1 {
  margin: 0;
}

#logo a {
  display: block;
  text-decoration: none;
  height: 80px;
}

#logo a img {
  max-height: 60px;
  max-width: 260px;
  height: auto;
  width: auto;
  vertical-align: middle;
  outline: none;
  border: none;
}

.valign-helper {
  height: 100%;
  display: inline-block;
  vertical-align: middle;
}

h3 {
  margin: 1em 0;
  text-align: center;
  font-size: 0.8em;
  font-weight: 400;
}

form {
  width: 240px;
  margin: 0 auto;
}

fieldset {
  border: none;
  margin: 0.25em;
  padding: 0;
}

fieldset input {
  display: block;
  margin-bottom: 1em;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 10px 12px;
  width: 100%;
  border-radius: 8px;
  font-size: 0.9em;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

fieldset input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
  outline: none;
}

fieldset button[type="submit"] {
  width: 100%;
  margin-top: 8px;
}

#reset-link {
  display: block;
  font-size: 0.85em;
  color: var(--purple);
  text-decoration: none;
  margin-top: 4px;
}

#reset-link:hover {
  text-decoration: underline;
}

hr {
  margin: 20px;
  border: none;
  height: 0;
  border-bottom: 1px solid #e2e8f0;
}

div.banner {
  color: #64748b;
  line-height: 1.2em;
}

div.banner:not(:empty) {
  margin-bottom: 1em;
}

* {
  box-sizing: border-box;
}

input[type="submit"],
input[type="reset"],
input[type="button"],
.action-button,
.button {
  cursor: pointer;
  display: inline-block;
  vertical-align: bottom;
  height: 38px;
  line-height: 38px;
  border: none;
  padding: 0 20px;
  color: #fff;
  background: var(--purple);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  user-select: none;
  transition: all 0.15s ease;
}

input[type="submit"] i,
input[type="reset"] i,
input[type="button"] i,
.action-button i,
.button i {
  margin-right: 0.3em;
}

.button:hover {
  text-decoration: none;
}

button[type=submit],
input[type="submit"],
.primary.button {
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-light, #A55A84));
  box-shadow: 0 4px 12px var(--purple-glow);
}

button[type=submit]:hover,
input[type=submit]:hover,
input[type=submit]:active {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  box-shadow: 0 6px 16px var(--purple-glow);
  color: #fff;
  transform: translateY(-1px);
}

input.submit:hover,
input.submit:active {
  background-position: bottom left;
}

#poweredBy {
  display: none;
}

#poweredBy a {
  color: inherit;
}

#poweredBy .osticket-logo {
  height: auto;
  width: 55px;
  vertical-align: baseline;
  border: none;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

#company {
  position: absolute;
  left: 50%;
  width: 400px;
  margin-left: -200px;
  bottom: -40px;
  font-size: 0.8em;
  color: #cbd5e1;
  text-align: center;
}

#company .content {
  border-radius: 8px;
  backdrop-filter: blur(4px);
  display: inline-block;
  padding: 0 15px;
  color: #4b4b4b;
}

.external-auth {
  display: inline-block;
  margin-bottom: 4px;
}

.external-auth+.external-auth {
  margin-top: 4px;
}

a.external-sign-in {
  text-decoration: none;
}

.external-auth-box {
  vertical-align: middle;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.external-auth-icon {
  display: inline-block;
  color: #475569;
  width: 30px;
  padding: 5px 10px;
  border-right: 1px solid #e2e8f0;
}

.external-auth-name {
  color: #475569;
  width: 100px;
  padding: 5px 10px;
  line-height: 30px;
  font-size: 11pt;
}

img.sign-in-image {
  border: none;
  max-height: 40px;
  max-width: 200px;
  width: auto;
  height: auto;
}

input[type=text],
input[type=password] {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9em;
}

@keyframes shake {
  0%, 100% { transform: translate(-50%, -50%) translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translate(-50%, -50%) translateX(5px); }
}

#loginBox.shake {
  animation: shake 0.5s ease-in-out;
}

@media (max-width: 480px) {
  #loginBox {
    width: 92%;
    padding: 2em 1.5em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    border-radius: 12px;
  }

  #loginBox::before {
    border-radius: 12px;
  }

  #loginBox::after {
    border-radius: 13px;
  }

  form {
    width: 100%;
  }

  #company {
    width: 90%;
    left: 5%;
    margin: 0;
    bottom: -30px;
  }
}