@font-face { font-family: Inter; src: url('../brand/Inter-400.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('../brand/Inter-600.ttf'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('../brand/Inter-700.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: Instrument; src: url('../brand/InstrumentSerif.ttf'); font-display: swap; }

:root {
  color-scheme: light;
  --hero-ink: #173d34;
  --hero-green: #005b33;
  --hero-muted: #62756d;
  --hero-line: #dfe5da;
  --pf-v5-global--FontFamily--text: Inter, Arial, sans-serif;
  --pf-v5-global--FontFamily--heading: Inter, Arial, sans-serif;
  --pf-v5-global--primary-color--100: #005b33;
  --pf-v5-global--primary-color--200: #004525;
  --pf-v5-global--active-color--100: #005b33;
  --pf-v5-global--link--Color: #005b33;
  --pf-v5-global--link--Color--hover: #004525;
  --pf-v5-global--Color--100: #173d34;
  --pf-v5-global--Color--200: #62756d;
}

html, body, #keycloak-bg { min-height: 100%; background: #f5f6f0; color: var(--hero-ink); }
body { margin: 0; font-family: Inter, Arial, sans-serif; }
.pf-v5-c-login { min-height: 100svh; padding: 56px 24px; background: transparent; }
.pf-v5-c-login__container {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'header' 'main';
  gap: 30px; width: min(100%, 520px); margin: auto; padding: 0;
}
#kc-header { padding: 0; margin: 0; text-align: center; }
#kc-header-wrapper {
  display: block; width: min(100%, 270px); height: 62px; margin: 0 auto;
  background: url('../brand/logo-clean.svg') center / contain no-repeat;
  /* The existing brand name remains available to screen readers. */
  overflow: hidden; text-indent: -9999px; white-space: nowrap;
}
.pf-v5-c-login__main {
  min-width: 0; color: var(--hero-ink); background: white; border: 1px solid var(--hero-line);
  border-radius: 20px; box-shadow: 0 12px 40px #173d340a;
}
.pf-v5-c-login__main-header { border-top: 0; padding: 36px 36px 20px; gap: 15px; align-items: start; }
#kc-page-title { font-family: Instrument, Georgia, serif; font-weight: 400; font-size: 36px; line-height: 1.12; letter-spacing: -.015em; color: var(--hero-ink); }
.pf-v5-c-login__main-header-utilities { width: 102px; flex-shrink: 0; }
.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control { font-size: 12px; min-height: 34px; }
.pf-v5-c-login__main-body { padding: 8px 36px 30px; }
.pf-v5-c-form { --pf-v5-c-form--GridGap: 22px; }
.pf-v5-c-form__label { color: var(--hero-ink); font-size: 13px; font-weight: 600; }
.pf-v5-c-form-control {
  background: white; color: var(--hero-ink); border: 1px solid #c8d4c8;
  border-radius: 9px; min-height: 46px; font-size: 15px;
}
.pf-v5-c-form-control::before, .pf-v5-c-form-control::after { border: 0; }
.pf-v5-c-form-control:focus-within { border-color: var(--hero-green); outline: 2px solid #005b332b; outline-offset: 2px; }
.pf-v5-c-form-control.pf-m-error { border-color: #b42318; }
.pf-v5-c-form-control input { padding: 11px 13px; min-width: 0; }
.pf-v5-c-form-control input:focus, .pf-v5-c-form-control select:focus { outline: none; }
.pf-v5-c-input-group { gap: 0; }
.pf-v5-c-input-group__item.pf-m-fill { min-width: 0; }
.pf-v5-c-input-group__item:has(+ .pf-v5-c-input-group__item) .pf-v5-c-form-control { border-radius: 9px 0 0 9px; }
.pf-v5-c-button.pf-m-control {
  min-height: 46px; background: #f6f8f3; color: var(--hero-green); border: 1px solid #c8d4c8;
  border-left: 0; border-radius: 0 9px 9px 0; padding-inline: 14px;
}
.pf-v5-c-button.pf-m-control::after { border: 0; }
.pf-v5-c-button.pf-m-primary, .pf-v5-c-button.pf-m-secondary {
  min-height: 46px; border-radius: 9px; padding: 12px 18px; font-size: 14px; font-weight: 600;
}
.pf-v5-c-button.pf-m-primary { background: var(--hero-green); color: white; }
.pf-v5-c-button.pf-m-primary:hover { background: #004525; }
.pf-v5-c-button.pf-m-secondary { color: var(--hero-green); border: 1px solid #c8d4c8; background: white; }
.pf-v5-c-button.pf-m-secondary::after { border: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid #819f62; outline-offset: 3px; }
.pf-v5-c-form__actions { margin-top: 4px; }
.pf-v5-c-login__main-footer { margin: 0; padding: 0; }
.pf-v5-c-login__main-footer-band { background: #f5f7f0; color: var(--hero-muted); border-radius: 0 0 20px 20px; padding: 20px 36px; }
.hero-login-footer { border-top: 1px solid var(--hero-line); margin: 0 36px; padding: 21px 0 25px; }
.hero-login-footer p { margin: 0; color: var(--hero-muted); font-size: 12px; line-height: 1.65; }
.hero-login-footer p + p { margin-top: 10px; }
.hero-login-footer strong { color: var(--hero-ink); font-weight: 600; }
.hero-login-security { display: flex; align-items: center; gap: 7px; }
.hero-login-security svg { flex-shrink: 0; color: var(--hero-green); }
.pf-v5-c-alert { border-radius: 8px; box-shadow: none; font-size: 13px; overflow-wrap: anywhere; }
.pf-v5-c-helper-text__item-text { font-size: 12px; line-height: 1.5; }
#kc-totp-settings { padding-left: 22px; }
#kc-totp-settings li { margin-block: 16px; line-height: 1.65; font-size: 13px; }
#kc-totp-settings p { margin-block: 8px; }
#kc-totp-secret-qr-code { max-width: 100%; height: auto; padding: 8px; background: white; border-radius: 8px; }
#kc-totp-secret-key { overflow-wrap: anywhere; }
#kc-content-wrapper, #kc-form, #kc-form-wrapper { min-width: 0; }

@media (max-width: 600px) {
  .pf-v5-c-login { padding: 28px 16px; }
  .pf-v5-c-login__container { gap: 23px; }
  #kc-header-wrapper { width: 230px; height: 53px; }
  .pf-v5-c-login__main-header { padding: 26px 22px 16px; flex-wrap: wrap; }
  #kc-page-title { font-size: 32px; }
  .pf-v5-c-login__main-header-utilities { width: 100%; max-width: 110px; }
  .pf-v5-c-login__main-body { padding: 6px 22px 25px; }
  .hero-login-footer { margin-inline: 22px; }
  .pf-v5-c-login__main-footer-band { padding: 18px 22px; }
}
