:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  color: #142738;
  background: #f4f6f8;
  font-size: 15px;
  letter-spacing: 0;
  --primary: #086bba;
  --border: #dbe2e8;
  --muted: #586c7a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 1px solid #c7d3dc;
  background: white;
  color: #213b4d;
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 14px;
  cursor: pointer;
}
button:hover {
  background: #eaf3f9;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #09aad0;
  outline-offset: 2px;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.primary:hover {
  background: #085895;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: white;
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #123b60;
  font-size: 21px;
  font-weight: 700;
}
.brand img {
  width: 143px;
  height: 55px;
  object-fit: contain;
}
nav {
  display: grid;
  gap: 6px;
}
nav button {
  text-align: left;
  border: 0;
  background: transparent;
}
nav button.active {
  background: #e6f2fa;
  color: #075994;
  font-weight: 650;
}
.identity {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
main {
  min-width: 0;
  padding: 30px 38px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 650;
  color: #427080;
  margin: 0 0 8px;
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
}
h2 {
  font-size: 19px;
  margin: 0 0 18px;
}
p {
  line-height: 1.5;
}
#notice {
  border-left: 4px solid #168362;
  background: #e7f5ee;
  padding: 12px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
#notice.error {
  border-color: #b33838;
  background: #fff0ed;
}
.login {
  max-width: 400px;
  margin: 70px auto;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin-bottom: 15px;
}
label {
  font-size: 13px;
  font-weight: 650;
}
input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #b9c9d3;
  border-radius: 5px;
  background: white;
  color: inherit;
  min-width: 0;
}
textarea {
  min-height: 90px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar .field {
  margin: 0;
  flex: 1;
  min-width: 145px;
  max-width: 230px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.stat {
  padding: 22px 15px;
  border-right: 1px solid var(--border);
}
.stat:last-child {
  border: 0;
}
.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 7px;
}
.stat span {
  color: var(--muted);
  font-size: 13px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  background: #edf2f5;
  color: #536877;
  font-weight: 600;
  white-space: nowrap;
}
th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e6ebef;
  vertical-align: middle;
}
td {
  max-width: 300px;
  overflow-wrap: anywhere;
}
td .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
td button {
  padding: 6px 10px;
  min-height: 34px;
  font-size: 12px;
}
a {
  color: #0768ae;
}
.badge {
  font-size: 12px;
  color: #166847;
  background: #e4f4eb;
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.RETIRED,
.badge.PAUSED {
  color: #6e5d35;
  background: #f5efdf;
}
.empty {
  padding: 36px 15px;
  color: var(--muted);
  text-align: center;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.bar-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  margin: 12px 0;
}
.hint {
  font-size: 13px;
  color: var(--muted);
}
dialog {
  width: min(640px, calc(100% - 24px));
  max-height: 90dvh;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  color: inherit;
  overflow: auto;
}
dialog::backdrop {
  background: #12253288;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}
.dialog-head h2 {
  padding-top: 8px;
}
footer {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 22px;
}
#formError {
  color: #a62727;
  font-size: 13px;
}
.qr-preview {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.danger {
  color: #a42727;
}
progress {
  width: 100%;
  accent-color: #0b92b5;
}
small {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  aside {
    padding: 20px 12px;
  }
  .brand img {
    width: 112px;
  }
  main {
    padding: 24px 20px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .shell {
    display: block;
  }
  aside {
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    gap: 10px;
  }
  .brand img {
    width: 115px;
    height: 40px;
  }
  .brand {
    font-size: 17px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  nav button {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 9px;
  }
  .identity {
    display: none;
  }
  main {
    padding: 22px 16px;
  }
  h1 {
    font-size: 24px;
  }
  .stat {
    padding: 15px 8px;
  }
  .stat strong {
    font-size: 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toolbar .field {
    max-width: none;
    min-width: 130px;
  }
  .login {
    margin: 25px auto;
  }
  dialog {
    padding: 16px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }
  table,
  tbody {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 12px;
  }
  td {
    display: block;
    border: 0;
    max-width: none;
    padding: 0;
    min-width: 0;
  }
  td:first-child,
  td:last-child {
    grid-column: 1/-1;
  }
  td:before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  td .actions {
    gap: 8px;
  }
  td small {
    overflow-wrap: anywhere;
  }
  .table-wrap tr + tr {
    margin-top: 8px;
  }
}
