/* Government-style Cambodia eVisa application form */

.app-form-page {
  --gov-ink: #1e2a36;
  --gov-panel: #243447;
  --gov-line: #c5d0da;
  --gov-field: #f7f9fb;
  --gov-icon: #3d4f63;
  background: #e8eef3;
  padding: 0 0 3rem;
}

.app-form-page .hero-banner {
  background: linear-gradient(135deg, #1e2a36 0%, #2c3e50 55%, #34495e 100%) !important;
}

.app-form-shell {
  padding-top: 0.35rem;
  max-width: 960px;
}

.app-form-shell > .breadcrumb-nav {
  margin-bottom: 0.65rem;
}

/* Steps */
.app-form-page .progress-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin: 0.25rem auto 1.35rem;
  position: relative;
}

.app-form-page .progress-container > .progress {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: #cfd8e0;
  z-index: 1;
  transform: translateY(-50%);
  margin: 0;
}

.app-form-page .progress-filled {
  position: absolute;
  top: 50%;
  left: 0;
  height: 3px;
  background: var(--gov-panel);
  z-index: 2;
  transform: translateY(-50%);
}

.app-form-page .progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  flex: 1;
}

.app-form-page .step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #cfd8e0;
  color: #fff;
  text-align: center;
  line-height: 26px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid #fff;
}

.app-form-page .step-circle.completed {
  background: var(--gov-panel);
}

.app-form-page .step-title {
  font-size: 0.7rem;
  color: #7a8794;
  margin-top: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-form-page .step-title.completed {
  color: var(--gov-panel);
}

/* Form shell */
.af-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.af-refbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--gov-line);
  border-left: 4px solid var(--flag-red);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  color: var(--gov-ink);
  font-size: 0.92rem;
}

.af-refbar__icon {
  display: inline-flex;
  color: var(--gov-icon);
}

.af-refbar__icon .af-icon {
  fill: currentColor;
}

/* Cards / sections */
.af-card {
  background: #fff;
  border: 1px solid var(--gov-line);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(30, 42, 54, 0.04);
  overflow: hidden;
}

.af-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(90deg, var(--flag-blue-dark) 0%, #6e5424 50%, var(--flag-blue-dark) 100%);
  color: #fff;
  border-bottom: 3px solid var(--flag-red);
}

.af-card__num {
  flex: 0 0 auto;
  min-width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.af-card__head h2 {
  margin: 0 0 0.15rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 0;
  padding: 0;
}

.af-card__head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
}

.af-card__body {
  padding: 1.2rem 1.2rem 1.35rem;
}

.af-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
}

.af-grid--docs {
  gap: 1.05rem;
}

.af-field--full,
.form-group.af-field--full {
  grid-column: 1 / -1;
}

/* Form group + icon input */
.af-form .form-group {
  margin: 0;
  min-width: 0;
}

.af-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gov-ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.35;
}

.af-req {
  color: var(--text-red);
  font-weight: 700;
}

.af-input {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--gov-line);
  background: #fff;
  border-radius: 2px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.af-input:focus-within {
  border-color: #4a6780;
  box-shadow: 0 0 0 3px rgba(36, 52, 71, 0.12);
}

.af-input__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.7rem;
  width: 2.7rem;
  background: var(--gov-field);
  border-right: 1px solid var(--gov-line);
  color: var(--gov-icon);
}

.af-input__icon .af-icon {
  display: block;
  fill: currentColor;
}

.af-input .af-control,
.af-input .form-control {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  padding: 0.55rem 0.8rem;
  color: var(--gov-ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.af-input .af-control:focus,
.af-input .form-control:focus {
  outline: 0;
  box-shadow: none !important;
}

.af-input select.af-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%243d4f63' d='M1.1 1.1 6 6 10.9 1.1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2rem;
}

.af-input--textarea {
  align-items: stretch;
}

.af-input--textarea .af-input__icon {
  align-items: flex-start;
  padding-top: 0.85rem;
}

.af-control--textarea {
  min-height: 6rem !important;
  resize: vertical;
}

.af-hint {
  display: block;
  margin-top: 0.3rem;
  color: #5c6b79;
  font-size: 0.8rem;
  transition: margin-top 0.15s ease;
}

/* Date-in-words under date fields */
.af-hint--date,
small.af-hint#dobtext,
small.af-hint#issuedatetext,
small.af-hint#expirytext,
small.af-hint#arrivaltext,
small.af-hint#departuretext {
  color: #a32020;
  font-weight: 600;
}

.af-hint--locked {
  color: #5a6570;
  font-style: italic;
  font-size: 0.76rem;
}

/* On hover/focus, push hints down so typing/tooltips do not cover them */
.af-form .form-group:hover > .af-hint,
.af-form .form-group:focus-within > .af-hint,
.af-form .form-group:hover > small.af-hint,
.af-form .form-group:focus-within > small.af-hint,
.af-form .form-group:hover > p.af-hint,
.af-form .form-group:focus-within > p.af-hint {
  margin-top: 0.7rem;
}

/* Locked / readonly shared fields (2nd+ member) */
.af-input--locked {
  background: #e4e8ed;
  border-color: #aeb8c3;
  box-shadow: none;
}

.af-input--locked:focus-within {
  border-color: #aeb8c3;
  box-shadow: none;
}

.af-input--locked .af-input__icon {
  background: #cfd5dc;
  color: #5a6570;
  border-right-color: #aeb8c3;
}

.af-input--locked .af-control,
.af-input--locked .form-control,
.af-input--locked .af-control:disabled,
.af-input--locked .form-control:disabled,
.af-input--locked .af-control[readonly],
.af-input--locked .form-control[readonly] {
  background: #dde2e8 !important;
  color: #3a4552 !important;
  cursor: not-allowed;
  opacity: 1;
}

.af-input--locked select.af-control {
  background-image: none;
}

/* Bootstrap tooltips below inputs with breathing room */
.app-form-page .tooltip {
  pointer-events: none;
}

.app-form-page .bs-tooltip-bottom,
.app-form-page .tooltip.bs-tooltip-bottom {
  margin-top: 0.45rem !important;
}

.app-form-page .tooltip-inner {
  max-width: 260px;
  text-align: left;
}

.af-charcount {
  margin-top: 0.3rem;
  text-align: right;
  font-size: 0.76rem;
  color: #7a8794;
}

.af-radio-row {
  display: flex;
  gap: 1.35rem;
  align-items: center;
  min-height: 2.7rem;
  padding: 0 0.85rem;
  border: 1px solid var(--gov-line);
  background: #fff;
  border-radius: 2px;
}

.af-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--gov-ink);
  margin: 0;
  cursor: pointer;
  text-transform: none;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.af-radio input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gov-panel);
}

/* Uploads — compact equal-height row */
.af-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.af-upload-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--gov-line);
  background: var(--gov-field);
  border-radius: 2px;
}

.af-upload-tile__preview {
  width: 88px;
  height: 110px;
  border: 1px solid var(--gov-line);
  background: #fff;
  overflow: hidden;
}

.af-upload-tile__preview--passport {
  width: 176px;
  height: 110px;
}

.af-upload-tile__preview img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.af-upload-tile input[type="file"] {
  display: none;
}

.af-btn--compact {
  min-height: 2.1rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

/* Buttons */
.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.55rem 1.2rem;
  border-radius: 2px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.af-btn .af-icon {
  fill: currentColor;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.af-btn--primary {
  background: var(--gov-panel);
  color: #fff;
  border-color: var(--gov-panel);
}

.af-btn--primary:hover {
  background: #1a2736;
  color: #fff;
}

.af-btn--secondary {
  background: var(--btn-red);
  color: #fff;
  border-color: var(--btn-red);
}

.af-btn--secondary:hover {
  background: var(--btn-red-hover);
  color: #fff;
}

.af-btn--ghost {
  background: #fff;
  color: var(--gov-ink);
  border-color: var(--gov-line);
}

.af-btn--ghost:hover {
  border-color: var(--gov-panel);
  color: var(--gov-panel);
}

/* File browse */
.af-file {
  margin: 0 !important;
}

.af-file .input-file {
  visibility: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
}

.af-file .input-group {
  display: flex;
  width: 100%;
  border: 1px solid var(--gov-line);
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
}

.af-file .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  padding: 0;
  background: var(--gov-field);
  color: var(--gov-icon);
  border: 0;
  border-right: 1px solid var(--gov-line);
}

.af-file .input-group-addon .af-icon {
  fill: currentColor;
}

.af-file .form-control {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 2.7rem;
  background: #fff;
}

.af-file .input-group-btn {
  display: flex;
}

.af-file .upload-field.btn {
  border: 0;
  border-left: 1px solid var(--gov-line);
  border-radius: 0;
  background: var(--gov-panel) !important;
  color: #fff !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  min-height: 2.7rem;
  padding: 0 1rem;
}

.af-file .upload-field.btn:hover {
  background: #1a2736 !important;
}

.af-business-docs {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gov-line);
}

.af-agree {
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d7e0e8;
  background: #f3f7fa;
  border-left: 4px solid var(--gov-panel);
}

.af-agree__label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  cursor: pointer;
  color: var(--gov-ink);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.af-agree__label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--gov-panel);
}

.af-agree__label a {
  font-weight: 700;
  text-decoration: underline;
}

.af-agree .mandatory {
  display: block;
  margin-top: 0.4rem;
}

.af-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}

.af-captcha__image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.af-captcha__image img {
  display: block;
  width: 160px;
  height: 52px;
  border: 1px solid var(--gov-line);
  background: #243447;
  user-select: none;
  -webkit-user-drag: none;
}

.af-captcha__refresh {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.af-captcha__field {
  margin: 0;
  max-width: 9.5rem;
}

.af-captcha__field .af-label {
  margin-bottom: 0.3rem;
}

.af-input--code {
  max-width: 9.5rem;
}

.af-input--code .af-control {
  width: 5.5rem;
  max-width: 5.5rem;
  letter-spacing: 0.18em;
  text-align: center;
  font-weight: 700;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.af-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gov-line);
}

.af-actions .af-btn--primary {
  min-width: 13rem;
}

.app-form-page .mandatory {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-red);
  font-size: 0.8rem;
}

.app-form-page .hide {
  display: none !important;
}

/* Preview — compact old-pattern density */
.af-preview {
  margin: 0 0 1.25rem;
}

.af-preview-title {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gov-panel);
}

.af-preview-panel {
  background: #fff;
  border: 1px solid var(--gov-line);
  border-radius: 2px;
  overflow: hidden;
}

.af-preview-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem;
  background: var(--gov-panel);
  border-bottom: 3px solid var(--flag-red);
}

.af-preview-panel__head h2 {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border: 0;
  padding: 0;
}

.af-preview-panel__body {
  padding: 0.75rem 0.9rem 0.85rem;
}

.af-preview-id {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}

.af-preview-id__col {
  min-width: 0;
}

.af-preview-label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e2a36;
  line-height: 1.25;
}

.af-preview-label--alert {
  color: #a32020;
}

.af-preview-label .af-req {
  color: #a32020;
}

.af-preview-id__frame {
  border: 1px solid var(--gov-line);
  background: #f3f5f7;
  overflow: hidden;
}

.af-preview-id__frame--photo {
  width: 140px;
  height: 175px;
}

.af-preview-id__frame--passport {
  width: 100%;
  max-width: 300px;
  height: 175px;
}

.af-preview-id__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.af-preview-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.85rem;
}

.af-preview-field {
  min-width: 0;
}

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

.af-preview-value {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #cfd6de;
  background: #f2f4f6;
  color: var(--gov-ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.af-preview-value--icon {
  padding-left: 0;
}

.af-preview-value__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.1rem;
  align-self: stretch;
  border-right: 1px solid #cfd6de;
  background: #e8edf2;
  color: var(--gov-icon);
}

.af-preview-value__icon .af-icon {
  fill: currentColor;
}

.af-preview-value__text {
  flex: 1;
  min-width: 0;
  padding: 0.15rem 0.35rem 0.15rem 0;
}

.af-preview-value--upper .af-preview-value__text {
  text-transform: uppercase;
}

.af-preview-section {
  margin: 0.75rem 0 0.45rem;
  padding: 0.4rem 0.65rem;
  background: var(--gov-panel);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  border-left: 3px solid var(--flag-red);
}

.af-preview-hint {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: #6b7a89;
  text-align: center;
}

.af-preview-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.85rem;
}

.af-preview-doc {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #cfd6de;
  background: #f8f9fb;
}

.af-preview-doc__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a5a6a;
}

.af-preview-doc__link {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--gov-panel);
  background: var(--gov-panel);
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.af-preview-doc__link:hover {
  background: #1a2736;
  color: #fff !important;
}

.af-preview-doc__missing {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9aa6b2;
  white-space: nowrap;
}

.af-preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

/* ---- Complete / payment result ---- */
.af-complete {
  max-width: 920px;
  margin: 0 auto 1.5rem;
  padding: 0 0.25rem;
}

.af-complete-ref {
  text-align: center;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 2px solid #8b1e2f;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gov-ink);
}

.af-complete-card__head {
  background: #7a1828 !important;
}

.af-complete-alert {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.af-complete-alert--success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.af-complete-alert--danger {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.af-complete-alert--warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #e65100;
}

.af-complete-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}

.af-complete-panel {
  background: #fff;
  border: 1px solid #d5dde5;
  overflow: hidden;
}

.af-complete-panel__head {
  padding: 0.65rem 0.9rem;
  background: #f4f6f8;
  border-bottom: 1px solid #e2e8ee;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gov-ink);
}

.af-complete-panel__body {
  padding: 0.9rem;
  font-size: 0.9rem;
}

.af-complete-kv {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e2e8ee;
}

.af-complete-kv:last-child {
  border-bottom: none;
}

.af-complete-kv span {
  color: #5c6b79;
}

.af-complete-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #6b7a89;
  line-height: 1.45;
}

.af-complete-steps {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.af-complete-reason {
  margin: 0;
  line-height: 1.45;
  color: var(--gov-ink);
}

.af-complete-status--fail {
  color: #b71c1c;
}

.af-complete-status--cancel {
  color: #e65100;
}

.af-complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  margin-top: 1.1rem;
}

@media (max-width: 767.98px) {
  .af-complete-grid {
    grid-template-columns: 1fr;
  }

  .af-complete-actions {
    flex-direction: column-reverse;
  }

  .af-complete-actions .af-btn {
    width: 100%;
  }
}

/* ---- Review / payment (Uzbekistan-style layout, Cambodia gov tone) ---- */
.af-pay {
  max-width: 920px;
  margin: 0 auto 1.5rem;
  padding: 0 0.25rem;
}

.af-pay-ref {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: #8b1e2f;
  font-weight: 600;
}

.af-pay-flash {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.af-pay-flash--ok {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.af-pay-flash--err {
  background: #fdecea;
  color: #8b1e2f;
  border: 1px solid #f5c2c0;
}

.af-pay-stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.af-pay-card {
  background: #fff;
  border: 1px solid #d5dde5;
  overflow: hidden;
}

.af-pay-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--gov-panel);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.af-pay-card__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e8edf2;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.2rem 0.55rem;
}

.af-pay-card__body {
  padding: 1rem;
}

.af-pay-card--travel {
  border-color: #c5d0da;
}

.af-pay-card--travel .af-pay-card__head {
  background: #2a4a5e;
}

.af-pay-card--travellers .af-pay-card__head {
  background: #1f5a3a;
}

.af-pay-card--summary .af-pay-card__head {
  background: #7a1828;
}

.af-pay-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.1rem;
  margin: 0;
}

.af-pay-meta--cols3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.af-pay-meta > div {
  margin: 0;
}

.af-pay-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7a89;
  margin-bottom: 0.15rem;
}

.af-pay-meta dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gov-ink);
  font-weight: 600;
}

.af-pay-meta__highlight {
  color: #a32020;
}

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

.af-pay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.af-pay-table th,
.af-pay-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8ee;
  text-align: left;
  vertical-align: top;
}

.af-pay-table th {
  background: #eef5f0;
  font-weight: 700;
  color: #1f5a3a;
}

.af-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.af-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gov-panel);
  background: #fff;
  border: 1px solid #c5d0da;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.af-pay-btn:hover {
  background: #f2f5f8;
  border-color: var(--gov-panel);
  color: var(--gov-panel);
}

.af-pay-btn--edit {
  color: #8b5a14;
  border-color: #e0c9a0;
}

.af-pay-btn--danger {
  color: #9b1c1c;
  border-color: #e8b4b4;
}

.af-pay-btn--add {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  color: #1f5a3a;
  border-color: #9fd4ab;
  background: #f3faf5;
}

.af-pay-btn--add:hover {
  background: #e5f6e9;
  border-color: #1f5a3a;
  color: #1f5a3a;
}

.af-pay-delete-form {
  display: inline;
  margin: 0;
}

.af-pay-add {
  margin: 0.9rem 0 0;
}

.af-pay-summary {
  list-style: none;
  margin: 0;
  padding: 0;
}

.af-pay-summary li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed #e0c8cd;
  font-size: 0.9rem;
}

.af-pay-summary li span:last-child {
  color: #7a1828;
  font-weight: 700;
}

.af-pay-total {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem -1rem -0.15rem;
  padding: 0.85rem 1rem;
  background: #f8e8ea;
  border-top: 2px solid #7a1828;
  font-size: 1.1rem;
  font-weight: 700;
  color: #7a1828;
}

.af-pay-total__words {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a5a63;
  line-height: 1.35;
  text-align: right;
}

.af-pay-note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: #8a5a63;
  line-height: 1.45;
}

.af-pay-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.af-pay-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.af-pay-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 1px solid #d5dde5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.af-pay-modal__head {
  padding: 0.75rem 1rem;
  background: #f4f6f8;
  border-bottom: 1px solid #e2e8ee;
  font-weight: 700;
  color: var(--gov-ink);
}

.af-pay-modal__body {
  padding: 1rem;
}

.af-pay-modal__row {
  margin: 0 0 0.85rem;
}

.af-pay-modal__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--gov-ink);
}

.af-pay-modal__select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd6de;
  background: #f7f9fb;
  font-size: 0.92rem;
}

.af-pay-modal__error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  min-height: 1.1em;
}

.af-pay-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

@media (max-width: 767.98px) {
  .af-pay-meta,
  .af-pay-meta--cols3 {
    grid-template-columns: 1fr;
  }

  .af-pay-footer {
    flex-direction: column-reverse;
  }

  .af-pay-footer .af-btn {
    width: 100%;
  }

  .app-form-shell {
    max-width: none;
  }

  .af-grid,
  .af-upload-grid,
  .af-preview-fields,
  .af-preview-docs,
  .af-preview-id {
    grid-template-columns: 1fr;
  }

  .af-upload-tile__preview--passport {
    width: 140px;
  }

  .af-preview-id__frame--passport {
    max-width: none;
  }

  .af-preview-doc {
    grid-template-columns: 1fr;
  }

  .af-actions,
  .af-preview-actions {
    flex-direction: column-reverse;
  }

  .af-actions .af-btn,
  .af-preview-actions .af-btn {
    width: 100%;
  }

  .af-card__body,
  .af-card__head {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .app-form-page .step-title {
    font-size: 0.58rem;
  }
}
