/* Login Page - Consistent Theme Styling */

/* Import the same CSS variables from homepage */
:root {
    --primary-gradient: linear-gradient(135deg, #7360f2 0%, #5f4dcf 100%);
    --secondary-gradient: linear-gradient(135deg, #352f4a 0%, #2a2138 100%);
    --success-gradient: linear-gradient(135deg, #35a552 0%, #2d8f45 100%);
    --danger-gradient: linear-gradient(135deg, #f94770 0%, #e63961 100%);
    --warning-gradient: linear-gradient(135deg, #ffd751 0%, #ffcd33 100%);
    --info-gradient: linear-gradient(135deg, #00c2ff 0%, #00a8db 100%);
    --light-gradient: linear-gradient(135deg, #fbfbff 0%, #f5f5f9 100%);
    --modern-shadow: 0 10px 30px -5px rgba(115, 96, 242, 0.15);
    --modern-shadow-hover: 0 20px 40px -10px rgba(115, 96, 242, 0.25);
    --glassmorphism: rgba(255, 255, 255, 0.1);
    --glassmorphism-border: rgba(255, 255, 255, 0.2);
}

/* Left Panel - Welcome Section */
.col-md-6.d-none.d-md-flex {
    background: var(--primary-gradient) !important;
    position: relative;
    overflow: hidden;
}

.col-md-6.d-none.d-md-flex::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.col-md-6.d-none.d-md-flex .text-center {
    position: relative;
    z-index: 2;
}

/* Logo styling */
.col-md-6.d-none.d-md-flex img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.col-md-6.d-none.d-md-flex img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.d-md-none img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(115, 96, 242, 0.15));
}

.d-md-none img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(115, 96, 242, 0.25));
}

/* Welcome text styling */
.col-md-6.d-none.d-md-flex h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.col-md-6.d-none.d-md-flex p {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 3rem;
}

/* Feature icons in welcome section */
.col-md-6.d-none.d-md-flex .material-symbols-rounded {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.col-md-6.d-none.d-md-flex .text-center:hover .material-symbols-rounded {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.col-md-6.d-none.d-md-flex .text-center p {
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Right Panel - Form Section */
.col-md-6.d-flex.flex-column.justify-content-center {
    background: #ffffff !important;
    position: relative;
}

/* Mobile logo */
.d-md-none .sidebar-icon.size-60 {
    background: var(--primary-gradient) !important;
    box-shadow: var(--modern-shadow);
    transition: all 0.3s ease;
}

.d-md-none .sidebar-icon.size-60:hover {
    transform: scale(1.05);
    box-shadow: var(--modern-shadow-hover);
}

.d-md-none .sidebar-icon.size-60 b {
    color: #ffffff !important;
}

/* Form container styling */
.mx-auto[style*="max-width: 900px"] {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

/* Form title styling */
.mx-auto[style*="max-width: 900px"] h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1726;
    margin-bottom: 0.25rem;
    text-align: center;
}

.mx-auto[style*="max-width: 900px"] .text-muted {
    color: #64748b;
}

/* Alert styling */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(80, 205, 137, 0.1) 0%, rgba(80, 205, 137, 0.05) 100%);
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 138, 55, 0.1) 0%, rgba(255, 138, 55, 0.05) 100%);
    color: #d97706;
    border-left: 4px solid #ff8a37;
}

.alert-info {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(56, 189, 248, 0.05) 100%);
    color: #0891b2;
    border-left: 4px solid #38bdf8;
}

/* Form group styling */
.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
}

/* Input group styling */
.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
}

.input-group:focus-within {
    border-color: #7360f2;
    box-shadow: 0 0 0 0.2rem rgba(115, 96, 242, 0.25);
    transform: translateY(-1px);
}

.input-group-text {
    background: #f9fafb;
    border: none;
    color: #6b7280;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    background: #7360f2;
    color: #ffffff;
}

.form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: none;
    background: #ffffff;
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-control.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
    font-weight: 500;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

/* Password toggle styling */
.password-toggle {
    border: none;
    background: transparent;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.password-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.password-toggle .material-symbols-rounded {
    font-size: 1.1rem;
}

/* Button styling */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--modern-shadow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--modern-shadow-hover);
}

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

.btn-primary .material-symbols-rounded {
    transition: transform 0.3s ease;
}

.btn-primary:hover .material-symbols-rounded {
    transform: translateX(3px);
}

/* Link styling */
.text-primary {
    color: #7360f2 !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.text-primary:hover {
    color: #5f4dcf !important;
    text-decoration: none;
}

.text-body {
    color: #7360f2 !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.text-body:hover {
    color: #5f4dcf !important;
    text-decoration: none;
}

/* Forgot password link */
.small.text-muted {
    color: #6b7280 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.small.text-muted:hover {
    color: #7360f2 !important;
    text-decoration: none;
}

/* Divider styling */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 1.5rem 0;
}

/* Responsive design */
@media (max-width: 767.98px) {
    .mx-auto[style*="max-width: 900px"] {
        padding: 0;
        margin: 0;
        border-radius: 0;
        max-width: 100% !important;
    }

    .mx-auto[style*="max-width: 900px"] h2 {
        font-size: 1.5rem;
    }

    .col-md-6.d-none.d-md-flex h1 {
        font-size: 2rem;
    }

    .col-md-6.d-none.d-md-flex p {
        font-size: 1rem;
    }

    /* Adjust form spacing on mobile */
    .form-group {
        margin-bottom: 0.5rem;
    }

    .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
    }

    .input-group {
        border-radius: 8px;
    }

    .input-group-text {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

/* Focus styles for accessibility */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #7360f2;
    outline-offset: 2px;
    border-radius: 4px;
}