/* OmniEHR Keycloak login theme v2 — the full palette on every auth page */
:root {
  --teal: #1E6F6A; --teal-deep: #155350;
  --seafoam: #6FBFB0; --mist: #9CC6DC; --sage: #B9D4BC;
  --coral: #E89B7A; --sand: #F6F1E9; --sand-2: #EFE8DB;
  --ink: #16323B; --ink-2: #1E3F4A; --muted: #5A7480;
  --line: #E4DBC9; --card: #FCFAF5;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(10,28,33,.25), 0 24px 60px -20px rgba(10,28,33,.5);
}

html, body.om-body { height: 100%; margin: 0; }
body.om-body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500; color: var(--ink); line-height: 1.5;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(111,191,176,.16), transparent 60%),
    radial-gradient(700px 500px at -10% 105%, rgba(232,155,122,.12), transparent 55%),
    radial-gradient(600px 400px at 50% 120%, rgba(156,198,220,.10), transparent 60%),
    linear-gradient(160deg, #16323B 0%, #11272E 55%, #0C1D23 100%);
}
.om-stage {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 16px; gap: 26px;
}

/* brand */
.om-brand { text-align: center; }
.om-mark { width: 96px; height: 96px; display: block; margin: 0 auto 14px; }
.om-word { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.om-word em { font-style: normal; color: var(--seafoam); }
.om-tag { font-size: .68rem; font-weight: 800; letter-spacing: .34em; color: rgba(255,255,255,.55); margin-top: 6px; }

/* card */
.om-card, main#kc-content {
  width: min(440px, 100%); background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 5px solid var(--teal);
}
.om-card-inner { padding: 34px 36px 30px; }
.om-card-head h1 {
  margin: 0 0 18px; font-size: 1.45rem; font-weight: 800;
  letter-spacing: -.01em; text-align: center; color: var(--ink);
}
.om-required { font-size: .78rem; color: var(--muted); text-align: center; margin: -8px 0 12px; }

/* alerts — palette severity */
.om-alert {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: 10px; padding: 11px 14px; margin: 0 0 16px;
  font-size: .9rem; font-weight: 500; border: 1px solid var(--line); background: var(--sand);
}
.om-alert-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; background: var(--mist); }
.om-alert-error   { background: rgba(232,155,122,.16); border-color: rgba(232,155,122,.5); color: #8C3E1F; }
.om-alert-error .om-alert-dot { background: var(--coral); }
.om-alert-warning { background: rgba(232,155,122,.10); border-color: rgba(232,155,122,.35); }
.om-alert-warning .om-alert-dot { background: var(--coral); }
.om-alert-success { background: rgba(111,191,176,.16); border-color: rgba(111,191,176,.5); color: #1C5B50; }
.om-alert-success .om-alert-dot { background: var(--seafoam); }
.om-alert-info .om-alert-dot { background: var(--mist); }

/* forms — restyle keycloak's classes inside the card */
.om-card label, .om-card .pf-c-form__label, .om-card .control-label {
  display: block; font-size: .82rem; font-weight: 800; color: var(--ink-2); margin: 0 0 6px;
}
.om-card input[type=text], .om-card input[type=password], .om-card input[type=email],
.om-card input[type=tel], .om-card input[type=number], .om-card select {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--ink);
  background: var(--sand); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 0 0 16px;
}
.om-card input:focus, .om-card select:focus {
  outline: none; border-color: var(--seafoam);
  box-shadow: 0 0 0 3px rgba(111,191,176,.3); background: #fff;
}
.om-card .pf-c-input-group { display: flex; align-items: stretch; }
.om-card .pf-c-input-group input { margin-bottom: 0; }
.om-card .pf-c-input-group { margin-bottom: 16px; }

/* primary button */
.om-card input[type=submit], .om-card button[type=submit],
.om-card .pf-c-button.pf-m-primary, .om-card #kc-login {
  width: 100%; font: inherit; font-weight: 800; font-size: 1rem;
  background: var(--teal); color: #fff; border: none; border-radius: 999px;
  padding: 13px 20px; cursor: pointer; margin-top: 4px;
  transition: background .15s ease;
}
.om-card input[type=submit]:hover, .om-card #kc-login:hover,
.om-card .pf-c-button.pf-m-primary:hover { background: var(--teal-deep); }

/* secondary / link buttons */
.om-card .pf-c-button.pf-m-control, .om-card .pf-c-button.pf-m-link,
.om-card a.pf-c-button { font: inherit; }
.om-card a { color: var(--teal); font-weight: 800; text-decoration: none; }
.om-card a:hover { text-decoration: underline; }

/* checkbox row + forgot link line */
.om-card .checkbox, .om-card .pf-c-check { font-size: .88rem; color: var(--muted); }
.om-card .checkbox label, .om-card .pf-c-check label { display: inline; font-weight: 500; color: var(--muted); }
#kc-form-options { display: inline-block; }
.om-card #kc-form-options + * , .om-card .kc-form-options-wrapper { font-size: .88rem; }

/* OTP / TOTP setup: QR + manual code */
.om-card #kc-totp-secret-qr-code, .om-card img[alt="Figure: Barcode"] {
  display: block; margin: 0 auto 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.om-card #kc-totp-secret-key, .om-card .kc-totp-secret-key {
  display: block; text-align: center; font-weight: 800; letter-spacing: .12em;
  background: var(--sand-2); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px;
}
.om-card ol#kc-totp-settings, .om-card .kc-totp-settings { color: var(--muted); font-size: .9rem; padding-left: 20px; }

/* recovery codes panel */
.om-card .kc-recovery-codes-list, .om-card ol[id*="recovery"] {
  columns: 2; font-weight: 800; letter-spacing: .06em;
  background: var(--sand-2); border-radius: 10px; padding: 14px 14px 14px 34px; margin: 0 0 14px;
}
.om-card .kc-recovery-codes-actions a { margin-right: 14px; }

/* try-another-way + info */
.om-try-another { text-align: center; margin-top: 14px; font-size: .9rem; }
.om-info { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; font-size: .9rem; color: var(--muted); }

/* social providers (future) */
#kc-social-providers ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
#kc-social-providers a {
  display: flex; justify-content: center; padding: 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--sand); font-weight: 800;
}

/* footer */
.om-foot { text-align: center; color: rgba(255,255,255,.55); font-size: .8rem; max-width: 560px; }
.om-foot-note { margin: 0 0 10px; }
.om-foot-links { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.om-foot-links a { color: var(--seafoam); font-weight: 800; text-decoration: none; }
.om-foot-links a:hover { text-decoration: underline; }
.om-locale select { font: inherit; background: transparent; color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 4px 8px; }
.om-foot-co { margin: 10px 0 0; opacity: .7; }

/* accessibility: visible focus, honest motion */
:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* small screens */
@media (max-width: 480px) {
  .om-stage { padding: 24px 12px; gap: 18px; justify-content: flex-start; }
  .om-mark { width: 64px; height: 64px; }
  .om-word { font-size: 1.5rem; }
  .om-card-inner { padding: 24px 20px 22px; }
}
