:root {
  --bg: #f7f2e8;
  --panel: rgba(255, 252, 247, 0.94);
  --text: #1f1b16;
  --muted: #6a6259;
  --line: rgba(56, 43, 28, 0.12);
  --accent: #1d7a5d;
  --accent-dark: #135642;
  --accent-soft: rgba(29, 122, 93, 0.12);
  --warning: #9b5d00;
  --success: #24724f;
  --shadow: 0 24px 60px rgba(58, 38, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(255, 213, 133, 0.32), transparent 30%),
    radial-gradient(circle at top right, rgba(87, 177, 129, 0.24), transparent 28%),
    linear-gradient(180deg, #fff7ed 0%, var(--bg) 100%);
}

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

a {
  color: inherit;
}

.hero {
  padding: 18px 20px 8px;
}

.hero__inner,
.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.72rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.hero__copy {
  max-width: 46ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: end;
}

.nav button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav button.is-active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.page {
  padding: 12px 0 56px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}

.panel--narrow {
  width: min(780px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.panel__heading,
.request-card__header,
.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

.hero-card {
  margin-bottom: 24px;
}

.hero-card__box {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(29, 122, 93, 0.14), rgba(255, 255, 255, 0.5));
  border: 1px solid rgba(19, 86, 66, 0.14);
}

.hero-card__box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

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

.stat-card,
.request-card,
.detail-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2.2rem;
}

.actions-row,
.card-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.actions-row--center {
  justify-content: center;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: white;
}

.button:hover {
  background: var(--accent-dark);
}

.button--secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid rgba(19, 86, 66, 0.22);
}

.button--secondary:hover {
  background: rgba(19, 86, 66, 0.08);
  color: var(--accent-dark);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border: 1px solid var(--line);
}

.button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.flash {
  margin: 0 auto 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 86, 66, 0.14);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.flash--error {
  background: rgba(176, 39, 39, 0.1);
  color: #8d1f1f;
  border-color: rgba(176, 39, 39, 0.15);
}

.hidden {
  display: none;
}

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

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

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

.cards {
  display: grid;
  gap: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.badge--pending_approval {
  background: rgba(242, 169, 59, 0.18);
  color: var(--warning);
}

.badge--approved {
  background: rgba(29, 122, 93, 0.14);
  color: var(--success);
}

.badge--finished {
  background: rgba(74, 107, 255, 0.14);
  color: #3553b2;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.form-grid__full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(56, 43, 28, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

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

.photo-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.loading {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 22, 0.28);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1000;
}

.progress-overlay.hidden {
  display: none;
}

.progress-overlay__card {
  min-width: min(360px, calc(100vw - 40px));
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.progress-overlay__card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.progress-overlay__card p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 840px) {
  .hero__inner,
  .hero-card,
  .stats,
  .form-grid,
  .details-grid,
  .photo-grid,
  .panel__heading,
  .request-card__header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav,
  .card-actions,
  .actions-row {
    justify-content: start;
  }
}
