/* ========================================
   Login Page Background Animation
   Accounting & Finance Theme with Infinity Color
   ======================================== */

/* Background Container */
.login-animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Infinity Color Gradient Overlay */
.login-animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255, 0, 0, 0.1), 
        rgba(255, 154, 0, 0.1), 
        rgba(208, 222, 33, 0.1), 
        rgba(79, 220, 74, 0.1), 
        rgba(63, 218, 216, 0.1), 
        rgba(47, 201, 226, 0.1), 
        rgba(28, 127, 238, 0.1), 
        rgba(95, 21, 242, 0.1), 
        rgba(186, 12, 248, 0.1), 
        rgba(251, 7, 217, 0.1), 
        rgba(255, 0, 0, 0.1));
    background-size: 400% 400%;
    animation: infinityGradient 15s ease infinite;
    z-index: 1;
}

@keyframes infinityGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Icons Container */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Individual Icon Styling */
.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: floatAround 20s infinite linear;
    filter: blur(0.5px);
    transition: all 0.3s ease;
}

.floating-icon:hover {
    opacity: 0.4;
    transform: scale(1.3) !important;
    filter: blur(0);
    z-index: 100;
}

/* Color variations with infinity effect */
.floating-icon:nth-child(odd) {
    animation-duration: 25s;
}

.floating-icon:nth-child(3n) {
    animation-duration: 18s;
    animation-direction: reverse;
}

.floating-icon:nth-child(4n) {
    animation-duration: 30s;
}

.floating-icon:nth-child(5n) {
    animation-duration: 22s;
    animation-direction: alternate-reverse;
}

/* Different starting positions */
.floating-icon:nth-child(1) { left: 5%; top: 10%; animation-delay: 0s; }
.floating-icon:nth-child(2) { left: 15%; top: 80%; animation-delay: -2s; }
.floating-icon:nth-child(3) { left: 25%; top: 30%; animation-delay: -4s; }
.floating-icon:nth-child(4) { left: 35%; top: 70%; animation-delay: -6s; }
.floating-icon:nth-child(5) { left: 45%; top: 15%; animation-delay: -8s; }
.floating-icon:nth-child(6) { left: 55%; top: 85%; animation-delay: -10s; }
.floating-icon:nth-child(7) { left: 65%; top: 40%; animation-delay: -12s; }
.floating-icon:nth-child(8) { left: 75%; top: 60%; animation-delay: -14s; }
.floating-icon:nth-child(9) { left: 85%; top: 20%; animation-delay: -16s; }
.floating-icon:nth-child(10) { left: 92%; top: 75%; animation-delay: -18s; }
.floating-icon:nth-child(11) { left: 10%; top: 50%; animation-delay: -3s; }
.floating-icon:nth-child(12) { left: 30%; top: 45%; animation-delay: -7s; }
.floating-icon:nth-child(13) { left: 50%; top: 55%; animation-delay: -11s; }
.floating-icon:nth-child(14) { left: 70%; top: 35%; animation-delay: -15s; }
.floating-icon:nth-child(15) { left: 90%; top: 50%; animation-delay: -19s; }
.floating-icon:nth-child(16) { left: 20%; top: 90%; animation-delay: -5s; }
.floating-icon:nth-child(17) { left: 40%; top: 25%; animation-delay: -9s; }
.floating-icon:nth-child(18) { left: 60%; top: 95%; animation-delay: -13s; }
.floating-icon:nth-child(19) { left: 80%; top: 5%; animation-delay: -17s; }
.floating-icon:nth-child(20) { left: 3%; top: 65%; animation-delay: -1s; }

/* Complex floating animation */
@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    10% {
        transform: translate(30px, -50px) rotate(36deg) scale(1.1);
    }
    20% {
        transform: translate(-20px, -80px) rotate(72deg) scale(0.9);
    }
    30% {
        transform: translate(50px, -40px) rotate(108deg) scale(1.2);
    }
    40% {
        transform: translate(-40px, -20px) rotate(144deg) scale(1);
    }
    50% {
        transform: translate(30px, 30px) rotate(180deg) scale(1.1);
    }
    60% {
        transform: translate(-50px, 50px) rotate(216deg) scale(0.95);
    }
    70% {
        transform: translate(40px, 20px) rotate(252deg) scale(1.15);
    }
    80% {
        transform: translate(-30px, -30px) rotate(288deg) scale(1);
    }
    90% {
        transform: translate(20px, -60px) rotate(324deg) scale(1.1);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* Color cycling for icons - Infinity Color Effect */
.floating-icon i {
    animation: colorCycle 4s infinite linear;
}

@keyframes colorCycle {
    0% {
        color: #ff6b6b;
        filter: hue-rotate(0deg);
    }
    20% {
        color: #feca57;
        filter: hue-rotate(72deg);
    }
    40% {
        color: #48dbfb;
        filter: hue-rotate(144deg);
    }
    60% {
        color: #ff9ff3;
        filter: hue-rotate(216deg);
    }
    80% {
        color: #54a0ff;
        filter: hue-rotate(288deg);
    }
    100% {
        color: #ff6b6b;
        filter: hue-rotate(360deg);
    }
}

/* Different color speeds for variety */
.floating-icon:nth-child(odd) i {
    animation-duration: 3s;
}

.floating-icon:nth-child(3n) i {
    animation-duration: 5s;
}

.floating-icon:nth-child(5n) i {
    animation-duration: 2.5s;
    animation-direction: reverse;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-icon {
        font-size: 1.5rem;
    }

    .floating-icon:nth-child(n+10) {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-icon {
        font-size: 1.2rem;
    }

    .floating-icon:nth-child(n+6) {
        display: none;
    }
}

/* ========================================
   Responsive Login Form Styles - Enhanced
   ======================================== */

/* Base auth form styling - Modern Glassmorphism Card */
.auth-form-light {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.auth-form-light:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

/* Top accent line */
.auth-form-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 35%, #f093fb 65%, #667eea 100%);
    background-size: 200% 100%;
    animation: accentFlow 3s ease-in-out infinite;
}

@keyframes accentFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Logo styling */
.auth-form-light .brand-logo {
    margin-bottom: 1rem !important;
}

.auth-form-light .brand-logo img {
    max-height: 90px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.2));
}

.auth-form-light .brand-logo:hover img {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 8px 16px rgba(102, 126, 234, 0.3));
}

/* Heading styles */
.auth-form-light h4 {
    color: #2d3436;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form-light .text-muted {
    color: #636e72 !important;
    font-size: 0.9rem;
    margin-bottom: 1.25rem !important;
}

/* Input group with icons - Modern Floating Style */
.auth-form-light .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 2px solid transparent;
}

.auth-form-light .input-group:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.auth-form-light .input-group:focus-within {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
    transform: translateY(-3px);
}

.auth-form-light .input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: all 0.3s ease;
}

.auth-form-light .input-group-text i {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.auth-form-light .input-group .form-control {
    border: none;
    border-left: 1px solid #f1f2f6;
    background: #fff;
    color: #2d3436;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auth-form-light .input-group .form-control:focus {
    border-left: 1px solid #667eea;
    background: #fff;
    color: #2d3436;
    box-shadow: none;
    outline: none;
}

.auth-form-light .input-group .form-control::placeholder {
    color: #b2bec3;
    font-weight: 300;
}

/* Form label */
.auth-form-light .form-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem !important;
    color: #667eea;
}

/* Form group spacing */
.auth-form-light .form-group {
    margin-bottom: 1rem;
}

/* Button styling - Modern Gradient with Glow */
.auth-form-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    padding: 0.95rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #fff !important;
}

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

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

.auth-form-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.auth-form-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Checkbox styling */
.auth-form-light .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-light .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 4px;
    border: 2px solid #dfe6e9;
    transition: all 0.3s ease;
    margin-top: 0;
    flex-shrink: 0;
}

.auth-form-light .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.auth-form-light .form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.auth-form-light .form-check-label {
    cursor: pointer;
    user-select: none;
    color: #636e72;
    font-size: 0.85rem;
    margin-left: 0;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Remember me section spacing */
.auth-form-light .my-3 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

/* Link styling */
.auth-form-light a.text-primary {
    color: #667eea !important;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-form-light a.text-primary::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.auth-form-light a.text-primary:hover::after {
    width: 100%;
}

.auth-form-light a.text-primary:hover {
    color: #764ba2 !important;
}

/* Alert styling */
.auth-form-light .alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem !important;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-light .alert-danger {
    background: linear-gradient(135deg, #ffe6e6 0%, #fff0f0 100%);
    color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.15);
}

.auth-form-light .alert-success {
    background: linear-gradient(135deg, #e6ffe6 0%, #f0fff0 100%);
    color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.auth-form-light .alert i {
    font-size: 1.1rem;
}

/* Responsive input group styling */
@media (max-width: 480px) {
    .auth-form-light .input-group-text {
        padding: 0.85rem 1rem;
        min-width: 48px;
    }

    .auth-form-light .input-group-text i {
        font-size: 1.1rem;
    }

    .auth-form-light .input-group .form-control {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 375px) {
    .auth-form-light .input-group-text {
        padding: 0.75rem 0.85rem;
        min-width: 42px;
    }

    .auth-form-light .input-group-text i {
        font-size: 1rem;
    }

    .auth-form-light .input-group .form-control {
        padding: 0.75rem 0.85rem;
        font-size: 0.9rem;
    }
}

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .auth-form-light {
        max-width: 480px;
        margin: 0 auto;
        padding: 2.5rem 2.25rem;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .auth-form-light {
        max-width: 450px;
        margin: 0 auto;
        padding: 2.5rem 2rem;
    }
}

/* Small tablets and large phones (481px to 767px) */
@media (max-width: 767px) {
    .col-lg-4, .col-md-6, .col-sm-8 {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        float: none;
    }

    .auth-form-light {
        padding: 2rem 1.75rem !important;
        border-radius: 20px !important;
    }

    .auth-form-light .brand-logo img {
        max-height: 80px !important;
    }

    .auth-form-light h4 {
        font-size: 1.5rem;
    }

    .auth-form-btn {
        padding: 0.9rem 1.75rem;
        font-size: 0.9rem;
    }
}

/* Extra small phones (320px to 480px) */
@media (max-width: 480px) {
    .container-fluid.page-body-wrapper {
        padding: 15px 10px;
    }

    .col-lg-4, .col-md-6, .col-sm-8 {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .auth-form-light {
        padding: 1.75rem 1.5rem !important;
        border-radius: 18px !important;
        margin: 0;
        width: 100%;
    }

    .auth-form-light .brand-logo img {
        max-height: 75px !important;
    }

    .auth-form-light h4 {
        font-size: 1.35rem;
    }

    .auth-form-light .text-muted {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 0.85rem;
    }

    .auth-form-light .form-label {
        font-size: 0.7rem;
    }

    .auth-form-btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.85rem;
    }

    .alert {
        font-size: 0.85rem;
        padding: 0.75rem 0.9rem;
    }
}

/* Very small phones (below 375px) */
@media (max-width: 375px) {
    .auth-form-light {
        padding: 1.5rem 1.25rem !important;
        border-radius: 16px !important;
    }

    .auth-form-light .brand-logo img {
        max-height: 70px !important;
    }

    .auth-form-light h4 {
        font-size: 1.25rem;
    }

    .auth-form-light .form-label {
        font-size: 0.65rem;
    }

    .auth-form-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Landscape orientation on small devices */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-form-light {
        padding: 1.75rem 2rem !important;
        max-width: 450px;
    }

    .auth-form-light .brand-logo img {
        max-height: 50px !important;
    }

    .auth-form-light h4 {
        font-size: 1.1rem;
        margin-bottom: 0.2rem !important;
    }

    .auth-form-light .text-muted {
        font-size: 0.8rem;
        margin-bottom: 0.75rem !important;
    }

    .form-group {
        margin-bottom: 0.65rem;
    }

    .auth-form-light .form-label {
        font-size: 0.65rem;
        margin-bottom: 0.35rem;
    }

    .auth-form-light .input-group .form-control {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .auth-form-btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Auth content wrapper */
.auth.content-wrapper {
    background: transparent !important;
}

/* Ensure the login form stays above the animation */
.content-wrapper {
    position: relative;
    z-index: 10;
    background: transparent !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Make the auth form container slightly transparent to show animation */
.auth-form-light {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* Ensure container-scroller allows background to show */
.container-scroller {
    background: transparent !important;
    min-height: 100vh;
}

.page-body-wrapper {
    background: transparent !important;
    min-height: 100vh;
}

/* Center the auth container */
.auth {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Ensure row is centered */
.row.w-100.mx-0 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Particle effects for extra visual appeal */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; top: 60%; animation-delay: -2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-delay: -4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 40%; top: 80%; animation-delay: -6s; animation-duration: 13s; }
.particle:nth-child(5) { left: 50%; top: 30%; animation-delay: -8s; animation-duration: 15s; }
.particle:nth-child(6) { left: 60%; top: 70%; animation-delay: -10s; animation-duration: 11s; }
.particle:nth-child(7) { left: 70%; top: 50%; animation-delay: -12s; animation-duration: 17s; }
.particle:nth-child(8) { left: 80%; top: 25%; animation-delay: -14s; animation-duration: 14s; }
.particle:nth-child(9) { left: 90%; top: 65%; animation-delay: -16s; animation-duration: 12s; }
.particle:nth-child(10) { left: 5%; top: 85%; animation-delay: -18s; animation-duration: 16s; }

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-200px) scale(0);
        opacity: 0;
    }
}

/* Glow effect overlay */
.login-animated-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 8s infinite alternate;
    z-index: 1;
}

@keyframes glowPulse {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

