:root {
  --bg: #f7f7fb;
  --ink: #121827;
  --muted: #667085;
  --brand: #16a34a;
  --brand2: #0f766e;
  --card: #fff;
  --line: #e4e7ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6vw;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

nav div {
  display: flex;
  gap: 20px;
  align-items: center;
}

.brand {
  font-weight: 900;
  font-size: 24px;
}

.brand span {
  color: var(--brand);
}

main {
  max-width: 1180px;
  margin: auto;
  padding: 36px 20px 70px;
}

.hero {
  min-height: 420px;
  border-radius: 34px;
  background: linear-gradient(120deg, rgba(18, 24, 39, .9), rgba(15, 118, 110, .84)), url(https://images.unsplash.com/photo-1559027615-cd4628902d4a?auto=format&fit=crop&w=1600&q=80) center/cover;
  display: flex;
  align-items: center;
  padding: 56px;
  color: #fff;
  box-shadow: 0 24px 80px #0f172a33;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 76px);
  line-height: .96;
  margin: 8px 0 18px;
  max-width: 760px;
}

.hero p {
  font-size: 20px;
  max-width: 620px;
  color: #e6fffb;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 800;
  color: #16a34a;
}

.hero .eyebrow {
  color: #86efac;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  margin: 8px 10px 8px 0;
  cursor: pointer;
  box-shadow: 0 10px 24px #16a34a38;
}

.btn.ghost {
  background: #ffffff22;
  border: 1px solid #ffffff55;
}

.btn.small {
  padding: 9px 14px;
  font-size: 14px;
}

.btn.muted {
  background: #475467;
  box-shadow: none;
}

.btn.danger {
  background: #dc2626;
  box-shadow: 0 10px 24px #dc262633;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 42px 0 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.campaign,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 12px 40px #1018280d;
}

.campaign-image-link {
  display: block;
  overflow: hidden;
}

.campaign img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.campaign div,
.card {
  padding: 22px;
}

.campaign h3 {
  font-size: 23px;
  margin: 0 0 8px;
}

.campaign p,
.card p {
  color: var(--muted);
  line-height: 1.65;
}

.campaign-summary {
  min-height: 4.95em;
}

.progress {
  height: 10px;
  background: #ecfdf3;
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #22c55e);
  border-radius: 999px;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 28px;
  align-items: start;
}

.detail > img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 16px 50px #1018281a;
}

.recent-donations {
  margin-top: 28px;
}

.recent-donations ul {
  margin-bottom: 0;
}

.narrow {
  max-width: 620px;
  margin: 20px auto;
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.campaign-description {
  height: 150px;
  resize: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  color: var(--ink);
}

.checkbox-label input {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

.donate {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 10px;
}

ul {
  padding-left: 20px;
  line-height: 2;
}

.hint {
  background: #ecfdf3;
  color: #166534;
  padding: 12px 14px;
  border-radius: 14px;
}

.payment-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin: 18px 0;
}

.payment-summary strong {
  font-size: 30px;
}

.wero-card {
  border-color: #99f6e4;
}

.btn.dark,
.btn.ghost.dark {
  background: #0f172a;
  color: #fff;
  border: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-completed {
  background: #e0f2fe;
  color: #075985;
}

.status-deleted {
  background: #fee2e2;
  color: #991b1b;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.actions form {
  display: inline;
}

.manage-box {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 10px;
}

.manage-box h2 {
  margin-bottom: 0;
}

.readonly-note {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 18px;
}

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

.admin-form-grid label {
  margin: 0;
}

.admin-form-grid .wide {
  grid-column: 1/-1;
}

.admin-form-grid .btn {
  align-self: end;
  justify-self: start;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.donation-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.donation-table th,
.donation-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.donation-table th {
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.donation-table tbody tr:nth-child(even) {
  background: #fcfcfd;
}

.donation-table tbody tr:hover {
  background: #f6fef9;
}

.donation-table tbody tr:last-child td {
  border-bottom: 0;
}

.amount-cell {
  text-align: right !important;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
}

.reference-cell {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.delete-cell {
  text-align: center !important;
  width: 82px;
}

.delete-cell form {
  margin: 0;
}

.admin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-campaign-table .actions {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.donation-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.donation-status-completed {
  background: #dcfce7;
  color: #166534;
}

.donation-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.icon-delete {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.icon-delete:hover {
  background: #dc2626;
  color: #fff;
}

.empty-table {
  text-align: center !important;
  color: var(--muted);
  padding: 28px !important;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 30px;
  border-top: 1px solid var(--line);
}

code {
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 6px;
}

.success {
  border-color: #bbf7d0;
}

@media (max-width: 800px) {
  nav {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  nav div {
    flex-wrap: wrap;
  }

  .hero {
    padding: 34px;
  }

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

  .detail > img {
    height: 300px;
  }

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