:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animação de fundo */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px 45px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.login-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.logo {
    width: 280px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    font-size: 20px;
    transition: color 0.3s ease;
    z-index: 1;
}

.form-control {
    width: 100%;
    padding: 18px 22px 18px 52px;
    font-size: 17px;
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
}

.form-control:focus+.input-icon {
    color: var(--primary-color);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 20px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login::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.5s ease;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

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

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    color: #51cf66;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.alert i {
    font-size: 18px;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .login-card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .logo {
        width: 220px;
        height: auto;
        max-height: 100px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .form-control {
        padding: 14px 18px 14px 45px;
        font-size: 15px;
    }

    .input-icon {
        left: 15px;
        font-size: 16px;
    }

    .password-toggle {
        right: 15px;
        font-size: 16px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}