/* ionob World — branded Keycloak login, matching the cockpit/portal design.
   Loaded after the stock keycloak login CSS, so these rules win. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --iw-ink: #030016;
  --iw-body: #3d3852;
  --iw-muted: #6f6a86;
  --iw-faint: #a8a3b8;
  --iw-line: #eceaf2;
  --iw-accent: #7e00ff;
  --iw-accent-deep: #5500aa;
  --iw-wash: #f4ebff;
}

/* ── page background: the app's porcelain ground with a soft purple aura ── */
.login-pf,
.login-pf body,
body {
  background: #fbfaFD !important;
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif !important;
}
.login-pf-page {
  background:
    radial-gradient(1100px 520px at 50% -10%, #f4ebff 0%, rgba(244, 235, 255, 0) 60%),
    #fbfaFD !important;
  padding-top: 7vh !important;
}
/* kill the stock patternfly background image */
.login-pf-page .login-pf-header { margin-bottom: 18px; }
#kc-header, .login-pf-page-header { background: transparent !important; }

/* ── brand mark + product name (rendered from realm displayNameHtml) ── */
#kc-header-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 0 4px !important;
  font-size: 0 !important;      /* hide any stray text nodes */
  color: transparent !important;
  text-shadow: none !important;
}
#kc-header-wrapper .iw-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
#kc-header-wrapper .iw-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #7e00ff, #5500aa);
  color: #fff;
  display: grid;
  place-items: center;
  font: 800 20px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 6px 18px -6px rgba(126, 0, 255, 0.55);
}
#kc-header-wrapper .iw-name {
  font: 800 20px/1 Inter, system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--iw-ink);
}
#kc-header-wrapper .iw-sub {
  font: 500 12.5px/1.4 Inter, system-ui, sans-serif;
  color: var(--iw-muted);
}

/* ── the card ── */
.card-pf {
  border: 1px solid var(--iw-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 60px -30px rgba(3, 0, 22, 0.35) !important;
  padding: 26px 28px 24px !important;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.card-pf::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(100deg, #7e00ff, #5500aa);
}

#kc-page-title,
#kc-form-login h1,
.pf-c-title {
  font: 700 16px/1.3 Inter, system-ui, sans-serif !important;
  color: var(--iw-ink) !important;
  margin-bottom: 6px !important;
}

/* ── labels + inputs ── */
label,
.pf-c-form__label,
.control-label {
  font: 600 12px/1.4 Inter, system-ui, sans-serif !important;
  color: var(--iw-body) !important;
}
input[type="text"],
input[type="password"],
input[type="email"],
.pf-c-form-control,
#kc-form-login input:not([type="submit"]):not([type="checkbox"]):not([type="button"]) {
  border: 1px solid #e2ddec !important;
  border-radius: 10px !important;
  padding: 11px 13px !important;
  font: 400 14px/1.4 Inter, system-ui, sans-serif !important;
  color: var(--iw-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color 140ms, box-shadow 140ms;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
.pf-c-form-control:focus {
  border-color: #c9a3f5 !important;
  box-shadow: 0 0 0 3px rgba(126, 0, 255, 0.12) !important;
  outline: none !important;
}

/* ── primary button (input#kc-login raises specificity over #kc-form-login input) ── */
input[type="submit"].pf-m-primary,
button[type="submit"].pf-m-primary,
.pf-c-button.pf-m-primary,
.pf-v5-c-button.pf-m-primary,
input#kc-login,
#kc-form-login input#kc-login {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: linear-gradient(100deg, #7e00ff, #5500aa) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  font: 600 14px/1 Inter, system-ui, sans-serif !important;
  padding: 12px 16px !important;
  box-shadow: 0 8px 20px -8px rgba(126, 0, 255, 0.6) !important;
  transition: filter 140ms;
  cursor: pointer;
}
input#kc-login:hover,
.pf-c-button.pf-m-primary:hover { filter: brightness(1.08); }

/* social / identity-provider buttons (Microsoft 365) */
#kc-social-providers a,
.pf-c-button.pf-m-control,
#kc-social-providers .pf-c-button {
  border: 1px solid var(--iw-line) !important;
  border-radius: 10px !important;
  color: var(--iw-body) !important;
  font: 600 13px/1 Inter, system-ui, sans-serif !important;
  background: #fff !important;
}
#kc-social-providers a:hover { background: var(--iw-wash) !important; }

/* links + misc */
a,
#kc-registration a,
#kc-info-wrapper a { color: var(--iw-accent-deep) !important; }
.pf-c-alert,
#kc-content-wrapper .alert { border-radius: 10px !important; }
#kc-info,
.login-pf-page .card-pf + #kc-info { color: var(--iw-muted) !important; }

/* checkbox accent */
input[type="checkbox"] { accent-color: var(--iw-accent) !important; }
