:root {
  --brand-bg-from: #020f26;
  --brand-bg-mid: #0a2450;
  --brand-bg-to: #142654;
  --brand-surface: #0f2147;
  --brand-text: #edf4ff;
  --brand-muted: #9ab4da;
  --brand-accent: #47c3c5;
  --brand-accent-strong: #709feb;
  --brand-border: #2b4374;
  --brand-focus: #60f3f6;
  --brand-panel-text: #17345d;
  --brand-panel-muted: #5f79a2;
  --brand-panel-border: rgba(112, 159, 235, 0.24);
  --brand-panel-bg: rgba(255, 255, 255, 0.92);
  --brand-panel-shadow: 0 24px 60px rgba(17, 45, 86, 0.16);
  --font-body: "Roboto Flex", "Segoe UI", sans-serif;
  --font-heading: "Urbanist", "Avenir Next", "Segoe UI", sans-serif;
}

html,
body,
body.login-pf,
.login-pf-page {
  min-height: 100vh;
  background: #ffffff !important;
  background-image: none !important;
}

body.login-pf,
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--brand-panel-text);
  background: #ffffff;
}

a,
#kc-form-options a,
#kc-registration a,
#kc-info a,
#try-another-way,
#switch-organization {
  color: var(--brand-accent);
  text-decoration: none;
}

a:hover,
#kc-form-options a:hover,
#kc-registration a:hover,
#kc-info a:hover,
#try-another-way:hover,
#switch-organization:hover {
  color: #2b95ae;
  text-decoration: underline;
}

.login-pf-page.dpt-login-shell {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.dpt-login-stage {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(360px, 460px);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  justify-content: flex-start;
}

.dpt-login-hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 40px 34px;
  border-radius: 0 32px 32px 0;
  color: var(--brand-text);
  background: linear-gradient(135deg, var(--brand-bg-from), var(--brand-bg-mid) 58%, var(--brand-bg-to));
  box-shadow: 0 28px 64px rgba(2, 15, 38, 0.28);
}

.dpt-login-hero::before,
.dpt-login-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.dpt-login-hero::before {
  top: -140px;
  right: -70px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(96, 243, 246, 0.24), transparent 66%);
}

.dpt-login-hero::after {
  bottom: -160px;
  left: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(112, 159, 235, 0.26), transparent 64%);
}

.dpt-login-hero-top,
.dpt-login-hero-card {
  position: relative;
  z-index: 1;
}

.dpt-login-hero-top {
  display: grid;
  gap: 22px;
}

.dpt-login-brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.36), transparent 22%),
    linear-gradient(145deg, rgba(71, 195, 197, 0.95), rgba(112, 159, 235, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 30px rgba(0, 0, 0, 0.18);
}

.dpt-login-brand-strip {
  border-radius: 28px;
  padding: 30px 32px;
  background: linear-gradient(135deg, rgba(2, 15, 38, 0.82), rgba(20, 38, 84, 0.94));
  border: 1px solid rgba(71, 195, 197, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dpt-login-kicker,
.dpt-login-panel-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dpt-login-kicker {
  color: rgba(216, 230, 255, 0.86);
}

.dpt-login-wordmark {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 900;
  line-height: 0.96;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.24);
}

.dpt-login-tagline {
  margin: 16px 0 0;
  color: var(--brand-focus);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.dpt-login-brand-support {
  margin: 18px 0 0;
  color: rgba(216, 230, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.5;
}

.dpt-login-brand-support a {
  color: var(--brand-focus);
  font-weight: 700;
}

.dpt-login-hero-card {
  border-radius: 24px;
  padding: 24px 26px;
  background: rgba(11, 27, 63, 0.66);
  border: 1px solid rgba(112, 159, 235, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(4, 11, 24, 0.24);
}

.dpt-login-hero-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
}

.dpt-login-hero-copy {
  margin: 0;
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(237, 244, 255, 0.88);
}

.dpt-login-chip-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dpt-login-chip {
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 243, 246, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #dff9fb;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dpt-login-support {
  margin: 18px 0 0;
  color: rgba(216, 230, 255, 0.82);
  font-size: 0.88rem;
}

.dpt-login-support a {
  color: var(--brand-focus);
  font-weight: 700;
}

.dpt-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 24px;
}

.dpt-login-card.card-pf {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--brand-panel-border);
  border-radius: 32px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 52px rgba(17, 45, 86, 0.12);
}

.dpt-login-card-header {
  padding: 26px 30px 18px;
  border-bottom: 1px solid rgba(112, 159, 235, 0.18);
  background: #ffffff;
}

.dpt-login-panel-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

#kc-current-locale-link {
  border-radius: 999px;
  border: 1px solid rgba(112, 159, 235, 0.22);
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: #27477d;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

#kc-current-locale-link:hover,
#kc-current-locale-link[aria-expanded="true"] {
  border-color: rgba(71, 195, 197, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(18, 49, 94, 0.1);
}

#language-switch1 {
  margin-top: 8px;
  border: 1px solid rgba(112, 159, 235, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(18, 49, 94, 0.12);
}

.dpt-login-panel-kicker {
  margin: 0;
  color: var(--brand-panel-muted);
}

#kc-page-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.08;
  color: #020f26;
  text-align: center;
}

.subtitle,
#kc-page-title + .subtitle {
  color: var(--brand-panel-muted);
}

#kc-content {
  flex: 0 0 auto;
}

#kc-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 30px 32px;
  color: var(--brand-panel-text);
}

#kc-form,
#kc-form-wrapper,
#kc-form-login {
  display: grid;
  gap: 18px;
}

#kc-form,
#kc-social-providers,
#kc-info,
#kc-select-try-another-way-form,
#kc-switch-organization-form {
  width: min(100%, 360px);
  margin-left: auto;
  margin-right: auto;
}

.form-group,
#kc-form-buttons,
#kc-form-options {
  width: 100%;
}

.form-group {
  margin-bottom: 0;
}

.pf-c-form__label,
.pf-c-form__label-text,
label {
  display: inline-block;
  margin-bottom: 8px;
  color: #1b3258;
  font-size: 0.86rem;
  font-weight: 700;
}

.pf-c-form-control,
input[type="text"],
input[type="password"],
input[type="email"] {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(112, 159, 235, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-panel-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pf-c-form-control:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover {
  border-color: rgba(71, 195, 197, 0.42);
}

.pf-c-form-control:focus,
input:focus {
  border-color: var(--brand-accent-strong);
  box-shadow: 0 0 0 4px rgba(112, 159, 235, 0.18);
  outline: 0;
}

.pf-c-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.pf-c-input-group .pf-c-form-control {
  flex: 1;
}

.pf-c-button.pf-m-control,
button[data-password-toggle] {
  border: 1px solid rgba(112, 159, 235, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: #27477d;
  min-width: 48px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.pf-c-button.pf-m-control:hover,
button[data-password-toggle]:hover {
  border-color: rgba(112, 159, 235, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(25, 81, 153, 0.12);
}

#kc-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.checkbox label,
.pf-c-check__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #294772;
  font-size: 0.84rem;
  font-weight: 600;
}

input[type="checkbox"] {
  accent-color: var(--brand-accent-strong);
}

.login-pf-settings {
  display: grid;
  gap: 10px;
}

#kc-form-buttons {
  margin-top: 4px;
}

.pf-c-button.pf-m-primary,
.btn-primary,
#kc-login {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(125deg, var(--brand-accent), var(--brand-accent-strong));
  color: #06213f;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(30, 94, 171, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.pf-c-button.pf-m-primary:hover,
.btn-primary:hover,
#kc-login:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(25, 81, 153, 0.3);
}

.pf-c-button.pf-m-primary:focus,
.btn-primary:focus,
#kc-login:focus {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(96, 243, 246, 0.2), 0 16px 28px rgba(25, 81, 153, 0.3);
}

#input-error,
.pf-c-form__helper-text,
.pf-c-form__helper-text-before,
.pf-c-form__helper-text-after,
.pf-c-helper-text__item-text,
.instruction {
  color: var(--brand-panel-muted);
}

.required {
  color: #ca596c;
}

.alert-error,
.pf-c-alert.pf-m-danger,
.pf-c-alert {
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid rgba(202, 89, 108, 0.22);
  background: rgba(255, 235, 239, 0.9);
  color: #7a2436;
  box-shadow: none;
}

.alert-success,
.pf-c-alert.pf-m-success {
  border-color: rgba(56, 161, 105, 0.22);
  background: rgba(232, 247, 238, 0.92);
  color: #165c37;
}

.alert-warning,
.pf-c-alert.pf-m-warning {
  border-color: rgba(192, 134, 34, 0.22);
  background: rgba(255, 244, 219, 0.94);
  color: #84530f;
}

.alert-info,
.pf-c-alert.pf-m-info {
  border-color: rgba(57, 120, 194, 0.2);
  background: rgba(234, 243, 255, 0.92);
  color: #234e87;
}

.pf-c-alert__title,
.kc-feedback-text {
  color: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}

#kc-info {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(112, 159, 235, 0.16);
}

#kc-info-wrapper,
#kc-registration-container,
#kc-registration {
  color: var(--brand-panel-muted);
  font-size: 0.86rem;
}

#kc-social-providers {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(112, 159, 235, 0.16);
}

#kc-social-providers h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #18345e;
}

#kc-social-providers hr {
  display: none;
}

.kc-social-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kc-social-item {
  border-radius: 16px;
  border: 1px solid rgba(112, 159, 235, 0.2);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #17345d;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(18, 49, 94, 0.06);
}

.kc-social-item:hover {
  text-decoration: none;
  border-color: rgba(71, 195, 197, 0.42);
  box-shadow: 0 14px 26px rgba(18, 49, 94, 0.1);
}

.kc-social-provider-logo {
  color: var(--brand-accent-strong);
}

.dpt-login-username {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
  padding: 8px 10px;
  border: 1px solid rgba(112, 159, 235, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
}

#kc-attempted-username {
  margin: 0;
  color: #17345d;
  font-size: 0.88rem;
  font-weight: 700;
}

#reset-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(112, 159, 235, 0.22);
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: #294772;
}

#reset-login:hover {
  text-decoration: none;
  border-color: rgba(71, 195, 197, 0.42);
  box-shadow: 0 10px 20px rgba(18, 49, 94, 0.1);
}

.kc-login-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kc-tooltip-text {
  display: none;
}

.dpt-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 30px 24px;
  border-top: 1px solid rgba(112, 159, 235, 0.16);
  color: var(--brand-panel-muted);
  font-size: 0.82rem;
}

.dpt-login-footer a {
  color: #1f6fb1;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .login-pf-page.dpt-login-shell {
    padding: 0;
  }

  .dpt-login-stage {
    grid-template-columns: 1fr;
    gap: 22px;
    width: 100%;
  }

  .dpt-login-panel {
    order: -1;
    justify-content: center;
    padding: 20px 16px 0;
  }

  .dpt-login-hero {
    min-height: auto;
    border-radius: 0 0 24px 24px;
  }
}

@media (max-width: 720px) {
  .login-pf-page.dpt-login-shell {
    padding: 16px;
  }

  .dpt-login-hero,
  .dpt-login-card.card-pf {
    border-radius: 24px;
  }

  .dpt-login-hero,
  .dpt-login-card-header,
  #kc-content-wrapper,
  .dpt-login-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .dpt-login-hero {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .dpt-login-brand-strip,
  .dpt-login-hero-card {
    padding: 22px;
  }

  .dpt-login-panel-top,
  #kc-form-options,
  .dpt-login-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pf-c-input-group {
    gap: 6px;
  }
}

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