.page-login {
    @include svg("login");
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.logo-login {
    @include s {
        img {
            max-width: 160px;
        }
    }
}

/* Login Container */
.login-container {
    background: white;
    border-radius: var(--br-16);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 900px;
    width: 90%;
    min-height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 2;
}

/* Left Panel - Branding */
.login-branding {
    background: var(--bg-light-6);
    color: var(--secondary-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-subtitle {
    margin-bottom: 0;
    line-height: 1.5;
}

.brand-features {
    text-align: left;
    max-width: 300px;
    margin-top: 1.6rem;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.brand-feature .uk-icon {
    width: 24px;
    text-align: right;
    opacity: 0.8;
    color: var(--primary-color);
}

/* Right Panel - Form */
.login-form-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(0deg, #fff 0%, var(--bg-light-14) 100%);
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;

    @include s {
        margin-bottom: 1rem;
    }
}

.form-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 0;
}

/* Phone Input Form */
.phone-step {
    display: block;
}

.phone-step.hidden {
    display: none;
}

.phone-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.country-code {
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    cursor: not-allowed;
    opacity: 0.7;
}

.phone-input {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.phone-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.phone-input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* OTP Step */
.otp-step {
    display: none;
}

.otp-step.active {
    display: block;
}

.otp-info {
    background: var(--bg-light-4);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.otp-info p {
    margin: 0;
    color: var(--secondary-color);
}

.phone-display {
    font-weight: 600;
    color: var(--primary-color);
}

.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.otp-digit {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: var(--br-8);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.otp-digit.filled {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.otp-digit.error {
    border-color: var(--error-color);
    background: rgba(255, 107, 107, 0.1);
}

.uk-button-danger:disabled,
.uk-button-default:disabled,
.uk-button-primary:disabled,
.uk-button-secondary:disabled {
    background-color: #b1b1b1; /* change background */
    color: #343434; /* change text color */
    cursor: not-allowed; /* show disabled cursor */
    opacity: 0.6; /* dim it */
}

/* Buttons */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95rem;
    padding: 0;
}

.btn-link:hover {
    color: var(--secondary-color);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

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

/* Resend Timer */
.resend-timer {
    text-align: center;
    margin-bottom: 1rem;
}

.resend-info {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timer-display {
    font-weight: 600;
    color: var(--primary-color);
}

/* Error Messages */
.error-message {
    background: #f9ebeb;
    border: 1px solid #f4d7d7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #ce4e50;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Message */
.success-message {
    background: #edf7ed;
    border: 1px solid #dcefdc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #5cb85c;
    font-size: 0.9rem;
    display: none;
}

.success-message.show {
    display: block;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 960px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-height: auto;
    }

    .login-branding {
        padding: 1rem 0;
        min-height: 0;
        text-align: center;
    }

    .brand-subtitle,
    .brand-features,
    .brand-title,
    .back-button {
        display: none;
    }

    .login-form-panel {
        padding: 1.2rem 2rem;
    }

    .form-title {
        font-size: 1.2rem;
    }

    .otp-digit {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        margin: 1rem;
    }

    .phone-input-group {
        flex-direction: column;
        gap: 1rem;
    }

    .country-code {
        min-width: auto;
    }

    .otp-inputs {
        gap: 0.5rem;
    }

    .otp-digit {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Animation for form transitions */
.form-step {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom radio buttons */
.user-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;

    @include s {
        margin-bottom: 1rem;
    }
}

.user-type-option {
    position: relative;
}

.user-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.user-type-label {
    display: block;
    background: var(--bg-light-6);
    border: 2px solid var(--border-color);
    border-radius: var(--br-8);
    color: var(--secondary-color);
    padding: 0.6rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-type-option input:checked + .user-type-label {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.user-type-name {
    font-weight: 600;
    font-size: 1rem;
}
