/* Login Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Container */
.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Side - Login Form */
.login-left {
    width: 50%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
}

.login-header {
    margin-bottom: 40px;
    text-align: left;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    color: #94a3b8;
}

/* Login Form */
.login-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.error-text {
    display: block;
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* Sign In Button */
.sign-in-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #1e293b;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.sign-in-btn:hover {
    background: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.sign-in-btn:active {
    transform: translateY(0);
}

/* Signup Link */
.signup-link {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.signup-link a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.login-footer a {
    color: #7c3aed;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Right Side - Welcome */
.login-right {
    width: 50%;
    background: linear-gradient(135deg, #1e2b3c 0%, #1e2b3c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

/* Decorative Background */
.login-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

/* Welcome Content */
.welcome-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

/* Animation Container */
.animation-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.ai-animation {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-animation:hover {
    transform: scale(1.05);
}

/* Ensure dotLottie web component fills container perfectly */
dotlottie-wc {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

/* Ensure the canvas inside dotLottie is centered */
dotlottie-wc canvas {
    display: block;
    margin: 0 auto;
    border-radius: 50%;
}


/* Welcome Text */
.welcome-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.welcome-content p {
    font-size: 17px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-left,
    .login-right {
        width: 50%;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .welcome-content h2 {
        font-size: 30px;
    }

    .animation-container {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        width: 100%;
        padding: 30px 20px;
    }

    .login-right {
        display: none;
    }

    .login-form {
        padding: 30px;
    }

    .login-header h1 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 25px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .form-group input {
        padding: 12px 14px;
    }

    .sign-in-btn {
        padding: 12px;
    }
}

/* Loading State */
.sign-in-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.sign-in-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Focus Visible */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .login-right {
        display: none;
    }

    .login-left {
        width: 100%;
    }
}