/* Login Page Styles - Modern Design */

/* Login Page Background */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 50%, #fef3c7 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(50px, 50px) rotate(180deg); }
}

/* Login Section */
.login-section { min-height: 78vh;   margin-top: 100px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 900px;
}

/* Login Card */
.login-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Panel - Left Side */
.login-welcome {
    position: relative;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #f97316 100%);
    padding: 3rem 2.5rem;
    color: var(--white);
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
}

.login-welcome::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.welcome-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-content p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Login Form Container - Right Side */
.login-form-container {
    padding: 3rem 2.5rem;
    background: var(--white);
}

/* Form Styles */
.login-form,
.otp-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 3.5rem;
    padding: 0 1rem 0 3rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--navy-primary);
    background: var(--white);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.form-hint strong {
    color: var(--blue-primary);
    font-weight: 600;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(to right, var(--blue-primary), var(--blue-secondary));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: linear-gradient(to right, var(--blue-secondary), var(--blue-light));
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -3px rgba(37, 99, 235, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Form Footer */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.link-primary {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.link-primary:hover {
    color: var(--blue-secondary);
    text-decoration: underline;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.back-btn:hover {
    background: var(--gray-100);
    color: var(--navy-primary);
}

.back-btn svg {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* OTP Input Fields */
.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.otp-input {
    width: 100%;
    aspect-ratio: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    color: var(--navy-primary);
    background: var(--white);
    transition: all 0.3s;
}

.otp-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.otp-input.filled {
    border-color: var(--blue-primary);
    background: rgba(37, 99, 235, 0.05);
}

/* Responsive Design */
@media (min-width: 768px) {
    .login-card {
        grid-template-columns: 45% 55%;
    }

    .login-welcome {
        min-height: 500px;
    }

    .welcome-content h2 {
        font-size: 2.25rem;
    }

    .welcome-content p {
        font-size: 1.125rem;
    }
}

@media (max-width: 767px) {
    .login-section {
        padding: 1rem;
    }

    .login-welcome {
        padding: 2rem 1.5rem;
        min-height: 200px;
    }

    .welcome-content h2 {
        font-size: 1.5rem;
    }

    .welcome-content p {
        font-size: 0.875rem;
    }

    .login-form-container {
        padding: 2rem 1.5rem;
    }

    .otp-inputs {
        gap: 0.5rem;
    }

    .otp-input {
        font-size: 1.25rem;
    }
}

/* Animation for OTP form transition */
.otp-form {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
