:root {
  color-scheme: light;
  --green: #126044;
  --ink: #1c3320;
  --muted: #69766b;
  --line: #e2eadf;
  --mint: #edf8e9;
  --shadow: 0 16px 45px #173d1a12;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #f5f8f4; font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: white; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 43px; height: 43px; object-fit: contain; }
.brand span { display: grid; gap: 2px; }
.brand strong { color: var(--green); font: 800 20px Georgia, serif; letter-spacing: 1px; }
.brand small, .muted { color: var(--muted); font-size: 11px; }
.main { display: grid; min-height: calc(100vh - 72px); place-items: center; padding: 28px 16px; }
.card { width: min(460px, 100%); padding: clamp(22px, 5vw, 32px); background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.card h1 { margin: 0 0 8px; font-size: 25px; }
.card > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: #53675d; font-size: 11px; font-weight: 750; }
.field input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d8e4dc; border-radius: 10px; font-size: 13px; }
.field input:focus { outline: 2px solid #4d9c7844; border-color: #4d9c78; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 10px 14px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 750; text-decoration: none; }
.button.primary { width: 100%; color: white; background: var(--green); border-color: var(--green); }
.button:hover { filter: brightness(.97); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.auth-links a, .auth-links button { color: var(--green); font-size: 11px; font-weight: 700; text-decoration: none; }
.auth-links button { padding: 0; background: transparent; border: 0; }
.notice { margin: 0 0 14px; padding: 11px 12px; color: #805a0b; background: #fff7e6; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.notice.error { color: #8f2d2d; background: #fff2f2; }
.roles { display: grid; gap: 10px; }
.role-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; background: #fbfdfb; border: 1px solid var(--line); border-radius: 13px; }
.role-card strong { display: block; margin-bottom: 3px; font-size: 13px; }
.role-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.role-card .button { flex-shrink: 0; }
.logout { width: 100%; margin-top: 14px; }
.spinner { color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 430px) {
  .role-card { align-items: flex-start; flex-direction: column; }
  .role-card .button { width: 100%; }
}
