:root {
  --ink: #251742;
  --purple: #4f2fcc;
  --mint: #dff8ec;
  --lavender: #b8a0ef;
  --line: #d8cee8;
  --muted: #70657f;
  --paper: #fff;
  --soft: #faf9ff;
  --danger: #b12b4f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--purple);
  font-weight: 650;
  border-radius: 3px;
  cursor: pointer;
}
button:hover {
  background: var(--mint);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--purple);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 38px;
  letter-spacing: -1.5px;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid #9e8bb8;
  background: var(--paper);
  border-radius: 2px;
}
textarea {
  min-height: 110px;
  font-family: ui-monospace, monospace;
}
label {
  display: block;
  font-weight: 600;
  margin: 14px 0;
}
label small,
.muted {
  color: var(--muted);
  font-weight: 400;
}
small {
  font-size: 12px;
}
code,
.eyebrow,
.stamp {
  font-family: ui-monospace, monospace;
}
.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.primary {
  background: var(--purple);
  color: white;
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.primary:hover {
  color: var(--ink);
}
.panel {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 #ece5f7;
  padding: 24px;
  margin-bottom: 24px;
  background: var(--paper);
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--soft);
}
.login form {
  width: min(500px, 100%);
  box-shadow: 8px 8px 0 var(--lavender);
  padding: 36px;
}
.login h1 {
  font-size: 58px;
  font-style: italic;
  color: var(--purple);
  margin-bottom: 20px;
}
.login h1 span {
  font-size: 18px;
  font-style: normal;
  letter-spacing: 0;
}
.login p {
  margin-bottom: 20px;
}
.login .primary {
  width: 100%;
  margin: 8px 0 20px;
}
[hidden] {
  display: none !important;
}
#shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  padding: 30px 20px;
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  font-size: 38px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -2px;
  text-decoration: none;
}
.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.5px;
  font-style: normal;
  font-family: ui-monospace, monospace;
}
nav {
  display: grid;
  gap: 10px;
}
nav button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  border: 1px solid transparent;
  color: var(--ink);
}
nav button span {
  font-family: ui-monospace, monospace;
  color: var(--muted);
  font-size: 11px;
}
nav button[aria-current="page"] {
  background: var(--mint);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--lavender);
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  line-height: 2;
}
.lamp {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #298459;
  margin-right: 6px;
}
main {
  padding: 36px 42px;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stamp {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 24px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.metric {
  border: 2px solid var(--ink);
  border-top: 5px solid var(--purple);
  padding: 20px;
  box-shadow: 3px 3px 0 #ece5f7;
}
.metric:nth-child(2) {
  border-top-color: #76dfb0;
}
.metric:nth-child(3) {
  border-top-color: var(--lavender);
}
.metric .value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  display: block;
  color: var(--muted);
}
.section-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  background: #f0eaff;
  font-weight: 650;
  color: #594b70;
}
th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td small {
  display: block;
  color: var(--muted);
}
td code {
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--mint);
  border-radius: 2px;
  font-size: 12px;
  white-space: nowrap;
}
.badge.warn {
  background: #fff1d1;
  color: #805617;
}
.badge.bad {
  background: #ffedf2;
  color: var(--danger);
}
.bar {
  display: flex;
  height: 12px;
  background: #f1ecfa;
  margin: 8px 0;
}
.bar .used {
  background: var(--purple);
}
.bar .borrowed {
  background: #76dfb0;
}
.empty {
  padding: 24px 0;
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions button {
  font-size: 12px;
  padding: 4px 8px;
}
.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hint {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 12px;
}
output {
  display: block;
  color: var(--danger);
  white-space: pre-wrap;
  margin: 10px 0;
}
output:empty {
  display: none;
}
dialog {
  width: min(650px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--lavender);
  padding: 26px;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #25174255;
}
.dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
#fields {
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  #shell {
    grid-template-columns: minmax(0, 1fr);
  }
  aside {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
    padding: 15px 20px;
    gap: 12px;
  }
  .brand {
    font-size: 30px;
  }
  .brand span {
    display: inline;
    margin-left: 12px;
  }
  .aside-bottom,
  aside > .eyebrow {
    display: none;
  }
  nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  nav button span {
    display: none;
  }
  main {
    padding: 24px;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 14px;
  }
  .metric .value {
    font-size: 32px;
  }
}
@media (max-width: 520px) {
  main {
    padding: 20px 14px;
  }
  h1 {
    font-size: 30px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metric .value {
    font-size: 34px;
  }
  .metric {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .panel {
    padding: 16px;
  }
  button {
    min-height: 44px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .quota-grid {
    grid-template-columns: 1fr;
  }
  .login form {
    padding: 24px;
  }
  th,
  td {
    padding: 10px 8px;
  }
}
