@font-face {
  font-family: Montserrat;
  src: url("/fonts/montserrat-regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/fonts/montserrat-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --red: #d71920;
  --red-dark: #a91016;
  --green: #159447;
  --green-dark: #0e6f34;
  --ink: #20252c;
  --muted: #66717e;
  --line: #dfe5e9;
  --soft: #f4f7f8;
  --white: #fff;
  --shadow: 0 20px 55px rgba(28, 45, 55, 0.1);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: linear-gradient(145deg, #f8fbfc 0, #eef4f6 50%, #fff 100%);
  color: var(--ink);
  font:
    16px/1.55 Montserrat,
    Arial,
    sans-serif;
  min-height: 100vh;
}
.portal-header {
  height: 84px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.portal-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.portal-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.portal-brand span {
  display: grid;
}
.portal-brand small {
  color: var(--muted);
  font-size: 0.76rem;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--red-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 96px;
}
.auth-card {
  width: min(520px, 100%);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 38px;
  box-shadow: var(--shadow);
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 18px;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  display: block;
  margin-bottom: 8px;
}
.auth-card > p,
.panel > p {
  color: var(--muted);
}
form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
}
input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cfd8dd;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus,
select:focus {
  outline: 3px solid rgba(215, 25, 32, 0.14);
  border-color: var(--red);
}
button {
  font: inherit;
}
.primary,
.secondary {
  min-height: 50px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}
.primary {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
}
.primary:hover {
  background: var(--red-dark);
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.compact {
  min-height: 38px;
  padding: 0 12px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}
.consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}
.consent a,
.portal-footer a {
  color: var(--red-dark);
  font-weight: 700;
}
.portal-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--red-dark);
  font-size: 0.87rem;
}
.welcome {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 34px;
}
.welcome p {
  color: var(--muted);
}
.account-state {
  border-radius: 999px;
  padding: 9px 14px;
  background: #e7f6ee;
  color: #17653a;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(28, 45, 55, 0.06);
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.donation-panel,
.subscriptions-panel,
.requests-panel {
  grid-column: span 2;
}
.official-donation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: fit-content;
}
.request-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.request-item:first-child {
  border-top: 0;
}
.request-item small {
  color: var(--muted);
}
.request-status {
  color: var(--green-dark);
  font-weight: 700;
  white-space: nowrap;
}
.switch {
  position: relative;
}
.switch input {
  position: absolute;
  opacity: 0;
}
.switch span {
  display: block;
  width: 52px;
  height: 30px;
  background: #cfd8dd;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.switch span:after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.2s;
}
.switch input:checked + span {
  background: var(--green);
}
.switch input:checked + span:after {
  transform: translateX(22px);
}
.switch input:focus-visible + span {
  outline: 3px solid rgba(21, 148, 71, 0.22);
  outline-offset: 3px;
}
.switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.58;
}
.amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.amounts button {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.amounts button.active {
  border-color: var(--red);
  background: #fff1f1;
  color: var(--red-dark);
}
.subscription {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.subscription:first-child {
  border-top: 0;
}
.subscription small {
  color: var(--muted);
}
.subscription-control {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 7px;
}
.recurring-master {
  display: grid;
  justify-items: end;
  gap: 7px;
}
.recurring-master small {
  max-width: 190px;
  color: var(--muted);
  text-align: right;
  font-size: 0.72rem;
}
.subscription-control small {
  max-width: 180px;
  text-align: right;
  font-size: 0.72rem;
}
.subscription-message {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  color: var(--red-dark);
  font-size: 0.78rem;
}
.empty {
  border: 1px dashed #cfd8dd;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 720px) {
  .portal-header {
    height: 72px;
    padding: 0 16px;
  }
  .portal-brand img {
    width: 42px;
    height: 42px;
  }
  .portal-brand small {
    display: none;
  }
  main {
    padding: 42px 0 72px;
  }
  .auth-card {
    padding: 26px 20px;
    border-radius: 20px;
  }
  .welcome {
    display: block;
  }
  .account-state {
    display: inline-block;
    margin-top: 8px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .donation-panel,
  .subscriptions-panel,
  .requests-panel {
    grid-column: auto;
  }
  .amounts {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 22px;
  }
  .subscription-control small {
    max-width: 130px;
  }
  .recurring-master small {
    max-width: 130px;
  }
  .request-item {
    grid-template-columns: 1fr;
  }
  .request-status {
    white-space: normal;
  }
}
