:root {
  --navy: #11164a;
  --teal: #17b3a3;
  --green: #1f943d;
  --text: #111827;
  --muted: #7b818b;
  --border: #d5d5d5;
  --soft: #ececec;
  --stamp: #e3e6ea;
  --white: #ffffff;
  font-family: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(to bottom, var(--navy) 0, var(--navy) 247px, #ececec 247px, #ececec 100%);
}

.page-shell {
  min-height: 100vh;
}

.top-hero {
  width: min(calc(100vw - 276px), 1624px);
  margin: 0 auto;
  padding-top: 22px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  width: 196px;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-pill,
.login-button {
  border: 0;
  background: var(--teal);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.lang-pill {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.login-button {
  border-radius: 4px;
  padding: 13px 20px;
  text-decoration: none;
}

.success-banner {
  margin-top: 20px;
  width: calc((100% - 26px) / 2);
  min-width: 0;
  background: var(--green);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
}

.validation-grid {
  width: min(calc(100vw - 276px), 1624px);
  margin: 35px auto 0;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 26px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  min-height: 470px;
  padding: 24px 34px 28px;
}

.signer-card {
  min-height: auto;
  align-self: start;
}

.card-row {
  display: flex;
  gap: 22px;
}

.card-icon {
  font-size: 82px !important;
  color: #b3b3b3;
  flex-shrink: 0;
}

.card-body {
  width: 100%;
}

.field-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-value {
  margin: 8px 0 18px;
  font-size: 16px;
  line-height: 1.25;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.apply-btn,
.cancel-btn,
.enter-button,
.certificate-button {
  border-radius: 4px;
  min-height: 44px;
  border: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.primary-action,
.apply-btn,
.certificate-button {
  background: var(--navy);
  color: var(--white);
}

.secondary-action {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border);
}

.stamp-box {
  background: var(--stamp);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  margin: 8px 0 24px;
}

.stamp-box summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 600;
}

.stamp-box summary::-webkit-details-marker {
  display: none;
}

.stamp-icon {
  color: var(--green);
  margin-right: 6px;
}

.expand-icon {
  margin-left: auto;
  color: #555;
}

.stamp-box[open] .expand-icon {
  transform: rotate(180deg);
}

.stamp-content {
  padding: 0 30px 10px;
}

.success-text {
  color: #088b2a;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hidden {
  display: none;
}

.lang-modal {
  width: min(625px, 100%);
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  padding: 22px 30px 28px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.close-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #222;
}

.close-btn .material-icons {
  font-size: 34px;
}

.select-wrap {
  display: block;
  background: #f5f5f5;
  border-radius: 4px 4px 0 0;
  border-bottom: 1px solid #888;
  padding: 10px 16px 0;
  margin: 0 12px 44px;
}

.select-wrap span {
  display: block;
  font-size: 14px;
  color: #666;
}

.select-wrap select {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: #222;
  padding: 4px 0 12px;
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.cancel-btn {
  background: transparent;
  color: #111;
}

.login-body {
  background: #fafafa;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 20px 40px;
}

.onr-logo {
  width: 352px !important;
  height: 80px;
  object-fit: contain;
  margin-bottom: 24px;
}

.login-card {
  width: 645px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

@media (min-width: 641px) {
  .onr-logo {
    margin-bottom: 90px;
  }

  .login-shell {
    transform: scale(0.78);
    transform-origin: top center;
  }
}

.login-tabs {
  margin: -38px 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  padding: 12px;
}

.tab-item {
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 19px;
  padding: 17px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.tab-item.active {
  background: #47539c;
}

.login-form {
  padding: 28px 18px 26px;
}

.input-line {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 12px 12px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 22px;
  color: #555;
}

.input-line input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 18px;
  color: #444;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px 0;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
}

.login-options a,
.register-text a {
  color: var(--navy);
  text-decoration: none;
}

.enter-button {
  background: var(--teal);
  color: var(--white);
  margin: 36px auto 24px;
  min-width: 104px;
  display: flex;
  font-size: 20px;
  font-weight: 500;
}

.divider {
  height: 1px;
  background: #e5e5e5;
}

.certificate-button {
  width: calc(100% - 40px);
  margin: 24px 20px;
  font-size: 16px;
}

.register-text {
  text-align: center;
  font-size: 15px;
  color: #666;
  margin: 24px 0 0;
}

.login-errors {
  display: none;
  color: #a94442;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.4;
  padding-left: 14px;
}

.login-errors.show {
  display: block;
}

.register-line {
  display: block;
  margin-bottom: 14px;
}

.register-label {
  display: block;
  color: #444;
  font-size: 13px;
  margin-bottom: 14px;
}

.register-line input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #d7d7d7;
  outline: none;
  padding: 8px 0 10px;
  font: inherit;
  font-size: 14px;
  color: #444;
  background: transparent;
}

.phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
  border-bottom: 1px solid #d7d7d7;
}

.country-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #555;
}

.country-flag {
  width: 20px;
  height: 15px;
  display: block;
  object-fit: cover;
}

.country-dropdown {
  position: absolute;
  left: -2px;
  top: 26px;
  width: 300px;
  max-height: 706px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.country-option {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.country-option em {
  font-style: normal;
  color: #999;
}

.country-option.is-selected,
.country-option:hover {
  background: #f2f2f2;
}

.phone-wrap input {
  border-bottom: 0;
}

.password-rules {
  border: 1px solid #f0f0f0;
  border-left: 4px solid #54c1e8;
  padding: 10px 16px;
  color: #666;
  font-size: 12px;
  line-height: 1.35;
}

.password-rules p {
  margin: 0 0 6px;
}

.password-rules ul {
  margin: 0;
  padding-left: 36px;
}

.recovery-card {
  width: min(645px, 100%);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  padding: 28px 14px 18px;
}

.recovery-title {
  margin: 0 0 24px;
  text-align: center;
  color: #444;
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 400;
}

.recovery-text {
  margin: 0 0 28px;
  text-align: center;
  color: #555;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.recovery-input {
  margin-bottom: 32px;
}

.recovery-button {
  margin: 0 auto 22px;
  min-width: 154px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
}

.back-login-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
  color: #101741;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
}

.back-login-link .material-icons {
  font-size: 16px;
}

.validation-modal {
  width: min(1334px, calc(100vw - 520px));
  background: #fff;
  border-radius: 4px;
  padding: 24px 30px 24px;
  max-height: calc(100vh - 34px);
  overflow: hidden;
}

.validation-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.validation-modal-head h2 {
  margin: 0;
  color: #222;
  font-size: 24px;
  font-weight: 600;
}

.validation-modal-title {
  margin: 0 0 20px;
  color: #666;
  font-size: 24px;
  font-weight: 600;
}

.validation-results-list {
  max-height: calc(100vh - 286px);
  overflow-y: auto;
  padding-right: 12px;
}

.validation-results-list p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 0;
  color: #333;
  font-size: 20px;
  line-height: 1.35;
}

.validation-results-list .material-icons {
  color: #1f943d;
  font-size: 30px;
  flex-shrink: 0;
}

.validation-ok-btn {
  margin-top: 12px;
  min-width: 80px;
}

.validate-doc-wrap {
  width: min(640px, calc(100vw - 28px));
  margin: 24px auto 40px;
}

.validate-box,
.validate-help-box {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  margin-bottom: 18px;
}

.validate-box {
  padding: 20px 22px 24px;
  text-align: center;
}

.validate-doc-icon {
  color: #b3b3b3;
  font-size: 64px !important;
}

.validate-box h1,
.validate-box h2 {
  margin: 8px 0 18px;
  font-size: 16px;
  font-weight: 400;
}

.validate-input-wrap {
  display: block;
  text-align: left;
  background: #f6f6f6;
  border-bottom: 1px solid #9b9b9b;
  border-radius: 4px 4px 0 0;
  padding: 8px 14px 5px;
}

.validate-input-wrap span {
  display: block;
  font-family: "Inter", Arial, sans-serif;
  font-size: 11px;
  color: #666;
}

.validate-input-wrap input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #111;
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  outline: 0;
  padding: 2px 0 3px;
}

.validate-main-btn {
  margin-top: 26px;
}

.validate-help-box summary {
  list-style: none;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.validate-help-box summary::-webkit-details-marker {
  display: none;
}

.validation-code-help {
  padding: 0 22px 16px;
}

.validation-code-help p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.35;
  color: #111;
}

.validation-code-image {
  display: block;
  width: min(180px, 100%);
  margin: 0 auto;
}

.upload-dropzone {
  height: 184px;
  border: 1px dashed #c5c5c5;
  border-radius: 4px;
  background: #f5f5f5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.upload-plus {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

@media (max-width: 900px) {
  body {
    background: linear-gradient(to bottom, var(--navy) 0, var(--navy) 280px, #ececec 280px, #ececec 100%);
  }

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

  .success-banner {
    width: 100%;
  }

  .top-hero,
  .validation-grid {
    width: calc(100vw - 32px);
  }

  .brand-logo {
    width: 160px;
  }

  .card-row {
    flex-direction: column;
  }

  .card-icon {
    font-size: 72px !important;
  }
}

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(to bottom, var(--navy) 0, var(--navy) 218px, #ececec 218px, #ececec 100%);
    overflow-x: hidden;
  }

  .page-shell {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .top-hero,
  .validation-grid {
    width: auto;
    max-width: none;
    margin-left: 14px;
    margin-right: 14px;
    padding-left: 0;
    padding-right: 0;
  }

  .top-hero {
    padding-top: 18px;
  }

  .top-nav {
    align-items: flex-start;
  }

  .brand-logo {
    width: 120px;
  }

  .nav-actions {
    gap: 8px;
  }

  .lang-pill {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .login-button {
    padding: 10px 12px;
    font-size: 11px;
  }

  .success-banner {
    margin-top: 14px;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .validation-grid {
    margin-top: 20px;
    gap: 24px;
  }

  .info-card,
  .lang-modal {
    padding-left: 18px;
    padding-right: 18px;
    width: 100%;
    max-width: 100%;
  }

  .info-card {
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .card-row {
    flex-direction: row;
    gap: 14px;
    min-width: 0;
  }

  .card-body {
    min-width: 0;
  }

  .card-icon {
    font-size: 70px !important;
  }

  .field-label {
    font-size: 12px;
  }

  .field-value {
    margin: 6px 0 14px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
  }

  .button-row {
    gap: 8px;
    flex-wrap: wrap;
  }

  .primary-action,
  .secondary-action {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
    max-width: 100%;
  }

  .secondary-action {
    line-height: 1.15;
  }

  .stamp-box summary {
    padding: 14px 14px;
    font-size: 12px;
  }

  .login-tabs {
    margin-left: 10px;
    margin-right: 10px;
  }

  .login-options {
    padding-left: 0;
    padding-right: 0;
    flex-direction: column;
    gap: 14px;
  }

  .certificate-button {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .login-body {
    background: #fbfbfb;
  }

  .login-shell {
    padding: 0 0 24px;
  }

  .onr-logo {
    width: 280px;
    height: 49px;
    object-fit: contain;
    max-width: calc(100vw - 48px);
    margin: 18px auto 48px;
    position: relative;
    z-index: 0;
  }

  .login-card {
    width: min(326px, calc(100vw - 24px));
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  }

  .login-tabs {
    margin: -22px 14px 0;
    padding: 10px;
    background: #101741;
    min-height: 59px;
  }

  .tab-item {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.05;
    padding: 12px 6px;
    gap: 5px;
  }

  .tab-item.active {
    background: #434e93;
  }

  .tab-item .material-icons {
    font-size: 18px;
  }

  .login-form {
    padding: 18px 14px 18px;
  }

  .input-line {
    gap: 18px;
    padding: 12px 8px 10px;
    margin-bottom: 16px;
  }

  .input-line .material-icons {
    font-size: 22px;
  }

  .input-line input {
    font-size: 16px;
  }

  .login-options {
    font-size: 13px;
    gap: 10px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .enter-button {
    min-width: 86px;
    min-height: 42px;
    margin: 24px auto 18px;
    font-size: 18px;
  }

  .certificate-button {
    min-height: 34px;
    margin-top: 18px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
  }

  .certificate-button .material-icons {
    font-size: 18px;
  }

  .register-text {
    font-size: 14px;
    line-height: 1.2;
    margin-top: 16px;
  }

  .register-card .login-tabs {
    margin-top: -22px;
  }

  .register-form {
    padding-top: 18px;
  }

  .register-line {
    margin-bottom: 12px;
  }

  .register-label {
    color: #555555;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    margin: 0 0 5px;
    padding: 0 15px;
  }

  .register-line input {
    font-size: 12px;
  }

  .phone-wrap {
    max-width: 198px;
  }

  .country-trigger {
    font-size: 12px;
  }

  .country-dropdown {
    width: 300px;
    max-width: calc(100vw - 44px);
    max-height: 706px;
  }

  .password-rules {
    margin-top: 18px;
    font-size: 11px;
  }

  .send-button {
    min-width: 76px;
    min-height: 38px;
    margin-top: 36px;
    font-size: 16px;
  }

  .recovery-card {
    width: min(326px, calc(100vw - 24px));
    padding: 30px 14px 20px;
  }

  .recovery-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .recovery-button {
    min-width: 153px;
    min-height: 40px;
    font-size: 14px;
  }

  .validation-modal {
    width: calc(100vw - 8px);
    max-height: calc(100vh - 8px);
    padding: 22px 20px 18px;
  }

  .validation-modal-head {
    margin-bottom: 18px;
  }

  .validation-modal-head h2 {
    font-size: 18px;
  }

  .validation-modal-title {
    margin-bottom: 14px;
    font-size: 18px;
  }

  .validation-results-list {
    max-height: calc(100vh - 214px);
    padding-right: 8px;
  }

  .validation-results-list p {
    padding: 14px 0;
    gap: 10px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .validation-results-list .material-icons {
    font-size: 24px;
  }

  .validation-ok-btn {
    min-width: 58px;
    min-height: 32px;
    margin-top: 16px;
    font-size: 12px;
  }
}
