.contribution-page {
  --cc-ink: #17332d;
  --cc-deep: #0e5147;
  --cc-mint: #e7f4ef;
  --cc-lime: #dff08d;
  --cc-paper: #fffefa;
  --cc-line: #d8e2dc;
  --cc-muted: #6f837c;
  --cc-amber: #e9a52b;
  --cc-coral: #e8654d;
  color: var(--cc-ink);
  padding: 44px 52px 60px;
  min-height: calc(100vh - 150px);
  background:
    radial-gradient(circle at 94% 3%, rgba(203, 234, 214, .72), transparent 28%),
    linear-gradient(135deg, #faf9f2 0%, #f6f8f1 54%, #f0f7f2 100%);
}

.cc-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.cc-eyebrow {
  margin: 0 0 8px;
  color: #267268;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cc-heading h1 {
  margin: 0;
  max-width: 760px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.025em;
}

.cc-heading-copy {
  margin: 10px 0 0;
  color: var(--cc-muted);
  font-size: 14px;
}

.cc-primary,
.cc-secondary,
.cc-quiet,
.cc-table-action {
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.cc-primary {
  padding: 14px 18px;
  color: white;
  background: var(--cc-deep);
  box-shadow: 0 12px 26px rgba(14, 81, 71, .18);
}

.cc-primary:hover,
.cc-secondary:hover,
.cc-table-action:hover { transform: translateY(-1px); }

.cc-secondary {
  padding: 12px 16px;
  color: var(--cc-deep);
  border: 1px solid #bfcfc7;
  background: rgba(255, 255, 255, .8);
}

.cc-summary-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.cc-card {
  position: relative;
  overflow: hidden;
  min-height: 144px;
  padding: 21px;
  border: 1px solid var(--cc-line);
  border-radius: 18px;
  background: rgba(255, 254, 250, .92);
  box-shadow: 0 10px 28px rgba(27, 60, 50, .07);
  animation: cc-rise .4s ease both;
}

.cc-card:first-child {
  color: white;
  border-color: transparent;
  background: linear-gradient(145deg, #0c4d43, #1d6653);
}

.cc-card:nth-child(2) { animation-delay: .05s; }
.cc-card:nth-child(3) { animation-delay: .1s; }
.cc-card:nth-child(4) { animation-delay: .15s; }

.cc-card-label {
  display: block;
  margin-bottom: 18px;
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 800;
}

.cc-card:first-child .cc-card-label,
.cc-card:first-child .cc-card-note { color: rgba(255,255,255,.72); }

.cc-card-value {
  display: block;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(27px, 2.2vw, 38px);
  line-height: 1;
}

.cc-card-note {
  display: block;
  margin-top: 12px;
  color: var(--cc-muted);
  font-size: 11px;
}

.cc-progress-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid var(--cc-line);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
}

.cc-progress-track {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #e2e9e4;
}

.cc-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #93bd4c, #0e7565);
}

.cc-progress-text { font-size: 12px; color: var(--cc-muted); }
.cc-progress-number { font-size: 20px; font-weight: 900; color: var(--cc-deep); }

.cc-panel {
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 20px;
  background: var(--cc-paper);
  box-shadow: 0 12px 32px rgba(27, 60, 50, .08);
}

.cc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--cc-line);
}

.cc-toolbar-copy h2 { margin: 0; font-size: 17px; }
.cc-toolbar-copy p { margin: 5px 0 0; color: var(--cc-muted); font-size: 12px; }

.cc-tools { display: flex; align-items: center; gap: 9px; }
.cc-search { position: relative; }
.cc-search input,
.cc-tools select {
  height: 42px;
  border: 1px solid var(--cc-line);
  border-radius: 11px;
  color: var(--cc-ink);
  background: white;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.cc-search input { width: 230px; padding: 0 13px; }
.cc-tools select { padding: 0 30px 0 12px; }
.cc-search input:focus,
.cc-tools select:focus,
.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus { border-color: #4c9286; box-shadow: 0 0 0 3px rgba(76,146,134,.12); }

.cc-table-wrap { overflow-x: auto; }
.cc-table { width: 100%; border-collapse: collapse; min-width: 1050px; }
.cc-table th {
  padding: 13px 16px;
  color: #71847d;
  background: #fafbf7;
  font-size: 10px;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
}
.cc-table td {
  padding: 14px 16px;
  border-top: 1px solid #e8ece8;
  font-size: 12px;
  vertical-align: middle;
}
.cc-table tbody tr:hover { background: #fbfdf9; }
.cc-person { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.cc-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #19584f;
  background: #e0eee9;
  font-size: 10px;
  font-weight: 900;
}
.cc-person strong { display: block; font-size: 12px; }
.cc-person small { display: block; margin-top: 3px; color: var(--cc-muted); }
.cc-money { white-space: nowrap; font-weight: 800; }
.cc-money.pending { color: #a46700; }
.cc-money.delivered { color: #137264; }
.cc-base-note { display: block; margin-top: 3px; color: var(--cc-muted); font-size: 10px; }

.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.cc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cc-status.pending { color: #9c6200; background: #fff1cd; }
.cc-status.partial { color: #b44c39; background: #ffebe6; }
.cc-status.complete { color: #167060; background: #e3f4ee; }
.cc-status.empty { color: #77847f; background: #eef1ef; }
.cc-row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.cc-table-action { padding: 9px 11px; color: var(--cc-deep); border: 1px solid #cfdbd5; background: white; font-size: 10px; }
.cc-table-action.primary { color: white; border-color: var(--cc-deep); background: var(--cc-deep); }
.cc-table-action:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.cc-empty { padding: 55px 20px; color: var(--cc-muted); text-align: center; }

.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 35, 31, .64);
  backdrop-filter: blur(7px);
}
.cc-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border-radius: 22px;
  background: #fffefa;
  box-shadow: 0 26px 80px rgba(7, 34, 29, .34);
  animation: cc-modal-in .2s ease both;
}
.cc-modal.wide { width: min(850px, 100%); }
.cc-modal-head { display: flex; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; border-bottom: 1px solid var(--cc-line); }
.cc-modal-head h2 { margin: 0; font-family: "DM Serif Display", Georgia, serif; font-size: 27px; font-weight: 400; }
.cc-modal-head p { margin: 6px 0 0; color: var(--cc-muted); font-size: 12px; }
.cc-modal-close { width: 38px; height: 38px; border: 0; border-radius: 10px; color: var(--cc-ink); background: #edf2ee; cursor: pointer; font-size: 22px; }
.cc-modal-body { padding: 22px 24px; }
.cc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cc-field { display: flex; flex-direction: column; gap: 7px; }
.cc-field.full { grid-column: 1 / -1; }
.cc-field label { font-size: 11px; font-weight: 800; }
.cc-field small { color: var(--cc-muted); font-size: 10px; }
.cc-field input,
.cc-field select,
.cc-field textarea {
  width: 100%;
  border: 1px solid var(--cc-line);
  border-radius: 11px;
  color: var(--cc-ink);
  background: white;
  font: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.cc-field input,
.cc-field select { height: 44px; padding: 0 12px; }
.cc-field textarea { min-height: 84px; padding: 11px 12px; resize: vertical; }
.cc-balance-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.cc-balance-item { padding: 12px; border-radius: 12px; background: #edf5f0; }
.cc-balance-item span { display: block; color: var(--cc-muted); font-size: 9px; text-transform: uppercase; }
.cc-balance-item strong { display: block; margin-top: 5px; font-size: 15px; }
.cc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 24px 22px; }
.cc-modal-error { display: none; margin: 0 24px 4px; padding: 10px 12px; border-radius: 10px; color: #9e3425; background: #ffebe6; font-size: 11px; }
.cc-modal-error.show { display: block; }

.cc-receipt-check { display: grid; width: 68px; height: 68px; margin: 4px auto 16px; place-items: center; border-radius: 50%; color: #146758; background: #ddf2ea; font-size: 30px; }
.cc-receipt-title { text-align: center; }
.cc-receipt-title h2 { margin: 0; font-family: "DM Serif Display", Georgia, serif; font-size: 31px; font-weight: 400; }
.cc-receipt-title p { color: var(--cc-muted); font-size: 12px; }
.cc-receipt-box { margin-top: 20px; padding: 18px; border: 1px dashed #9ebbb2; border-radius: 14px; }
.cc-receipt-row { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; font-size: 11px; }
.cc-receipt-row span { color: var(--cc-muted); }
.cc-receipt-row strong { text-align: right; }
.cc-receipt-row.total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--cc-line); font-size: 16px; }

.cc-history-list { display: grid; gap: 10px; }
.cc-history-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--cc-line); border-radius: 13px; }
.cc-history-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #e7f3ee; font-weight: 900; }
.cc-history-item strong { display: block; font-size: 12px; }
.cc-history-item small { display: block; margin-top: 4px; color: var(--cc-muted); font-size: 10px; }
.cc-history-amount { text-align: right; font-weight: 900; }
.cc-history-amount small { color: var(--cc-muted); }

.cc-toast { position: fixed; right: 24px; bottom: 24px; z-index: 11000; max-width: 360px; padding: 14px 17px; border-radius: 13px; color: white; background: #103f37; box-shadow: 0 18px 44px rgba(5,37,31,.25); font-size: 12px; font-weight: 700; }

@keyframes cc-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes cc-modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .contribution-page { padding: 34px 28px 50px; }
  .cc-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .contribution-page { padding: 26px 16px 38px; }
  .cc-heading { align-items: stretch; flex-direction: column; }
  .cc-heading .cc-primary { width: 100%; }
  .cc-summary-grid { grid-template-columns: 1fr; }
  .cc-card { min-height: 118px; }
  .cc-toolbar { align-items: stretch; flex-direction: column; }
  .cc-tools { align-items: stretch; flex-direction: column; }
  .cc-search input { width: 100%; }
  .cc-tools select { width: 100%; }
  .cc-form-grid { grid-template-columns: 1fr; }
  .cc-field.full { grid-column: auto; }
  .cc-balance-strip { grid-template-columns: 1fr; }
  .cc-modal-actions { flex-direction: column-reverse; }
  .cc-modal-actions button { width: 100%; }
}

@media print {
  .sidebar, .topbar, .demo-banner, .cc-heading-actions, .cc-tools, .cc-row-actions { display: none !important; }
  .contribution-page { padding: 0; background: white; }
  .cc-panel, .cc-card { box-shadow: none; }
}
