body {
  margin: 0;
  padding: 0;
  background: url("../img/background.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Avenir, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.custom-login-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: row;
  gap: 0;
  margin-bottom: 50px;
  transition: all 0.4s ease;
  flex-wrap: wrap;
}


.custom-form {
  margin-top: 2em;
}

.custom-login-body {
  @media all and (max-width: 480px) {
    justify-content: flex-start;
    align-items: flex-start;
  }
}
.container {
  position: relative;
}

.shadow-card {
  position: absolute;
  top: 20px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.6);
  width: 100%;
  max-width: 400px;
  height: 100%;
  border-radius: 8px;
  z-index: 0;
}

.custom-login-card {
  position: relative;
  background-color: rgba(255, 255, 255);
  border-radius: 4px;
  padding: 15px 30px;
  margin: auto;
  width: 100%;
  max-width: 500px;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
  @media all and (max-width: 480px) {
    min-width: 80vw;
  }
  min-width: 380px;
}

.custom-logo {
  display: block;
  margin: 0 auto 20px auto;
}

.custom-login-title {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-align: center;
}

.custom-login-description {
  font-size: 13px;
  text-align: center;
}

.field {
  display: flex;
  flex-flow: column-reverse;
  position: relative;
  margin-bottom: 10px;
}

.field input {
  font-size: 16px;
  border: none;
  border-bottom: 2px solid #ccc;
  background: transparent;
  color: #333;
  padding: 0.3rem 0;
  font-family: inherit;
  transition: all 0.2s;
}

.field input:focus {
  border-color: rgb(31, 158, 196);
  outline: none;
}

.field label {
  font-size: 13px;
  color: #999;
  transition: all 0.2s;
  transform-origin: left bottom;
  transform: translate(0, 2.1rem) scale(1.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

input:placeholder-shown + label {
  cursor: text;
}

input:focus + label,
input:not(:placeholder-shown) + label {
  transform: translate(0, 0) scale(1);
  color: rgb(31, 158, 196);
}

input::placeholder {
  opacity: 0;
  transition: opacity 0.2s;
}

input:focus::placeholder {
  opacity: 1;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background-color: rgb(31, 158, 196);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #008cba;
}

.btn-primary[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary[disabled]::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}

.forgot-password {
  margin-top: 30px;
  font-size: 0.9rem;
}

.signup-link {
  font-size: 0.9rem;
  position: absolute;
  bottom: 0;
  text-align: right;
  width: 100%;
  box-sizing: border-box;
  padding: 0 2.5rem;
}

.signup-link a,
.forgot-password a {
  color: rgb(31, 158, 196);
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover,
.forgot-password a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.custom-signup-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #e5e5e5;
  border-radius: 4px;
  top: 0;
  right: 0;
  font-size: .9rem;
  animation: revealItem .5s ease-in both;
  transform: translate(36px, 50.4px);
  transition: transform 0.4s ease, top 0.4s ease;
}

.kc-feedback-text {
  margin-bottom: 1rem;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
}

.kc-feedback-text.error,
.kc-feedback-text.error * {
  margin-top: 30px;
  background-color: #ffe6e6;
  color: #c00;
  border: 1px solid #c00;
}
.kc-feedback-text.info,
.kc-feedback-text.info * {
  margin-top: 30px;
  background-color: #fdf2e5;
  color: #ec7a08;
  border: 1px solid #ec7a08;
}
.kc-feedback-text.warning,
.kc-feedback-text.warning * {
  margin-top: 30px;
  background-color: #fff8e5;
  color: #d9822b;
  border: 1px solid #d9822b;
}
.kc-feedback-text.success,
.kc-feedback-text.success * {
  margin-top: 30px;
  background-color: #e6ffed;
  color: #107c10;
  border: 1px solid #107c10;
}

#kc-totp-secret-qr-code {
  width: 150px;
  height: 150px;
  margin: auto;
  display: block;
}
.back-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgb(31, 158, 196);
  text-decoration: none;
  padding: 10px 0;
  border-radius: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.back-link:hover {
  text-decoration: underline;
}

.back-link:visited {
  color: rgb(31, 158, 196);
}

.back-link:focus {
  outline: none;
}

.back-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 158, 196, 0.3);
  text-decoration: underline;
}

body.kc-otp-setup {
  overflow-y: auto;
  min-height: 100vh;
}

@media (max-width: 600px) {
  .custom-login-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .custom-signup-card {
    transform: translate(0px, 50.4px);
  }

  .custom-login-card {
    width: 300px !important;
  }
  
  body.kc-otp-setup .custom-login-card {
    max-width: 300px;
  }
}
