:root {
  --green: #0b7b3e;
  --green-dark: #075d2f;
  --yellow: #f4b928;
  --text: #111827;
  --muted: #5f6874;
  --line: #d9dee5;
  --soft: #f5f7f8;
  --white: #ffffff;
  --danger: #a82020;
  --success-bg: #f3faf6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f5;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 34px 18px 60px;
}

.order-panel {
  width: min(980px, 100%);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid #e4e8e6;
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(20, 35, 27, 0.08);
  overflow: hidden;
}

.brand-header {
  min-height: 122px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: min(310px, 72vw);
  max-height: 92px;
  object-fit: contain;
}

.page-title-row {
  padding: 28px 44px 10px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 760;
  color: #111;
}

.page-title-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
}

form {
  padding: 0 44px 40px;
}

.form-section {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}

.compact-section {
  padding-bottom: 24px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  color: #151515;
  font-size: 21px;
  font-weight: 720;
}

.section-heading > span {
  display: block;
  width: 100%;
  margin-left: 0;
  color: #111;
  font-size: 20px;
  font-weight: 720;
  text-align: left;
}

.form-grid {
  display: grid;
  gap: 18px 20px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

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

.field > span,
.address-title {
  font-size: 14px;
  font-weight: 650;
  color: #20242a;
}

.required-mark {
  margin-left: 2px;
  color: #c62828;
  font-size: 0.78em;
  font-weight: 800;
  font-style: normal;
  vertical-align: text-top;
}

.route-label {
  display: inline-block;
  text-align: left;
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: #111;
  background: #fff;
  border: 1px solid #cfd5da;
  border-radius: 9px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 123, 62, 0.11);
}

input.invalid,
select.invalid {
  border-color: #b72e2e;
  box-shadow: 0 0 0 3px rgba(183, 46, 46, 0.08);
}

.address-block {
  margin-top: 20px;
}

.address-title {
  margin-bottom: 9px;
}

.pallet-field {
  max-width: 240px;
}

.payment-option {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid #cfd5da;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
}

.payment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--green);
  position: relative;
}

.payment-option input:checked + .radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--green);
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 28px;
}

.submit-button,
.secondary-button {
  min-height: 50px;
  border-radius: 10px;
  border: 0;
  padding: 0 28px;
  font-weight: 720;
  cursor: pointer;
}

.submit-button {
  min-width: 190px;
  background: var(--green);
  color: white;
}

.submit-button:hover {
  background: var(--green-dark);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.secondary-button {
  background: #fff;
  color: var(--green-dark);
  border: 1px solid #9abda9;
}

.message {
  margin-top: 22px;
  border-radius: 9px;
  padding: 13px 15px;
  font-size: 14px;
}

.error-message {
  background: #fff4f4;
  color: var(--danger);
  border: 1px solid #efd0d0;
}

.success-panel {
  padding: 48px 44px 56px;
  text-align: center;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.success-panel h2 {
  margin: 0;
  font-size: 28px;
}

.success-panel p {
  margin: 9px 0 26px;
  color: var(--muted);
}

.confirmation-box {
  width: min(460px, 100%);
  margin: 0 auto 12px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--success-bg);
  border: 1px solid #cfe6d8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.confirmation-box span,
.confirmation-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

.confirmation-box strong {
  font-size: 20px;
  letter-spacing: .03em;
}

.confirmation-row {
  width: min(460px, 100%);
  margin: 0 auto 26px;
  display: flex;
  justify-content: space-between;
  padding: 4px 4px;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 0;
  }

  .order-panel {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .page-title-row,
  form,
  .success-panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .two-col,
  .address-grid {
    grid-template-columns: 1fr;
  }

  .submit-row {
    justify-content: stretch;
  }

  .submit-button {
    width: 100%;
  }
}

/* Online payment */
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.online-payment-panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #d8e4dc;
  border-radius: 12px;
  background: #f7faf8;
}

.bank-card {
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d8dfdb;
}

.bank-card-title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 750;
  color: #111;
}

.bank-detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid #eef1ef;
}

.bank-detail-row:first-of-type {
  border-top: 0;
}

.bank-detail-row span {
  color: #68716b;
  font-size: 14px;
}

.bank-detail-row strong {
  color: #111;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.payment-instruction {
  margin: 14px 0 16px;
  color: #4f5a53;
  font-size: 14px;
  line-height: 1.55;
}

.upload-field b {
  color: #b42318;
}

.upload-field input[type="file"] {
  height: auto;
  min-height: 48px;
  padding: 10px 12px;
}

.upload-status {
  margin-top: 8px;
  font-size: 13px;
  color: #6b736e;
}

.upload-status.ready {
  color: #08733a;
  font-weight: 650;
}

@media (max-width: 720px) {
  .payment-methods {
    flex-direction: column;
  }

  .payment-option {
    width: 100%;
  }

  .bank-detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.label-actions {
  width: min(520px, 100%);
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.label-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid #9abda9;
  color: #075d2f;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}

.label-actions a.primary-label-action {
  color: #fff;
  background: #0b7b3e;
  border-color: #0b7b3e;
}


/* Payment receipt preview */
.payment-proof-preview {
  margin-top: 14px;
  border: 1px solid #d8dfdb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.payment-proof-preview[hidden] {
  display: none !important;
}

.payment-proof-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1ef;
}

.payment-proof-preview-header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.payment-proof-preview-header strong {
  color: #151916;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.payment-proof-preview-header span {
  color: #6b736e;
  font-size: 12px;
}

.remove-proof-button {
  flex: 0 0 auto;
  border: 1px solid #d5d9d7;
  background: #fff;
  color: #5a625d;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.remove-proof-button:hover {
  border-color: #b6bdb9;
  background: #f7f8f7;
}

.payment-proof-preview-body {
  padding: 14px;
  background: #f7f9f8;
}

.payment-proof-preview-body img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.payment-proof-preview-body iframe {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.payment-proof-preview-message {
  padding: 18px;
  text-align: center;
  color: #5f6862;
  font-size: 14px;
  line-height: 1.55;
}

.payment-proof-preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #9abda9;
  border-radius: 8px;
  background: #fff;
  color: #075d2f;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 720px) {
  .payment-proof-preview-header {
    align-items: flex-start;
  }

  .payment-proof-preview-body iframe {
    height: 420px;
  }
}
