:root {
  --ink: #17202a;
  --muted: #5d6975;
  --paper: #f3f5f6;
  --surface: #ffffff;
  --line: #cbd2d8;
  --brand: #173b57;
  --brand-strong: #0d2b41;
  --accent: #d69a2d;
  --danger: #9b2c2c;
  --radius: 0.5rem;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.55; }
a { color: var(--brand); text-underline-offset: 0.2em; }
.topbar { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem clamp(1rem, 4vw, 3rem); color: white; background: var(--brand-strong); border-bottom: 0.25rem solid var(--accent); }
.brand { color: white; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.12em; text-decoration: none; }
.environment { font-size: 0.875rem; opacity: 0.8; }
.shell { width: min(100% - 2rem, 68rem); margin: auto; padding: 2rem 0; }
.footer { padding: 1rem; text-align: center; color: var(--muted); font-size: 0.875rem; }
.auth-panel, .status-panel { width: min(100%, 30rem); margin: auto; padding: clamp(1.25rem, 4vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-top: 0.3rem solid var(--brand); border-radius: var(--radius); }
.auth-heading { margin-bottom: 1.5rem; }
.eyebrow { margin: 0 0 0.25rem; color: var(--brand); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.65rem, 5vw, 2.4rem); line-height: 1.15; }
.auth-heading p:last-child, .status-panel > p { color: var(--muted); }
.form-stack { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
label { font-weight: 700; }
small { color: var(--muted); font-size: 0.8rem; }
input { width: 100%; min-height: 2.85rem; padding: 0.65rem 0.75rem; color: var(--ink); background: var(--surface); border: 1px solid #8996a3; border-radius: 0.35rem; font: inherit; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 0.2rem solid var(--accent); outline-offset: 0.15rem; }
button, .secondary { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.65rem 1rem; border-radius: 0.35rem; font: inherit; font-weight: 700; cursor: pointer; }
.primary { color: white; background: var(--brand); border: 1px solid var(--brand); }
.primary:hover { background: var(--brand-strong); }
.secondary { color: var(--brand); background: transparent; border: 1px solid var(--brand); text-decoration: none; }
.alternative { margin-top: 1.25rem; text-align: center; }
.notice { margin: 0 0 1rem; padding: 0.75rem; border-left: 0.25rem solid var(--brand); background: #edf3f7; }
.notice-error { color: var(--danger); border-color: var(--danger); background: #fff2f2; }
.status-panel { text-align: center; }
.status-mark { width: 3rem; height: 3rem; margin: 0 auto 1rem; display: grid; place-items: center; border: 0.15rem solid var(--accent); border-radius: 50%; font-size: 1.5rem; font-weight: 800; }
.workspace { display: grid; gap: 1.5rem; }
.workspace-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.role-badge { padding: 0.35rem 0.65rem; color: white; background: var(--brand); border-radius: 99rem; font-size: 0.875rem; }
.system-state { display: grid; gap: 0.25rem; padding: 1rem; background: var(--surface); border-left: 0.3rem solid var(--accent); }
.system-state span, .action-card span { color: var(--muted); }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.action-card { min-height: 8rem; display: grid; align-content: center; gap: 0.4rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.text-button { padding-left: 0; color: var(--brand); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 42rem) { .action-grid { grid-template-columns: 1fr; } .workspace-head { display: grid; } .role-badge { width: fit-content; } }
@media (prefers-color-scheme: dark) {
  :root { --ink: #edf2f5; --muted: #a9b4bd; --paper: #10171d; --surface: #19232c; --line: #3d4a55; --brand: #4f89b5; --brand-strong: #0a2132; --accent: #e0a63d; --danger: #ff9f9f; }
  input { border-color: #778591; }
  .primary { color: #08131b; background: #78acd2; }
  .notice { background: #1a3040; }
  .notice-error { background: #3b2024; }
}
