/*
 * WAiSER authentication theme
 * Jointly branded for KDTLab and EINS S&C.
 */

:root {
  --waiser-navy: #08172c;
  --waiser-blue: #075c9f;
  --waiser-blue-bright: #0877c9;
  --waiser-orange: #f6a21a;
  --waiser-ink: #172033;
  --waiser-muted: #667085;
  --waiser-line: #dce3ec;
  --waiser-surface: #ffffff;
  --waiser-danger: #c92a2a;
  --waiser-radius: 20px;
}

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

.login-pf body,
body.login-pf {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--waiser-ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(8, 119, 201, 0.34), transparent 30%),
    radial-gradient(circle at 82% 84%, rgba(246, 162, 26, 0.16), transparent 26%),
    linear-gradient(135deg, #061326 0%, #0a2545 52%, #0a3156 100%);
  font-family: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

.login-pf body::before,
body.login-pf::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 72%);
}

.login-pf-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 16px;
}

#kc-header {
  position: relative;
  inset: auto;
  z-index: 2;
  width: auto;
  padding: 8px 14px;
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(0, 8, 24, 0.2);
  transform: none;
}

#kc-header-wrapper {
  width: 310px;
  height: 58px;
  padding: 0;
  font-size: 0;
  background-image:
    url("../img/kdtlab_logo.png"),
    url("../img/einssnc_logo.png");
  background-repeat: no-repeat;
  background-position: left center, right center;
  background-size: 154px auto, 132px auto;
  filter: drop-shadow(0 5px 18px rgba(0, 0, 0, 0.1));
}

.card-pf,
.login-pf-page .card-pf {
  width: 440px;
  max-width: 100%;
  margin: 0 auto;
  padding: 44px 46px 40px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--waiser-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(0, 9, 25, 0.36);
}

#kc-content,
#kc-content-wrapper {
  width: 100%;
}

#kc-page-title {
  margin: 0 0 8px;
  color: var(--waiser-ink);
  font-size: 30px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.04em;
  text-align: left;
}

.waiser-login-intro {
  margin: 9px 0 0;
  color: var(--waiser-muted);
  font-size: 14px;
  line-height: 1.5;
}

.waiser-login-unavailable {
  margin: 24px 0 0;
  color: var(--waiser-danger);
  font-size: 14px;
}

#kc-form {
  margin-top: 28px;
}

.form-group {
  margin-bottom: 19px;
}

.control-label {
  margin-bottom: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.form-control,
.pf-c-form-control,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--waiser-ink);
  border: 1px solid var(--waiser-line);
  border-radius: 10px;
  background: #fbfcfe;
  box-shadow: none;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control:focus,
.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--waiser-blue-bright);
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 119, 201, 0.13);
}

.pf-c-input-group {
  display: flex;
}

.pf-c-input-group .pf-c-form-control {
  border-radius: 10px 0 0 10px;
}

.pf-c-input-group .pf-c-button {
  min-width: 48px;
  border: 1px solid var(--waiser-line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #fbfcfe;
}

.btn-primary,
.pf-c-button.pf-m-primary,
#kc-login,
input[type="submit"] {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--waiser-blue) 0%, var(--waiser-blue-bright) 100%);
  box-shadow: 0 10px 22px rgba(7, 92, 159, 0.24);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.pf-c-button.pf-m-primary:hover,
#kc-login:hover,
input[type="submit"]:hover {
  color: #fff;
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(7, 92, 159, 0.3);
}

a {
  color: var(--waiser-blue);
  font-weight: 600;
}

a:hover,
a:focus {
  color: var(--waiser-blue-bright);
  text-decoration: none;
}

#kc-form-options,
#kc-registration,
#kc-info-wrapper {
  color: var(--waiser-muted);
  font-size: 13px;
}

#kc-registration {
  margin-top: 26px;
  text-align: center;
}

#kc-info,
#kc-info-wrapper {
  margin: 0;
  padding: 0;
  background: transparent;
}

.checkbox label {
  color: var(--waiser-muted);
  font-size: 13px;
}

.alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
}

.alert-error,
.pf-m-danger {
  color: #8a1c1c;
  background: #fff0f0;
}

.alert-success,
.pf-m-success {
  color: #17653a;
  background: #edf9f1;
}

.kc-social-section hr,
hr {
  border-color: #edf0f5;
}

#kc-social-providers li {
  margin-bottom: 10px;
}

#kc-social-providers .btn,
#kc-social-providers .pf-c-button,
#kc-social-providers .zocial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-color: var(--waiser-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(19, 38, 68, 0.09);
  color: #25324a;
  font-size: 15px;
  font-weight: 700;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#kc-social-providers .btn:hover,
#kc-social-providers .pf-c-button:hover,
#kc-social-providers .zocial:hover {
  border-color: #9fb7cf;
  background: #fff;
  box-shadow: 0 11px 26px rgba(19, 38, 68, 0.14);
  color: var(--waiser-blue);
  transform: translateY(-1px);
}

#kc-social-providers .fa-google {
  margin-right: 10px;
  color: #4285f4;
  font-size: 18px;
}

/* The template emits no local credential form; styling is only presentation. */
#kc-social-providers {
  margin-top: 30px;
}

#kc-social-providers ul {
  display: block;
  margin: 0;
  padding: 0;
}

#kc-social-providers li {
  width: 100%;
  margin: 0;
}

/* Registration forms are longer, so allow the card to breathe vertically. */
body:has(#kc-register-form) .login-pf-page {
  justify-content: flex-start;
}

body:has(#kc-register-form) .card-pf {
  margin-top: 32px;
  margin-bottom: 32px;
}

#kc-register-form .col-sm-12,
#kc-register-form .col-md-12 {
  padding-right: 0;
  padding-left: 0;
}

@media (max-width: 1040px) {
  .login-pf-page {
    padding: 32px 16px;
  }

  .card-pf,
  .login-pf-page .card-pf {
    width: min(440px, 100%);
  }
}

@media (max-width: 520px) {
  .login-pf body,
  body.login-pf {
    background: #f4f7fb;
  }

  .login-pf body::before,
  body.login-pf::before {
    display: none;
  }

  .login-pf-page {
    padding: 24px 16px;
  }

  #kc-header-wrapper {
    width: 270px;
    height: 50px;
    background-size: 135px auto, 114px auto;
  }

  .card-pf,
  .login-pf-page .card-pf {
    padding: 32px 24px 28px;
    border-color: #e5eaf1;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(20, 35, 55, 0.1);
  }

  #kc-page-title {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
