:root {
  color-scheme: light dark;
  --iot-ink: light-dark(#101815, #f4f4f5);
  --iot-paper: light-dark(#f7f8f5, #09090b);
  --iot-surface: light-dark(#fff, #18181b);
  --iot-border: light-dark(#a0a9a1, #71717a);
  --iot-grid: light-dark(rgb(23 33 29 / 7%), rgb(255 255 255 / 5%));
  --iot-action: light-dark(#101815, #f4f4f5);
  --iot-action-text: light-dark(#fff, #18181b);
  --iot-signal: #c5ec73;
  --iot-muted: light-dark(#657169, #b4b4bd);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body,
.login-pf body {
  min-height: 100vh;
  color: var(--iot-ink);
  background:
    linear-gradient(var(--iot-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--iot-grid) 1px, transparent 1px), var(--iot-paper);
  background-size: 64px 64px;
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
}

.login-pf-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

#kc-header {
  margin: 0 0 24px;
  color: var(--iot-ink);
}

#kc-header-wrapper {
  padding: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#kc-header-wrapper::before {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-right: 12px;
  border-radius: 50%;
  color: #101815;
  background: var(--iot-signal);
  content: "I";
  letter-spacing: 0;
}

.card-pf,
.pf-v5-c-login__main,
.pf-c-login__main {
  width: min(100%, 480px);
  border: 0;
  border-radius: 18px;
  background: var(--iot-surface);
  box-shadow:
    inset 0 0 0 1px rgba(23, 33, 29, 0.09),
    0 28px 80px rgba(16, 24, 21, 0.12);
}

.card-pf {
  padding: 34px;
}

#kc-page-title {
  color: var(--iot-ink);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1;
}

label,
.pf-v5-c-form__label-text,
.pf-c-form__label-text {
  color: var(--iot-ink);
  font-size: 12px;
  font-weight: 650;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  min-height: 46px;
  border: 1px solid var(--iot-border);
  border-radius: 9px;
  color: var(--iot-ink);
  background: var(--iot-paper);
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--iot-signal);
  outline-offset: 3px;
}

#kc-login,
input[type="submit"],
.pf-v5-c-button.pf-m-primary,
.pf-c-button.pf-m-primary {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  color: var(--iot-action-text);
  background: var(--iot-action);
  font-weight: 700;
}

#kc-login:hover,
input[type="submit"]:hover,
.pf-v5-c-button.pf-m-primary:hover,
.pf-c-button.pf-m-primary:hover {
  color: #101815;
  background: var(--iot-signal);
}

a {
  color: light-dark(#3e5b19, #c5ec73);
  font-weight: 650;
}

.alert-error,
.pf-v5-c-alert.pf-m-danger,
.pf-c-alert.pf-m-danger {
  border-radius: 9px;
  color: #713e39;
  background: #f5e3e1;
}

@media (max-width: 600px) {
  .login-pf-page {
    align-items: end;
    padding: 0;
  }

  .card-pf,
  .pf-v5-c-login__main,
  .pf-c-login__main {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
