/* Login Page Styles - Ultra Modern Design with Dark Tones */
body.login-page {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #4c1d95 70%, #581c87 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 28px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s ease;
}

.login-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 1);
}

.login-card:hover::before {
    left: 100%;
}

.login-header {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #581c87 100%);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: headerPulse 8s ease-in-out infinite;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.5) 50%,
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(20px, 20px) scale(1.05);
        opacity: 0.9;
    }
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.brand-wrapper {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.brand-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
}

.brand-wrapper:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

.brand-icon {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.brand-wrapper:hover .brand-icon {
    transform: scale(1.15) rotate(360deg);
}

.brand-name {
    color: #ffffff;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    display: block;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-body {
    padding: 3rem 2.5rem;
}

.login-title {
    color: #1e293b;
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.5);
    animation: expandWidth 0.6s ease-out 0.4s both;
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

.login-page .form-group {
    margin-bottom: 1.75rem;
}

.login-page .form-control-lg {
    height: 58px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
}

.login-page .form-control-lg:hover {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
}

.login-page .form-control-lg:focus {
    border-color: #7c3aed;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(124, 58, 237, 0.15),
        0 4px 12px rgba(124, 58, 237, 0.2);
    outline: none;
    transform: translateY(-2px);
}

.login-page .form-control-lg::placeholder {
    color: #94a3b8;
    font-weight: 400;
    transition: all 0.3s ease;
}

.login-page .form-control-lg:focus::placeholder {
    color: #cbd5e1;
    transform: translateX(4px);
}

.login-page .input-group {
    position: relative;
}

.login-page .input-group .form-control-lg {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.login-page .input-group-text {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 14px 14px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.25rem;
}

.login-page .input-group:hover .input-group-text {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
}

.login-page .input-group:focus-within .input-group-text {
    border-color: #7c3aed;
    background: #ffffff;
    transform: translateY(-2px);
}

.login-page .input-group-text i {
    color: #64748b;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.login-page .input-group-text:hover i {
    color: #7c3aed;
    transform: scale(1.1);
}

.login-page .input-group-text:active i {
    transform: scale(0.95);
}

.login-btn {
    background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 35%, #7e22ce 70%, #a21caf 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    height: 58px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 10px 25px rgba(76, 29, 149, 0.5),
        0 4px 10px rgba(107, 33, 168, 0.4),
        0 2px 5px rgba(126, 34, 206, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #ffffff;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(76, 29, 149, 0.6),
        0 6px 15px rgba(107, 33, 168, 0.5),
        0 0 20px rgba(126, 34, 206, 0.4),
        0 0 40px rgba(168, 85, 247, 0.2);
    background-position: 100% 0;
    color: #ffffff;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover::after {
    opacity: 1;
}

.login-btn:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.login-btn:focus {
    outline: none;
    box-shadow:
        0 15px 35px rgba(76, 29, 149, 0.6),
        0 0 0 4px rgba(124, 58, 237, 0.25);
}

.login-btn i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(-4px);
    animation: bounceX 0.6s ease infinite;
}

@keyframes bounceX {
    0%, 100% { transform: translateX(-4px); }
    50% { transform: translateX(0); }
}

.login-page .form-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(80px);
    animation: float 25s infinite ease-in-out;
}

.floating-shapes .shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.floating-shapes .shape-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.15) 100%);
    top: 55%;
    right: 8%;
    animation-delay: 8s;
}

.floating-shapes .shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 100%);
    bottom: 15%;
    left: 15%;
    animation-delay: 16s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(40px, -40px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translate(30px, 40px) rotate(270deg) scale(1.05);
    }
}

/* Loading State */
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.login-btn.loading {
    position: relative;
    color: transparent;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Animations */
.login-page .form-group {
    animation: fadeInUp 0.8s ease-out both;
}

.login-page .form-group:nth-child(1) {
    animation-delay: 0.4s;
}

.login-page .form-group:nth-child(2) {
    animation-delay: 0.5s;
}

/* Validation States */
.login-page .form-control-lg.is-invalid {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.8);
}

.login-page .form-control-lg.is-invalid:focus {
    border-color: #ef4444;
    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 4px 12px rgba(239, 68, 68, 0.15);
}

.login-page .form-control-lg.is-valid {
    border-color: #10b981;
    background: rgba(240, 253, 244, 0.8);
}

.login-page .form-control-lg.is-valid:focus {
    border-color: #10b981;
    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.1),
        0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .floating-shapes .shape {
        filter: blur(60px);
    }

    .floating-shapes .shape-1 {
        width: 300px;
        height: 300px;
    }

    .floating-shapes .shape-2 {
        width: 250px;
        height: 250px;
    }

    .floating-shapes .shape-3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 767.98px) {
    body.login-page::before {
        animation: none;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }

    .login-header {
        padding: 2rem 1.5rem;
    }

    .brand-name {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .login-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .login-title::after {
        width: 60px;
        height: 4px;
    }

    .login-page .form-control-lg {
        height: 54px;
        font-size: 0.95rem;
    }

    .login-btn {
        height: 54px;
        font-size: 1rem;
    }

    .floating-shapes .shape {
        filter: blur(40px);
        opacity: 0.06;
    }

    .floating-shapes .shape-1 {
        width: 200px;
        height: 200px;
    }

    .floating-shapes .shape-2 {
        width: 180px;
        height: 180px;
    }

    .floating-shapes .shape-3 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        border-radius: 24px;
        margin: 1rem;
    }

    .login-body {
        padding: 1.5rem 1.25rem;
    }

    .login-header {
        padding: 1.75rem 1.25rem;
    }

    .brand-name {
        font-size: 1.35rem;
    }

    .login-title {
        font-size: 1.35rem;
    }
}

/* Dark Theme Support (Optional) */
@media (prefers-color-scheme: dark) {
    body.login-page.dark-theme {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    }

    .dark-theme .login-card {
        background: rgba(30, 27, 75, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .dark-theme .login-title {
        color: #e2e8f0;
        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .dark-theme .form-control-lg {
        background: rgba(30, 27, 75, 0.5);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }

    .dark-theme .form-control-lg:focus {
        background: rgba(30, 27, 75, 0.7);
        border-color: #6366f1;
    }
}

