:root {
    --login-bg-start: #0a1f33;
    --login-bg-end: #020617;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.62);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --accent: #00d2ff;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 24px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at center, var(--login-bg-start) 0%, var(--login-bg-end) 100%);
}

body::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    z-index: -1;
}

.bubbles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bubble {
    position: absolute;
    bottom: -160px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 35%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    animation-name: rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.4;
    }
    80% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-130vh) rotate(360deg);
        opacity: 0;
    }
}

.bubble:nth-child(1) {
    left: 2%;
    width: 44px;
    height: 44px;
    animation-duration: 8s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 8%;
    width: 86px;
    height: 86px;
    animation-duration: 12s;
    animation-delay: 1.8s;
}

.bubble:nth-child(3) {
    left: 15%;
    width: 54px;
    height: 54px;
    animation-duration: 9s;
    animation-delay: 3.6s;
}

.bubble:nth-child(4) {
    left: 21%;
    width: 118px;
    height: 118px;
    animation-duration: 16s;
    animation-delay: 0.7s;
}

.bubble:nth-child(5) {
    left: 29%;
    width: 68px;
    height: 68px;
    animation-duration: 11s;
    animation-delay: 4.1s;
}

.bubble:nth-child(6) {
    left: 36%;
    width: 150px;
    height: 150px;
    animation-duration: 18s;
    animation-delay: 2.4s;
}

.bubble:nth-child(7) {
    left: 43%;
    width: 40px;
    height: 40px;
    animation-duration: 7s;
    animation-delay: 1.2s;
}

.bubble:nth-child(8) {
    left: 50%;
    width: 78px;
    height: 78px;
    animation-duration: 10s;
    animation-delay: 5.2s;
}

.bubble:nth-child(9) {
    left: 57%;
    width: 96px;
    height: 96px;
    animation-duration: 13s;
    animation-delay: 2.9s;
}

.bubble:nth-child(10) {
    left: 64%;
    width: 48px;
    height: 48px;
    animation-duration: 8s;
    animation-delay: 4.8s;
}

.bubble:nth-child(11) {
    left: 71%;
    width: 132px;
    height: 132px;
    animation-duration: 17s;
    animation-delay: 1.5s;
}

.bubble:nth-child(12) {
    left: 78%;
    width: 62px;
    height: 62px;
    animation-duration: 9s;
    animation-delay: 3.1s;
}

.bubble:nth-child(13) {
    left: 84%;
    width: 104px;
    height: 104px;
    animation-duration: 14s;
    animation-delay: 0.9s;
}

.bubble:nth-child(14) {
    left: 92%;
    width: 56px;
    height: 56px;
    animation-duration: 10s;
    animation-delay: 5.7s;
}

.bubble:nth-child(15) {
    left: 98%;
    width: 72px;
    height: 72px;
    animation-duration: 12s;
    animation-delay: 2s;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: min(400px, 100%);
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 152, 255, 0.1);
    position: relative;
    z-index: 10;
}

.login-card::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.login-logo {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.3));
}

.login-title {
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.login-subtitle {
    margin: 0 0 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: 0.3s;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.input-group input:focus {
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

.forgot-pass {
    display: block;
    margin: -10px 0 25px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    transition: 0.2s;
}

.forgot-pass:hover {
    color: #ffffff;
}

.btn-entrar {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: 0.3s;
    background: linear-gradient(135deg, #0062ff 0%, #0041a8 100%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-entrar:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0, 98, 255, 0.4);
    filter: brightness(1.1);
}

.btn-entrar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-entrar .spinner-border {
    margin-right: 8px;
    vertical-align: -2px;
}

.footer-links {
    margin-top: 25px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

#login-error,
.login-card .alert {
    text-align: left;
    background: rgba(220, 53, 69, 0.18);
    color: #ffd5d9;
    border: 1px solid rgba(220, 53, 69, 0.45);
}

.powered {
    position: absolute;
    bottom: 20px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

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

    .powered {
        bottom: 12px;
    }
}
