:root {
  --green: #17633a;
  --green-2: #23834c;
  --leaf: #82ba5a;
  --mint: #edf6ef;
  --cream: #f6f7f3;
  --ink: #202d25;
  --muted: #65736a;
  --line: #dce5dd;
  --white: #fff;
  --warning: #926417;
  --danger: #b3261e;
  --shadow: 0 14px 38px rgba(29, 58, 38, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}
body.modal-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: Manrope, "DM Sans", sans-serif;
  line-height: 1.2;
  letter-spacing: -.025em;
}

a { color: var(--green); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 10px 5vw;
  background: rgba(23, 99, 58, .98);
  box-shadow: 0 3px 18px #143d2819;
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font: 800 1.16rem Manrope, sans-serif;
  line-height: 1.1;
}
.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.brand small {
  display: block;
  margin-top: 4px;
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .29em;
}
#menu {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 20px);
}
#menu a {
  font-size: .86rem;
  white-space: nowrap;
}
#menu a:hover { opacity: .8; }
#burger {
  display: none;
  color: #fff;
  border: 0;
  background: none;
  font-size: 1.8rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  min-height: 45px;
  padding: 11px 19px;
  color: #fff;
  background: var(--green-2);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover {
  background: var(--green);
  box-shadow: 0 6px 18px #17633a22;
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}
.btn-small {
  min-height: 36px;
  padding: 7px 14px;
  background: #fff;
  color: var(--green) !important;
  border-radius: 999px;
}
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--green);
  border-color: #b7cfbd;
}
.btn-outline:hover { color: #fff; }
.btn-quiet {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn-quiet:hover {
  color: var(--ink);
  background: #f4f7f4;
  box-shadow: none;
}

/* General website content */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 42px;
  align-items: center;
  padding: clamp(48px, 7vw, 90px) 7vw;
  background: linear-gradient(118deg, #145c34, #2b8c51 64%, #80b95c);
  color: #fff;
}
.hero h1 {
  max-width: 740px;
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.8vw, 4rem);
}
.hero p {
  max-width: 680px;
  color: #f2f8f3;
  font-size: 1.06rem;
}
.hero .btn {
  margin-top: 13px;
  background: #fff;
  color: var(--green);
}
.hero img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 56px #0e392a3d;
}
.page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 45px clamp(20px, 5vw, 56px);
}
.page h1 {
  color: var(--green);
  font-size: clamp(2rem, 3vw, 2.75rem);
}
.page h2 { margin-top: 1.6em; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.card {
  margin: 15px 0;
  padding: 22px;
  background: var(--white);
  border: 1px solid #e5ebe5;
  border-radius: 15px;
  box-shadow: 0 4px 16px #00000008;
}
.pic {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 15px;
  margin: 12px 0;
}
.note {
  padding: 12px 16px;
  color: #245736;
  background: var(--mint);
  border-left: 4px solid var(--green-2);
  border-radius: 8px;
}
.page table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.page td, .page th {
  padding: 9px 12px;
  border-bottom: 1px solid #e6ece7;
  text-align: left;
  vertical-align: top;
}
.eyebrow {
  color: var(--green-2);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
footer {
  padding: 34px 6vw 20px;
  color: #e4efe7;
  background: #123b26;
}
footer a { color: #c7edcf; }
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}
.thanks {
  margin-top: 26px;
  color: #b8d1bf;
  font-size: .9rem;
}
.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}
.err {
  margin-top: 12px;
  color: var(--danger);
  white-space: pre-wrap;
}
.ok {
  color: var(--green);
  font-weight: 700;
}

/* Authentication and multi-step registration form */

.application-page {
  max-width: 1050px;
  padding-top: 38px;
  padding-bottom: 64px;
}
.application-intro {
  position: relative;
  padding: 15px 0 27px;
}
.application-intro h1 { margin: 8px 0 12px; }
.application-intro > p {
  max-width: 710px;
  color: var(--muted);
  margin: 0;
}
.fee-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 20px;
  margin-top: 22px;
  padding: 17px 20px;
  max-width: 640px;
  background: #fff;
  border: 1px solid #dfe9df;
  border-radius: 12px;
  box-shadow: 0 5px 18px #143d2808;
}
.fee-banner > span {
  color: #526257;
  font-size: .9rem;
}
.fee-banner strong {
  color: var(--green);
  font: 800 1.45rem Manrope, sans-serif;
}
.fee-banner small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .77rem;
}

/* Stepper and progress */

.stepper-wrap {
  margin: 18px 0 25px;
  padding: 20px 20px 14px;
  background: #fff;
  border: 1px solid #e1e8e1;
  border-radius: 14px;
  box-shadow: 0 8px 24px #143d2808;
}
.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stepper-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-align: center;
  color: #89968c;
}
.stepper-number {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid #d5dfd7;
  border-radius: 50%;
  background: #f8faf8;
  color: #768379;
  font-size: .87rem;
  font-weight: 800;
}
.stepper-label {
  max-width: 145px;
  min-height: 34px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
}
.stepper-item.active { color: var(--green); }
.stepper-item.active .stepper-number {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 5px #17633a13;
}
.stepper-item.completed { color: #477a53; }
.stepper-item.completed .stepper-number {
  color: #fff;
  background: #5f9d6b;
  border-color: #5f9d6b;
}
.stepper-item.locked .stepper-label { color: #88928b; }
.step-progress {
  height: 4px;
  margin: 3px 11% 0;
  background: #edf1ed;
  border-radius: 9px;
  overflow: hidden;
}
.step-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--leaf));
  transition: width .25s;
}

/* Form sections */

.form-step {
  padding: clamp(20px, 4vw, 36px);
  background: #fff;
  border: 1px solid #e2e9e2;
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.section-heading {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ebefeb;
}
.section-kicker {
  color: var(--green-2);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .13em;
}
.section-heading h2 {
  margin: 7px 0 8px;
  color: #1a3626;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
}
.section-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: .92rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 21px;
  align-items: start;
}
.field {
  display: block;
  min-width: 0;
  margin: 0;
  font-weight: 600;
}
.field-wide { grid-column: 1 / -1; }
.field-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0 0 8px;
  color: #293b2f;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
}
.field-label i, .required-note i {
  color: #bd4135;
  font-style: normal;
}
.field-label small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #cbd8cd;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: .93rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input[type="file"] {
  padding: 8px;
  color: #5f6f63;
  font-size: .83rem;
  background: #fbfcfb;
}
.field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid #d2dfd4;
  border-radius: 6px;
  background: #eff6f0;
  color: #215c37;
  font-weight: 700;
  cursor: pointer;
}
.field textarea {
  min-height: 95px;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px #23834c17;
}
.field input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #d6a6a2;
}
.file-field {
  padding: 13px;
  border: 1px dashed #cddbcf;
  background: #fbfdfb;
  border-radius: 10px;
}
.file-state {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: #4d6b55;
  font-size: .76rem;
}
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #cfe2d2;
  background: #f0f8f1;
  color: #365640;
}
.privacy-note > span { font-size: 1.1rem; }
.privacy-note p { margin: 0; font-size: .85rem; }

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 21px;
  border-top: 1px solid #e8eee8;
}
.step-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.required-note {
  margin-top: 17px;
  color: var(--muted);
  font-size: .78rem;
}
.form-help {
  padding: 20px 4px;
  color: var(--muted);
  font-size: .88rem;
}
.form-message {
  margin: 0 0 14px;
  color: var(--danger);
  font-size: .9rem;
}
.form-message:empty { display: none; }
.form-message.info {
  padding: 10px 13px;
  color: #305c40;
  background: #eef7ef;
  border-radius: 8px;
}
.form-message.warning {
  padding: 10px 13px;
  color: #82570f;
  background: #fff5df;
  border-radius: 8px;
}
.form-message.error { color: var(--danger); }
.previous-applications {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 17px;
  border: 1px solid #dfe9df;
  border-radius: 10px;
  background: #fff;
}
.previous-applications span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.previous-applications a {
  padding: 4px 8px;
  border-radius: 5px;
  background: #eff7f0;
  font-weight: 700;
}
.auth-page {
  display: grid;
  min-height: 70vh;
  place-items: center;
}
.auth-card {
  width: min(100%, 500px);
  padding: clamp(23px, 5vw, 40px);
  background: #fff;
  border: 1px solid #e3e9e3;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 8px 0 10px; }
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

/* Preview dialog */

.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #102a1dcc;
  backdrop-filter: blur(4px);
}
.preview-dialog {
  display: flex;
  flex-direction: column;
  width: min(100%, 820px);
  max-height: min(88vh, 920px);
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px #0004;
}
.preview-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.preview-dialog-head h2 {
  margin: 4px 0 0;
  color: var(--green);
}
.modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eff5f0;
  color: var(--green);
  font-size: 1.8rem;
  line-height: 1;
}
.preview-content { overflow: auto; padding: 8px 24px 20px; }
.preview-group { padding: 14px 0 7px; }
.preview-group h3 {
  margin: 4px 0 11px;
  color: var(--green);
  font-size: 1.02rem;
}
.preview-rows {
  border: 1px solid #e5ece5;
  border-radius: 8px;
  overflow: hidden;
}
.preview-row {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) 1.2fr;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf1ed;
  font-size: .83rem;
}
.preview-row:last-child { border-bottom: 0; }
.preview-row span { color: var(--muted); }
.preview-row strong { overflow-wrap: anywhere; font-weight: 700; }
.preview-dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fafcfa;
}

/* Printable application dossier and payment acknowledgement */

.receipt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 32px, 1080px);
  margin: 22px auto;
  padding: 16px 19px;
  background: #fff;
  border: 1px solid #dfe8df;
  border-radius: 12px;
}
.receipt-toolbar > div:first-child { display: grid; gap: 3px; }
.receipt-toolbar > div:first-child span {
  color: var(--muted);
  font-size: .85rem;
}
.receipt-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-document {
  width: min(100% - 32px, 900px);
  margin: 0 auto 50px;
  color: #24372a;
}
.receipt-page {
  position: relative;
  min-height: 1120px;
  margin: 0 0 25px;
  padding: 31px 34px 45px;
  background: #fff;
  border: 1px solid #e4e9e4;
  box-shadow: 0 10px 34px #1c432513;
  overflow: hidden;
}
.receipt-page::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  content: "";
  background: linear-gradient(90deg, #145b34, #79b855);
}
.receipt-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 18px;
  border-bottom: 2px solid #2b7243;
}
.receipt-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.receipt-brand img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.receipt-brand div { display: grid; gap: 4px; }
.receipt-brand div span {
  color: #155c35;
  font: 800 1.07rem Manrope, sans-serif;
  letter-spacing: .04em;
}
.receipt-brand small {
  max-width: 390px;
  color: #68776c;
  font-size: .69rem;
}
.receipt-doc-label {
  padding: 9px 12px;
  border: 1px solid #b9d1bd;
  border-radius: 5px;
  color: #28613a;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.5;
  text-align: center;
}
.receipt-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 21px 0 13px;
}
.receipt-title-row h1 {
  margin: 4px 0 5px;
  color: #1b5131;
  font-size: 1.9rem;
}
.receipt-title-row p { margin: 0; color: #738076; font-size: .8rem; }
.receipt-overline {
  color: #698372;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.receipt-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.receipt-qr-wrap #qr {
  padding: 5px;
  background: #fff;
  border: 1px solid #e0e9e0;
  border-radius: 5px;
}
.receipt-qr-wrap small {
  max-width: 95px;
  color: #7a887d;
  font-size: .58rem;
  text-align: center;
}
.receipt-number-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr .9fr;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 15px;
  border-radius: 7px;
  background: #edf6ef;
  border: 1px solid #d4e7d7;
}
.receipt-number-strip > div { display: grid; gap: 4px; min-width: 0; }
.receipt-number-strip span {
  color: #5d7664;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.receipt-number-strip strong {
  color: #164e2d;
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.receipt-number-strip .status-paid { color: #2b7c43; }
.receipt-section { margin-top: 13px; break-inside: avoid; }
.receipt-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid #dce7de;
  color: #1e6037;
  font-size: .82rem;
  letter-spacing: .025em;
}
.receipt-section h3 > span {
  display: inline-block;
  width: 4px;
  height: 14px;
  background: #6ca74f;
  border-radius: 5px;
}
.receipt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .72rem;
}
.receipt-table th, .receipt-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e9eee9;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.receipt-table th {
  width: 34%;
  color: #67756a;
  font-weight: 600;
  background: #fafcfa;
}
.receipt-table td { color: #263b2b; font-weight: 600; }
.receipt-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 10px 0 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #dce7de;
}
.receipt-page-heading h2 {
  margin: 5px 0 0;
  color: #1b5131;
  font-size: 1.4rem;
}
.receipt-page-heading > strong { color: #2b7543; font-size: .8rem; }

.document-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.document-check {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #e6ece6;
  border-radius: 5px;
  font-size: .67rem;
}
.document-check > span:first-child {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #f1f3f1;
  color: #7f8c81;
  font-weight: 800;
}
.document-check.document-received > span:first-child {
  background: #e0f1e3;
  color: #24783c;
}
.document-check b { color: #6b786e; font-size: .61rem; font-weight: 700; }
.document-check.document-received b { color: #2b7c43; }
.payment-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid #cde3d1;
  border-radius: 8px;
  background: #f0f8f1;
}
.payment-summary > div:first-child { display: grid; gap: 3px; }
.payment-summary > div:first-child > span { color: #4f6f57; font-size: .7rem; }
.payment-summary strong { color: #155b34; font: 800 1.55rem Manrope, sans-serif; }
.payment-summary small { color: #768578; font-size: .64rem; overflow-wrap: anywhere; }
.payment-badge {
  padding: 8px 10px;
  border: 1px solid #8cc49a;
  border-radius: 5px;
  color: #286b3e;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}
.receipt-declaration {
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 3px solid #81b85e;
  background: #fbfcfa;
}
.receipt-declaration b { color: #265b36; font-size: .73rem; }
.receipt-declaration p {
  margin: 4px 0 0;
  color: #5e6e62;
  font-size: .67rem;
  line-height: 1.52;
}
.receipt-contact {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
  padding: 10px 0;
  border-top: 1px solid #e5ece5;
}
.receipt-contact > div { display: grid; gap: 2px; }
.receipt-contact b { color: #305f3d; font-size: .7rem; }
.receipt-contact span { color: #6b796e; font-size: .65rem; }
.receipt-page-foot {
  position: absolute;
  right: 34px;
  bottom: 17px;
  left: 34px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 7px;
  border-top: 1px solid #e6ece6;
  color: #8a968c;
  font-size: .56rem;
  letter-spacing: .06em;
}
.receipt-error {
  max-width: 650px;
  margin: 25px auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #e2e9e2;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.loading-page { min-height: 55vh; color: var(--muted); }

/* Admin panel */

.admin-page h1 { margin-bottom: 25px; }
.admin-search {
  display: flex;
  align-items: end;
  gap: 12px;
  max-width: 720px;
  margin: 18px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-search .field { flex: 1; }
.admin-result {
  margin: 15px 0;
  padding: 14px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-files { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-files .btn { font-size: .8rem; }

/* Tablet and mobile */

@media (max-width: 1080px) {
  .nav { padding-inline: 3vw; }
  #menu { gap: 10px; }
  #menu a { font-size: .78rem; }
}

@media (max-width: 880px) {
  #burger { display: block; }

  #menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 12px 5vw 18px;
    background: var(--green);
    box-shadow: 0 15px 20px #183f2926;
  }

  #menu.open { display: flex; }
  #menu a { padding: 10px 0; font-size: .9rem; }
  #menu .btn-small { width: fit-content; padding: 7px 15px; }
  .hero { grid-template-columns: 1fr; }
  .hero img { max-height: 390px; }
  .receipt-page { min-height: 0; }
  .receipt-page-foot { position: static; margin-top: 20px; }
}

@media (max-width: 620px) {
  .page { padding: 28px 17px; }
  .hero { gap: 23px; padding: 42px 22px; }
  .hero h1 { font-size: 2.2rem; }
  .application-page { padding: 26px 12px 42px; }
  .fee-banner { grid-template-columns: 1fr auto; padding: 13px; }
  .stepper-wrap { padding: 14px 8px 11px; }
  .stepper { gap: 0; }
  .stepper-item { gap: 6px; }
  .stepper-number { width: 29px; height: 29px; font-size: .77rem; }
  .stepper-label { max-width: 67px; min-height: 32px; font-size: .59rem; }
  .step-progress { margin-inline: 7%; }
  .form-step { padding: 18px 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .field-wide { grid-column: auto; }
  .step-actions { align-items: stretch; flex-direction: column; }
  .step-actions > .btn { align-self: stretch; }
  .step-actions-right { display: grid; grid-template-columns: 1fr 1.2fr; }
  .step-actions-right .btn { padding-inline: 10px; }
  .receipt-toolbar { align-items: stretch; flex-direction: column; }
  .receipt-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .receipt-document { width: calc(100% - 16px); }
  .receipt-page { padding: 21px 16px 25px; }
  .receipt-masthead { align-items: flex-start; }
  .receipt-brand { gap: 8px; }
  .receipt-brand img { width: 43px; height: 43px; }
  .receipt-brand div span { font-size: .78rem; }
  .receipt-brand small { font-size: .57rem; }
  .receipt-doc-label { padding: 6px; font-size: .53rem; }
  .receipt-title-row h1 { font-size: 1.45rem; }
  .receipt-number-strip { grid-template-columns: 1fr; }
  .receipt-number-strip > div { grid-template-columns: 120px 1fr; align-items: baseline; }
  .receipt-table { font-size: .67rem; }
  .receipt-table th, .receipt-table td { padding: 5px; }
  .document-checklist { grid-template-columns: 1fr; }
  .receipt-page-foot { gap: 8px; font-size: .48rem; }
  .preview-overlay { padding: 8px; }
  .preview-dialog-head, .preview-content, .preview-dialog-actions {
    padding-left: 14px;
    padding-right: 14px;
  }
  .preview-row { grid-template-columns: 1fr; gap: 3px; }
  .admin-search { align-items: stretch; flex-direction: column; }
}

/* A4 print layout */

@page { size: A4; margin: 10mm; }

@media print {
  body {
    background: #fff !important;
    color: #1a2b20;
    font-family: Arial, sans-serif;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .no-print, .receipt-toolbar, footer, .nav { display: none !important; }

  body:has(.receipt-document) { background: #fff !important; }

  #view:has(.receipt-document) {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .receipt-document { width: 100%; margin: 0; }

  .receipt-page {
    width: 100%;
    min-height: 277mm;
    height: auto;
    margin: 0;
    padding: 5mm 5mm 8mm;
    border: 0;
    box-shadow: none;
    overflow: visible;
    page-break-after: always;
    break-after: page;
  }

  .receipt-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .receipt-page-foot { right: 5mm; bottom: 2mm; left: 5mm; }
  .receipt-section { margin-top: 2.5mm; }
  .receipt-section h3 { margin-bottom: 1.3mm; padding-bottom: 1mm; font-size: 8.5pt; }
  .receipt-table { font-size: 7.4pt; }
  .receipt-table th, .receipt-table td { padding: 1.1mm 1.7mm; }
  .receipt-number-strip { margin-bottom: 2mm; padding: 2mm 3mm; }
  .receipt-title-row { padding: 3mm 0 2mm; }
  .receipt-title-row h1 { font-size: 19pt; }
  .receipt-masthead { padding-bottom: 2mm; }
  .receipt-brand img { width: 14mm; height: 14mm; }
  .receipt-page-heading { margin: 2mm 0 3mm; padding-bottom: 2mm; }
  .receipt-page-heading h2 { font-size: 15pt; }
  .document-checklist { gap: 1.3mm 2mm; }
  .document-check { padding: 1.4mm; font-size: 7pt; }
  .payment-summary { margin-top: 3mm; padding: 2.5mm 3mm; }
  .payment-summary strong { font-size: 16pt; }
  .receipt-declaration { margin-top: 2.5mm; padding: 2mm 3mm; }
  .receipt-declaration p { font-size: 7pt; }
  .receipt-contact { margin-top: 2mm; padding: 2mm 0; }
  .receipt-contact span, .receipt-contact b { font-size: 7pt; }
  .receipt-page-foot { font-size: 6pt; }

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

/* Fix: Keep the Register button visible on hover */
.nav #menu a.btn.btn-small,
.nav #menu a.btn.btn-small:hover,
.nav #menu a.btn.btn-small:focus-visible {
  background: #ffffff;
  color: #17633a !important;
  border: 1px solid #ffffff;
  opacity: 1;
}

.nav #menu a.btn.btn-small:hover,
.nav #menu a.btn.btn-small:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2),
              0 5px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}


.legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid #d4e3d6;
  border-radius: 10px;
  background: #f5faf5;
  color: #354c3b;
  font-size: .84rem;
  line-height: 1.6;
}

.legal-consent input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: #17633a;
}

.legal-consent span { flex: 1; }
.legal-consent a { font-weight: 700; }