:root {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #172c3c;
  background: #f4f6f8;
  font-size: 15px;
  line-height: 1.55;
  --accent: #174e75;
  --muted: #506574;
  --line: #d5dee5;
  --radius: 10px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  padding: 10px 17px;
  font-weight: 600;
}
button:hover {
  background: #103b5b;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary {
  background: white;
  border-color: var(--line);
  color: #172c3c;
}
button.quiet {
  background: transparent;
  color: inherit;
  padding: 7px 0;
  text-align: left;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #4385b6;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #9eafbc;
  border-radius: 7px;
  background: white;
  color: #172c3c;
  min-width: 0;
  caret-color: var(--accent);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input::placeholder {
  color: #5b6d7b;
}
input[type="checkbox"] {
  width: auto;
}
label {
  display: block;
  font-weight: 550;
  font-size: 0.9rem;
  margin: 12px 0;
}
label input,
label select,
label textarea {
  margin-top: 5px;
}
p {
  color: var(--muted);
  max-width: 70ch;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
}
h3 {
  font-size: 1rem;
  margin: 0 0 12px;
}
.wordmark {
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.wordmark span {
  display: block;
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0;
  color: inherit;
  opacity: 0.8;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(100%, 430px);
  background: white;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.login .wordmark {
  margin-bottom: 46px;
}
.login h1 {
  font-size: 1.7rem;
}
.login form {
  margin-top: 32px;
}
.login button {
  width: 100%;
  margin-top: 10px;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100dvh;
}
[hidden] {
  display: none !important;
}
aside {
  background: #112c3f;
  color: #e8f0f5;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.tenant-label {
  margin: 10px 0;
  color: #cad7e2;
}
aside select {
  background: #1e3d52;
  color: white;
  border-color: #537084;
  font-size: 0.85rem;
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  text-align: left;
  border-radius: 6px;
  background: transparent;
  color: #dae5ed;
  font-weight: 450;
  padding: 11px 12px;
}
nav button:hover,
nav button.active {
  background: #294c64;
  color: white;
}
.aside-bottom {
  margin-top: auto;
  display: grid;
  font-size: 0.8rem;
  gap: 7px;
  color: #bdcedb;
}
main {
  padding: 44px 5vw 20px;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
header p {
  font-size: 0.85rem;
  margin: 0 0 9px;
}
header button {
  flex-shrink: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.toolbar p {
  margin: 0;
}
.summary {
  display: flex;
  gap: 40px;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 35px;
  flex-wrap: wrap;
}
.summary strong {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.summary span {
  font-size: 0.85rem;
  color: var(--muted);
}
.guide {
  max-width: 650px;
  margin-top: 30px;
}
.guide li {
  margin: 15px 0;
  padding-left: 7px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 0.75rem;
  font-weight: 600;
  color: #526979;
  padding: 14px 18px;
  background: #edf2f5;
}
td {
  padding: 18px;
  border-top: 1px solid #e3e9ed;
  font-size: 0.88rem;
  vertical-align: top;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: normal;
  max-width: 28rem;
}
td button {
  padding: 5px 9px;
  font-size: 0.78rem;
  margin-right: 5px;
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
code {
  font-size: 0.8rem;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  padding: 18px;
  background: #edf2f5;
  border-radius: 7px;
  max-height: 45vh;
  overflow: auto;
}
.empty {
  background: white;
  padding: 50px 30px;
  border: 1px dashed #9eafbc;
  border-radius: var(--radius);
  text-align: center;
}
.empty p {
  margin: 10px auto 22px;
}
.badge {
  display: inline-block;
  background: #e9f2f7;
  color: #1c5275;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.75rem;
}
.badge.error {
  background: #fff0e8;
  color: #8d341b;
}
footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
#notice {
  background: #e7eff5;
  padding: 12px 16px;
  border-radius: 7px;
  margin-bottom: 22px;
}
#form-error,
#login-error {
  color: #973b25;
  font-size: 0.9rem;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  width: min(650px, calc(100% - 30px));
  max-height: 90dvh;
  overflow: auto;
  color: #172c3c;
  background: white;
}
dialog::backdrop {
  background: rgb(11 31 47 / 0.55);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.wide {
  grid-column: 1/-1;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
.checks label {
  font-weight: 450;
  min-width: 150px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 20px 0;
  padding: 10px 18px;
}
legend {
  font-weight: 600;
  padding: 0 5px;
}
.approval {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin: 18px 0;
}
::selection {
  background: #bfd6e8;
  color: #102d43;
}
* {
  scrollbar-color: #9bafbe #f4f6f8;
  scrollbar-width: thin;
}
@media (max-width: 800px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  aside {
    position: relative;
    height: auto;
    padding: 20px;
    gap: 12px;
  }
  .wordmark {
    font-size: 1.4rem;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 4px;
    padding-bottom: 6px;
  }
  nav button {
    white-space: nowrap;
    padding: 8px 10px;
  }
  .aside-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
  }
  .tenant-label {
    max-width: 400px;
  }
  main {
    padding: 26px 20px;
  }
  header {
    margin-bottom: 26px;
  }
  .summary {
    gap: 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  aside,
  main,
  nav {
    min-width: 0;
  }
  .table-wrap {
    max-width: 100%;
  }
  table {
    min-width: 620px;
  }
  header {
    gap: 12px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 1.65rem;
  }
  .login-panel {
    padding: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.15s ease-out;
  }
  dialog[open] {
    animation: appear 0.16s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.4;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
