:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #66727d;
  --line: #d8dee4;
  --accent: #096b72;
  --accent-2: #8a5a12;
  --danger: #b42318;
  --warn: #b54708;
  --ok: #067647;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafb;
  color: #24313a;
  font-size: 12px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.brand.big {
  padding: 0;
  border: 0;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  letter-spacing: 0;
}

nav {
  padding: 12px;
}

nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: #35434d;
}

nav a.active,
nav a:hover {
  background: #e8f3f4;
  color: #064f55;
}

.main {
  margin-left: 248px;
  padding: 22px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 750;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

.topbar p,
small,
.user {
  color: var(--muted);
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.user strong {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #24313a;
  font-size: 12px;
  text-transform: uppercase;
}

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

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric-card {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 24px;
}

.panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fafbfc;
  color: #4d5b66;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  line-height: 1.45;
}

.chip {
  display: inline-flex;
  min-width: 68px;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f4;
  color: #3d4a54;
  font-size: 12px;
  font-weight: 650;
}

.chip.healthy,
.chip.success,
.chip.enabled,
.chip.closed {
  background: #ecfdf3;
  color: var(--ok);
}

.chip.stale,
.chip.warning,
.chip.open,
.chip.preview {
  background: #fff4e5;
  color: var(--warn);
}

.chip.error,
.chip.degraded,
.chip.failure,
.chip.disabled {
  background: #fef3f2;
  color: var(--danger);
}

.filters,
.form-grid,
.inline-form,
.action-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filters {
  margin-bottom: 12px;
}

.form-grid,
.action-form {
  padding: 14px;
}

.action-form {
  align-items: stretch;
  border-top: 1px solid var(--line);
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
button,
.button {
  min-height: 34px;
  border-radius: 6px;
  font: inherit;
}

input,
textarea {
  min-width: 180px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  background: white;
}

textarea {
  min-height: 72px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0d646b;
  padding: 0 12px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button.selected {
  background: #12343b;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-radius: var(--radius);
  background: #fffaeb;
  color: #93370d;
}

.notice.error {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--danger);
}

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

.login-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 16px;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

  nav {
    display: flex;
    overflow: auto;
  }

  nav a {
    white-space: nowrap;
  }

  .main {
    margin-left: 0;
  }

  .topbar,
  .login-shell {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
