: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;
    --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: 40px 20px 20px 20px;
}

.auth-container {
    display: flex;
    flex-direction: column;
}

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

/* 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;
    object-fit: cover;
    object-position: left center;
}

.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: 40px 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: var(--color-white);
    border-radius: 16px;
}

.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;
}

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

.form-header a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

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

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

.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: 44px;
    box-sizing: border-box;
    /* Ensure padding doesn't affect height */
}

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

.input-wrapper input,
.input-wrapper select {
    flex-grow: 1;
    border: none;
    outline: none;
    background: none;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: #262626;
    height: 44px;
    /* Ensure input takes full height */
}

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

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

.input-wrapper.with-button {
    padding: 0;
}

.input-wrapper.with-button input {
    height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: 6px 0 0 6px;
}

.input-button {
    background: var(--gradient-button);
    color: var(--color-white);
    border: none;
    padding: 10px 16px;
    border-radius: 0 6px 6px 0;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-button:hover {
    opacity: 0.9;
}

.input-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-wrapper.with-icon {
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

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

.input-row .input-wrapper {
    flex: 1;
}

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

.group-label.text-center {
    text-align: center;
}

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

.required-star {
    color: #EB5757;
}

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

.select-wrapper select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: var(--color-white);
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: #262626;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.select-wrapper select:focus {
    border-color: var(--color-primary);
    outline: none;
}

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

.day-select {
    flex: 0 0 132px;
}

.role-selection-group {
    margin-top: 0;
}

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

.role-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    width: 135px;
    height: 54px;
    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;
    transition: all 0.2s ease;
    position: relative;
}

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

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

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-icon {
    width: 32px;
    height: 32px;
}

.role-label {
    font-size: 14px;
    font-weight: 600;
}

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

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

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

.form-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;
}

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

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.btn {
    background: var(--gradient-button);
    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: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary {
    background: var(--gradient-button);
}

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

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

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

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

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

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Error Alert Styles */
.alert {
    border-radius: 6px;
    padding: 12px 16px;
    width: 100%;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 21px;
    margin-bottom: 16px;
}

.alert-danger {
    background-color: #fee;
    border: 1px solid #dc3545;
    color: #721c24;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.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;
}

/* Error messages for individual fields */
.error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.is-invalid {
    border-color: #dc2626 !important;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    flex-shrink: 0;
}

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

/* Hide spinner by default */
.loading-spinner {
    display: none;
}

/* Button loading state */
/* 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;
}

/* Button hover effects */
.btn-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(191deg, #0078F8 19.35%, #0941EB 101.33%);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover:not(.btn-loading) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.btn-primary:active:not(.btn-loading) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Input button specific styles */
.input-button.btn-primary {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

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

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

@keyframes pulse {
    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);
    }
}

.is-invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

/* Input wrapper with button enhancements */
.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;
}

.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-right: 12px;
    background: transparent;
}

.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);
}

/* Hover effect for input wrapper button */
.input-wrapper.with-button .input-button:hover:not(.btn-loading):not(.btn-countdown) {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: none;
    box-shadow: none;
}

/* Error state for input wrapper */
.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);
}

/* Responsive adjustments */
/* Responsive adjustments */
/* Removed max-width: 480px block to keep button horizontal */

/* Loading state for input wrapper */
/* .input-wrapper.with-button .input-button.btn-loading {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
}

.input-wrapper.with-button .input-button.btn-countdown {
    background: linear-gradient(135deg, #10b981, #059669) !important;
} */

@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 {
        position: relative;
        flex: none;
        width: 100%;
        height: 400px;
        border-radius: 0;
        top: auto;
        align-self: auto;
        max-height: none;
    }

    .promo-background-image {
        border-radius: 0;
    }

    .promo-overlay {
        border-radius: 0;
        padding: 36px 32px;
    }

    .form-panel {
        width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 820px) {
    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;
    }

    .form-title {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .form-panel {
        padding: 40px 16px 20px 16px;
    }

    .input-row {
        flex-direction: column;
    }

    .day-select {
        flex: auto;
    }

    .form-title {
        font-size: 28px;
    }

    .promo-overlay {
        padding: 32px 24px;
    }

    .promo-title {
        font-size: 24px;
        line-height: 30px;
    }

    .promo-subtitle {
        font-size: 14px;
        line-height: 20px;
    }
}

/* iPad specific optimizations */
@media (min-width: 821px) and (max-width: 1024px) {
    body {
        padding: 20px 16px 16px 16px;
    }

    .signup-container {
        gap: 20px;
        margin: 0 auto 16px auto;
    }

    .promo-panel {
        flex: 0 0 480px;
    }

    .form-panel {
        padding: 24px 32px 24px 32px;
        gap: 12px;
    }

    .signup-form {
        gap: 12px;
    }

    .form-group {
        gap: 3px;
        margin-bottom: 0;
    }

    .input-wrapper,
    .input-wrapper input,
    .select-wrapper select,
    .btn-primary {
        height: 40px;
    }

    .role-option {
        width: 120px;
        height: 48px;
        gap: 4px;
    }

    .role-icon {
        width: 28px;
        height: 28px;
    }

    .role-options {
        gap: 10px;
        margin-top: 4px;
    }

    .form-title {
        font-size: 26px;
        line-height: 36px;
    }

    .divider {
        margin: 8px 0 6px 0;
    }

    .social-login {
        gap: 10px;
    }

    .btn-social {
        height: 38px;
    }
}

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