/* ============================================================
   TEZ ERP — signup.css
   Styles for Sign Up / Get Started page layout, form, and validation.
   Reuses base.css tokens and components.css primitives.
   ============================================================ */

/* Main layout inherits structure from demo page */
.signup-page {
  padding-block: clamp(40px, 6vw, 72px);
  background: var(--paper);
  position: relative;
}

.signup-page .container {
  max-width: 1260px;
}

.signup-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 5vw, 68px);
  align-items: center;
}

/* ---------------- Left Info Column ---------------- */
.signup-info {
  display: flex;
  flex-direction: column;
}

.signup-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.16;
  color: var(--graphite);
  margin-block: 12px 16px;
  letter-spacing: -0.02em;
}

.signup-subtext {
  font-size: var(--fs-body-lg);
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Checklist */
.signup-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
  list-style: none;
  padding: 0;
}

.signup-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checklist-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EBF3FF;
  color: var(--azure);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist-text {
  font-size: var(--fs-body-sm);
  color: var(--graphite);
  line-height: 1.45;
}

.checklist-text strong {
  color: var(--graphite);
  font-weight: 600;
}

/* Trust / Customer Proof Section */
.signup-trust-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.trust-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 700;
  text-align: left;
}

.trust-logos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 20px;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.trust-logo-card {
  height: 54px;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-logo-card img {
  max-height: 44px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.trust-logo-card:hover img {
  transform: scale(1.08);
}

.trust-logo-card img[src*="Apex"] { max-height: 32px; }
.trust-logo-card img[src*="Grippo"] { max-height: 46px; max-width: 120px; }
.trust-logo-card img[src*="Esvee"] { max-height: 44px; }
.trust-logo-card img[src*="Lunkad"] { max-height: 44px; }
.trust-logo-card img[src*="BrandWagon"] { max-height: 48px; }
.trust-logo-card img[src*="Spectrum"] { max-height: 48px; }
.trust-logo-card img[src*="TechFlex"] { max-height: 38px; }
.trust-logo-card img[src*="SportsNext"],
.trust-logo-card img[src*="sportsnext"] { max-height: 34px; }

/* Direct contact help box */
.signup-contact-box-wrap {
  display: flex;
  justify-content: flex-start;
  margin-top: 22px;
}

.signup-contact-box {
  padding: 12px 18px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--fs-caption);
  color: var(--slate);
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.signup-contact-box .contact-box-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.45;
}

.contact-box-lead {
  font-weight: 600;
  color: var(--graphite);
}

.contact-box-sub {
  color: var(--slate);
}

.contact-box-icon {
  color: var(--azure);
  flex-shrink: 0;
  margin-top: 2px;
}

.signup-contact-box a {
  color: var(--azure);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-contact-box a:hover {
  color: var(--azure-dark);
}

/* ---------------- Right Signup Card ---------------- */
.signup-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 24px 64px -10px rgba(15, 23, 42, 0.16), 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: clamp(28px, 4vw, 42px);
  position: relative;
}

.signup-card-header {
  margin-bottom: 24px;
}

.signup-card-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--graphite);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.signup-card-desc {
  font-size: var(--fs-caption);
  color: var(--slate);
  line-height: 1.45;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--graphite);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.required-star {
  color: #E11D48;
  margin-left: 2px;
  font-weight: 700;
}

.form-input {
  height: 48px;
  padding: 0 14px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--graphite);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  width: 100%;
}

.form-input::placeholder {
  color: var(--slate-soft);
  opacity: 0.85;
}

.form-input:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.form-input.is-invalid {
  border-color: #E11D48 !important;
  background-color: #FFF5F5 !important;
}

.form-error-msg {
  display: none;
  font-size: 0.75rem;
  color: #E11D48;
  font-weight: 500;
  margin-top: 2px;
}

.form-group.has-error .form-error-msg {
  display: block;
}

/* Password Input Wrapper with Show/Hide Toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-input {
  padding-right: 46px;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-soft);
  cursor: pointer;
  border-radius: 4px;
  transition: color var(--dur-fast) var(--ease);
}

.password-toggle-btn:hover {
  color: var(--graphite);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--azure);
}

/* Phone Input with +91 prefix */
.phone-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.phone-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-soft);
  pointer-events: none;
  user-select: none;
  padding-right: 8px;
  border-right: 1.5px solid var(--line);
  line-height: 1;
  display: flex;
  align-items: center;
  z-index: 2;
}

.phone-input-wrap .phone-field {
  width: 100%;
  padding-left: 56px;
}

/* Terms Checkbox */
.terms-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--azure);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-label {
  font-size: 0.835rem;
  color: var(--slate);
  line-height: 1.45;
}

.terms-label a {
  color: var(--azure);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-label a:hover {
  color: var(--azure-dark);
}

.terms-group.has-error .terms-label {
  color: #E11D48;
}

/* Submit Button */
.btn-signup-submit {
  height: 50px;
  width: 100%;
  background: #0b1720;
  color: #ffffff !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid #0b1720;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  box-shadow: 0 4px 16px -2px rgba(11, 23, 32, 0.35);
  transition: all var(--dur-fast) var(--ease);
}

.btn-signup-submit:hover {
  background: #1e293b;
  border-color: #1e293b;
  box-shadow: 0 6px 20px -2px rgba(11, 23, 32, 0.45);
  transform: translateY(-1px);
}

.btn-signup-submit:active {
  transform: translateY(1px);
}

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

/* Card Footer: Sign In Link */
.signup-card-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--slate);
}

.signup-card-footer a {
  color: var(--azure);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-card-footer a:hover {
  color: var(--azure-dark);
}

/* Side-by-Side Mobile / Email & Send OTP Button */
.phone-otp-row,
.email-otp-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.email-otp-row .form-input {
  flex: 1;
  width: 100%;
}

.btn-side-otp {
  height: 48px;
  min-width: 120px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--azure);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid rgba(47, 111, 237, 0.4);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  transition: all var(--dur-fast) var(--ease);
}

.btn-side-otp:hover {
  background: #EBF3FF;
  border-color: var(--azure);
}

.btn-side-otp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-side-verified {
  height: 48px;
  min-width: 124px;
  padding: 0 16px;
  background: #E6F7F0;
  color: #059669;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  animation: popIn 0.25s var(--ease);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Expandable OTP Box */
.otp-box {
  margin-top: 6px;
  padding: 10px 12px;
  background: #F0F7FF;
  border: 1.5px solid #C8E1FF;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.2s var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.otp-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.otp-box-hint {
  color: var(--slate);
  font-weight: 500;
}

.otp-input-row {
  display: flex;
  width: 100%;
}

.otp-code-input {
  width: 100%;
  height: 42px;
  padding: 4px 8px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--graphite);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.otp-code-input:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.btn-verify-otp {
  height: 38px;
  padding: 0 14px;
  background: var(--azure);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}

.btn-verify-otp:hover {
  background: var(--azure-dark);
}

.otp-error-msg {
  font-size: 0.72rem;
  color: #E11D48;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 960px) {
  .signup-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .signup-info {
    order: 2;
  }

  .signup-card {
    order: 1;
    max-width: 580px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .signup-card {
    padding: 24px 20px;
  }

  .trust-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .phone-otp-row,
  .email-otp-row {
    flex-wrap: wrap;
  }

  .btn-side-otp,
  .btn-side-verified {
    width: 100%;
    justify-content: center;
  }
}
