:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #dce2ea;
  --brand: #146c63;
  --brand-2: #1f7a9b;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

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

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
}

.login-card h1,
.section-title h2 {
  margin: 0;
}

.eyebrow {
  margin: 0;
  color: var(--brand-2);
  font-weight: 700;
}

.error {
  border: 1px solid #f3b4ae;
  border-radius: 6px;
  background: #fff4f2;
  color: var(--danger);
  padding: 12px;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar div {
  display: grid;
  gap: 3px;
}

.topbar span,
.section-title p {
  color: var(--muted);
  font-size: 13px;
}

.topbar a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 48px;
  display: grid;
  gap: 18px;
}

.stats,
.two-col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.two-col {
  grid-template-columns: 1.2fr .8fr;
}

.stats article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.stats span {
  color: var(--muted);
}

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

.panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.section-title {
  display: grid;
  gap: 5px;
}

.section-title p {
  margin: 0;
}

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

.stack,
.plan-row {
  display: grid;
  gap: 12px;
}

.plan-row {
  grid-template-columns: 1fr .6fr .6fr 1.3fr auto;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .stats,
  .two-col,
  .grid-form,
  .plan-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 16px;
  }
}

