/* Login Page Styles with Geometric Animation */

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-bs-theme="dark"] .login-background {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Geometric Shapes Animation */
.geometric-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

[data-bs-theme="dark"] .shape {
    opacity: 0.08;
}

/* Shape 1 - Rotating Square */
.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    top: 10%;
    left: 15%;
    animation: float-rotate 20s infinite;
    transform: rotate(45deg);
}

/* Shape 2 - Circle */
.shape-2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    top: 60%;
    right: 10%;
    animation: float-up-down 15s infinite;
}

/* Shape 3 - Triangle */
.shape-3 {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid rgba(255, 255, 255, 0.15);
    bottom: 15%;
    left: 8%;
    animation: float-tilt 18s infinite;
}

/* Shape 4 - Hexagon */
.shape-4 {
    width: 120px;
    height: 69px;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    top: 25%;
    right: 20%;
    animation: float-spin 25s infinite;
}

.shape-4::before {
    content: "";
    position: absolute;
    top: -35px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 35px solid rgba(255, 255, 255, 0.12);
}

.shape-4::after {
    content: "";
    position: absolute;
    bottom: -35px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-top: 35px solid rgba(255, 255, 255, 0.12);
}

/* Shape 5 - Small Square */
.shape-5 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    border-radius: 15px;
    bottom: 30%;
    right: 25%;
    animation: float-diagonal 22s infinite;
}

/* Shape 6 - Oval */
.shape-6 {
    width: 180px;
    height: 100px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    top: 40%;
    left: 5%;
    animation: float-pulse 16s infinite;
}

/* Animations */
@keyframes float-rotate {
    0%, 100% {
        transform: translate(0, 0) rotate(45deg);
    }
    50% {
        transform: translate(50px, -30px) rotate(135deg);
    }
}

@keyframes float-up-down {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-60px);
    }
}

@keyframes float-tilt {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-40px, 40px) rotate(15deg);
    }
}

@keyframes float-spin {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(60px, -50px) rotate(180deg);
    }
}

@keyframes float-diagonal {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, -30px) scale(1.2);
    }
}

@keyframes float-pulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(30px, 20px) scale(1.15);
        opacity: 0.15;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 1.5rem;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    animation: card-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-bs-theme="dark"] .login-card {
    background: rgba(30, 30, 46, 0.95);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: inline-block;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    animation: logo-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.login-logo svg {
    width: 100%;
    height: 100%;
    color: var(--bs-primary);
    filter: drop-shadow(0 4px 12px rgba(36, 112, 220, 0.3));
}

[data-bs-theme="dark"] .login-logo svg {
    color: #4299e1;
    filter: drop-shadow(0 4px 12px rgba(66, 153, 225, 0.4));
}

@keyframes logo-entrance {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 0.5rem;
    animation: text-entrance 0.6s ease-out 0.3s backwards;
}

.login-subtitle {
    color: var(--bs-secondary-color);
    font-size: 1rem;
    margin-bottom: 0;
    animation: text-entrance 0.6s ease-out 0.4s backwards;
}

@keyframes text-entrance {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Form */
.login-form {
    animation: form-entrance 0.6s ease-out 0.5s backwards;
}

@keyframes form-entrance {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Login Alert */
.login-alert {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #dc3545;
    animation: alert-shake 0.5s ease-in-out;
}

[data-bs-theme="dark"] .login-alert {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.1));
    border-color: rgba(220, 53, 69, 0.4);
}

@keyframes alert-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Form Floating Inputs */
.login-form .form-floating {
    position: relative;
}

.login-form .form-floating label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-secondary-color);
    transition: all 0.3s ease;
}

.login-form .form-floating label i {
    font-size: 1rem;
}

.login-form .form-control {
    height: 58px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] .login-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-body-color);
}

.login-form .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-2px);
    background: white;
}

[data-bs-theme="dark"] .login-form .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #4299e1;
    box-shadow: 0 0 0 0.25rem rgba(66, 153, 225, 0.2);
}

.login-form .form-control:focus + label {
    color: var(--bs-primary);
}

[data-bs-theme="dark"] .login-form .form-control:focus + label {
    color: #4299e1;
}

/* Login Button */
.login-btn {
    height: 56px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--bs-primary), #1e5bb8);
    border: none;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .login-btn {
    background: linear-gradient(135deg, #4299e1, var(--bs-primary));
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.3);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(var(--bs-primary-rgb), 0.5);
}

[data-bs-theme="dark"] .login-btn:hover {
    box-shadow: 0 6px 30px rgba(66, 153, 225, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn span,
.login-btn i {
    position: relative;
    z-index: 1;
}

.login-btn i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-subtitle {
        font-size: 0.95rem;
    }

    .login-form .form-control {
        height: 54px;
    }

    .login-btn {
        height: 52px;
        font-size: 1rem;
    }

    /* Reduce geometric shapes on mobile */
    .shape {
        opacity: 0.06;
    }

    [data-bs-theme="dark"] .shape {
        opacity: 0.04;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .shape,
    .login-card,
    .login-logo,
    .login-title,
    .login-subtitle,
    .login-form,
    .login-btn::before {
        animation: none !important;
        transition: none !important;
    }

    .login-btn:hover {
        transform: none;
    }
}
