/* Modern Auth Design - Figma Inspired */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: #F5F5F5;
    overflow-x: hidden;
}

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

/* Mobile Status Bar */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.375rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    color: #FFFFFF;
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 1.0625rem;
}

.status-bar .time {
    flex: 1;
    text-align: center;
}

.status-bar .indicators {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Background with overlay */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 67.55%, #6ED4BE 89.25%), url("../images/bg.jpg") lightgray -0.0031rem -21.0691rem / 100.012% 137.762% no-repeat;
    z-index: 1;
}

/* Logo */
.auth-logo {
    z-index: 10;
}

.auth-logo img {
    padding: 0.5rem;
    height: 3.750rem;
}

.auth-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #FFFFFF;
}

/* Main Form Container */
.auth-form-container {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1.25rem;
}

.auth-form {
    width: 100%;
    max-width: 20.688rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input Fields */
.auth-input-group {
    position: relative;
    background: #FFFFFF;
    border: 0.0625rem solid #ECF0F1;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
}

.auth-input-group .input-icon {
    width: 1.250rem;
    height: 1.250rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.auth-input-group input {
    border: none;
    outline: none;
    background: none;
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #2D2D2D;
    line-height: 1;
}

.auth-input-group input::placeholder {
    color: #BEBEBE;
}

.auth-input-group input:focus {
    outline: none;
}

/* User Type Selection */
.auth-input-group.user-type-selection {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    height: auto;
    gap: 1rem;
}

.user-type-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2D2D2D;
    margin-bottom: 0.5rem;
}

.radio-group {
    display: flex;
    /* flex-direction: column; */
    gap: 0.75rem;
    flex-wrap: wrap;
}

.radio-option {
    position: relative;
    flex: 1;
}

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

.radio-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #F8F9FA;
    border: 0.125rem solid #ECF0F1;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.radio-option label:hover {
    border-color: #6ED4BE;
    background: #F0FDF9;
}

.radio-option input[type="radio"]:checked+label {
    border-color: #6ED4BE;
    background: #F0FDF9;
}

/* .radio-option input[type="radio"]:checked+label::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.250rem;
    height: 1.250rem;
    background: #6ED4BE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
} */

/* .radio-option input[type="radio"]:checked+label::before {
    content: '✓';
    position: absolute;
    right: 1.375rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
} */

.radio-option label i {
    font-size: 1.25rem;
    color: #6ED4BE;
    width: 1.5rem;
    text-align: center;
}

.radio-option label span {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2D2D2D;
    flex: 1;
}

.radio-option label small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #757575;
    display: block;
    margin-top: 0.125rem;
}

.radio-option label {
    flex-direction: column;
    align-items: flex-start;
}

.radio-option label>div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.radio-option label span {
    flex: 1;
}

.radio-option label small {
    /* margin-left: 2.25rem; */
    margin-top: 0.25rem;
}

/* User Type Selection Error State */
.auth-input-group.user-type-selection.error {
    border-color: #ff4757;
    background: #fff5f5;
}

.auth-input-group.user-type-selection.error .radio-option label {
    border-color: #ff4757;
    background: #fff5f5;
}

/* Remember me and Forgot password */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember-checkbox {
    width: 1rem;
    height: 1rem;
    background: transparent;
    border: 0.0625rem solid #FFFFFF;
    border-radius: 0.1875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.remember-checkbox::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.remember-checkbox.checked,
input[type="checkbox"]:checked+.remember-checkbox {
    background: #6ED4BE;
    border-color: #6ED4BE;
}

.remember-checkbox.checked::after,
input[type="checkbox"]:checked+.remember-checkbox::after {
    opacity: 1;
}

.remember-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
}

.forgot-password {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Sign In Button */
.auth-submit-btn {
    background: #6ED4BE;
    border: none;
    border-radius: 1rem;
    padding: 0.75rem 0;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0rem 0.25rem 0.25rem rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.auth-submit-btn:hover {
    background: #5bc4a8;
    transform: translateY(-0.0625rem);
    box-shadow: 0rem 0.375rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Bottom Text Section */
.auth-bottom-text {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2.5rem 1.9375rem;
    color: #FFFFFF;
}

.auth-headline {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.auth-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.auth-download-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* App Store Buttons */
.app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.app-store-btn {
    width: 8.625rem;
    height: 2.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 0.0625rem solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
}

.app-store-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.app-store-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Safari Bottom Bar */
.safari-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8.438rem;
    z-index: 20;
}

.safari-bar-bg {
    position: absolute;
    bottom: 0.0625rem;
    left: 0;
    right: 0;
    height: 8.375rem;
    background: #F7F7F7;
    box-shadow: 0rem -0.025rem 0rem 0rem #C1C1C1;
}

.safari-address-bar {
    position: absolute;
    bottom: 4.875rem;
    left: 1.6875rem;
    right: 1.6875rem;
    height: 2.625rem;
}

.safari-address-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.625rem;
    background: #FFFFFF;
    border-radius: 0.625rem;
    box-shadow: 0rem 0.125rem 0.75rem rgba(0, 0, 0, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    gap: 0.25rem;
}

.safari-address-text {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    color: #202124;
    text-align: center;
}

.safari-icons {
    position: absolute;
    bottom: 2.625rem;
    left: 1.0625rem;
    right: 1.125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.safari-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Home Indicator */
.home-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 8.688rem;
    height: 0.313rem;
    background: #AEAEB2;
    border-radius: 6.25rem;
    z-index: 25;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #BEBEBE;
    transition: color 0.3s ease;
    z-index: 10;
}

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

.auth-input-group.has-toggle input {
    padding-right: 2.5rem;
}

/* Error States */
.auth-input-group.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-family: 'Montserrat', sans-serif;
}

/* Loading State */
.auth-submit-btn:disabled {
    background: #BEBEBE;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn.loading {
    position: relative;
}

.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid transparent;
    border-top: 0.125rem solid #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-form {
        max-width: 100%;
    }

    .app-store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .auth-bottom-text {
        padding: 1.25rem;
    }

    .auth-headline {
        font-size: 1rem;
    }

    .auth-subtitle {
        font-size: 0.8125rem;
    }

    .auth-download-text {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .auth-bottom-text {
        padding: 0.9375rem;
    }

    .safari-bottom {
        display: none;
        /* Hide safari bar on very small screens */
    }

    .home-indicator {
        bottom: 1.25rem;
    }
}

/* Sign up link */
.auth-signup-link {
    text-align: center;
    margin-top: 1.25rem;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
}

.auth-signup-link a {
    color: #6ED4BE;
    text-decoration: none;
    font-weight: 600;
}

.auth-signup-link a:hover {
    text-decoration: underline;
}

/* App Download Section */
.app-download-section {
    margin-top: 2rem;
    text-align: center;
}

.download-text {
    margin-bottom: 1.25rem;
}

.download-title {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 0.25rem;
}

.download-subtitle {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
    opacity: 0.9;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
    position: relative;
}

.download-btn::after {
    content: 'Coming Soon';
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 0.5rem;
    position: absolute;
    top: 0.1875rem;
    left: 60%;
    width: 3.750rem;
    transform: translateX(-60%);
}

.download-btn:hover {
    transform: translateY(-0.125rem);
}

.download-btn img {
    height: 2.5rem;
    width: auto;
    border-radius: 0.375rem;
}

@media (max-width: 480px) {

    .download-title,
    .download-subtitle {
        font-size: 0.875rem;
        line-height: 1.250rem;
    }

    .download-buttons {
        gap: 0.5rem;
    }

    .download-btn img {
        height: 2.250rem;
    }
}

/* Form Title */
.auth-form-title {
    margin-bottom: 0.5rem;
}

.auth-form-title h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.2;

}

/* Sign in link styles */
.signin-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
    width: 100%;
    display: block;
}

.signin-link {
    color: #6ED4BE;
    text-decoration: underline;
    text-underline-position: from-font;
}

.signin-link:hover {
    color: #5bc4a8;
}

/* Alert messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: rgba(255, 71, 87, 0.1);
    border: 0.0625rem solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.alert-success {
    background-color: rgba(110, 212, 190, 0.1);
    border: 0.0625rem solid rgba(110, 212, 190, 0.3);
    color: #FFFFFF;
}

/* Ensure intl tel input works with auth styles */
.auth-input-group .iti {
    width: 100%;
}

.auth-input-group .iti__tel-input {
    width: 100%;
    border: none;
    background: transparent;
    padding-left: 3.125rem;
    font-size: 1rem;
    color: #333;
}

.auth-input-group .iti__tel-input:focus {
    outline: none;
}

.auth-input-group .iti__country-list {
    z-index: 9999;
}