

:root {
  --color-primary:        #007cba;
  --color-primary-hover:  #0069a0;
  --color-accent:         #f5a623;
  --color-text:           #1a1a1a;
  --color-text-secondary: #757575;
  --color-border:         #e0e0e0;
  --color-bg-page:        #e8e8e8;
  --color-bg-card:        #ffffff;
  --color-bg-main:        #f5f5f5;
  --color-btn-dark:       #2c3e50;

  --font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-size-base: 14px;

  --design-width: 940px;
  --label-width: 90px;
  --input-height: 34px;
  --btn-height: 34px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.4;
  color: var(--color-text);
  background-color: var(--color-bg-page);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
  font-size: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page-outer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  padding: 24px 0 24px;
}

@media (min-width: 960px) {
  .page-outer {
    padding-bottom: 80px;
    align-items: flex-start;
    padding-top: 36px;
  }
}

.scale-host {
  width: var(--design-width);
  overflow: hidden;
  flex-shrink: 0;
}

.page-wrapper {
  width: var(--design-width);
  background: var(--color-bg-card);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform-origin: top left;
}

.logo-area {
  position: relative;
  width: 100%;
  background: #ffffff;
  line-height: 0;
  border-bottom: 1px solid #ececec;
}

.company-logo {
  width: 100%;
  height: auto;
  min-height: 64px;
  object-fit: contain;
  object-position: left center;
  background: #ffffff;
}

.contact-us-link {
  position: absolute;
  right: 22px;
  bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
  z-index: 2;
}

.main-content {
  flex: 1;
  padding: 18px 22px 24px;
  background: var(--color-bg-main);
}

.page-title {
  font-size: 27px;
  font-weight: 520;
  color: var(--color-text);
  margin-bottom: 16px;
}

.login-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.card {
  background: var(--color-bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
}

.card-icon-img {
  width: auto;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 10px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: 22px 18px 26px;
  position: relative;
  min-height: 220px;
}

.form-step { display: none; }
.form-step.active { display: block; }

.form-row { margin-bottom: 0; }

.inline-row {
  display: grid;
  grid-template-columns: var(--label-width) 170px 1fr;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.field-group {
  display: contents;
}

.form-input {
  height: var(--input-height);
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 0 10px;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  width: 170px;
  max-width: 170px;
  transition: border-color 0.15s;
  grid-column: 2;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.form-link {
  font-size: 13px;
  white-space: nowrap;
  color: var(--color-primary);
  grid-column: 3;
  justify-self: start;
}

.displayed-username {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.password-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  grid-column: 2;
  width: 170px;
}
.password-input-wrap .form-input {
  width: 170px;
  max-width: 170px;
  padding-right: 32px;
  grid-column: auto;
}
.toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.7;
}
.toggle-password:hover { opacity: 1; }
.eye-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

#usernameStep .field-group {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 2 / 4;
}
#usernameStep .form-input {
  grid-column: auto;
  width: 170px;
  max-width: 170px;
  flex: 0 0 170px;
}
#usernameStep .form-link {
  grid-column: auto;
}

.checkbox-row {
  margin-top: 2px;
  margin-bottom: 18px;
  padding-left: calc(var(--label-width) + 10px);
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text);
}
.form-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
}

.form-actions {
  padding-left: calc(var(--label-width) + 10px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-height);
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  transition: background-color 0.15s, opacity 0.15s;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
}

.loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  z-index: 10;
}
.loading-overlay.visible {
  display: block;
}

.trouble-card {
  position: relative;
  padding: 0;
  min-height: 280px;
  display: flex;
  align-items: stretch;
}
.trouble-illustration {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.trouble-illustration a {
  display: block;
  width: 100%;
  height: 100%;
}
.trouble-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.promo-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  background: #f0f0f0;
  min-height: 280px;
}

.promo-track {
  display: flex;
  width: 400%;           
  height: 100%;
  min-height: 280px;
  transition: transform 0.4s ease;
}

.promo-slide {
  display: block;
  width: 25%;            
  flex: 0 0 25%;
  height: 100%;
  min-height: 280px;
  text-decoration: none;
  overflow: hidden;
}

.promo-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: contain;   
  object-position: center;
  background: #ffffff;
}

.promo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  z-index: 3;            
  line-height: 1;
  user-select: none;
}
.promo-nav:hover {
  background: #fff;
}
.promo-prev { left: 8px; }
.promo-next { right: 8px; }

.new-user-card .card-body {
  min-height: 220px;
  padding: 22px 18px 28px;
}
.new-user-text {
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 18px;
  line-height: 1.45;
}
.new-user-body .form-actions {
  padding-left: 0;
  text-align: center;
}

.app-banner {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0;
  overflow: hidden;
  min-height: 120px;
}
.app-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
}
.app-banner-inner a {
  display: block;
  width: 100%;
}
.app-icon-img {
  width: 100%;
  height: auto;
  min-height: 120px;
  max-height: 160px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.page-footer {
  background: #ffffff;
  padding: 18px 22px 24px;
  text-align: center;
  border-top: 1px solid #eee;
}
.footer-contact {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 5px;
}
.footer-copyright {
  font-size: 12px;
  color: #999;
}

.verify-content {
  padding: 28px 36px 32px;
  background: #f7f7f7;
  min-height: 380px;
}

.verify-title {
  font-size: 26px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 18px;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: #d9d9d9;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-pct {
  font-size: 13px;
  color: var(--color-text-secondary);
  min-width: 36px;
  text-align: right;
}

.verify-desc {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 640px;
}

.method-list {
  margin-bottom: 28px;
}
.method-option {
  display: block;
  margin-bottom: 18px;
  cursor: pointer;
}
.method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.method-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.method-radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #999;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  background: #fff;
}
.method-option input[type="radio"]:checked + .method-radio .method-radio-dot {
  border-color: var(--color-primary);
}
.method-option input[type="radio"]:checked + .method-radio .method-radio-dot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}
.method-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.method-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  line-height: 1.45;
  padding-left: 28px;
}
.method-meta a {
  color: var(--color-primary);
}

.code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.code-label {
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
}
.code-label .req {
  color: #c00;
  margin-left: 2px;
}
.code-input {
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 0 12px;
  font-size: 14px;
  width: 220px;
  background: #fff;
}
.code-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.code-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
}
.code-view input {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
}

.resend-text {
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: 28px;
  line-height: 1.5;
}
.resend-text a {
  color: var(--color-primary);
}

.verify-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 8px 0 20px;
}

.verify-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.btn-secondary {
  background: #fff;
  color: var(--color-text);
  border: 1px solid #ccc;
  height: var(--btn-height);
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
  min-width: 90px;
}
.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.status-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(247, 247, 247, 0.92);
  z-index: 20;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}
.status-overlay.visible {
  display: flex;
}
.status-msg {
  font-size: 16px;
  color: var(--color-text);
  font-weight: 500;
}
.status-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
}
