:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #222b27;
  background: #f1f3f2;
  font-synthesis: none;
  --panel: #fff;
  --ink: #222b27;
  --muted: #58655e;
  --line: #dce2de;
  --line-strong: #9aa9a0;
  --green: #165b45;
  --soft-green: #e4f0e9;
  --red: #a12f43;
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.45; }
::selection { background: var(--soft-green); color: var(--green); }
input { caret-color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { object-fit: contain; flex: 0 0 44px; }
.brand-name { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; }
.brand-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.environment-label { padding: 3px 7px; border-radius: 3px; font-size: 12px; font-weight: 600; color: #785315; background: #faf0d9; }
html[data-environment="production"] .environment-label { display: none; }
main { flex: 1; background: var(--panel); padding: 64px 24px 48px; }
.account-surface { width: 100%; max-width: 432px; margin: 0 auto; }
h1 { margin: 0 0 28px; font-size: 24px; font-weight: 650; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 22px; }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.account-link { margin: 24px 0 0; font-size: 14px; }
.account-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); text-underline-offset: 3px; }
label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
input { display: block; width: 100%; min-width: 0; height: 44px; padding: 9px 12px; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; }
input:disabled { background: #f1f3f2; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 1px; right: 1px; width: 44px; height: 42px; border: 0; border-radius: 3px; background: transparent; }
.icon-button:hover { background: #eef1ef; }
.icon-button:focus-visible { outline-offset: -4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); background: var(--panel); font-size: 14px; font-weight: 600; line-height: 1.35; }
.button img { flex: 0 0 18px; }
.button:hover { background: #eef1ef; }
.button:disabled { opacity: .65; }
.primary { width: 100%; color: var(--panel); background: var(--green); border-color: var(--green); }
.primary:hover { background: #104634; }
.primary img { filter: brightness(0) invert(1); }
.message { margin: 20px 0 16px; color: var(--red); font-size: 14px; overflow-wrap: anywhere; }
.message[data-kind="info"] { color: var(--muted); }
.section-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.section-heading h1 { margin: 0; }
.connection-state { padding: 3px 7px; border-radius: 3px; color: var(--green); background: var(--soft-green); font-size: 12px; font-weight: 600; }
.account-details { margin: 0; font-size: 14px; }
.account-details > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.service-state { margin-top: 32px; }
#logoutButton { margin-top: 28px; }
footer { padding: 16px 24px; text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .topbar { padding: 16px 20px; gap: 12px; }
  .brand { align-items: start; gap: 12px; }
  .brand-name { font-size: 19px; }
  .brand-subtitle { line-height: 1.4; }
  main { padding: 36px 20px; }
  .account-details > div { grid-template-columns: 112px minmax(0, 1fr); }
}
