:root {
  color-scheme: light;
  --page: #f3f5ef;
  --panel: #fff;
  --ink: #1c2921;
  --muted: #4b5c51;
  --line: #cfdbd0;
  --action: #234731;
  font: 16px/1.6 system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #347850; outline-offset: 3px; }
.bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: .8rem clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.brand { font-size: 1.55rem; font-weight: 750; text-decoration: none; letter-spacing: -.035em; }
.brand span { color: #438757; }
nav { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; }
nav a { font-weight: 620; }
main { width: min(100% - 2.5rem, 66rem); margin: clamp(2.5rem, 7vw, 5.5rem) auto; }
main.narrow { max-width: 32rem; }
h1 { margin: 0 0 .75rem; font-size: clamp(2.15rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: -.04em; }
h2 { font-size: 1.34rem; margin: 0 0 .65rem; }
p { color: var(--muted); margin: .4rem 0 1rem; }
section { margin-top: 2rem; padding: 1.35rem; border: 1px solid var(--line); background: var(--panel); border-radius: .6rem; }
label { display: grid; gap: .35rem; margin-top: 1rem; font-weight: 620; }
label[hidden] { display: none; }
input:not([type=hidden]) { color: var(--ink); background: var(--panel); font: inherit; border: 1px solid #869c8b; border-radius: .35rem; padding: .6rem .7rem; width: 100%; }
button { margin-top: 1rem; background: var(--action); color: #fff; padding: .55rem .9rem; font: inherit; font-weight: 650; border: 1px solid transparent; border-radius: .35rem; cursor: pointer; }
button:hover { background: #386547; }
.secondary { color: var(--action); background: transparent; border-color: #869c8b; }
.secondary:hover { background: #e0ebe2; }
.workspace-bar { gap: .75rem 1rem; padding-inline: 1.25rem; }
.logout {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}
.logout button { flex: none; margin: 0; }
.account-name { color: var(--muted); font-weight: 650; overflow-wrap: anywhere; }
.workspace-page { display: flex; flex-direction: column; min-height: 100vh; }
.workspace-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); flex: 1; }
.workspace-layout > main {
  width: 100%;
  min-width: 0;
  max-width: 76rem;
  margin: 0;
  padding: 2rem clamp(1.25rem, 3vw, 3rem) 4rem;
}
.workspace-layout h1 { font-size: 2.5rem; line-height: 1.15; }
.workspace-layout main > section { margin-top: 1.25rem; }
.workspace-layout main > form,
.workspace-layout main > section > form { max-width: 38rem; }
.workspace-nav {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: .25rem;
  padding: 1.5rem .75rem;
  border-inline-end: 1px solid var(--line);
  background: var(--panel);
}
.workspace-nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border-radius: .35rem;
  text-decoration: none;
}
.workspace-nav a:hover { background: var(--page); }
.workspace-nav a[aria-current="page"] {
  color: var(--action);
  background: #e0ebe2;
  font-weight: 750;
}
.workspace-nav-back { color: var(--muted); margin-top: .5rem; }
@media (max-width: 46rem) {
  .workspace-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .workspace-layout h1 { font-size: 2rem; }
  .workspace-layout > main { padding-top: 1.5rem; }
  .workspace-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: .5rem .75rem;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }
  .workspace-nav-back { margin-top: 0; }
}
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: .7rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li:first-child { border-top: 0; }
.key-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
#issued-key, #issued-secret { display: block; overflow-wrap: anywhere; color: var(--action); }
details summary { cursor: pointer; }

.owner-picker { position: relative; }
.owner-picker > label { margin-bottom: .35rem; }
.owner-picker-popup {
  position: absolute;
  z-index: 2;
  inset: calc(100% + .25rem) 0 auto;
  background: var(--panel);
  border: 1px solid #869c8b;
  border-radius: .35rem;
  box-shadow: 0 .4rem 1rem #1c292125;
}
.owner-picker-popup ul {
  list-style: none;
  max-height: 15rem;
  overflow: auto;
  margin: 0;
  padding: .25rem;
}
.owner-picker-popup ul:empty { display: none; }
.owner-picker-popup [role="option"] {
  padding: .45rem .7rem;
  border-radius: .25rem;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.owner-picker-popup [role="option"]:hover,
.owner-picker-popup [aria-selected="true"] { color: var(--action); background: #e0ebe2; }
.owner-picker-status { margin: 0; padding: .55rem .95rem; }
.owner-picker-status:empty { display: none; }

.table-panel { padding: 0; }
.table-scroll { overflow-x: auto; border-radius: inherit; }
.table-scroll:focus-visible { outline: 2px solid #347850; outline-offset: 3px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
.admin-table-wide { min-width: 42rem; }
.admin-table-audit { min-width: 56rem; }
.admin-table-reservations { min-width: 32rem; }
.admin-table th,
.admin-table td {
  padding: .7rem 1rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.admin-table thead th {
  background: var(--page);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}
.admin-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.admin-table [scope="row"] { font-weight: 620; }
.admin-table time { font-size: .875rem; white-space: nowrap; }
.admin-table summary { white-space: nowrap; }
.admin-table button {
  margin: 0;
  padding: .35rem .65rem;
  background: transparent;
  color: var(--action);
  border-color: #869c8b;
}
.admin-table button:hover { background: #e0ebe2; }
.admin-table .table-empty { color: var(--muted); }
.pagination {
  margin: 0;
  padding: .65rem 1rem;
  border-top: 1px solid var(--line);
}
