:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f5f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #155eef;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d8dee8;
  display: flex;
  gap: 24px;
  min-height: 58px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  color: #111827;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  flex: 1;
}

main {
  padding: 24px;
}

h1,
h2 {
  margin: 0 0 16px;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

button,
.button {
  background: #155eef;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 9px 14px;
}

.secondary {
  background: #e8edf5;
  color: #17202a;
}

.danger {
  background: #c2410c;
}

.page-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #17202a;
  font: inherit;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

table {
  background: #ffffff;
  border-collapse: collapse;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metrics a,
.metrics div,
.panel,
.details > div,
.login-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.metrics a,
.metrics div {
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
}

.metrics strong {
  font-size: 28px;
}

.metrics span,
.details span {
  color: #64748b;
  font-size: 13px;
}

.grid-two {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 22px;
}

.panel {
  margin-bottom: 22px;
  padding: 18px;
}

.details {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.details > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 12px;
}

label {
  color: #475569;
  display: grid;
  font-size: 13px;
  gap: 6px;
}

.check {
  align-items: center;
  display: flex;
  gap: 8px;
  padding-top: 24px;
}

.check input {
  width: auto;
}

.inline-form {
  margin-top: 12px;
}

.badge {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  max-width: 460px;
  overflow-wrap: anywhere;
}

.muted {
  color: #64748b;
  font-size: 12px;
  margin-top: 3px;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

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

.disabled {
  cursor: default;
  opacity: 0.55;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-panel {
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
}

.alert {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  padding: 10px 12px;
}

@media (max-width: 1100px) {
  .metrics,
  .details,
  .form-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .topbar,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
