:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #63717a;
  --line: #d9e1e5;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.topbar {
  align-items: center;
  background: #172026;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
}

.brand {
  color: #fff;
  font-size: 20px;
}

.topbar nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.topbar a {
  color: #fff;
}

.topbar form {
  margin: 0;
}

button,
.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 14px;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.header-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2 {
  margin: 0 0 10px;
}

p {
  color: var(--muted);
  margin: 0 0 14px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.narrow {
  max-width: 560px;
}

.form p {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
}

.list-row span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.totals,
.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  background: #e6f4f1;
  border: 1px solid #a9d8d0;
  border-radius: 8px;
  padding: 10px 12px;
}

@media (max-width: 780px) {
  .topbar,
  .header-row,
  .list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 18px;
  }
}

