:root {
  color-scheme: light;
  font-family: system-ui, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #18181b;
  background: #f8f8f7;
  --border: #dededb;
  --muted: #5e5e65;
  --paper: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { background: var(--paper); border-right: 1px solid var(--border); min-height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; gap: 32px; }
.brand { padding: 0 10px; display: grid; gap: 5px; font-weight: 750; text-decoration: none; }
.brand small, .hint, .status, .eyebrow { color: var(--muted); }
.brand small { font-weight: 500; }
nav { display: grid; gap: 5px; }
nav a { padding: 11px 10px; text-decoration: none; border-radius: 4px; font-size: 14px; }
nav a:hover, nav a[aria-current] { background: #efefed; }
nav a[aria-current] { font-weight: 750; }
.logout { margin-top: auto; }
a { color: inherit; text-underline-offset: 3px; }
main { padding: 40px 32px; max-width: 920px; width: 100%; }
h1 { margin: 0 0 24px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -.03em; }
h2 { margin: 0 0 18px; font-size: 18px; }
.panel { background: var(--paper); padding: 22px; border: 1px solid var(--border); border-radius: 5px; margin: 0 0 16px; }
.form, label { display: grid; gap: 14px; }
label { gap: 6px; font-size: 14px; font-weight: 650; min-width: 0; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
input, select, button { font: inherit; border: 1px solid var(--border); border-radius: 4px; min-height: 42px; }
input, select { background: white; color: inherit; width: 100%; padding: 8px 10px; font-weight: 400; }
button { width: fit-content; padding: 8px 14px; cursor: pointer; background: #19191c; color: white; border-color: #19191c; font-size: 14px; font-weight: 650; }
button:hover { filter: brightness(1.24); }
button.quiet { background: white; color: #27272a; border-color: var(--border); }
button.danger { color: #922c2c; }
.status, .hint { font-size: 14px; margin: 0 0 14px; }
.form .hint, .panel > .hint:last-child { margin: 0; }
.indicator { display: inline-block; width: 8px; height: 8px; background: #a4a4a4; border-radius: 50%; margin-right: 5px; }
.indicator.online { background: #28764b; }
.notice { padding: 12px 14px; margin: 0 0 16px; border: 1px solid var(--border); background: #fff; border-radius: 4px; font-size: 14px; }
.notice.error { color: #922c2c; border-color: #eac0c0; }
.notice.success { color: #23633d; border-color: #c8ded0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { padding-left: 0; }
td a { white-space: nowrap; }
@media (max-width: 650px) {
  body { display: block; }
  .sidebar { min-height: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .brand { padding: 0; }
  nav { display: flex; flex-wrap: wrap; grid-column: 1 / -1; grid-row: 2; }
  .logout { margin: 0; }
  main { padding: 24px 16px; }
  .panel { padding: 16px; }
  .fields { grid-template-columns: 1fr; }
}
.logout .hint { overflow-wrap: anywhere; }

.signed-out {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100svh;
  background: linear-gradient(125deg, #f3f4ff 0%, #e7edff 100%);
}

.signed-out main {
  max-width: 800px;
  padding: 24px;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  min-height: 390px;
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 56px rgb(38 53 110 / 15%);
}

.login-accent {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #4658cf, #697df0);
  border-radius: 0 120px 120px 0;
  animation: login-accent-in 440ms ease-out both;
}

@keyframes login-accent-in {
  from { transform: translateX(-7%); opacity: 0.75; }
  to { transform: translateX(0); opacity: 1; }
}

.login-accent::before,
.login-accent::after {
  position: absolute;
  top: 50%;
  left: 35%;
  width: 84%;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  transform: translate(-52%, -50%);
  content: "";
}

.login-accent::after { width: 114%; }

.login-content {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 24px;
  padding: 38px 28px;
  text-align: center;
}

.login-content h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.login-content .notice { margin: 0; }

.login-action {
  display: grid;
  place-items: center;
  width: min(100%, 220px);
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #4859d3;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.login-action:hover { background: #3b49b8; }
.login-action:focus-visible { outline: 2px solid #25398e; outline-offset: 4px; }

@media (max-width: 580px) {
  .signed-out main { max-width: 440px; padding: 16px; }
  .login-card { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .login-accent { min-height: 105px; border-radius: 0 0 80px 0; }
  .login-accent::before, .login-accent::after { max-width: 210px; }
  .login-accent::after { max-width: 276px; }
  .login-content { padding: 36px 22px 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-accent { animation: none; }
}
