:root {
  font:
    15px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #17324d;
  background: #f2f7fe;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 0 0 12px;
}
h2 {
  font-size: 21px;
  margin: 0 0 12px;
}
p {
  color: #526b84;
  margin: 8px 0 18px;
}
a {
  color: #136ac2;
  text-underline-offset: 3px;
}
header {
  background: white;
  border-bottom: 1px solid #cddff3;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  font-size: 23px;
  font-weight: 750;
  color: #146dc4;
}
.brand span {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: #52708d;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.workspace {
  max-width: 1420px;
  margin: auto;
  padding: 28px 32px 60px;
}
.card {
  background: #fff;
  border: 1px solid #d1e0f2;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 6px 24px #153a6410;
}
.login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login .card {
  max-width: 470px;
  width: 100%;
}
.login .brand {
  margin-bottom: 30px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 650;
  font-size: 13px;
  margin: 14px 0;
}
input,
select {
  width: 100%;
  border: 1px solid #bed5ef;
  border-radius: 9px;
  background: #fff;
  color: #17324d;
  padding: 12px;
  min-width: 0;
  font-weight: 400;
  min-height: 46px;
}
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9acaff;
  outline-offset: 2px;
}
.password {
  display: flex;
  position: relative;
}
.password input {
  padding-right: 50px;
}
.password button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 42px;
  border: 0;
  background: transparent;
  color: #36709f;
  font-size: 20px;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #bfd5ef;
  border-radius: 9px;
  background: #fff;
  color: #245985;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.button.primary {
  background: #176ec6;
  color: white;
  border-color: #176ec6;
}
.button.danger {
  color: #a32a32;
  border-color: #e6bec3;
}
.login .button.primary {
  width: 100%;
  margin-top: 12px;
}
.error {
  color: #a22332;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
nav {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.tab {
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 12px 18px;
  color: #446582;
  font-weight: 650;
}
.tab.active {
  background: #dcecff;
  color: #145caa;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 24px;
}
.heading p {
  margin-bottom: 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.summary div {
  padding: 18px;
  border: 1px solid #d1e0f2;
  border-radius: 12px;
  background: white;
  font-size: 13px;
  color: #526b84;
}
.summary strong {
  display: block;
  font-size: 27px;
  color: #17324d;
  margin-top: 7px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.toolbar input {
  max-width: 400px;
}
.table-card {
  overflow: hidden;
  border: 1px solid #d1e0f2;
  border-radius: 14px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
th,
td {
  text-align: left;
  padding: 16px;
  vertical-align: top;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #e2ebf7;
  font-size: 13px;
}
th {
  background: #eaf3ff;
  color: #42617e;
  font-weight: 650;
}
th:first-child {
  width: 23%;
}
th:last-child {
  width: 30%;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 15px;
}
small {
  display: block;
  color: #62788f;
  font-size: 12px;
  margin-top: 5px;
}
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
  background: #eef3f8;
  color: #526b84;
}
.badge.active {
  background: #e3f6eb;
  color: #17673c;
}
.badge.ready {
  background: #fff2d6;
  color: #865710;
}
.badge.error,
.badge.suspended {
  background: #ffebec;
  color: #a0323a;
}
.meter {
  height: 6px;
  border-radius: 6px;
  background: #e9f0f8;
  margin-top: 9px;
  overflow: hidden;
}
.meter span {
  height: 100%;
  display: block;
  background: #4a9bea;
}
.meter.over span {
  background: #d7595f;
}
.empty {
  padding: 40px;
  text-align: center;
  color: #61758b;
}
dialog {
  border: 1px solid #d1e0f2;
  border-radius: 16px;
  padding: 0;
  width: min(660px, calc(100vw - 32px));
  max-height: 90svh;
  box-shadow: 0 30px 100px #10335340;
}
dialog::backdrop {
  background: #18314866;
  backdrop-filter: blur(4px);
}
#dialog-content {
  padding: 25px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}
.close {
  border: 0;
  background: #eff5fd;
  border-radius: 9px;
  min-width: 40px;
  min-height: 40px;
  color: #42617e;
  font-size: 20px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: start;
  font-weight: 400;
}
.check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  flex-shrink: 0;
}
.form-actions {
  display: flex;
  justify-content: end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2ebf7;
  background: #fff;
  position: sticky;
  bottom: 0;
}
.explanation {
  background: #edf5ff;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
}
.backup-row {
  padding: 14px 0;
  border-bottom: 1px solid #e2ebf7;
}
.backup-row:last-child {
  border: 0;
}
.backup-row .actions {
  margin-top: 8px;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 30px);
  padding: 12px 18px;
  background: #173c61;
  color: #fff;
  border-radius: 10px;
  z-index: 10;
}
.events th:last-child {
  width: auto;
}
@media (max-width: 760px) {
  header {
    padding: 15px 16px;
  }
  .brand {
    font-size: 21px;
  }
  .header-actions > span {
    display: none;
  }
  .workspace {
    padding: 20px 16px 40px;
  }
  .heading {
    align-items: start;
    flex-direction: column;
  }
  h1 {
    font-size: 25px;
  }
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .summary div {
    padding: 13px;
  }
  .summary strong {
    font-size: 24px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar input {
    max-width: none;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: auto;
  }
  thead {
    display: none;
  }
  tr {
    padding: 14px 16px;
    border-bottom: 1px solid #d9e5f5;
  }
  td {
    padding: 7px 0;
    border: 0;
  }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: #5d7893;
    margin-bottom: 4px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  dialog {
    max-height: 94svh;
  }
  #dialog-content {
    padding: 20px;
  }
  .form-actions {
    padding-bottom: env(safe-area-inset-bottom, 8px);
  }
  .actions .button {
    flex-grow: 1;
  }
  .events td {
    padding: 7px 0;
  }
  .card {
    padding: 22px;
  }
  .login .brand {
    margin-bottom: 24px;
  }
}

.meter progress {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  accent-color: #4a9bea;
}
.meter.over progress {
  accent-color: #d7595f;
}
[data-more] {
  margin-top: 16px;
}
