:root {
  color-scheme: light;
  --ink: #211915;
  --muted: #6c5f57;
  --line: rgba(33, 25, 21, 0.14);
  --paper: #f7f1e7;
  --brand: #8d2f25;
  --brand-strong: #662118;
  --success: #1f7a4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(189, 140, 60, 0.18), transparent 26rem),
    linear-gradient(135deg, #fff8ee 0%, var(--paper) 56%, #efe1d0 100%);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.portal-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
}

.brand-link,
.portal-nav {
  display: inline-flex;
  align-items: center;
}

.brand-link {
  gap: 10px;
  font-weight: 800;
}

.brand-link img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.portal-nav {
  gap: 8px;
}

.portal-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.intro {
  padding: 28px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.92;
}

.lead {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.trust-row div {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.trust-row strong {
  display: block;
  font-size: 1.4rem;
}

.trust-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.payment-card,
.admin-card,
.receipt-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 0 24px 70px rgba(70, 43, 25, 0.12);
}

.payment-card {
  padding: clamp(18px, 4vw, 30px);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.card-heading h2,
.admin-card h2,
.receipt-card h2 {
  margin: 0;
  font-size: 1.8rem;
}

.status-pill {
  border-radius: 999px;
  background: rgba(31, 122, 79, 0.1);
  color: var(--success);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(33, 25, 21, 0.18);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  padding: 13px 12px;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(141, 47, 37, 0.12);
}

.amount-row {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 10px;
}

.pay-button,
.admin-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fffaf2;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  margin-top: 20px;
  padding: 15px 18px;
}

.pay-button:hover,
.admin-button:hover {
  background: var(--brand-strong);
}

.helper {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  margin-top: 24px;
}

.admin-card,
.receipt-card {
  padding: 22px;
}

.admin-login {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.admin-login input {
  min-width: 0;
}

.admin-login button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

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

.payment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 0.9rem;
}

.payment-table th,
.payment-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
}

.payment-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.receipt-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.receipt-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  padding-bottom: 14px;
}

.receipt-head img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.receipt-head strong,
.receipt-head span {
  display: block;
}

.receipt-head strong {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.receipt-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.receipt-line span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.print-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  margin-top: 16px;
  padding: 12px 14px;
}

.is-hidden {
  display: none;
}

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

  .intro {
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .portal-shell {
    width: min(100% - 22px, 1160px);
    padding-top: 14px;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .amount-row,
  .admin-login {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-login button {
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .portal-header,
  .intro,
  .payment-card,
  .admin-card,
  .print-button,
  .receipt-empty {
    display: none !important;
  }

  .portal-shell,
  .hero,
  .lower-grid,
  .receipt-card {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .receipt-card {
    border: 0;
    box-shadow: none;
  }
}
