.v4-login-header { margin-bottom: 90px; }
@media screen and (max-width: 767px) {
  .v4-login-header { margin-bottom: 20px; }
  .v4-back-button {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    padding: 10px; border: none; background: #f0f0f0; border-radius: 50px; flex: 0;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  }
  .v4-login-tab { font-size: 14px; padding: 16px 15px; }
}

.v4-login-tabs { display: flex; border-bottom: 2px solid #e8e8e8; background: #fff; }
.v4-login-tab {
  flex: 1; padding: 18px 20px; text-align: center; font-size: 15px; font-weight: 600;
  color: #666; background: transparent; border: none; border-bottom: 3px solid transparent;
  cursor: pointer; transition: all 0.3s; text-decoration: none; display: block;
}
.v4-login-tab:hover { color: #333; background: #f8f9fa; }
.v4-login-tab.active { color: #fff; background: #2d3436; border-bottom-color: #2d3436; }

.v4-gender-tabs { display: flex; gap: 12px; margin-top: 8px; }
.v4-gender-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border: 2px solid #e8e8e8; background: #fff; color: #666;
  font-size: 15px; font-weight: 500; border-radius: 10px; cursor: pointer; transition: all 0.3s ease;
}
.v4-gender-tab i { font-size: 20px; }
.v4-gender-tab:hover { border-color: #2da44e; background: #f8fdf9; }
.v4-gender-tab.active { border-color: #2d3436; background: #2d3436; color: #fff; }

.v4-otp-header { margin-bottom: 32px; }
.v4-otp-title { font-size: 24px; font-weight: 600; color: #2d3436; margin-bottom: 24px; }
.v4-otp-subtitle { color: #666; margin-bottom: 32px; }
.v4-otp-phone-info { display: flex; align-items: flex-start; padding: 16px; background: #f8f9fa; border-radius: 12px; }
.v4-otp-message { font-size: 14px; color: #666; margin: 0 0 8px 0; line-height: 1.5; }
.v4-otp-ref { font-size: 13px; font-weight: 600; color: #2da44e; margin: 0; }

.v4-otp-inputs { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }
.v4-otp-input {
  width: 50px; height: 60px; text-align: center; font-size: 24px; font-weight: 600;
  color: #2d3436; background: #fff; border: 2px solid #e8e8e8; border-radius: 12px;
  outline: none; transition: all 0.3s;
}
.v4-otp-input:focus { border-color: #999; box-shadow: 0 0 0 3px rgba(153,153,153,0.1); }
.v4-otp-input.filled { background: #f8f9fa; border-color: #999; }
@media (max-width: 576px) {
  .v4-otp-title { font-size: 20px; }
  .v4-otp-inputs { gap: 8px; }
  .v4-otp-input { width: 45px; height: 55px; font-size: 20px; }
}

.v4-form-input-wrapper.error .v4-form-input:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.v4-input-clear-btn {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #999; font-size: 16px; cursor: pointer;
  padding: 4px 8px; transition: all 0.2s; display: none; align-items: center; justify-content: center; opacity: 0;
}
.v4-input-clear-btn.show { display: flex; opacity: 1; }
.v4-input-clear-btn:hover { color: #dc3545; transform: translateY(-50%) scale(1.1); }
.v4-input-clear-btn i { font-size: 14px; }
.v4-form-input-wrapper:has(.v4-password-toggle) .v4-input-clear-btn { right: 70px; }

.v4-password-toggle {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #666; font-size: 14px;
  cursor: pointer; padding: 4px 8px; transition: color 0.2s; font-weight: 500;
}
.v4-password-toggle:hover { color: #2da44e; }

.v4-account-change {
  display: inline-block; margin-top: 8px; font-size: 13px; color: #007bff;
  text-decoration: none; font-weight: 500; transition: color 0.2s;
}
.v4-account-change:hover { color: #0056b3; text-decoration: underline; }

.v4-forgot-password { text-align: right; margin-bottom: 24px; }
.v4-forgot-password a { font-size: 14px; color: #666; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.v4-forgot-password a:hover { color: #007bff; }

.v4-social-divider { display: flex; align-items: center; margin: 24px 0 20px; color: #999; font-size: 14px; }
.v4-social-divider::before, .v4-social-divider::after { content: ''; flex: 1; height: 1px; background: #e8e8e8; }
.v4-social-divider span { padding: 0 15px; }

.v4-phone-login-btn {
  width: 100%; padding: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: #333; background: #fff; border: 2px solid #e8e8e8;
  border-radius: 10px; text-decoration: none; cursor: pointer; transition: all 0.3s;
}
.v4-phone-login-btn.v4-hidden { display: none; }
.v4-phone-login-btn:hover { background: #f8f9fa; border-color: #ccc; color: #000; }
.v4-phone-login-btn i { font-size: 18px; color: #2da44e; }

.v4-security-badge { margin-top: 30px; }

.v4-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: normal; }
.v4-checkbox-input { width: 18px; height: 18px; cursor: pointer; margin-top: 2px; flex-shrink: 0; }
.v4-checkbox-text { font-size: 13px; color: #333; line-height: 1.5; }
.v4-checkbox-text--muted { font-size: 13px; color: #666; line-height: 1.5; }
.v4-contract-link { color: #007bff; text-decoration: none; }
.v4-marketing-link { color: #007bff; text-decoration: none; margin-left: 4px; cursor: pointer; }
.v4-form-group--mb24 { margin-bottom: 24px; }
.v4-forgot-back-wrapper { text-align: center; margin-top: 16px; }
.v4-forgot-back-link { color: #007bff; text-decoration: none; font-size: 14px; }
.v4-password-hint { color: #666; font-size: 12px; margin-top: 4px; display: block; }

.contract-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.contract-modal.active { display: flex; }

.contract-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.contract-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

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

.contract-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
}
.contract-modal-header h2 { font-size: 20px; font-weight: 600; color: #333; margin: 0; }

.contract-modal-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; border: none; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; color: #666;
}
.contract-modal-close:hover { background: #e0e0e0; color: #333; }

.contract-modal-body { flex: 1; overflow-y: auto; padding: 0; }
.contract-modal-body .popupWrapper,
.contract-modal-body body,
.contract-modal-body #contractLister {
  width: 100%; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.6;
}
.contract-modal-body table { width: 100%; border-collapse: collapse; }
.contract-modal-body td { padding: 12px 24px; }
.contract-modal-body .agreementHeader { font-size: 18px; font-weight: 600; text-align: center; padding: 20px 24px; }
.contract-modal-body .agreementInfo { font-size: 14px; line-height: 1.6; padding: 12px 24px; }
.contract-modal-body h1,
.contract-modal-body h2,
.contract-modal-body h3 { font-size: 18px; font-weight: 600; margin: 16px 0; color: #333; }
.contract-modal-body strong { font-weight: 600; color: #000; }
.contract-modal-body u { text-decoration: underline; }
.contract-modal-body br { display: block; margin: 8px 0; content: ""; }

@media (max-width: 991px) {
  .contract-modal { padding: 0; }
  .contract-modal-content { border-radius: 0; max-width: 100%; max-height: 100vh; height: 100vh; }
  .contract-modal-header { padding: 20px; }
  .contract-modal-header h2 { font-size: 18px; }
  .contract-modal-body { padding: 0; }
  .contract-modal-body td { padding: 10px 16px; }
  .contract-modal-body .agreementHeader { font-size: 16px; padding: 16px; }
  .contract-modal-body .agreementInfo { font-size: 13px; padding: 10px 16px; }
  .contract-modal-body h1,
  .contract-modal-body h2,
  .contract-modal-body h3 { font-size: 16px; }
}
