* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #b3b4bd;
  color: #1f1f1f;
  font-size: 13px;
}

.page-shell {
  width: min(1024px, calc(100% - 16px));
  margin: 8px auto;
}

.top-header {
  height: 99px;
  background: #062b5f;
  color: #fff;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid #cacaca;
  position: relative;
  overflow: hidden;
}

.brand-area {
  display: flex;
  align-items: center;
  padding: 7px 10px;
}

.brand-logo {
  width: 340px;
  max-height: 220px;
  object-fit: contain;
  margin-left: 10px;
}

.app-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 6px 12px;
}

.help-link {
  color: #fff;
  text-decoration: underline;
  font-size: 11px;
  margin-bottom: 8px;
}

.app-title {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.content-wrap {
  margin-top: 7px;
}

.panel {
  border: 1px solid #b4b4b4;
  background: #fff;
}

.panel + .panel {
  margin-top: 8px;
}

.panel-title {
  background: #062b5f;
  color: #fff;
  font-size: 13px;
  padding: 6px 12px;
  font-weight: 700;
  line-height: 1.1;
}

.panel-body {
  padding: 12px;
}

.intro-text {
  margin: 0 0 11px;
  font-size: 13px;
  line-height: 1.25;
}

.error-banner {
  border: 1px solid #b6b6b6;
  margin-bottom: 10px;
  background: #fff;
}

.error-banner-title {
  background: #bf1b1b;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.error-banner-text {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.required-indicator {
  color: #cc0000;
  font-weight: 700;
}

.form-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.form-row label {
  min-width: 310px;
  font-size: 13px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

select,
input {
  border: 1px solid #a8a8a8;
  font-size: 13px;
  padding: 2px 5px;
  min-height: 24px;
}

select {
  min-width: 370px;
  background: #fff;
}

.terms-checkbox {
  min-height: auto;
  width: 12px;
  height: 12px;
  margin: 0;
}

.dynamic-fields .form-row {
  margin-bottom: 10px;
}

.dynamic-fields input {
  width: 370px;
}

.dynamic-fields .checkbox-row input {
  width: auto;
}

.dynamic-fields .form-row label {
  min-width: 310px;
}

.info-dot {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #24567f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
}

.field-with-icons {
  display: inline-flex;
  align-items: center;
  border: 1px solid #a8a8a8;
  background: #fff;
  height: 24px;
}

.field-with-icons input {
  border: 0;
  min-height: 20px;
  width: 344px;
  outline: none;
}

.field-icon {
  width: 22px;
  border-left: 1px solid #a8a8a8;
  text-align: center;
  font-size: 12px;
  color: #1f1f1f;
}

.terms-row .input-wrap,
.checkbox-row .input-wrap {
  align-items: center;
}

.checkbox-row {
  margin-bottom: 2px !important;
}

.terms-link {
  color: #304f74;
  text-decoration: underline;
}

.checkbox-label {
  font-size: 13px;
  min-width: 0 !important;
  margin-left: 4px;
}

.form-error {
  color: #bf1010;
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 12px;
}

.button-row {
  border: 1px solid #d4d4d4;
  background: #efefef;
  padding: 5px;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
}

.btn {
  min-width: 40px;
  height: 22px;
  border: 1px solid #a8a8a8;
  background: linear-gradient(to bottom, #f8f8f8, #dedede);
  cursor: pointer;
  font-size: 13px;
  padding: 0 8px;
}

.btn:hover {
  background: linear-gradient(to bottom, #ffffff, #d7d7d7);
}

.result-panel .result-text {
  font-size: 13px;
  margin: 0;
  line-height: 1.35;
}

.result-pass {
  color: #0b5e26;
}

.page-footer {
  margin-top: 8px;
  border: 1px solid #b4b4b4;
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
}

.page-footer a {
  color: #304f74;
}

.page-footer span {
  margin: 0 8px;
  color: #888;
}

@media (max-width: 700px) {
  .page-shell {
    width: calc(100% - 8px);
    margin: 4px auto;
  }

  .top-header {
    height: 129px;
  }

  .brand-area {
    align-items: flex-start;
    padding: 10px 10px 0;
    width: 82%;
  }

  .brand-logo {
    width: 100%;
    max-width: 100%;
    max-height: 140px;
    margin-left: 0;
  }

  .app-title-wrap {
    position: absolute;
    right: 10px;
    top: 8px;
    bottom: 8px;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 0;
  }

  .app-title {
    font-size: 17px;
  }

  .help-link {
    font-size: 10px;
    margin-bottom: 0;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .dynamic-fields input,
  select {
    width: min(100%, 360px);
    min-width: 0;
  }

  .intro-text,
  .form-row label,
  select,
  input,
  .form-error,
  .panel-title,
  .page-footer {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .top-header {
    height: 115px;
  }

  .brand-area {
    width: 84%;
  }

  .brand-logo {
    width: 100%;
    max-width: 100%;
    max-height: 130px;
    margin-left: 0;
  }

  .app-title {
    font-size: 14px;
  }

  .help-link {
    font-size: 9px;
  }
}
