:root {
  color-scheme: light;
  font-family: Segoe UI, Arial, sans-serif;
  color: #172026;
  background: #f5f7f8;
}

body {
  margin: 0;
}

body.logged-out .authedOnly,
body.logged-in .loginOnly {
  display: none !important;
}

body.logged-out main {
  max-width: 460px;
  padding-top: 72px;
}

body.logged-out header {
  justify-content: center;
  text-align: center;
}

body.logged-out .toolbar {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #dde4e9;
  border-radius: 6px;
  flex-direction: column;
  padding: 16px;
}

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px;
}

header,
.toolbar,
.filters,
.stats,
.pager,
.panelHeader {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

header {
  justify-content: space-between;
}

.headerActions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.toolNav {
  justify-content: flex-end;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

input,
select,
button {
  height: 36px;
  border: 1px solid #c8d1d8;
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
  box-sizing: border-box;
}

input {
  min-width: 220px;
}

button {
  cursor: pointer;
  background: #1f6feb;
  color: white;
  border-color: #1f6feb;
}

.buttonLike {
  align-items: center;
  border: 1px solid #1f6feb;
  border-radius: 6px;
  box-sizing: border-box;
  color: white;
  display: inline-flex;
  height: 36px;
  padding: 0 10px;
  text-decoration: none;
}

button:disabled {
  cursor: default;
  opacity: .45;
}

button.secondary,
.buttonLike.secondary {
  background: #ffffff;
  color: #172026;
  border-color: #c8d1d8;
}

button.danger {
  background: #b42318;
  border-color: #b42318;
}

button.tiny {
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.stats div {
  min-width: 120px;
  padding: 12px;
  background: white;
  border: 1px solid #dde4e9;
  border-radius: 6px;
}

.stats span {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.stats small,
#apiStatus,
#pageInfo,
#auditPageInfo,
#backupPageInfo {
  color: #5f6b75;
  font-size: 13px;
}

.tableWrap {
  overflow: auto;
  max-height: 520px;
  background: white;
  border: 1px solid #dde4e9;
  border-radius: 6px;
  margin-bottom: 18px;
}

.compactTable {
  max-height: 340px;
}

.compactPager {
  margin-top: -6px;
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1760px;
}

.compactTable table {
  min-width: 980px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f8fafb;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.actions {
  display: flex;
  gap: 8px;
}

.warn {
  color: #b54708;
  font-weight: 700;
}

.dangerText {
  color: #b42318;
  font-weight: 700;
}

#message {
  min-height: 24px;
  white-space: pre-wrap;
  color: #344054;
  font-family: inherit;
}

@media (max-width: 760px) {
  main {
    padding: 14px;
  }

  header,
  .toolbar,
  .filters,
  .stats,
  .pager,
  .panelHeader {
    align-items: stretch;
    flex-direction: column;
  }

  input,
  select,
  button {
    width: 100%;
  }
}
