:root {
  --color-primary: #0068bb;
  --color-text-primary: #0c2737;
  --color-text-secondary: #6c7796;
  --color-text-placeholder: #c1c1c1;
  --color-text-light: #434b56;
  --color-white: #ffffff;
  --color-border: #ebeced;
  --color-error: #dc3545;
  --color-success: #28a745;
  --gradient-button: linear-gradient(221deg, #0078f8 0%, #0941eb 110.58%);
}

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

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

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: #f0f2f5;
    color: var(--color-text-primary);
    min-height: 100vh;
    padding: 60px 20px 40px 20px;
}

.auth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.signup-container {
    flex: 1;
    display: flex;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto 40px auto;
    gap: 30px;
    border-radius: 16px;
    overflow: hidden;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); */
    margin-top: 50px;
}

.mobile-auth-header {
    display: none;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    padding: 16px 24px;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.form-header-text {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--color-text-secondary);
    margin: 0;
}

.form-header-link {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--color-primary);
    padding: 0 8px;
    text-decoration: none;
}

/* Footer spacing */
.auth-container .footer {
    margin-top: auto;
}

.promo-panel {
    position: relative;
    flex: 0 0 704px;
    color: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
}

.promo-background-image {
    width: 100%;
    height: 100%;
    display: block;
}

.promo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.28) 42.79%, rgba(0, 0, 0, 0.2) 85.57%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    text-align: center;
}

.promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 580px;
    width: 100%;
}

.promo-title {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 42px;
    margin: 0;
    letter-spacing: -0.02em;
}

.promo-subtitle {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    margin: 0;
    opacity: 0.95;
}

.promo-slider-dots {
    width: 24px;
    height: 8px;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: rgba(255, 255, 255, 0.8);
}

.form-panel {
    flex: 1;
    padding: 60px 48px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background-color: var(--color-white);
    border-radius: 16px;
}

.form-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: var(--color-text-secondary);
}

.login-link {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
}

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

.signup-form h2 {
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 48px;
    letter-spacing: -1.28px;
    color: #000000;
    margin: 0;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-group label, .form-group > label {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 21px;
    color: var(--color-text-primary);
}

.form-link {
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-primary);
    cursor: pointer;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0 12px;
    background-color: var(--color-white);
    height: 50px;
    box-sizing: border-box;
}

.input-group:focus-within {
    border-color: var(--color-primary);
}

.input-group input, .input-group select {
    flex-grow: 1;
    border: none;
    outline: none;
    background: none;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: #262626;
    padding: 0 16px;
    height: 50px;
}

.input-group input::placeholder {
    color: var(--color-text-placeholder);
}

.input-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Input wrapper with button for verification code */
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0 12px;
    background-color: var(--color-white);
    position: relative;
    height: 50px;
    box-sizing: border-box;
}

.input-wrapper.with-button {
    display: flex;
    gap: 0;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s ease;
    background: white;
    padding: 0;
}

.input-wrapper.with-button:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-wrapper.with-button .form-input {
    flex: 1;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 12px;
    background: transparent;
    height: 50px;
}

.input-wrapper.with-button .form-input:focus {
    outline: none;
    box-shadow: none;
}

.input-wrapper.with-button .input-button {
    border: none;
    border-radius: 0;
    width: auto;
    padding: 0 20px;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-wrapper.with-button .input-button:hover:not(.btn-loading):not(.btn-countdown) {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    transition: all 0.2s ease;
}

.btn-loading .loading-spinner {
    display: inline-block !important;
}

.btn-loading .btn-text {
    opacity: 1;
}

/* Pulse animation for countdown */
.btn-countdown {
    animation: pulse-phone 2s infinite;
}

.btn-countdown:hover {
    transform: none !important;
    box-shadow: none !important;
}

@keyframes pulse-phone {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.input-wrapper.with-button.is-invalid {
    border-color: #dc2626;
}

.input-wrapper.with-button.is-invalid:focus-within {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.phone-input {
    border-color: #f6f6f6;
}

.country-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    min-width: 200px;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.country-option:last-child {
    border-bottom: none;
}

.country-option:hover {
    background-color: #f5f5f5;
}

.country-option .flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

/* Flag colors using CSS */
.flag-be {
    background: linear-gradient(to right, #000 33%, #ffd700 33%, #ffd700 66%, #ff0000 66%);
}

.flag-fr {
    background: linear-gradient(to right, #002395 33%, #ffffff 33%, #ffffff 66%, #ed2939 66%);
}

.flag-us {
    background: linear-gradient(to bottom, #b22234 7.7%, #ffffff 7.7%, #ffffff 15.4%, #b22234 15.4%, #b22234 23.1%, #ffffff 23.1%, #ffffff 30.8%, #b22234 30.8%, #b22234 38.5%, #ffffff 38.5%, #ffffff 46.2%, #b22234 46.2%, #b22234 53.9%, #ffffff 53.9%, #ffffff 61.6%, #b22234 61.6%, #b22234 69.3%, #ffffff 69.3%, #ffffff 77%, #b22234 77%, #b22234 84.7%, #ffffff 84.7%, #ffffff 92.4%, #b22234 92.4%);
    position: relative;
}

.flag-uk {
    background: linear-gradient(45deg, #012169 25%, #ffffff 25%, #ffffff 50%, #c8102e 50%, #c8102e 75%, #ffffff 75%);
}

.flag-de {
    background: linear-gradient(to bottom, #000 33%, #dd0000 33%, #dd0000 66%, #ffce00 66%);
}

.flag-vn {
    background: linear-gradient(to bottom, #da251d 50%, #ffcd00 50%);
}

.separator {
    width: 1px;
    height: 24px;
    background-color: #d9d9d9;
}

.input-icon {
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 16px;
}

.half-width {
    flex: 1;
}

.form-hint {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: var(--color-text-primary);
    opacity: 0.7;
    margin: 0;
}

.form-hint .asterisk {
    color: #EB5757;
}

.select-group {
    position: relative;
    flex: 1;
}

.select-group .chevron-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

@media (min-width: 769px) {
.select-group:nth-child(1) { flex-basis: 172px; flex-grow: 0; }
.select-group:nth-child(2) { flex-basis: 132px; flex-grow: 0; }
.select-group:nth-child(3) { flex-basis: 172px; flex-grow: 0; }
}

.role-selection label {
    text-align: center;
    font-size: 16px;
    color: var(--color-text-light);
    font-weight: 400;
}

.role-options {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 11px;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    width: 145px;
    height: 67px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-white);
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #8b8f95;
    justify-content: center;
    transition: all 0.2s ease;
}

.role-option span {
    padding: 2px 0;
    margin: 0;
}

.role-option img {
    padding: 2px;
    margin: 0;
    width: 40px;
    height: 40px;
}

.role-option:hover {
    border-color: var(--color-primary);
    background-color: rgba(0, 104, 187, 0.05);
}

.role-option.selected {
    border-color: var(--color-primary);
    background-color: rgba(0, 104, 187, 0.1);
    color: var(--color-primary);
}


.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-group label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: var(--color-text-light);
    opacity: 0.7;
    cursor: pointer;
}

.checkbox-group label a {
    text-decoration: none;
    color: var(--color-primary);
}

.custom-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(24, 24, 27, 0.5);
    border-radius: 2px;
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.custom-checkbox:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.btn-submit {
    background: linear-gradient(191deg, #0078F8 19.35%, #0941EB 101.33%);
    color: var(--color-white);
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 19.6px;
    border: none;
    border-radius: 50px;
    padding: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 104, 187, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin: 24px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e5e7eb;
}

.social-logins {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    height: 50px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
    background-color: var(--color-white);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.social-btn img { 
    width: 24px; 
    height: 24px; 
}

@media (max-width: 1200px) {
    body {
        padding: 40px 10px 20px 10px;
    }
    .promo-panel {
        flex: 0 0 50%;
    }
    .signup-container {
        margin: 0 auto 20px auto;
    }
    .form-panel {
        padding: 50px 24px 32px 24px;
    }
}

@media (max-width: 992px) {
    .signup-container {
        flex-direction: column;
        gap: 0;
    }
    .mobile-auth-header {
        display: flex;
    }
    .form-header {
        display: none;
    }
    .promo-panel {
        flex: none;
        width: 100%;
        height: 400px;
        border-radius: 0;
    }
    .promo-background-image { 
        border-radius: 0; 
    }
    .promo-overlay { 
        border-radius: 0;
        padding: 36px 32px;
    }
    .form-panel {
        width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 10px;
        background-color: var(--color-white);
    }
    .signup-container {
        gap: 0;
        border-radius: 0;
    }
    .mobile-auth-header {
        display: flex; /* Ensure it stays visible */
    }
    .promo-panel {
        height: 320px;
        border-radius: 0;
        margin-right: 0;
    }
    .promo-background-image { 
        border-radius: 0; 
    }
    .promo-overlay { 
        border-radius: 0;
        padding: 20px;
    }
    .form-panel {
        padding: 40px 16px 20px 16px;
        border-radius: 0;
    }
    .signup-form h2 {
        font-size: 28px;
    }
    .promo-title {
        font-size: 24px;
        line-height: 30px;
    }
    .promo-subtitle {
        font-size: 14px;
        line-height: 20px;
    }
}

@media (max-width: 600px) {
    .form-panel { 
        padding: 40px 16px 20px 16px; 
    }
    .form-row {
        flex-direction: column;
    }
    /* .role-options {
        flex-direction: column;
    } */
    .signup-form h2 {
        font-size: 28px;
    }
    .promo-overlay {
        padding: 32px 24px;
    }
    .promo-title {
        font-size: 28px;
        line-height: 36px;
    }
    .promo-subtitle {
        font-size: 18px;
        line-height: 26px;
    }
}

  /* Error and Success Styling */
  .alert {
      border-radius: 6px;
      padding: 12px 16px;
      width: 100%;
      font-family: 'Lato', sans-serif;
      font-size: 14px;
      line-height: 21px;
      margin-bottom: 20px;
  }
  
  .alert-danger {
      background-color: #fee;
      border: 1px solid #dc3545;
      color: #721c24;
  }
  
  .alert-success {
      background-color: #d4edda;
      border: 1px solid #c3e6cb;
      color: #155724;
  }
  
  .alert ul {
      list-style-position: inside;
      padding-left: 0;
      margin: 0;
  }
  
  .alert li {
      padding-left: 8px;
      margin-bottom: 4px;
  }
  
  .alert li:last-child {
      margin-bottom: 0;
  }
  
  .alert.mb-0,
  .alert .mb-0 {
      margin-bottom: 0;
  }
  
  .is-invalid {
      border-color: var(--color-error) !important;
      box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
  }
  
  .invalid-feedback {
      display: block;
      width: 100%;
      margin-top: 4px;
      font-size: 12px;
      color: var(--color-error);
      line-height: 1.2;
  }
  
  .error-message {
      display: block;
      width: 100%;
      margin-top: 6px;
      font-size: 12px;
      color: var(--color-error);
      line-height: 1.2;
      font-weight: 500;
  }

@media (min-width: 1024px) and (max-width: 1280px) {
    .signup-container {
        margin-top: 32px;
        margin-left: 32px;
        margin-right: 32px;
        width: auto;
    }
}

