body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f6f2ea;
  color: #1f1f1f;
}

a {
  color: #8b3f1f;
}

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

.app-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #fff1d6, #f6c98b);
  border-bottom: 1px solid #e3c18a;
}

.app-shell h1,
.card h2 {
  margin: 0;
}

.app-shell p {
  margin: 6px 0 0;
  color: #5a4937;
}

.app-nav {
  display: flex;
  gap: 16px;
  padding: 0 24px 18px;
  background: #fffaf2;
  border-bottom: 1px solid #ecd8b5;
}

.app-nav a {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
}

.app-nav a.active,
.app-nav a:hover {
  background: #ffe1b0;
}

.card {
  background: #fff;
  border: 1px solid #e7dcc7;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(71, 51, 29, 0.08);
  margin-bottom: 24px;
}

.narrow {
  max-width: 460px;
}

.stack,
.filter-grid {
  display: grid;
  gap: 14px;
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

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

input,
select,
textarea {
  border: 1px solid #ccb998;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffcf7;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: #8b3f1f;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #6a6a6a;
}

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

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e7dcc7;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(71, 51, 29, 0.05);
}

.stat-card span {
  display: block;
  color: #6d5a44;
  margin-bottom: 12px;
}

.stat-card strong {
  font-size: 28px;
}

.notice {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.notice.success {
  background: #e6f6e8;
  color: #235c2d;
}

.notice.error {
  background: #fde7e7;
  color: #8f2e2e;
}

.actions-row,
.pager,
.detail-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
}

.detail-grid dt {
  font-weight: 700;
}

.detail-grid dd {
  margin: 0;
}

.body-copy,
pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.logout-form {
  margin: 0;
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 18px;
  }
}