body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: #2c3e50;
    padding: 30px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

.login-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}

.login-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.login-logo:hover {
    transform: scale(1.05);
}

.header-separator {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 20px auto 15px auto;
    position: relative;
}

.header-separator::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.login-title {
    color: white;
    font-size: 24px;
    font-weight: 300;
    margin: 5px 0 0 0;
    letter-spacing: 1px;
}

.login-form {
    padding: 40px 30px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.login-form-group {
    margin-bottom: 25px;
}

.login-form-group label {
    display: block;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    color: #2c3e50;
}

/* Garante que inputs de texto e senha tenham o mesmo estilo */
.login-input[type="password"],
.login-input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    color: #2c3e50;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Força o mesmo estilo para inputs dentro do container de senha */
.password-container input[type="password"],
.password-container input[type="text"] {
    width: 100%;
    padding: 12px 50px 12px 15px !important;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    color: #2c3e50;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.login-input:focus,
.login-input[type="password"]:focus,
.login-input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container .login-input {
    padding-right: 50px; /* Espaço para o ícone do olho */
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7f8c8d;
    font-size: 18px;
    user-select: none;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #34495e;
}

.remember-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
    cursor: pointer;
}

.remember-checkbox label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    font-weight: 500;
}

.forgot-password:hover {
    color: #2980b9;
}

.login-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-button:active::before {
    width: 300px;
    height: 300px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.3);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.error-message.show {
    display: block;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

.login-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    color: #666;
    font-size: 13px;
}

/* Estilos do texto do botão com transição suave */
#buttonText {
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

#buttonText.hiding {
    opacity: 0;
    transform: scale(0.8);
}

/* Loader aprimorado */
.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite, pulse 1.5s ease-in-out infinite;
    position: absolute;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.loader.show {
    display: inline-block;
    opacity: 1;
    transform: scale(1);
}

/* Melhora a aparência do botão quando está carregando */
.login-button:disabled {
    cursor: not-allowed;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.login-button:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.login-button:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}

.login-button:disabled::before {
    display: none;
}

@media (max-width: 480px) {
    .login-container {
        max-width: 360px;
        margin: 0 20px;
    }

    .login-form {
        padding: 40px 24px;
    }

    .login-header {
        padding: 32px 20px;
    }

    .login-logos {
        padding: 0 10px;
    }

    .header-separator {
        width: 60px;
        margin: 15px auto 12px auto;
    }

    .login-logo {
        height: 50px;
    }

    .login-title {
        font-size: 22px;
    }
}