/* Skin Envy sign-in pages, option C (13 September 2026): one centred column,
   the same on a computer, an upright tablet and a phone. Values are DESIGN.md's
   tokens: warm neutrals, teal as the only brand hue, no gradients, elevation by
   a lightness shift and one soft shadow, 8px controls and 12px cards. No web
   fonts: the live EMR strips Google Fonts too, so the same fallbacks apply. */
:root {
  --teal: #0c7b84;
  --teal-dark: #06666e;
  --teal-pale: #e4f1f1;
  --red: #a02a23;
  --red-pale: #f9ecea;
  --green: #2e6647;
  --green-pale: #e8f2eb;
  --orange: #a8441a;
  --orange-pale: #faefe7;
  --ink: #2b2622;
  --ink-soft: #4e463f;
  --muted: #6a6058;
  --canvas: #f3eee8;
  --surface: #fefcfa;
  --field-line: #a9a199;
  --on-action: #fefcfa;
  --focus-ring: #0c7b84;
  --fs-xs: 0.8125rem;
  --fs-base: 1rem;
  --fs-2xl: 1.9375rem;
  --radius-control: 8px;
  --radius: 12px;
  --shadow: 0 2px 6px rgba(43, 38, 34, 0.07), 0 16px 40px rgba(43, 38, 34, 0.1);
  --body-font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading-font: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body.se-body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--body-font);
  font-size: var(--fs-base);
  line-height: 1.5;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Layout: logo, welcome, card, footer. The footer sits at the bottom of the
   screen when there is room and simply follows the card when there is not. */
.se-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: clamp(32px, 8vh, 88px) 16px 24px;
}

.se-head {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.se-logo {
  width: clamp(150px, 20vw, 220px);
  height: auto;
}

.se-welcome {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.se-card {
  width: min(440px, 100%);
  padding: clamp(24px, 5vw, 32px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.se-title {
  margin-bottom: 16px;
  font-size: var(--fs-2xl);
}

.se-footer {
  margin-top: auto;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.se-support,
.se-credit {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.se-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

/* Brand sheet: clear space a quarter of the mark's width, never below 24px. */
.se-credit-mark {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 6px 0;
}

/* Forms */
.se-field {
  margin-bottom: 4px;
}

.se-label {
  display: block;
  margin: 16px 0 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.se-input {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.se-input[aria-invalid="true"] {
  border-color: var(--red);
}

.se-password-wrap {
  position: relative;
}

.se-password-wrap .se-input {
  padding-right: 72px;
}

.se-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.se-reveal {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: var(--fs-xs);
}

/* Keycloak swaps these two classes on the <i> when the password is shown. */
.se-reveal-show::before {
  content: "Show";
  font-style: normal;
}

.se-reveal-hide::before {
  content: "Hide";
  font-style: normal;
}

.se-field-error {
  display: block;
  margin-top: 8px;
  color: var(--red);
  font-size: var(--fs-xs);
}

.se-options:empty,
#kc-form-options:empty {
  display: none;
}

.se-settings {
  margin: 12px 0 0;
}

.se-settings label,
.se-field .checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.se-settings input[type="checkbox"],
.se-field input[type="checkbox"] {
  width: auto;
  accent-color: var(--teal);
}

#kc-form-buttons,
.se-buttons {
  margin-top: 24px;
}

.se-button {
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.se-button-primary {
  color: var(--on-action);
  background: var(--teal-dark);
}

.se-button-primary:hover {
  filter: brightness(0.92);
}

.se-button-secondary {
  margin-top: 12px;
  color: var(--teal-dark);
  background: transparent;
  border-color: var(--field-line);
}

.se-full {
  width: 100%;
}

/* Messages */
.se-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  font-size: var(--fs-xs);
}

.se-alert-error {
  background: var(--red-pale);
  color: var(--red);
}

.se-alert-warning {
  background: var(--orange-pale);
  color: var(--orange);
}

.se-alert-success {
  background: var(--green-pale);
  color: var(--green);
}

.se-alert-info {
  background: var(--teal-pale);
  color: var(--teal-dark);
}

.se-signed-as {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.se-info,
#kc-info {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

#kc-info a,
.se-card a {
  color: var(--teal-dark);
  font-weight: 700;
}

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