:root {
  --bg: #f3efe4;
  --panel: rgba(255, 252, 245, 0.85);
  --ink: #1d241d;
  --muted: #657067;
  --line: rgba(29, 36, 29, 0.12);
  --primary: #205c48;
  --primary-2: #164235;
  --accent: #cd7a2b;
  --danger: #8a2a2a;
  --success: #1c6a4e;
  --shadow: 0 22px 60px rgba(40, 42, 29, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(205, 122, 43, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(32, 92, 72, 0.14), transparent 32%),
    linear-gradient(180deg, #f8f4ea 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.panel h2,
.form-header h3,
.table-header h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  max-width: 13ch;
}

.lede {
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 18px;
}

.hero-card,
.panel,
.flash {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 22px;
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(32, 92, 72, 0.14), rgba(255, 255, 255, 0.8)),
    var(--panel);
}

.meta-grid {
  width: 100%;
  display: grid;
  gap: 12px;
}

.meta-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.panel {
  padding: 24px;
}

.panel-heading,
.table-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.panel h2 {
  font-size: 34px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.stack-form,
.table-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  padding: 18px;
}

.form-header p {
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
}

.field {
  display: block;
  margin-top: 14px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(29, 36, 29, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 13px 14px;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(32, 92, 72, 0.55);
  box-shadow: 0 0 0 4px rgba(32, 92, 72, 0.12);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  margin-top: 16px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 700;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 600;
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.table-block {
  margin-top: 18px;
}

.table-shell {
  margin-top: 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(32, 92, 72, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

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

.flash-wrap {
  position: sticky;
  bottom: 18px;
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.flash {
  max-width: 460px;
  padding: 14px 16px;
  pointer-events: auto;
}

.flash.success {
  border-color: rgba(28, 106, 78, 0.2);
}

.flash.error {
  border-color: rgba(138, 42, 42, 0.22);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero,
  .layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 20px, 1320px);
  }

  .hero h1 {
    max-width: none;
  }
}
