:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #102039;
  --muted: #738096;
  --line: #dfe5ee;
  --line-strong: #c8d3e1;
  --primary: #176fe5;
  --primary-hover: #0f62cd;
  --primary-soft: #edf5ff;
  --accent: #176fe5;
  --accent-hover: #0f62cd;
  --error: #b43b3b;
  --success: #27824c;
  --focus: #176fe5;
  --radius: 9px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(16, 32, 57, 0.035);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 56px 18px;
  place-items: start center;
}

.form-card {
  position: relative;
  width: min(880px, 100%);
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.language-switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 36px);
  width: 78px;
  padding: 3px;
  margin: -16px -16px 18px 0;
  margin-left: auto;
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  background: #f5f7fa;
}

.language-switcher::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 36px;
  height: 30px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(24, 32, 42, 0.09);
  content: "";
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.language-switcher.is-en::before {
  transform: translateX(36px);
}

.language-switcher button {
  position: relative;
  z-index: 1;
  min-width: 36px;
  min-height: 30px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.language-switcher button:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.language-switcher button:active {
  transform: none;
}

.language-switcher button.active {
  color: var(--primary);
}

.language-switcher button:focus-visible {
  outline: 3px solid rgba(19, 93, 235, 0.2);
  outline-offset: -1px;
}

@media (prefers-reduced-motion: reduce) {
  .language-switcher::before {
    transition: none;
  }
}

.form-header {
  max-width: 660px;
  margin: 0 auto 32px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--focus);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.confirmation-form.is-loading {
  pointer-events: none;
}

.form-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(238, 243, 247, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.form-loader.visible {
  display: flex;
}

.loader-card {
  display: grid;
  justify-items: center;
  gap: 0;
  width: min(590px, 100%);
  padding: 42px clamp(22px, 5vw, 46px) 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(31, 45, 61, 0.14), 0 4px 12px rgba(31, 45, 61, 0.04);
  text-align: center;
}

.form-loader:not(.success) .loader-card {
  width: min(540px, 100%);
}

.loader-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(1.9rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

.loader-text {
  max-width: 370px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}

.loader-success-icon {
  display: none;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #168851;
  box-shadow: 0 0 0 11px #e8f6ee;
}

.loader-success-icon.visible {
  display: grid;
}

.loader-success-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.loader-card:has(.loader-success-icon.visible) .loader-title {
  font-size: clamp(2rem, 5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0;
}

.loader-success-details {
  display: grid;
  gap: 0;
  width: 100%;
}

.loader-loading-details {
  display: grid;
  width: 100%;
}

.loader-loading-details.hidden {
  display: none;
}

.loader-success-details.hidden {
  display: none;
}

.loader-email-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(360px, 100%);
  margin: 0 auto 28px;
  padding: 15px 20px;
  border-radius: 13px;
  background: #edf8f2;
  color: var(--text);
}

.loader-email-pill strong {
  min-width: 0;
  font-size: 1.12rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.loader-email-pill svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #159557;
  stroke-width: 2;
}

.loader-divider {
  width: 100%;
  height: 1px;
  margin: 0 0 28px;
  background: #e3e9f0;
}

.loader-loading-details .loader-divider {
  margin: 34px 0 26px;
}

.loader-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  text-align: left;
}

.loader-step {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.loader-step-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #eef4ff;
}

.loader-step-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #1763ed;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.loader-step strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.loader-step small {
  display: block;
  color: #8290a5;
  font-size: 0.94rem;
  line-height: 1.4;
}

.loader-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8a96aa;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.loader-security svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #8492a6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.loader-advice-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
}

.loader-advice-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  text-align: left;
}

.loader-advice-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
}

.loader-advice-item small {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.48;
}

.loader-advice-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eff4ff;
}

.loader-advice-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #1660ef;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.loader-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  margin-top: 30px;
  border-radius: 13px;
  background: var(--primary);
  font-size: 1.1rem;
  box-shadow: none;
}

.loader-action:hover {
  background: var(--primary-hover);
  box-shadow: 0 10px 26px rgba(19, 93, 235, 0.2);
}

.loader-spinner {
  width: 76px;
  height: 76px;
  margin: 0 auto 26px;
  border: 8px solid #dce8fd;
  border-top-color: var(--primary);
  border-right-color: #7aa8ff;
  border-radius: 50%;
  animation: loader-spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.field-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.choice-group,
.service-calculator,
.family-section,
.request-type-section,
.personal-data-section,
.legal-entity-section {
  display: grid;
  align-content: start;
  gap: 12px;
  margin: 0;
  min-inline-size: 0;
}

.field span,
.choice-group legend,
.service-calculator legend,
.family-section legend,
.request-type-section legend,
.personal-data-section legend {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input,
select {
  min-height: 52px;
  padding: 13px 15px;
}

input::placeholder,
textarea::placeholder {
  color: #8a94a6;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.4 1.6 6 6.2l4.6-4.6' fill='none' stroke='%23637084' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px 8px;
}

select::-ms-expand {
  display: none;
}

textarea {
  min-height: 112px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(124, 140, 224, 0.16);
}

.choice-group,
.service-calculator,
.family-section,
.request-type-section,
.personal-data-section,
.legal-entity-section,
.total-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.choice-group legend,
.service-calculator legend,
.family-section legend,
.request-type-section legend,
.personal-data-section legend {
  padding: 0 6px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 760;
  line-height: 1.2;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 8px;
  background: var(--line);
}

.request-type-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-type-section {
  padding: 20px;
  border: 1px solid #dbe5fb;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f7faff, #f9fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.request-type-card {
  position: relative;
  grid-template-columns: 1fr;
  min-height: 94px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.request-type-card > input,
.biometrics-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.request-type-card:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.request-type-card:has(input:checked) {
  border-color: var(--focus);
  background: #f7f8ff;
  box-shadow: 0 8px 26px rgba(124, 140, 224, 0.14);
}

.request-type-card strong,
.request-type-card small {
  display: block;
  overflow-wrap: anywhere;
}

.request-type-card > span {
  width: 100%;
  min-width: 0;
}

.biometrics-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(320px, 100%);
}

.biometrics-option {
  position: relative;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  min-height: 44px;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.biometrics-option:focus-within {
  outline: 3px solid rgba(23, 111, 229, 0.18);
  outline-offset: 2px;
}

.biometrics-option:hover {
  border-color: #b9cbe2;
  background: #fbfdff;
}

.biometrics-option:has(input:checked) {
  border-color: #9fc6f8;
  background: #edf6ff;
  color: var(--primary);
}

.request-type-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.calculator-note,
.field-hint,
.helper-text {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.section-note {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lookup-request-button {
  justify-self: start;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(30, 99, 240, 0.16);
}

.lookup-request-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 26px rgba(19, 93, 235, 0.2);
}

.lookup-request-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-applicant-fields {
  display: grid;
  gap: 18px;
}

.primary-applicant-fields.is-loaded {
  margin-top: 2px;
  padding: 18px;
  border: 1px solid #d8eadf;
  border-radius: var(--radius);
  background: #fbfefc;
}

.primary-applicant-fields.is-readonly input {
  background: #f8fafc;
  color: var(--text);
}

.primary-applicant-fields.is-readonly .legal-entity-toggle {
  pointer-events: none;
}

.primary-applicant-fields.is-readonly input[type="checkbox"] {
  cursor: not-allowed;
}

.existing-request-status {
  display: none;
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.existing-request-status:not(:empty) {
  display: block;
}

.existing-request-status.loading {
  color: var(--primary);
}

.existing-request-status.success {
  color: var(--success);
}

.existing-request-status.error {
  color: var(--error);
}


.service-list {
  display: grid;
  gap: 12px;
}

.service-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.service-row:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.service-row:has(.service-check:checked) {
  border-color: var(--focus);
  background: #f7f8ff;
  box-shadow: 0 8px 26px rgba(124, 140, 224, 0.12);
}

.service-row.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.58;
}

.service-row.is-disabled:hover {
  border-color: var(--line);
  background: #fbfcfd;
}

.service-row.is-disabled .service-title,
.service-row.is-disabled .service-price {
  color: var(--muted);
}

.service-row.is-disabled .service-check {
  cursor: not-allowed;
}

.service-check {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.service-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.service-title {
  color: var(--text);
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.service-price {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.service-dependency-note {
  display: none;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.service-row.is-disabled .service-dependency-note {
  display: block;
}

.is-lookup-locked {
  position: relative;
  opacity: 0.54;
}

.is-lookup-locked,
.is-lookup-locked * {
  cursor: not-allowed;
}

.is-lookup-locked .service-row:hover {
  border-color: var(--line);
  background: #fbfcfd;
  box-shadow: none;
}

.choice,
.consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text);
  line-height: 1.45;
}

.choice > span,
.consent > span {
  min-width: 0;
}

.choice input,
.consent input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 0.94rem;
}

.consent .error-text {
  grid-column: 1 / -1;
  padding-left: 30px;
}

.consent a {
  color: var(--focus);
  font-weight: 760;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.form-actions {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 8px calc(clamp(24px, 4vw, 44px) * -1) calc(clamp(24px, 4vw, 44px) * -1);
  padding: 22px clamp(24px, 4vw, 44px);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: linear-gradient(180deg, #fbfcfd 0%, #f7f9fc 100%);
}

.form-actions button {
  width: 100%;
}

.delivery-note {
  width: 100%;
  margin: 0;
  padding: 15px 16px;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
}

.family-list {
  display: grid;
  gap: 12px;
}

.legal-entity-section {
  background: #f9fbfd;
}

.legal-entity-toggle {
  align-items: center;
  font-weight: 760;
}

.legal-entity-fields {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 220px;
  padding-top: 10px;
}

.upload-request-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

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

.upload-request-card strong {
  color: var(--text);
  font-size: 1.05rem;
}

.upload-request-card p {
  position: relative;
  margin: 8px 0 0;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.45;
}

.upload-request-card p::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #4f6fe8;
  border-radius: 50%;
  color: #4f6fe8;
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 800;
}

.upload-batch {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.upload-dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 42px 24px 24px;
  border: 1px dashed #b8c8df;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f6fe8;
  font-size: 1.7rem;
  font-style: normal;
  font-weight: 800;
}

.upload-dropzone strong {
  color: var(--text);
  font-size: 1.02rem;
}

.upload-dropzone small {
  color: var(--muted);
}

.upload-dropzone b {
  color: #4f6fe8;
}

.upload-dropzone em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.upload-dropzone.dragover,
.upload-dropzone.has-files {
  border-color: #6e7ee9;
  background: #f7f8ff;
  box-shadow: 0 0 0 3px rgba(110, 126, 233, 0.12);
}

.upload-added-section {
  display: grid;
  gap: 12px;
}

.upload-added-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.2;
}

.upload-added-section h2 span {
  color: var(--muted);
  font-weight: 760;
}

.upload-file-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.upload-file-head,
.upload-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 42px;
  align-items: center;
  gap: 12px;
}

.upload-file-head {
  padding: 12px 16px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.upload-file-row {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.upload-file-head span:nth-child(2),
.upload-file-size {
  text-align: right;
}

.upload-file-names {
  min-width: 0;
  overflow-wrap: anywhere;
}

.upload-file-names,
.upload-file-size {
  color: var(--muted);
  font-size: 0.86rem;
}

.secure-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.family-member {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 110px 42px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.family-member .field {
  margin: 0;
}

.total-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  border-color: #111111;
  background: linear-gradient(135deg, #111111, #202936);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(17, 17, 17, 0.16);
}

.total-label,
.total-detail {
  color: inherit;
}

.total-label {
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.72;
  text-transform: uppercase;
}

.total-detail {
  max-width: 520px;
  font-size: 0.92rem;
  opacity: 0.82;
}

.total-breakdown {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.35;
  list-style: none;
  opacity: 0.92;
}

.total-breakdown li {
  position: relative;
  padding-left: 14px;
}

.total-breakdown li::before {
  position: absolute;
  left: 0;
  content: "•";
}

#totalAmount {
  display: block;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1;
  white-space: nowrap;
}

button {
  min-height: 52px;
  min-width: min(280px, 100%);
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 26px rgba(24, 32, 42, 0.16);
}

button:focus-visible,
a:focus-visible,
.service-row:focus-within,
.request-type-card:focus-within,
.add-family-button:focus-visible,
.icon-remove:focus-visible {
  outline: 3px solid rgba(19, 93, 235, 0.22);
  outline-offset: 2px;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: default;
  opacity: 0.58;
}

.add-family-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  min-height: 68px;
  padding: 14px 18px;
  border: 1px dashed #b8c3d2;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.add-family-button:hover {
  border-color: var(--focus);
  background: #f7f8ff;
}

.add-family-button > span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--focus);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.add-family-button strong {
  font-size: 1rem;
}

.add-family-button small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 640;
  line-height: 1.35;
}

.icon-remove {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--error);
  font-size: 1.35rem;
  line-height: 1;
}

.upload-file-row .icon-remove {
  justify-self: end;
}

.icon-remove:hover {
  border-color: var(--error);
  background: #fff5f3;
}

.icon-remove:disabled,
.icon-remove:disabled:hover {
  border-color: var(--line);
  background: #ffffff;
  color: #c9d1dc;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

.form-status {
  display: none;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  min-height: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.form-status:not(:empty) {
  display: grid;
}

.form-status strong {
  color: var(--ink);
  font-size: 1rem;
}

.form-status span {
  color: inherit;
  font-size: 0.92rem;
}

.form-status.success {
  border-color: #b7e4cb;
  background: #effaf4;
  color: var(--success);
}

.form-status.success strong {
  color: var(--success);
}

.form-status.error {
  border-color: #f4b8b1;
  background: #fff5f3;
  color: var(--error);
}

.form-status.error strong {
  color: var(--error);
}

.form-actions button,
.support-actions button {
  background: var(--primary);
}

.form-actions button:hover,
.support-actions button:hover {
  background: var(--primary-hover);
  box-shadow: 0 14px 30px rgba(19, 93, 235, 0.2);
}

.support-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  min-width: 0;
  min-height: 0;
  padding: 0 20px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.support-fab:hover {
  background: #111111;
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

body.support-open .support-fab {
  display: none;
}

body.support-open {
  overflow: hidden;
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
}

.support-fab-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
}

.support-fab-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.support-modal {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 1100;
  display: none;
  width: 420px;
  max-width: calc(100vw - 28px);
}

.support-modal.visible {
  display: block;
}

.support-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(25, 35, 50, 0.18), 0 6px 18px rgba(25, 35, 50, 0.06);
}

.support-close {
  display: flex;
  flex: 0 0 auto;
  place-items: center;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.support-close:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 82px;
  padding: 16px 16px 16px 18px;
  background: #111111;
  color: #ffffff;
}

.support-manager {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.support-manager-info {
  min-width: 0;
}

.support-avatar {
  display: flex;
  flex: 0 0 auto;
  place-items: center;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
  font-weight: 900;
}

.support-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-header p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.3;
}

.support-content {
  max-height: min(720px, calc(100vh - 190px));
  overflow-y: auto;
  scrollbar-color: #c9d1dc transparent;
  scrollbar-width: thin;
}

.support-content::-webkit-scrollbar {
  width: 7px;
}

.support-content::-webkit-scrollbar-track {
  background: transparent;
}

.support-content::-webkit-scrollbar-thumb {
  background: #c9d1dc;
  border-radius: 99px;
}

.support-form-state {
  display: block;
}

.support-form-state.hidden {
  display: none !important;
}

.support-form {
  display: grid;
  gap: 0;
}

.support-form-body {
  display: grid;
  gap: 14px;
  padding: 16px 16px 10px;
}

.support-intro {
  padding: 15px 16px;
  border: 1px solid #dbe6fb;
  border-radius: 11px;
  background: #f4f7fc;
}

.support-intro-title {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.3;
}

.support-intro-text {
  color: #47566c;
  font-size: 0.88rem;
  line-height: 1.45;
}

.support-group {
  margin: 0;
}

.support-group input,
.support-group textarea {
  border-radius: 10px;
}

.support-group .field-hint {
  margin-top: -2px;
  font-size: 0.78rem;
}

.support-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 16px 14px;
  border-top: 1px solid #e9edf3;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), #ffffff 18%);
}

.support-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  min-height: 52px;
  border-radius: 10px;
  font-size: 0.94rem;
  box-shadow: 0 8px 20px rgba(30, 99, 240, 0.15);
}

.support-actions button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.support-button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: support-spin 0.75s linear infinite;
}

.support-actions button.is-loading .support-button-spinner {
  display: block;
}

.support-actions button.is-loading .support-send-icon {
  display: none;
}

@keyframes support-spin {
  to {
    transform: rotate(360deg);
  }
}

.support-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: #8a96a8;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.support-security svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.support-success-state {
  display: block;
}

.support-success-body {
  padding: 34px 28px 26px;
  text-align: center;
}

.support-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  margin: 4px auto 22px;
  border-radius: 50%;
  background: #e8f8ef;
}

.support-success-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--success);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.support-success-body h2 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.support-success-body > p {
  max-width: 300px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.support-success-note {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border: 1px solid #d3f0df;
  border-radius: 11px;
  background: #eefaf3;
  text-align: left;
}

.support-success-note span {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dff5e8;
  color: var(--success);
}

.support-success-note svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.support-success-note strong {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.support-success-close {
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin-top: 26px;
  border: 1px solid #8fb0ff;
  border-radius: 10px;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
}

.support-success-close:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: none;
}

.error-text {
  display: none;
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.field.invalid .error-text,
.choice-group.invalid .error-text,
.service-calculator.invalid .error-text,
.family-section.invalid .error-text,
.legal-entity-section.invalid .error-text,
.consent.invalid .error-text {
  display: block;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea,
.field.upload-dropzone.invalid,
.choice-group.invalid,
.service-calculator.invalid,
.family-section.invalid,
.legal-entity-section.invalid,
.upload-batch.invalid,
.consent.invalid {
  border-color: var(--error);
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.08);
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 700px) {
  .language-switcher {
    margin: -10px -8px 16px 0;
    margin-left: auto;
  }

  h1 {
    font-size: clamp(1.7rem, 9vw, 1.95rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .page-shell {
    padding: 0;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }


  .request-type-options {
    grid-template-columns: 1fr;
  }

  .request-type-card {
    min-height: auto;
    padding: 14px;
  }

  .lookup-request-button {
    width: 100%;
  }

  .service-row {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .service-check {
    margin-top: 3px;
  }

  .service-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .service-title {
    width: 100%;
    font-size: 0.98rem;
    line-height: 1.32;
  }

  .service-price {
    grid-column: auto;
    width: 100%;
    font-size: 0.92rem;
    line-height: 1.3;
    text-align: left;
  }

  .service-dependency-note {
    width: 100%;
    font-size: 0.84rem;
  }

  .family-member {
    grid-template-columns: 1fr;
  }

  .legal-entity-fields {
    grid-template-columns: 1fr;
  }

  .upload-file-head {
    display: none;
  }

  .upload-file-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upload-file-size {
    font-weight: 760;
  }

  .total-panel {
    position: static;
    padding: 22px;
  }

  .form-card {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    min-height: 100vh;
    padding: 22px;
    border: 0;
    border-radius: 0;
  }

  .form-actions {
    margin-right: -22px;
    margin-left: -22px;
    margin-bottom: -22px;
    padding: 16px 22px;
  }

  .loader-card {
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 34px 22px 24px;
    border-radius: 14px;
  }

  .loader-spinner {
    width: 64px;
    height: 64px;
    border-width: 7px;
  }

  .loader-success-icon {
    width: 68px;
    height: 68px;
    box-shadow: 0 0 0 9px #e8f6ee;
  }

  .loader-title {
    font-size: 1.65rem;
  }

  .loader-card:has(.loader-success-icon.visible) .loader-title {
    font-size: 1.75rem;
  }

  .loader-text {
    margin-bottom: 28px;
    font-size: 0.94rem;
  }

  .loader-email-pill {
    font-size: 1rem;
  }

  .loader-advice-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }

  .loader-advice-icon {
    width: 44px;
    height: 44px;
  }

  .loader-advice-icon svg {
    width: 23px;
    height: 23px;
  }

  .loader-step {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  .loader-step-icon {
    width: 46px;
    height: 46px;
  }

  .loader-step-icon svg {
    width: 23px;
    height: 23px;
  }

  .loader-step strong {
    font-size: 1rem;
  }

  .loader-step small {
    font-size: 0.88rem;
  }

  .loader-security {
    align-items: flex-start;
    font-size: 0.82rem;
    text-align: left;
  }

  .loader-advice-item strong {
    font-size: 1.05rem;
  }

  .loader-advice-item small {
    font-size: 0.94rem;
  }

  .loader-action {
    min-height: 58px;
    font-size: 1rem;
  }

  .support-fab {
    right: 14px;
    bottom: 14px;
    height: 50px;
    padding: 0 17px;
    max-width: calc(100vw - 28px);
  }

  .support-modal {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-width: none;
  }

  .support-modal.visible {
    display: flex;
  }

  .support-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 16px;
  }

  .support-header {
    min-height: 74px;
    padding: 14px;
  }

  .support-avatar {
    width: 40px;
    height: 40px;
  }

  .support-header h2 {
    font-size: 0.94rem;
  }

  .support-header p {
    font-size: 0.75rem;
  }

  .support-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .support-form-state,
  .support-form {
    min-height: 100%;
  }

  .support-form {
    display: flex;
    flex-direction: column;
  }

  .support-form-body {
    flex: 1 1 auto;
    padding: 14px 14px 8px;
  }

  .support-actions {
    flex: 0 0 auto;
    padding: 11px 14px 13px;
    padding-bottom: max(13px, env(safe-area-inset-bottom));
  }

  .support-success-body {
    padding: 28px 22px 24px;
  }

  .support-success-body h2 {
    font-size: 1.35rem;
  }
}

/* Nomad CRM client-portal visual system. */
.public-portal {
  background: #f6f8fb;
  color: #102039;
}

.public-header {
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.public-header-inner {
  width: min(920px, calc(100% - 40px));
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.public-brand-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.public-header .language-switcher {
  height: 36px;
  align-items: center;
  margin: 0;
}

.public-header .language-switcher button {
  min-width: 36px;
  min-height: 30px;
  padding: 6px;
  border-radius: 7px;
}

.public-portal .page-shell {
  min-height: calc(100vh - 62px);
  padding: 24px 20px 48px;
}

.public-portal .form-card {
  width: min(920px, 100%);
  padding: 28px;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.public-portal .form-header {
  max-width: none;
  margin: 0 0 22px;
  text-align: left;
}

.public-portal .form-header h1 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(1.9rem, 5vw, 2.3rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: 0;
}

.public-portal .form-header > p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 0.94rem;
}

.public-portal .eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.public-portal .confirmation-form {
  gap: 14px;
}

.public-portal .field,
.public-portal .choice-group,
.public-portal .service-calculator,
.public-portal .family-section,
.public-portal .request-type-section,
.public-portal .personal-data-section,
.public-portal .legal-entity-section {
  gap: 9px;
}

.public-portal .choice-group,
.public-portal .service-calculator,
.public-portal .family-section,
.public-portal .request-type-section,
.public-portal .personal-data-section,
.public-portal .legal-entity-section,
.public-portal .total-panel {
  padding: 20px;
  border-color: var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 32, 57, 0.025);
}

.public-portal .section-heading {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 720;
}

.public-portal .section-heading::after {
  margin-left: 12px;
  background: var(--line);
}

.public-portal .request-type-section {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 32, 57, 0.025);
}

.public-portal .request-type-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 78px;
  padding: 13px 14px;
  border-color: var(--line);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: none;
}

.public-portal .biometrics-option {
  grid-template-columns: minmax(0, 1fr);
}

.public-portal .request-type-card:hover {
  border-color: #b9cbe2;
  background: #fbfdff;
  box-shadow: none;
}

.public-portal .request-type-card:has(input:checked) {
  border-color: #9fc6f8;
  background: #f4f9ff;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.public-portal input,
.public-portal select,
.public-portal textarea {
  border-color: var(--line);
  border-radius: 9px;
  color: var(--text);
}

.public-portal input,
.public-portal select {
  min-height: 44px;
  padding: 10px 12px;
}

.public-portal textarea {
  padding: 12px 13px;
}

.public-portal input:focus,
.public-portal select:focus,
.public-portal textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 111, 229, 0.1);
}

.public-portal input::placeholder,
.public-portal textarea::placeholder {
  color: #98a3b3;
}

.public-portal .field span,
.public-portal .choice-group legend,
.public-portal .service-calculator legend,
.public-portal .family-section legend,
.public-portal .request-type-section legend,
.public-portal .personal-data-section legend {
  color: #40506a;
  font-size: 0.84rem;
  font-weight: 650;
}

.public-portal .field-hint,
.public-portal .calculator-note,
.public-portal .helper-text,
.public-portal .section-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.public-portal .primary-applicant-fields.is-loaded {
  border-color: #cce5d5;
  background: #f6fbf8;
}

.public-portal .legal-entity-section {
  gap: 8px;
  padding: 14px 16px;
  background: #fafbfd;
}

.public-portal .legal-entity-toggle {
  min-height: 24px;
}

.public-portal .legal-entity-fields {
  gap: 14px;
  padding-top: 6px;
}

.public-portal .field-grid,
.public-portal .primary-applicant-fields {
  gap: 14px;
}

.public-portal .service-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

.public-portal .service-row {
  min-height: 64px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.public-portal .service-row + .service-row {
  border-top: 1px solid var(--line);
}

.public-portal .service-row:hover {
  background: #f8fbff;
  box-shadow: none;
}

.public-portal .service-row:has(.service-check:checked) {
  background: #f1f7ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.public-portal .service-row.is-disabled,
.public-portal .service-row.is-disabled:hover {
  border-color: transparent;
  background: #fafbfd;
}

.public-portal .service-title {
  font-size: 0.9rem;
  font-weight: 680;
}

.public-portal .service-price,
.public-portal .service-dependency-note {
  font-size: 0.78rem;
}

.public-portal .service-check,
.public-portal .choice input,
.public-portal .consent input {
  accent-color: var(--primary);
}

.public-portal .family-member {
  border-color: var(--line);
  border-radius: 11px;
  background: #fafbfd;
}

.public-portal .add-family-button {
  min-height: 64px;
  border-color: #b9c8dc;
  border-radius: 10px;
  color: var(--text);
}

.public-portal .add-family-button:hover {
  border-color: #9cc6ff;
  background: #f7fbff;
  box-shadow: none;
}

.public-portal .add-family-button > span {
  background: #edf5ff;
  color: var(--primary);
}

.public-portal .total-panel {
  border-color: #cfe0f7;
  background: #f7fbff;
  color: var(--text);
  box-shadow: none;
}

.public-portal .total-label {
  color: var(--muted);
  opacity: 1;
}

.public-portal .total-detail {
  color: #40506a;
  opacity: 1;
}

.public-portal .total-breakdown {
  color: #40506a;
  opacity: 1;
}

.public-portal #totalAmount {
  border-top-color: #dbe7f5;
  color: var(--primary);
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 750;
}

.public-portal .consent {
  padding: 14px 16px;
  border-color: var(--line);
  border-radius: 10px;
  background: #fafbfd;
  color: #40506a;
  font-size: 0.86rem;
}

.public-portal .consent a {
  color: var(--primary);
  font-weight: 650;
}

.public-portal button {
  min-height: 46px;
  border-radius: 9px;
  font-weight: 680;
}

.public-portal .form-actions {
  gap: 12px;
  margin: 4px -28px -28px;
  padding: 16px 28px;
  border-radius: 0 0 14px 14px;
  background: #fafbfd;
}

.public-portal .form-actions button,
.public-portal .support-actions button,
.public-portal .lookup-request-button {
  background: var(--primary);
  box-shadow: none;
}

.public-portal .form-actions button:hover,
.public-portal .support-actions button:hover,
.public-portal .lookup-request-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(23, 111, 229, 0.12);
}

.public-portal .delivery-note {
  border-color: var(--line);
  background: #ffffff;
  font-size: 0.82rem;
}

.public-portal .form-loader {
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(8px);
}

.public-portal .loader-card {
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 46px rgba(16, 32, 57, 0.12);
}

.public-portal .loader-success-icon {
  background: var(--success);
  box-shadow: 0 0 0 10px #eaf6ee;
}

.public-portal .support-fab {
  height: 48px;
  right: 22px;
  bottom: 22px;
  background: #102039;
  box-shadow: 0 8px 24px rgba(16, 32, 57, 0.18);
}

.public-portal .support-fab:hover {
  background: #172b48;
  box-shadow: 0 10px 26px rgba(16, 32, 57, 0.22);
}

.public-portal .support-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(16, 32, 57, 0.18);
}

.public-portal .support-header {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.public-portal .support-header p {
  color: var(--muted);
}

.public-portal .support-avatar {
  background: #edf5ff;
  color: var(--primary);
}

.public-portal .support-close {
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.public-portal .support-intro {
  border-color: #cfe0f7;
  background: #f7fbff;
}

.upload-portal .form-card {
  width: min(920px, 100%);
}

.upload-portal .upload-request-card,
.upload-portal .upload-batch {
  padding: 16px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fafbfd;
}

.upload-portal .upload-request-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.upload-portal .upload-request-card p::before {
  border-color: var(--primary);
  color: var(--primary);
}

.upload-portal .upload-dropzone {
  min-height: 185px;
  padding: 34px 20px 20px;
  border-color: #b9c8dc;
  border-radius: 11px;
  background: #ffffff;
}

.upload-portal .upload-dropzone i {
  width: 48px;
  height: 48px;
  background: #edf5ff;
  color: var(--primary);
}

.upload-portal .upload-dropzone b {
  color: var(--primary);
}

.upload-portal .upload-dropzone.dragover,
.upload-portal .upload-dropzone.has-files {
  border-color: #9cc6ff;
  background: #f7fbff;
  box-shadow: 0 0 0 3px rgba(23, 111, 229, 0.1);
}

.upload-portal .upload-file-table {
  border-color: var(--line);
  border-radius: 11px;
}

.upload-portal .upload-file-head {
  background: #f4f7fb;
}

@media (max-width: 700px) {
  .public-header,
  .public-header-inner {
    min-height: 58px;
  }

  .public-header-inner {
    width: calc(100% - 32px);
  }

  .public-brand-name {
    font-size: 16px;
  }

  .public-portal .page-shell {
    min-height: calc(100vh - 58px);
    padding: 14px 10px 82px;
  }

  .public-portal .form-card {
    min-height: 0;
    padding: 14px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .public-portal .form-header {
    margin-bottom: 17px;
    padding: 0 4px;
  }

  .public-portal .form-header h1 {
    font-size: 1.85rem;
  }

  .public-portal .choice-group,
  .public-portal .service-calculator,
  .public-portal .family-section,
  .public-portal .request-type-section,
  .public-portal .personal-data-section,
  .public-portal .legal-entity-section,
  .public-portal .total-panel {
    padding: 15px 14px;
    border-radius: 12px;
  }

  .public-portal .service-list {
    margin-right: -1px;
    margin-left: -1px;
  }

  .public-portal .service-row {
    padding: 12px;
  }

  .public-portal .form-actions {
    margin: 2px -10px -14px;
    padding: 14px 10px;
    border-radius: 0;
    background: transparent;
  }

  .public-portal .support-fab {
    right: 14px;
    bottom: 14px;
  }

  .upload-portal .upload-request-card,
  .upload-portal .upload-batch {
    padding: 14px;
  }

  .upload-portal .upload-dropzone {
    min-height: 165px;
    padding: 26px 14px 18px;
  }
}

/* Application form: split workspace inspired by the client portal concept. */
@media (min-width: 961px) {
  .application-form-portal .public-header-inner {
    width: min(1180px, calc(100% - 48px));
  }

  .application-form-portal .page-shell {
    padding: 30px 24px 72px;
  }

  .application-form-portal .form-card {
    width: min(1180px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .application-form-portal .form-header {
    margin-bottom: 24px;
  }

  .application-form-portal .form-header h1 {
    font-size: clamp(2.25rem, 4vw, 2.75rem);
    font-weight: 780;
  }

  .application-form-portal .form-header > p:not(.eyebrow) {
    font-size: 1rem;
  }

  .application-form-portal .confirmation-form {
    display: flex;
    gap: 18px 22px;
    align-items: start;
  }

  .application-form-portal .application-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
  }

  .application-form-portal .application-sidebar {
    position: sticky;
    top: 10px;
    bottom: 0;
    display: grid;
    flex: 0 0 360px;
    align-self: start;
    gap: 16px;
    margin-top: 6px;
    min-width: 0;
  }
}

.application-form-portal .request-type-section,
.application-form-portal .personal-data-section,
.application-form-portal .service-calculator,
.application-form-portal .family-section,
.application-form-portal .application-sidebar > .choice-group,
.application-form-portal .application-sidebar > .total-panel,
.application-form-portal .application-sidebar > .consent {
  border-color: #dbe4f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(20, 54, 95, 0.045);
}

.application-form-portal .request-type-section,
.application-form-portal .personal-data-section,
.application-form-portal .service-calculator,
.application-form-portal .family-section {
  padding: 20px;
}

.application-form-portal .request-type-card {
  min-height: 92px;
  padding: 16px;
  border-color: #d4dfed;
  border-radius: 12px;
}

.application-form-portal .request-type-card:has(input:checked) {
  border-color: var(--primary);
  background: #f2f8ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.application-form-portal .request-type-card strong {
  font-size: 0.95rem;
}

.application-form-portal .request-type-card small {
  color: #7183a0;
}

.application-form-portal .section-heading {
  font-size: 1.05rem;
  font-weight: 750;
}

.application-form-portal .section-heading::after {
  display: none;
}

.application-form-portal .field span,
.application-form-portal .choice-group legend,
.application-form-portal .service-calculator legend,
.application-form-portal .family-section legend,
.application-form-portal .request-type-section legend,
.application-form-portal .personal-data-section legend {
  color: #0d2344;
  font-weight: 680;
}

.application-form-portal input,
.application-form-portal select,
.application-form-portal textarea {
  border-color: #cfdaea;
  background: #ffffff;
}

.application-form-portal .legal-entity-section {
  border-color: #dbe4f0;
  background: #f8fbff;
}

.application-form-portal .service-list {
  border-color: #dbe4f0;
  border-radius: 12px;
}

.application-form-portal .service-row {
  min-height: 58px;
  padding: 11px 12px;
}

.application-form-portal .service-row:has(.service-check:checked) {
  background: #eef6ff;
  box-shadow: none;
}

.application-form-portal .service-title {
  color: #0d2344;
  font-size: 0.84rem;
  font-weight: 650;
}

.application-form-portal .service-price {
  color: #536a8c;
  font-size: 0.82rem;
}

.application-form-portal .application-sidebar {
  min-width: 0;
}

.application-form-portal .application-sidebar > .total-panel,
.application-form-portal .application-sidebar > .choice-group,
.application-form-portal .application-sidebar > .consent {
  padding: 20px;
}

.application-form-portal .application-sidebar > .total-panel {
  gap: 16px;
  border-color: #cfe0f7;
  background: #ffffff;
}

.application-form-portal .total-label {
  margin: 0 0 12px;
  color: #0d2344;
  font-size: 1rem;
  font-weight: 760;
  text-transform: none;
}

.application-form-portal .total-detail {
  color: #7183a0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.application-form-portal .total-breakdown {
  gap: 0;
  margin-top: 14px;
  color: #0d2344;
  font-size: 0.82rem;
}

.application-form-portal .total-breakdown li {
  padding: 11px 0;
  border-top: 1px solid #e5ebf3;
}

.application-form-portal .total-breakdown li::before {
  display: none;
}

.application-form-portal #totalAmount {
  padding-top: 16px;
  border-top: 1px solid #dbe4f0;
  color: #0d2344;
  font-size: 2rem;
  font-weight: 800;
  text-align: left;
}

.application-form-portal .application-sidebar > .choice-group {
  gap: 12px;
}

.application-form-portal .application-sidebar > .choice-group legend {
  float: left;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  font-size: 0.96rem;
  line-height: 1.35;
}

.application-form-portal .application-sidebar > .choice-group legend + * {
  clear: both;
}

.application-form-portal .biometrics-options {
  width: 100%;
}

.application-form-portal .biometrics-option {
  min-height: 42px;
  border-color: #cfdaea;
}

.application-form-portal .biometrics-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef6ff;
}

.application-form-portal .application-sidebar > .consent {
  margin: 0;
  background: #ffffff;
}

.application-form-portal .application-sidebar .form-actions {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.application-form-portal .application-sidebar .delivery-note {
  margin: 0;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f0f5fb;
  color: #657997;
  line-height: 1.5;
}

.application-form-portal .application-sidebar .form-status:empty {
  display: none;
}

.application-form-portal .application-sidebar #submitButton {
  width: 100%;
  min-height: 52px;
  margin: 0;
  background: #1677ff;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 760;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.18);
}

.application-form-portal .application-sidebar #submitButton:hover {
  background: #0869ed;
}

@media (max-width: 960px) {
  .application-form-portal .public-header-inner {
    width: min(100% - 28px, 760px);
  }

  .application-form-portal .page-shell {
    padding: 18px 12px 84px;
  }

  .application-form-portal .form-card {
    width: min(760px, 100%);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .application-form-portal .confirmation-form,
  .application-form-portal .application-main,
  .application-form-portal .application-sidebar {
    display: grid;
    gap: 14px;
  }

  .application-form-portal .application-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .application-form-portal .request-type-section,
  .application-form-portal .personal-data-section,
  .application-form-portal .service-calculator,
  .application-form-portal .family-section,
  .application-form-portal .application-sidebar > .choice-group,
  .application-form-portal .application-sidebar > .total-panel,
  .application-form-portal .application-sidebar > .consent {
    padding: 15px 14px;
    border-radius: 12px;
  }

  .application-form-portal .request-type-card {
    min-height: 78px;
    padding: 14px;
  }

  .application-form-portal .application-sidebar .form-actions {
    margin: 0;
    padding: 0;
  }
}
