/* Base styles to prevent horizontal scroll */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.1);
    width: calc(100% - 60px);
    max-width: 380px;
    padding: 30px;
    margin: 80px auto;
    position: relative;
    transform: translateY(0);
    font-family: "Lexend", sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(8, 145, 178, 0.15);
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo img {
    color: #007681;
    width: 10rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.logo p {
    color: #007681;
    font-size: 0.875rem;
    font-weight: 400;
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 30px;
    position: relative;
}

.tab-button {
    flex: 1;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
	font-family: "Lexend", sans-serif;

    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.tab-button.active {
    color: #007681;
    background: white;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

.role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.role-option {
    flex: 1;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.role-option.selected {
    background: #ecfeff;
    border-color: #007681;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.1);
}

.role-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    fill: #64748b;
    transition: all 0.3s ease;
}

.role-option.selected .role-icon {
    fill: #007681;
}

.role-title {
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.role-desc {
    color: #64748b;
    font-size: 11px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    flex: 1;
    width: 100%;
    padding: 14px 0px 14px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.mobile-input {
    display: flex;
    gap: 12px;
    width: 100%;
}

.country-code-selector {
    position: relative;
    min-width: 90px;
}

.country-code {
    width: 100%;
    padding: 14px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-code:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.country-code-selector::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #64748b;
    pointer-events: none;
}

.auth-method {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.method-button {
    flex: 1;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
	font-family: "Lexend", sans-serif;

    transition: all 0.3s ease;
}

.method-button.active {
    background: #ecfeff;
    border-color: #007681;
    color: #007681;
}

.primary-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #007681 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
	font-family: "Lexend", sans-serif;

    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-link {
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.secondary-link a {
    color: #007681;
    text-decoration: none;
    font-weight: 500;
}

.secondary-link a:hover {
    text-decoration: underline;
}

.otp-section {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.otp-title {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.otp-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 30px;
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.otp-input {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #06b6d4;
    background: white;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.resend-timer {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.back-button {
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #0891b2;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .auth-container {
        width: calc(100% - 40px);
        margin: 20px auto;
        padding: 20px;
        border-radius: 16px;
    }

    .logo img {
        width: 8rem;
        max-width: 100%;
    }

    .role-selector {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .role-option {
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-input {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .country-code-selector {
        min-width: 100%;
        width: 100%;
    }

    .country-code {
        width: 100%;
        box-sizing: border-box;
    }

    .form-input {
        width: 100%;
        box-sizing: border-box;
    }

    .auth-method {
        flex-direction: column;
        width: 100%;
    }

    .method-button {
        width: 100%;
        box-sizing: border-box;
    }

    .otp-inputs {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        flex: 1;
        max-width: 40px;
    }

    .primary-button {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 360px) {
    .auth-container {
        width: calc(100% - 20px);
        margin: 10px auto;
        padding: 15px;
    }

    .otp-inputs {
        gap: 6px;
        padding: 0 5px;
    }

    .otp-input {
        width: 35px;
        height: 35px;
        font-size: 16px;
        max-width: 35px;
    }

    .primary-button {
        padding: 12px;
    }
}

/* Ensure all elements use border-box */
*, *:before, *:after {
    box-sizing: border-box;
}

/* Improve touch targets on mobile */
@media (hover: none) {
    .role-option,
    .method-button,
    .primary-button,
    .country-code {
        padding: 16px;
        min-height: 48px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideIn 0.5s ease;
}

.hidden {
    display: none;
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message Styles */
.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}