:root {
    --primary: #000000;
    --secondary: #333333;
    --light: #f5f5f5;
    --accent: #444444;
    --danger: #ff3333;
    --success: #33cc33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    overflow: hidden;
    position: relative;
}

.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 50%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation: float 15s infinite ease-in-out;
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -200px;
    animation: float 18s infinite ease-in-out reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 10%;
    animation: float 12s infinite ease-in-out 2s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 15%;
    animation: float 10s infinite ease-in-out 1s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, 15px) rotate(5deg); }
    50% { transform: translate(5px, -10px) rotate(10deg); }
    75% { transform: translate(-10px, 5px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.login-container {
    width: 400px;
    max-width: 90%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    background-color: var(--primary);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.input-icon {
    position: absolute;
    top: 40px;
    right: 12px;
    color: #888;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    user-select: none;
}

.checkbox-group input {
    margin-right: 8px;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--secondary);
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none; /* Evita que reciba clics */
}

.login-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.login-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #ffeeee;
    color: var(--danger);
    border-left: 4px solid var(--danger);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-strength {
    height: 5px;
    border-radius: 3px;
    margin-top: 8px;
    transition: all 0.3s;
    background-color: #ddd;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.btn-icon {
    margin-right: 8px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 500px) {
    .login-container {
        width: 95%;
        max-width: 95%;
    }
    
    .login-form {
        padding: 20px;
    }
}