*, ::after, ::before {
    box-sizing: border-box;
}

body {
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

body::before {
    display: none;
}

body::after {
    display: none;
}

/* Background Elements */
@keyframes drift-bg {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-1%, -1%); }
    100% { transform: translate(0, 0); }
}

.bg-elements {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}


.geo-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

.geo-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(85, 112, 255, 0.2), transparent);
    height: 1px;
    width: 200%;
    left: -50%;
    transform-origin: center;
    box-shadow: 0 0 15px rgba(85, 112, 255, 0.1);
}

.l-1 { top: 20%; transform: rotate(-15deg); animation: line-drift 20s infinite alternate ease-in-out; }
.l-2 { top: 40%; transform: rotate(10deg); animation: line-drift 25s infinite alternate-reverse ease-in-out; }
.l-3 { top: 60%; transform: rotate(-5deg); animation: line-drift 30s infinite alternate ease-in-out; }
.l-4 { top: 80%; transform: rotate(20deg); animation: line-drift 22s infinite alternate-reverse ease-in-out; }
.l-5 { top: 10%; transform: rotate(35deg); animation: line-drift 28s infinite alternate ease-in-out; }

@keyframes line-drift {
    0% { transform: rotate(var(--rot, 0deg)) translateY(0); }
    100% { transform: rotate(var(--rot, 0deg)) translateY(20px); }
}

/* Specific rotations for animation to use */
.l-1 { --rot: -15deg; }
.l-2 { --rot: 10deg; }
.l-3 { --rot: -5deg; }
.l-4 { --rot: 20deg; }
.l-5 { --rot: 35deg; }

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3.5rem 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    margin: auto;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    animation: card-entry 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes card-entry {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    z-index: 1;
}

.login-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.mb-5 {
    margin-bottom: 2rem !important;
}

.login-logo {
    max-height: 42px;
    width: auto;
    margin: 0 auto 2rem;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.login-title {
    display: none;
}

.login-subtitle-ai {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-family: sans-serif;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mb-3 {
    display: block !important;
    margin-bottom: 1.25rem !important;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
    padding-left: 0.125rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.07);
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background-color: #5570ff;
    border: none;
    border-radius: 1rem;
    margin-top: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 20px rgba(85, 112, 255, 0.4);
}

.btn-login:hover {
    background-color: #4e67ff;
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(85, 112, 255, 0.7);
}


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

.alert {
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: none;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-info {
    background-color: #f0f9ff;
    color: #075985;
}

@media (max-width: 576px) {
    body {
        padding: 1rem;
    }

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

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

    .login-subtitle {
        margin-bottom: 2rem;
    }

    .btn-login {
        margin-top: 1.5rem;
    }
}
