* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  color: #2f2f2f;
  background-color: #e5e5e5;
  background-image: linear-gradient(135deg, #f4f4f4 0%, #d6d6d6 52%, #bcbcbc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/assets/images/Nortek N Pattern.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 36px;
}

.form-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
}

.form-logo {
  width: 240px;
  max-width: 65%;
  height: auto;
  transform: translateX(-2%);
}

.page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 10px;
}

.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #000;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  color: #2f3c4a;
}

.header-divider {
  border: 0;
  border-top: 1px solid #d7d7d7;
  margin: 0 0 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  background: rgba(246, 246, 246, 0.96);
  box-shadow: 0 18px 36px rgba(76, 95, 112, 0.18);
}

.panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #c9c9c9;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: #ececec;
  font-weight: 600;
  color: #2f3c4a;
}

.panel-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2f3c4a;
  flex: 1;
}

.header-signin-btn {
  margin-left: auto;
  border: 1px solid #c72e48;
  border-radius: 999px;
  background: transparent;
  color: #c72e48;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.header-signin-btn:hover {
  background: #c72e48;
  color: #fff;
}

.panel-body {
  position: relative;
  z-index: 1;
  padding: 18px;
}

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

.field-row {
  display: flex;
  gap: 10px;
}

.field-row .field {
  flex: 1;
}

.field-row .field--full {
  flex: 1 1 100%;
}

.required {
  color: red;
}

/* Success screen */
.success-screen {
  text-align: center;
  padding: 1rem 2rem;
}
.success-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e6f4ea;
  color: #2e7d32;
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}
.success-subtitle {
  color: #555;
  margin-bottom: 0.25rem;
}
.success-email {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  word-break: break-all;
}
.success-steps {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  margin: 0 auto 1rem auto;
  text-align: left;
  display: block;
  width: fit-content;
  min-width: 280px;
}
.success-steps-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}
.success-steps ol {
  margin: 0;
  padding-left: 1.25rem;
}
.success-steps li {
  margin-bottom: 0.3rem;
  color: #444;
  line-height: 1.4;
}

.password-hints {
  margin: -4px 0 10px 0;
  padding-left: 18px;
  font-size: 12px;
  color: #666;
}

.field {
  margin-bottom: 6px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: #404040;
  font-weight: 600;
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid #c7d1d8;
  background-color: #fff;
  border-radius: 2px;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  color: #33434e;
  outline: none;
}

.field input.readonly {
  background-color: #f0f0f0;
  color: #777;
  cursor: default;
}

.field input:focus,
.field select:focus {
  border-color: #8ea8ba;
  box-shadow: inset 0 0 0 1px #8ea8ba;
}

.field input.invalid,
.field select.invalid {
  border-color: #b42335;
}

.field small,
.terms-error {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  color: #b42335;
  font-size: 12px;
}

.terms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475b69;
  font-size: 13px;
  margin: 4px 0 0;
}

.terms-row input {
  width: 16px;
  height: 16px;
}

.actions {
  margin-top: 8px;
}

.submit-btn {
  border: 0;
  border-radius: 999px;
  background: #c72e48;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
  padding: 6px 12px;
  cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
  background: #ae223a;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn .spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

.signin-footer {
  margin-top: 14px;
  font-size: 13px;
  color: #475b69;
  text-align: center;
}

.signin-footer a {
  color: #c72e48;
  text-decoration: none;
  font-weight: 600;
}

.signin-footer a:hover {
  text-decoration: underline;
}

.success {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid #95c597;
  background: #e9f8ea;
  color: #2c6830;
  border-radius: 2px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .page-wrapper {
    padding: 18px 12px 24px;
  }

  .panel-header {
    padding: 10px 12px;
  }

  .panel-body {
    padding: 12px;
  }

  .field-row {
    flex-direction: column;
    gap: 0;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .panel-header {
    font-size: 18px;
  }

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

  .field input,
  .field select,
  .submit-btn,
  .terms-row {
    font-size: 13px;
  }
}
