* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #162232;
  background:
    radial-gradient(circle at top left, rgba(178, 98, 60, 0.14), transparent 32%),
    linear-gradient(135deg, #ede6db 0%, #f7f2eb 52%, #ebe5db 100%);
}

a {
  color: #8a452a;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 250, 243, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(22, 34, 50, 0.08);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #8a452a;
}

.app-title,
.hero-title,
.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.app-title {
  font-size: 1.3rem;
}

.flash {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid #1a6b47;
  background: rgba(255, 255, 255, 0.72);
}

.flash-error {
  border-left-color: #b34444;
}

.flash-success {
  border-left-color: #1a6b47;
}

.page-grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.panel,
.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 251, 245, 0.84);
  box-shadow: 0 20px 60px rgba(22, 34, 50, 0.08);
}

.panel {
  padding: 24px;
}

.hero-panel {
  padding: clamp(24px, 5vw, 60px);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.hero-subtitle {
  margin: 16px 0 0;
  font-size: clamp(1.2rem, 2.5vw, 1.9rem);
  color: #4e5c6a;
}

.muted-copy {
  color: #586678;
  line-height: 1.7;
}

.large-copy {
  max-width: 42rem;
  font-size: 1.05rem;
}

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

.section-card {
  padding: 20px;
  border: 1px solid rgba(22, 34, 50, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(138, 69, 42, 0.4);
  text-decoration: none;
}

.section-index {
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #8a452a;
}

.section-title {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.05;
}

.small-title {
  font-size: 1.25rem;
}

.narrow {
  width: min(560px, 100%);
  margin: 32px auto 0;
}

.auth-panel {
  margin-top: 42px;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: #2f3d4f;
}

.full-width {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(22, 34, 50, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid #8a452a;
  background: #8a452a;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: #8a452a;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.62);
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(22, 34, 50, 0.1);
  text-align: left;
}

.admin-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #586678;
}

.form-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(22, 34, 50, 0.12);
}

@media (max-width: 800px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
  }

  .app-header,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }
}

