:root {
  color-scheme: light;
  --ink: #203040;
  --muted: #5e6c79;
  --line: #dce2e7;
  --blue: #215bc3;
  --paper: #f7f9fb;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    'Noto Sans JP',
    sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
.token-login {
  display: grid;
  gap: 12px;
  max-width: 360px;
  margin: 20px auto 0;
  text-align: left;
}
.client-token-panel {
  margin-top: 16px;
  margin-bottom: 20px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  padding: 32px 22px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 750;
  font-size: 23px;
  letter-spacing: -0.7px;
  color: var(--ink);
}
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
}
.tagline {
  font-size: 11px;
  color: var(--muted);
  margin: 17px 0 38px;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  padding: 12px 14px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
nav a[aria-current='page'] {
  color: var(--blue);
  background: #edf3ff;
  font-weight: 650;
}
main {
  max-width: 1400px;
  padding: 44px 48px 64px;
  min-width: 0;
}
.eyebrow {
  color: var(--muted);
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 9px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 0 0 28px;
}
h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0;
}
.toolbar p {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.card p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 13px;
}
.card strong {
  font-size: 27px;
  font-weight: 650;
}
.empty {
  padding: 44px 20px;
  text-align: center;
  border: 1px dashed #bdc9d3;
  border-radius: 12px;
  background: #fff;
}
.empty p {
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  background: #f9fafc;
}
th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
button {
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  border-radius: 7px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.quiet {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
.small {
  padding: 6px 10px;
  font-size: 12px;
}
.danger {
  color: #ac3333;
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 20px;
  background: #f0f3f6;
  color: var(--muted);
  font-size: 11px;
}
.good {
  background: #e9f5ef;
  color: #256b48;
}
.pending {
  background: #fff3dd;
  color: #8b6317;
}
.wrap {
  white-space: normal;
  word-break: break-word;
}
code {
  font-size: 12px;
}
label {
  display: block;
  font-size: 13px;
  margin: 16px 0 6px;
}
input,
select,
textarea {
  font: inherit;
  font-size: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bcc8d3;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
textarea {
  min-height: 86px;
  resize: vertical;
}
input[type='checkbox'] {
  width: auto;
  margin-right: 8px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 18px 0;
  padding: 8px 14px 14px;
}
legend {
  font-size: 13px;
}
.checkbox {
  display: flex;
  align-items: center;
  margin: 9px 0;
  gap: 5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 90vh;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: #18263580;
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}
#message,
#dialog-error {
  padding: 12px 16px;
  background: #fff1ed;
  border: 1px solid #efd1c7;
  border-radius: 7px;
  font-size: 13px;
}
.helper {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 12px;
}
.list {
  display: grid;
  gap: 18px;
}
.list .panel {
  padding: 22px;
}
#logout {
  margin-top: 40px;
  width: 100%;
}
:focus-visible {
  outline: 3px solid #78a5ef;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--blue);
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  main {
    padding: 30px 24px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 17px;
  }
}
@media (max-width: 640px) {
  .shell {
    display: block;
  }
  aside {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 20px;
  }
  .mark {
    width: 29px;
    height: 32px;
  }
  .tagline {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 14px;
    gap: 3px;
  }
  nav a {
    padding: 9px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  main {
    padding: 25px 18px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .card p {
    margin: 0;
  }
  .card strong {
    font-size: 22px;
  }
  #logout {
    margin-top: 12px;
    width: auto;
  }
  .toolbar {
    align-items: flex-start;
  }
  h1 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr {
    display: block;
    white-space: normal;
  }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .table-wrap tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
    border: 0;
    font-size: 12px;
    word-break: break-word;
  }
  .table-wrap td::before {
    content: attr(data-label);
    flex: 0 0 100px;
    color: var(--muted);
    font-size: 11px;
  }
  .table-wrap td > span,
  .table-wrap td > code {
    min-width: 0;
    white-space: normal;
  }
  .table-wrap td:last-child {
    justify-content: flex-end;
  }
  .table-wrap td:last-child::before {
    display: none;
  }
}
